source: trunk/skins/lemill/macros_messages.pt @ 3029

Revision 3029, 2.1 KB checked in by jukka, 10 years ago (diff)

Fixed #1962. Refactored messages that are based on properties of resources (deleted, draft, private, missing language) to come from a single source, getMessages-method and message_macros.pt. It should be easy to expand to add new suggestions.

Line 
1<html xmlns="http://www.w3.org/1999/xhtml"
2      xmlns:tal="http://xml.zope.org/namespaces/tal"
3      xmlns:metal="http://xml.zope.org/namespaces/metal"
4      xmlns:i18n="http://xml.zope.org/namespaces/i18n"
5      i18n:domain="lemill">
6
7  <head><title></title></head>
8
9  <body>
10
11
12<metal:draft define-macro="draft"><div class="portalMessage" i18n:domain="lemill" i18n:translate="text_draft_status">This learning resource is in draft status.</div></metal:draft>
13
14<metal:old_version define-macro="old_version"><div class="portalMessage" i18n:domain="lemill" i18n:translate="text_old_history_version">You are viewing old version from <span i18n:name="thetime" tal:define="old_version_time python: here.getTimeForOldHistory(showOldVersionMessage)"  tal:content="python:DateTime(old_version_time).strftime('%d.%m.%Y %H:%M:%S')">Fri Oct 27 04:49:26 2006</span>.</div>
15</metal:old_version>
16
17
18<metal:deleted define-macro="deleted"><div class="portalMessage" i18n:domain="lemill" tal:define="note_text context/getDeletionReason | None"><span i18n:translate="this_is_deleted">This resource has been deleted.</span> <span tal:condition="note_text" i18n:translate="heading_reason_for_deletion">Reason for deletion: </span><span tal:replace="note_text" /></div></metal:deleted>
19
20
21<metal:private define-macro="private"><div class="portalMessage" i18n:translate="text_resource_is_private">This resource is private and visible only for its author.</div></metal:private>
22
23
24<metal:language_missing define-macro="language_missing">
25    <div class="portalMessage" i18n:domain="lemill" i18n:translate="text_language_missing"> <form tal:attributes="action string:${here_url}/updateLanguage" id="languageUpdater" method="post">
26            This resource doesn't have language defined. If you can, please help others to find it by telling us in which language it is.<br/><select name="lang" id="lang">
27            <option tal:attributes="value la" tal:content="python:context.script_getPrettyLanguage(la)" tal:repeat="la context/getLanguagelist" /></select></form></div>
28<script type="text/javascript">
29$('select#lang').change(function() {this.form.submit();});
30</script>
31
32</metal:language_missing>
33 
34  </body>
35
36</html>
Note: See TracBrowser for help on using the repository browser.