source: trunk/skins/lemill/manage_translations.pt @ 1926

Revision 1926, 4.7 KB checked in by jukka, 12 years ago (diff)

Few i18n:s evaded my attention.

Line 
1<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
2      lang="en"
3      metal:use-macro="here/main_template/macros/master"
4      >
5     
6     
7<metal:block fill-slot="top_slot"
8             tal:define="dummy python:request.set('disable_border',1)" />
9
10<body>
11
12<div metal:fill-slot="main"
13     tal:define="translations python:here.getTranslationsOfOriginal(include_self=False);
14                 mother here/getOriginal;
15                 obj_translations here/getTranslations;
16                ">
17
18      <div id="content" class="documentEditable">
19
20    <div id="region-content">
21      <a name="documentContent"></a>
22
23      <div metal:use-macro="here/global_statusmessage/macros/portal_message">
24        Portal status message
25      </div>
26
27    <h1>LeMill managers: Manage translations</h1>
28
29     <form name="change_mother"
30           method="post"
31           class="enableUnloadProtection"
32           tal:attributes="action string:${here/absolute_url}/manage_form_setTranslationOf"
33           action="manage_form_setTranslationOf">
34
35        <h2>
36            This '<span tal:replace="here/Title" />' (<span tal:replace="here/id" />) <br/>is a translation of...
37        </h2>
38        <p><input type="text" tal:attributes="value mother/id | string:" name="mother_field" /> <a href="" tal:condition="mother" tal:attributes="href string:${mother/absolute_url}/manage_translations" >link</a></p>
39
40      <div class="formControls">
41           
42           <input class="context"
43                  type="submit"
44                  name="form.button.set_mother"
45                  value="Change source of translation"
46                 
47                  tal:attributes="tabindex tabindex/next"
48                  />
49       </div>
50
51
52     </form>
53
54        <br/>
55
56        <h2>The following are translations of this resource:</h2>
57
58        <tal:cond condition="obj_translations">
59     <form name="assign_translations"
60           method="post"
61           class="enableUnloadProtection"
62           tal:attributes="action string:${here/absolute_url}/manage_form_setTranslations"
63           action="manage_form_setTranslations">
64
65
66        <ul tal:repeat="trans obj_translations">
67        <li  tal:define="index repeat/trans/index" >
68        <input type="text" tal:attributes="value trans/id; name python:'obj_translation%s' % index" />
69        <a href="" tal:content="trans/title" tal:attributes="href string:${trans/absolute_url}/manage_translations" />       
70        <input type="hidden" tal:attributes="value trans/id; name python:'obj_translation_old%s' % index" />
71        (<span tal:replace="python:here.script_getPrettyLanguage(trans.Language())" />)
72        </li>
73        </ul>
74
75
76
77      <div class="formControls">
78           <input class="context"
79                  type="submit"
80                  name="form.button.assign_translations"
81                  value="Change translations"
82                  tal:attributes="tabindex tabindex/next"
83                  />
84      </div>
85
86        <p>You can remove translations by setting the field blank or change translation by writing other objects id in place.</p>
87        <p tal:condition="mother"><b>This is a translation of resource <span tal:replace="mother/id" />, but seems to have translations of its own. These translations should also point to <span tal:replace="mother/id" />.</b></p>
88
89
90        </form>
91        </tal:cond>
92   <tal:cond condition="not:obj_translations">
93    <ul><li>No translations based on this resource</li></ul>
94   </tal:cond>
95
96    <br/><br/>
97
98     <form name="add_translations"
99           method="post"
100           class="enableUnloadProtection"
101           tal:attributes="action string:${here/absolute_url}/manage_form_addTranslation"
102           action="manage_form_addTranslation">
103
104        <p><input type="text" value="" name="new_translation" />
105        <input class="context"
106                  type="submit"
107                  name="form.button.add_translation"
108                  value="Add this as translation"
109                  tal:attributes="tabindex tabindex/next"
110                  />
111        </p>
112
113        <tal:cond condition="python:translations and mother">
114        <h>This resource belongs to a group of translations:</h2>
115
116        <legend>Source resource '<a href="" tal:content="mother/id" tal:attributes="href string:${mother/absolute_url}/manage_translations" />' (<span  tal:content="python:here.script_getPrettyLanguage(mother.Language())" />) has following translations:</legend>
117
118        <ul tal:repeat="trans translations">
119        <li><span tal:replace="trans/id" /> <a href="" tal:content="trans/title" tal:attributes="href string:${trans/absolute_url}/manage_translations" /> (<span tal:replace="python:here.script_getPrettyLanguage(trans.Language())" />)</li>
120        </ul>
121
122        </tal:cond>
123
124     </form>
125
126
127    </div>
128  </div>
129</div>
130
131</body>
132</html>
133
134
Note: See TracBrowser for help on using the repository browser.