baseline
[omp.pkp.sfu.ca.git] / plugins / generic / translator / locale.tpl
blobc9eede85599e205a277de2c09c1aa36d6adb76bf
1 {**
2  * locale.tpl
3  *
4  * Copyright (c) 2003-2008 John Willinsky
5  * Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
6  *
7  * List of component locales to edit for a particular locale
8  *
9  * $Id: locale.tpl,v 1.1.1.1 2008/10/20 21:27:09 tylerl Exp $
10  *}
11 {strip}
12 {translate|assign:"pageTitleTranslated" key="plugins.generic.translator.locale" locale=$locale}
13 {include file="common/header.tpl"}
14 {/strip}
16 <ul class="menu">
17         <li class="current"><a href="{url op="edit" path=$locale}">{translate key="common.edit"}</a></li>
18         <li><a href="{url op="check" path=$locale}">{translate key="plugins.generic.translator.check"}</a></li>
19 </ul>
21 <p>{translate key="plugins.generic.translator.localeDescription"}</p>
23 <a name="localeFiles"></a>
25 <h3>{translate key="plugins.generic.translator.localeFiles"}</h3>
26 <table class="listing" width="100%">
27         <tr><td colspan="2" class="headseparator">&nbsp;</td></tr>
28         <tr class="heading" valign="bottom">
29                 <td width="85%">{translate key="plugins.generic.translator.file.filename"}</td>
30                 <td width="15%">{translate key="common.action"}</td>
31         </tr>
32         <tr><td colspan="2" class="headseparator">&nbsp;</td></tr>
34 {assign var=needsAsteriskNote value=0}
35 {iterate from=localeFiles item=filename}
36 {assign var=filenameEscaped value=$filename|escape:"url"|escape:"url"}
37 {if file_exists($filename)}
38         {assign var=fileExists value=1}
39 {else}
40         {assign var=fileExists value=0}
41         {assign var=needsAsteriskNote value=1}
42 {/if}
43         <tr valign="top">
44                 <td>
45                         {if $fileExists}
46                                 <a href="{url op="downloadLocaleFile" path=$locale|to_array:$filenameEscaped}">{$filename|escape}</a>
47                         {else}
48                                 {$filename|escape}&nbsp;*
49                         {/if}
50                 </td>
51                 <td>
52                         {if $fileExists}
53                                 <a href="{url op="editLocaleFile" path=$locale|to_array:$filenameEscaped}" class="action">{translate key="common.edit"}</a>
54                         {else}
55                                 {url|assign:"redirectUrl" op="editLocaleFile" path=$locale|to_array:$filenameEscaped}
56                                 <a href="{url op="createFile" path=$locale|to_array:$filenameEscaped redirectUrl=$redirectUrl}" class="action" onclick='return confirm("{translate|escape:"javascript" key="plugins.generic.translator.file.confirmCreate" filename=$filename}")'>{translate key="common.create"}</a>
57                         {/if}
58                 </td>
59         </tr>
60         <tr>
61                 <td colspan="2" class="{if $localeFiles->eof()}end{/if}separator">&nbsp;</td>
62         </tr>
63 {/iterate}
65 {if $localeFiles->wasEmpty()}
66         <tr>
67                 <td colspan="2" class="nodata">{translate key="common.none"}</td>
68         </tr>
69         <tr>
70                 <td colspan="2" class="endseparator">&nbsp;</td>
71         </tr>
72 {else}
73         <tr>
74                 <td align="left">{page_info iterator=$localeFiles}</td>
75                 <td align="right">{page_links anchor="localeFiles" name="localeFiles" iterator=$localeFiles}</td>
76         </tr>
77 {/if}
79 </table>
81 {if $needsAsteriskNote}
82         <span class="instruct">{translate key="plugins.generic.translator.file.doesNotExistNote"}</span>
83 {/if}
85 <a name="miscFiles"></a>
87 <h3>{translate key="plugins.generic.translator.miscFiles"}</h3>
88 <table class="listing" width="100%">
89         <tr><td colspan="2" class="headseparator">&nbsp;</td></tr>
90         <tr class="heading" valign="bottom">
91                 <td width="85%">{translate key="plugins.generic.translator.file.filename"}</td>
92                 <td width="15%">{translate key="common.action"}</td>
93         </tr>
94         <tr><td colspan="2" class="headseparator">&nbsp;</td></tr>
96 {assign var=needsAsteriskNote value=0}
97 {iterate from=miscFiles item=filename}
98 {assign var=filenameEscaped value=$filename|escape:"url"|escape:"url"}
99 {if file_exists($filename)}
100         {assign var=fileExists value=1}
101 {else}
102         {assign var=fileExists value=0}
103         {assign var=needsAsteriskNote value=1}
104 {/if}
105         <tr valign="top">
106                 <td>
107                         {if $fileExists}
108                                 <a href="{url op="downloadLocaleFile" path=$locale|to_array:$filenameEscaped}">{$filename|escape}</a>
109                         {else}
110                                 {$filename|escape}&nbsp;*
111                         {/if}
112                         </td>
113                 <td>
114                         {if $fileExists}
115                                 <a href="{url op="editMiscFile" path=$locale|to_array:$filenameEscaped}" class="action">{translate key="common.edit"}</a>
116                         {else}
117                                 {url|assign:"redirectUrl" op="editMiscFile" path=$locale|to_array:$filenameEscaped}
118                                 <a href="{url op="createFile" path=$locale|to_array:$filenameEscaped redirectUrl=$redirectUrl}" class="action" onclick='return confirm("{translate|escape:"javascript" key="plugins.generic.translator.file.confirmCreate" filename=$filename}")'>{translate key="common.create"}</a>
119                         {/if}
120                 </td>
121         </tr>
122         <tr>
123                 <td colspan="2" class="{if $miscFiles->eof()}end{/if}separator">&nbsp;</td>
124         </tr>
125 {/iterate}
127 {if $miscFiles->wasEmpty()}
128         <tr>
129                 <td colspan="2" class="nodata">{translate key="common.none"}</td>
130         </tr>
131         <tr>
132                 <td colspan="2" class="endseparator">&nbsp;</td>
133         </tr>
134 {else}
135         <tr>
136                 <td align="left">{page_info iterator=$miscFiles}</td>
137                 <td align="right">{page_links anchor="miscFiles" name="miscFiles" iterator=$miscFiles}</td>
138         </tr>
139 {/if}
141 </table>
143 {if $needsAsteriskNote}
144         <span class="instruct">{translate key="plugins.generic.translator.file.doesNotExistNote"}</span>
145 {/if}
147 <a name="emails"></a>
149 <h3>{translate key="plugins.generic.translator.emails"}</h3>
150 <table class="listing" width="100%">
151         <tr><td colspan="3" class="headseparator">&nbsp;</td></tr>
152         <tr class="heading" valign="bottom">
153                 <td width="35%">{translate key="manager.emails.emailKey"}</td>
154                 <td width="50%">{translate key="plugins.generic.translator.file.filename"}</td>
155                 <td width="15%">{translate key="common.action"}</td>
156         </tr>
157         <tr><td colspan="3" class="headseparator">&nbsp;</td></tr>
159 {iterate from=emails key=emailKey item=email}
160         <tr valign="top">
161                 <td>{$emailKey|escape}</td>
162                 <td>{$email.subject|escape}</td>
163                 <td>
164                         <a href="{url op="editEmail" path=$locale|to_array:$emailKey}" class="action">{translate key="common.edit"}</a>&nbsp;|&nbsp;<a href="{url op="deleteEmail" path=$locale|to_array:$emailKey}" class="action" onclick="return confirm('{translate|escape:"jsparam" key="plugins.generic.translator.confirmDelete"}')">{translate key="common.delete"}</a>
165                 </td>
166         </tr>
167         <tr>
168                 <td colspan="3" class="{if $emails->eof()}end{/if}separator">&nbsp;</td>
169         </tr>
170 {/iterate}
172 {if $emails->wasEmpty()}
173         <tr>
174                 <td colspan="3" class="nodata">{translate key="common.none"}</td>
175         </tr>
176         <tr>
177                 <td colspan="3" class="endseparator">&nbsp;</td>
178         </tr>
179 {else}
180         <tr>
181                 <td align="left">{page_info iterator=$emails}</td>
182                 <td colspan="2" align="right">{page_links anchor="emails" name="emails" iterator=$emails}</td>
183         </tr>
184 {/if}
186 </table>
188 {include file="common/footer.tpl"}