(no comment)
[my-sputnik-wiki.git] / sputnik / templates.lua
blob6d0093c0b1e2835249f89fafbb68d47f24090635
2 fields = ""
3 title = "Templates"
4 category = ""
5 actions = ""
6 config = ""
7 markup_module = ""
8 templates = ""
9 translations = ""
10 prototype = "@Lua_Config"
11 permissions = ""
12 html_main = ""
13 html_head = ""
14 html_menu = ""
15 html_logo = ""
16 html_search = ""
17 html_page = [=[ <div class="title">$if_title_icon[[
18 <img src="$title_icon" class="title_icon" alt="type icon ($title_icon)"/>]]
19 <a name="title" title="_(CURRENT_PAGE)" $show_link >$title</a> $if_old_version[[<span class="from_version">($version)</span>]]
20 </div>
21 <div id="breadcrumbs">
22 <ul>
23 $do_breadcrumb[[
24 <li class="first"><a $link>$title</a></li>]],[[
25 <li class="follow"><a $link>â–¹&nbsp; $title</a></li>]]
26 </ul>
27 <span class="toolbar">
28 $do_toolbar[[
29 <a $link>$title</a>
30 ]]
31 </span>
32 </div>
34 <div class='content'>
35 $do_messages[[<p class="$class">$message</p>]]
37 $content
38 </div>]=]
39 html_content = ""
40 html_body = ""
41 html_footer = ""
42 html_header = ""
43 html_sidebar = ""
44 html_meta_keywords= ""
45 html_meta_description= ""
46 redirect_destination= ""
47 xssfilter_allowed_tags= ""
48 http_cache_control= ""
49 http_expires = ""
50 content = [====[--- this is the template that generates the outer tags of the page ---
52 TRANSLATIONS = "Translations:Main"
54 --------------------------------------------------------------------------------
55 ------- BASIC TEMPLATES --------------------------------------------------------
56 --------------------------------------------------------------------------------
57 MAIN = [===[
58 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
59 <HTML><HEAD><TITLE>lua-users wiki: $title</TITLE>
60 <LINK TYPE="text/css" REL="stylesheet" HREF="http://lua-users.org/styles/main.css">
61 <STYLE TYPE="text/css" REL="stylesheet">
62 input.hidden, div.honey {
63 display: none;
65 div.advanced_field {
66 display: none;
68 div.advanced_field input, div.advanced_field textarea {
69 display: block;
71 div.advanced_field {
72 margin-top: .5em;
74 div#toggle_advanced_fields {
75 display: inline;
76 font-size: smaller;
78 </STYLE>
79 </HEAD>
80 <BODY ><table width="100%" border="0"> <tr><td align=left width="100%"><h1><a href="]===]..NICE_URL..[===[_search&amp;q=$title&amp;Search=Search" title="List pages referring to $title">$title</a></h1></td><td align=right>
81 <table cellpadding="0" cellspacing="0" border="0" width="1%">
82 <tbody>
83 <tr>
84 <td><a href="/">
85 <img src="http://lua-users.org/images/nav-logo.png" alt="lua-users home" width="177" height="40" border="0"></a></td>
87 </tr>
88 <tr>
89 <td>
90 <table cellpadding="0" cellspacing="0" border="0" width="100%">
91 <tbody>
92 <tr>
93 <td><img src="http://lua-users.org/images/nav-elbow.png" alt="" width="48" height="40"></td>
94 <td nowrap valign="middle" width="100%">
95 <a href="$nice_url" class="nav">wiki</a></td>
97 </tr>
98 </tbody>
99 </table>
100 </td>
101 </tr>
102 </tbody>
103 </table>
104 </td></tr> </table>
106 $content
108 <hr>
109 <a href="$nice_url/FindPage" >FindPage</a> &middot; <a href="$nice_url/RecentChanges">RecentChanges</a>
110 <a $edit_link>edit</a> &middot; <a $history_link>history</a> &middot;
111 $if_logged_in[[ logged as $user (<a $logout_link>logout</a>)]]
112 $if_not_logged_in[[<a $login_link>login</a>]]
114 </body>
115 </html>
116 ]===]
121 LOGGED_OUT = [===[_(YOU_ARE_NOW_LOGGED_OUT)]===]
125 --------------------------------------------------------------------------------
126 ------- HISTORY, ETC -----------------------------------------------------------
127 --------------------------------------------------------------------------------
129 DATE_SELECTOR = [===[
130 <div id="date_selector" style="border:1px solid #bbb; background: #eee8aa; padding: 5 5 5 5">
131 _(CHANGES_BY_DATE) ($current_month):
132 <span class="history_dates">
133 $do_dates[=[$if_current_date[[$date]]|[[<a $date_link>$date</a>]]
134 ]=]
135 </span>
136 <br/>
137 _(CHOOSE_ANOTHER_MONTH) ($current_year) :
138 <span class="history_months">
139 $do_months[=[$if_current_month[[$month]]$if_other_month[[<a $month_link>$month</a>]]
140 ]=]
141 </span>
142 <br/>
143 </div> <!-- end of "date_selector" div-->
144 <br/>
145 ]===]
147 HISTORY = [===[
148 <form action="$base_url">
149 <input type="hidden" class="hidden" name="p" value="$node_name.diff"/>
150 <input type="submit" value="_(DIFF_SELECTED_VERSIONS)"/>
151 <table width="100%">
152 <tbody>
153 $do_revisions[==[
154 <tr>
155 $if_new_date[=[
156 <tr><td style="border-right: 0; border-left: 0" colspan="3"><h2>$date</h2></td></tr>
157 ]=]
158 $if_edit[=[
159 <td width="5px" $if_minor[[bgcolor="#f0f0f0"]]>
160 <input class="diff_radio" type="radio" value="$version" name="other"/>
161 </td>
162 <td width="5px" $if_minor[[bgcolor="#f0f0f0"]]>
163 <input class="diff_radio" type="radio" value="$version" name="version"/>
164 </td>
165 <td width="400px" $if_minor[[bgcolor="#f0f0f0"]]>
166 _(AUTHOR_SAVED_VERSION) $if_summary[[<ul><li>$summary</li></ul>]]
167 </td>
168 ]=]
169 </tr>
170 ]==]
171 </tbody>
172 </table>
173 </form>
174 ]===]
177 COMPLETE_HISTORY = [===[
178 <table width="100%">
179 <tbody>
180 $do_revisions[==[
181 $if_new_date[=[
182 <tr><td style="border-right: 0; border-left: 0" colspan="3"><h2>$date</h2></td></tr>
183 ]=]
184 $if_edit[=[
185 <tr>
186 <td width="50px" $if_stale[[style="display:none"]] rowspan="$row_span">
187 &nbsp;<a $latest_link>$title</a>
188 </td>
189 <td width="300px" $if_minor[[bgcolor="#f0f0f0"]] style="border-right: 0px">
190 _(AUTHOR_SAVED_VERSION)
191 $if_summary[[<p>$summary</p>]]
192 </td>
193 <td width="10%" $if_minor[[bgcolor="#f0f0f0"]] style="border-left: 0px" align="right">
194 <a $diff_link title="_(DIFF)"><img alt="_(DIFF)" src="$diff_icon"/></a>
195 <a $history_link title="_(HISTORY)"><img alt="_(HISTORY)" src="$history_icon"/></a>
196 </td>
197 </tr>
198 ]=]
199 ]==]
200 </tbody>
201 </table>
202 ]===]
204 DIFF = [===[
205 <ul>
206 <li><a $link1><ins class='diffmod'>$version1</ins></a> _(BY_AUTHOR1)</li>
207 $if_version2_exists[[<li><a $link2><del class='diffmod'>$version2</del></a> _(BY_AUTHOR2)</li>]]
208 </ul>
209 $diff
210 ]===]
212 RSS = [===[<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
213 <channel>
214 <title>$title</title>
215 <description/>
216 <link>$channel_url</link>
217 $items[==[
218 <item>
219 <link>$link</link>
220 <title>$title</title>
221 <guid isPermaLink="$ispermalink">$guid</guid>
222 <pubDate>$pub_date</pubDate>
223 <dc:creator>$author</dc:creator>
224 <description>$summary</description>
225 </item>]==]
226 </channel>
227 </rss>
228 ]===]
230 RSS_SUMMARY = [===[
231 $if_summary_exists[[$summary]]
232 $if_no_summary[[_(NO_EDIT_SUMMARY)]]
233 <hr/>
234 <a href="$history_url">_(HISTORY)</a>
235 <a href="$diff_url">_(SHOW_CHANGES_SINCE_PREVIOUS)</a>]===]
237 LIST_OF_ALL_PAGES = [===[
238 $do_nodes[[<a href="$url">$name</a><br/>]]
239 ]===]
242 SITEMAP_XML = [===[<?xml version="1.0" encoding="UTF-8"?>
243 <urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
244 xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"
245 xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
246 $do_urls[[<url>
247 <loc>$url</loc>
248 <lastmod>$lastmod</lastmod>
249 <changefreq>$changefreq</changefreq>
250 <priority>$priority</priority>
251 </url>]]
252 </urlset>
253 ]===]
255 --------------------------------------------------------------------------------
256 ------- MISCELLANEOUS ----------------------------------------------------------
257 --------------------------------------------------------------------------------
259 EDIT = [===[
261 <form class="edit" method="post" enctype="multipart/form-data" action="$action_url">
262 $captcha
263 <input class="hidden" type="hidden" name="p" value="$node_name.post"/>
264 <input class="hidden" type="hidden" name="post_token" value="$post_token"/>
265 <input class="hidden" type="hidden" name="post_timestamp" value="$post_timestamp"/>
266 <input class="hidden" type="hidden" name="post_fields" value="$post_fields"/>
267 $if_preview[[
268 <h2>_(PREVIEWING_UNSAVED_CHANGES)</h2>
269 <div class="preview">$preview</div>
270 <a href="#new_page_content_header" class="button">_(CHANGE)</a>
271 <div class="submit">
272 <button class="positive" type="submit" name="action_save" accesskey="s">_(SAVE)</button>
273 <button class="negative" type="submit" name="action_show" accesskey="c">_(CANCEL)</button>
274 </div>
276 $html_for_fields
277 <div class="submit">
278 <button class="positive" type="submit" accesskey="s" name="action_save">_(SAVE)</button>
279 <button class="positive" type="submit" accesskey="s" name="action_preview">_(PREVIEW)</button>
280 <button class="negative" type="submit" accesskey="s" name="action_cancel">_(CANCEL)</button>
281 </div>
282 </form>
283 ]===]
285 EDIT_FORM_HEADER = [[<a name="$anchor"></a><h2>$label</h2>]]
286 EDIT_FORM_NOTE = [[<h3>$label</h3>]]
287 EDIT_FORM_LABEL = [[<label>$label</label>]]
288 EDIT_FORM_INLINE_LABEL = [[<label class="inline">$label</label>]]
289 EDIT_FORM_FILE = [[<input type="file" value="$value" name="$name"/>]]
290 EDIT_FORM_HONEYPOT = [[<input type="text" value="$value" name="$name"/>]]
291 EDIT_FORM_TEXT_FIELD = [[<input type="text" value="$value" name="$name" class="textfield"/>]]
292 EDIT_FORM_HIDDEN = [[<input type="hidden" class="hidden" value="$value" name="$name"/>]]
293 EDIT_FORM_READONLY_TEXT = [[<input type="text" value="$value" name="$name" class="readonly textfield" readonly="readonly" />]]
294 EDIT_FORM_PASSWORD = [[<input type="password" value="$value" name="$name" size="20" class="textfield"></input>]]
295 EDIT_FORM_TEXTAREA = [[<textarea class="$class" name="$name" cols="80" rows="$rows">$value</textarea>]]
296 EDIT_FORM_EDITOR = [[<textarea class="$class" name="$name" cols="80" rows="$rows">$value</textarea>]]
297 EDIT_FORM_BIG_TEXTAREA = [[<textarea class="$class" name="$name" id="main_text_area" cols="80" rows="$rows">$value</textarea><br/>
298 <a href="#" onclick="expandTextArea(); return false;">expand</a>]]
299 EDIT_FORM_CHECKBOX = [[<input class="checkbox" style="border:1px solid black"
300 type="checkbox" name="$name" value="yes"
301 $if_checked[=[checked="checked"]=] /><br/>]]
302 EDIT_FORM_CHECKBOX_TEXT = [[<input class="checkbox" style="border:1px solid black"
303 type="checkbox" name="$name" value="yes"
304 $if_checked[=[checked="checked"]=] />$text<br/>]]
305 EDIT_FORM_SELECT = [[<select name="$name" tabindex="$tab_index">
306 $do_options[===[<option value="$value" $if_selected[=[selected="yes"]=]>$display</option>]===]
307 </select>]]
308 EDIT_FORM_SHOW_ADVANCED = [[<a id="more_fields" href="#" class="local" onclick="toggleElements('advanced_field')">
309 <div id="toggle_advanced_fields">_(SHOW_ADVANCED_OPTIONS)</div></a>]]
310 EDIT_FORM_DIV_START = [=[$do_collapse[[<h2 id="trigger_$id" class="ctrigger $state">$label</h2>]]<div id="$id" class="$class">]=]
311 EDIT_FORM_DIV_END = [[</div>]]
313 LOGIN_FORM = [===[
315 <form method="post" action="$action_url">
316 <input class="hidden" type="hidden" name="post_token" value="$post_token"/>
317 <input class="hidden" type="hidden" name="post_timestamp" value="$post_timestamp"/>
318 <input class="hidden" type="hidden" name="post_fields" value="$post_fields"/>
319 $html_for_fields
320 <button class="submit" type="submit" accesskey="c" name="action_login">_(LOGIN)</button>
321 </form>
323 ]===]
324 --------------------------------------------------------------------------------
325 ------- DEALING WITH LUA CODE --------------------------------------------------
326 --------------------------------------------------------------------------------
328 LUA_CODE = [===[
329 $if_ok[[<font color="green">_(THIS_LUA_CODE_PARSES_CORRECTLY)</font>]]
330 $if_errors[[
331 <font color='red'>
332 <p><b>_(THIS_LUA_CODE_HAS_PROBLEMS)</b></p>
333 <code> $errors </code>
334 </font>
337 <div width="100%">
338 <style>
339 table.code {
340 width: 100%;
341 border-collapse: collapse
342 background: red;
343 border-style: none;
345 table.body {
346 background: yellow;
348 table.code tbody th {
349 font-size: 90%;
351 table.code tbody th a{
352 text-decoration: none;
353 color: white;
355 table.code th.lineno {
356 width: 4em;
358 table.code th.bad {
359 background: red;
361 table.code tbody td {
362 border: none;
364 table.code tbody td code {
365 background: white;
367 table.code tbody td code.bad{
368 background: yellow;
370 </style>
371 <table class="code">
372 <tbody>
373 $do_lines[[
374 <tr>
375 <th id="L$i" class="$class"><a href="#L$i">$i</a></th>
376 <td><code class="$class">$line</code></td>
377 </tr>
379 </tbody>
380 </table>
381 </div>
382 ]===]
384 ACTION_NOT_FOUND = [===[
385 <div class="error_message">
386 <p>_(PAGE_DOES_NOT_SUPPORT_ACTION)</p>
387 $if_custom_actions[[
388 <p>_(THIS_PAGE_DEFINED_THE_FOLLOWING_ACTIONS)</p>
389 <pre><code>$actions</code></pre>
391 </div>
392 ]===]
394 REGISTRATION = [===[
395 <h3>Create new account</h3>
396 <form class="register" method="post" enctype="multipart/form-data" action="$action_url">
397 <input class="hidden" type="hidden" name="p" value="$node_name.$action"/>
398 <input class="hidden" type="hidden" name="post_token" value="$post_token"/>
399 <input class="hidden" type="hidden" name="post_timestamp" value="$post_timestamp"/>
400 <input class="hidden" type="hidden" name="post_fields" value="$post_fields"/>
401 $html_for_fields
402 $captcha
403 <div class="submit">
404 <button class="submit positive" type="submit" accesskey="s" name="action_submit">Register</button>
405 </div>
406 </form>
407 ]===]
409 VERSION = [=[
410 <h2>Installer Version</h2>
412 $installer
414 <h2>Specific Rocks</h2>
416 <table>
417 $rocks[[
418 <tr>
419 <th>$rock</th>
420 <td>$version</td>
421 </tr>
423 </table>
424 ]=]
426 ]====]
427 edit_ui = ""
428 admin_edit_ui = ""
429 breadcrumb = ""
430 save_hook = ""
431 search_form = [[