| 1 |
--- this is the template that generates the outer tags of the page --- |
| 2 |
|
| 3 |
TRANSLATIONS = "Translations:Main" |
| 4 |
|
| 5 |
-------------------------------------------------------------------------------- |
| 6 |
------- BASIC TEMPLATES -------------------------------------------------------- |
| 7 |
-------------------------------------------------------------------------------- |
| 8 |
|
| 9 |
MAIN = [===[ |
| 10 |
<?xml version="1.0" encoding="UTF-8"?> |
| 11 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" |
| 12 |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
| 13 |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" |
| 14 |
lang="en"> |
| 15 |
<head> |
| 16 |
<meta http-equiv="Content-Type" |
| 17 |
content="text/html; charset=UTF-8" /> |
| 18 |
$if_no_index[[<meta name="ROBOTS" content="NOINDEX, NOFOLLOW"/>]] |
| 19 |
<title>$site_title: $title</title> |
| 20 |
$do_stylesheets[[<link type="text/css" rel="stylesheet" href="$url" /> |
| 21 |
]] |
| 22 |
<link rel="alternate" type="application/rss+xml" title="_(RECENT_EDITS_TO_SITE)" $site_rss_link/> |
| 23 |
<link rel="alternate" type="application/rss+xml" title="_(RECENT_EDITS_TO_node)" $node_rss_link/> |
| 24 |
<link rel="icon" href="/favicon.ico" type="image/x-icon" /> |
| 25 |
</head> |
| 26 |
|
| 27 |
<body> |
| 28 |
<div id='doc2' class='yui-t4'> |
| 29 |
<div id="login"> <!--login and search (in the upper right corner) --> |
| 30 |
$if_search[[<form action="$base_url" style="margin-right: 0px; padding-right: 0px;"> |
| 31 |
<input class="hidden" type="hidden" name="p" value="_search"/> |
| 32 |
<input class="search_box" type="text" name="q" size="16" value="$search_box_content"/> |
| 33 |
<input class="small_submit" type="submit" name="Search" value="_(SEARCH)" |
| 34 |
title="_(TOOLTIP_FOR_SEARCH)"/></form><br/>]] |
| 35 |
$if_logged_in[[ _(HI_USER) (<a $logout_link>_(LOGOUT)</a>) ]] |
| 36 |
$if_not_logged_in[[<A $login_link>_(LOGIN)</a>]] |
| 37 |
<a $site_rss_link><img src="$icons_url/feed-icon-12x12.png" id="rss_icon" title="RSS for edits to this wiki" alt="Small RSS Icon" /></a> |
| 38 |
</div> |
| 39 |
<!-- |
| 40 |
<div id="logo"> |
| 41 |
<a class="logo" href="$home_page_url"> |
| 42 |
<img src="$logo_url" alt="_(LOGO)" /> |
| 43 |
</a> |
| 44 |
</div> |
| 45 |
--> |
| 46 |
<div id='hd'><!--navigation bar -->$nav_bar</div> |
| 47 |
|
| 48 |
<div id='bd'><!--the body, consisting of the page and the sidebar--> |
| 49 |
<div id="yui-main" $if_old_version[[style='background-color:#ddd;']]><!--this just marks the page as "main" --> |
| 50 |
<div class="yui-b" id='page'> |
| 51 |
|
| 52 |
<span class="toolbar"> |
| 53 |
<a $edit_link >_(EDIT)</a> |
| 54 |
| <a $history_link>_(HISTORY)</a> |
| 55 |
| <a $node_rss_link><img src="$icons_url/feed-icon-12x12.png" |
| 56 |
class="rss_icon" title="RSS for edits to this node" alt="Small RSS Icon" /></a> |
| 57 |
</span> |
| 58 |
|
| 59 |
<h1 class="title"><a $show_link >$title</a> $if_old_version[[<span class="from_version">($version)</span>]]</h1> |
| 60 |
|
| 61 |
<div class='content'>$content</div> |
| 62 |
|
| 63 |
</div> <!-- end of div .yui-b#page --> |
| 64 |
</div> <!-- end of div #yui-main (end of body)--> |
| 65 |
|
| 66 |
<div class="yui-b" id="sidebar">$sidebar</div> |
| 67 |
|
| 68 |
</div> <!-- end of div #bd --> |
| 69 |
_(POWERED_BY_SPUTNIK) |
| 70 |
</div> <!-- end of div.yui-t4#doc2 --> |
| 71 |
<br/> |
| 72 |
</body> |
| 73 |
</html> |
| 74 |
]===] |
| 75 |
|
| 76 |
NAV_BAR = [===[ |
| 77 |
<ul id='menu'> $do_sections[[ |
| 78 |
<li class='$class' id='$id'><a $link>$label</a></li>]] |
| 79 |
</ul> |
| 80 |
<ul id='submenu'> $do_subsections[[ |
| 81 |
<li class='$class'><a $link>$label</a></li>]] |
| 82 |
</ul> |
| 83 |
]===] |
| 84 |
|
| 85 |
LOGGED_OUT = [===[_(YOU_ARE_NOW_LOGGED_OUT)]===] |
| 86 |
|
| 87 |
-------------------------------------------------------------------------------- |
| 88 |
------- HISTORY, ETC ----------------------------------------------------------- |
| 89 |
-------------------------------------------------------------------------------- |
| 90 |
|
| 91 |
DATE_SELECTOR = [===[ |
| 92 |
<div id="date_selector" style="border:1px solid #bbb; background: #eee8aa; padding: 5 5 5 5"> |
| 93 |
_(CHANGES_BY_DATE) ($current_month): |
| 94 |
<span class="history_dates"> |
| 95 |
$do_dates[=[$if_current_date[[$date]]|[[<a $date_link>$date</a>]] |
| 96 |
]=] |
| 97 |
</span> |
| 98 |
<br/> |
| 99 |
_(CHOOSE_ANOTHER_MONTH) ($current_year) : |
| 100 |
<span class="history_months"> |
| 101 |
$do_months[=[$if_current_month[[$month]]$if_other_month[[<a $month_link>$month</a>]] |
| 102 |
]=] |
| 103 |
</span> |
| 104 |
<br/> |
| 105 |
</div> <!-- end of "date_selector" div--> |
| 106 |
<br/> |
| 107 |
]===] |
| 108 |
|
| 109 |
HISTORY = [===[ |
| 110 |
<form action="$base_url"> |
| 111 |
<input type="hidden" class="hidden" name="p" value="$node_name.diff"/> |
| 112 |
<input type="submit" value="_(DIFF_SELECTED_VERSIONS)"/> |
| 113 |
<table width="100%"> |
| 114 |
<tbody> |
| 115 |
$do_revisions[==[ |
| 116 |
<tr> |
| 117 |
<td width="100px" $if_minor[[bgcolor="#f0f0f0"]]> |
| 118 |
<a $version_link>$version</a> |
| 119 |
</td> |
| 120 |
<td width="5px" $if_minor[[bgcolor="#f0f0f0"]]> |
| 121 |
<input class="diff_radio" type="radio" value="$version" name="other"/> |
| 122 |
</td> |
| 123 |
<td width="5px" $if_minor[[bgcolor="#f0f0f0"]]> |
| 124 |
<input class="diff_radio" type="radio" value="$version" name="version"/> |
| 125 |
</td> |
| 126 |
<td width="50%" $if_minor[[bgcolor="#f0f0f0"]]> |
| 127 |
_(BY_AUTHOR) $if_summary[[<ul><li>$summary</li></ul>]] |
| 128 |
</td> |
| 129 |
</tr> |
| 130 |
]==] |
| 131 |
</tbody> |
| 132 |
</table> |
| 133 |
</form> |
| 134 |
]===] |
| 135 |
|
| 136 |
|
| 137 |
COMPLETE_HISTORY = [===[ |
| 138 |
<table width="100%"> |
| 139 |
<tbody> |
| 140 |
$do_revisions[==[ |
| 141 |
<tr> |
| 142 |
<td width="50px" $if_stale[[style="display:none"]] rowspan="$row_span"> |
| 143 |
|
| 144 |
<a $latest_link>$title</a> |
| 145 |
<a class="help" $history_link>_(HISTORY)</a> |
| 146 |
</td> |
| 147 |
<td width="100px" $if_minor[[bgcolor="#f0f0f0"]]> |
| 148 |
<a $version_link>$version</a> |
| 149 |
<a class="help" $diff_link>_(DIFF)</a> |
| 150 |
</td> |
| 151 |
<td width="50%" $if_minor[[bgcolor="#f0f0f0"]]> |
| 152 |
_(BY_AUTHOR) $if_summary[[<ul><li>$summary</li></ul>]] |
| 153 |
</td> |
| 154 |
</tr> |
| 155 |
]==] |
| 156 |
</tbody> |
| 157 |
</table> |
| 158 |
]===] |
| 159 |
|
| 160 |
DIFF = [===[ |
| 161 |
<ul> |
| 162 |
<li><a $link1><ins class='diffmod'>$version1</ins></a>_(BY_AUTHOR1)</li> |
| 163 |
<li><a $link2><del class='diffmod'>$version2</del></a>_(BY_AUTHOR2)</li> |
| 164 |
</ul> |
| 165 |
$diff |
| 166 |
]===] |
| 167 |
|
| 168 |
RSS = [===[<rss version="2.0"> |
| 169 |
<channel> |
| 170 |
<title>$title</title> |
| 171 |
<description/> |
| 172 |
<link>$baseurl</link> |
| 173 |
$items[[ |
| 174 |
<item> |
| 175 |
<link>$link</link> |
| 176 |
<title>$title</title> |
| 177 |
<guid isPermalink="$ispermalink">$guid</guid> |
| 178 |
<description>$summary</description> |
| 179 |
</item>]] |
| 180 |
</channel> |
| 181 |
</rss> |
| 182 |
]===] |
| 183 |
|
| 184 |
LIST_OF_ALL_PAGES = [===[ |
| 185 |
<H2>Regular Nodes</H2> |
| 186 |
$do_regular_nodes[[<a href="$url">$name</a><br/>]] |
| 187 |
|
| 188 |
<H2>Special Nodes</H2> |
| 189 |
$do_special_nodes[[<a href="$url">$name</a><br/>]] |
| 190 |
]===] |
| 191 |
|
| 192 |
|
| 193 |
SITEMAP_XML = [===[<?xml version="1.0" encoding="UTF-8"?> |
| 194 |
<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 195 |
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" |
| 196 |
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> |
| 197 |
$do_urls[[<url> |
| 198 |
<loc>$url</loc> |
| 199 |
<lastmod>$lastmod</lastmod> |
| 200 |
<changefreq>$changefreq</changefreq> |
| 201 |
<priority>$priority</priority> |
| 202 |
</url>]] |
| 203 |
</urlset> |
| 204 |
]===] |
| 205 |
|
| 206 |
-------------------------------------------------------------------------------- |
| 207 |
------- MISCELLANEOUS ---------------------------------------------------------- |
| 208 |
-------------------------------------------------------------------------------- |
| 209 |
|
| 210 |
EDIT = [===[ |
| 211 |
$if_try_again[[ |
| 212 |
<br/><font color='red'><b>$alert</b></font><br/><br/> |
| 213 |
]] |
| 214 |
|
| 215 |
<form method="post" action="$action_url"> |
| 216 |
<script type="text/javascript"> |
| 217 |
function toggleElements(class_name) { |
| 218 |
var re = new RegExp('\\b' + "advanced_field" + '\\b'); |
| 219 |
var els = document.getElementsByTagName("div"); |
| 220 |
for(var i=0,j=els.length; i<j; i++) { |
| 221 |
var elem = els[i]; |
| 222 |
if(re.test(elem.className)) { |
| 223 |
if (elem.style.display=="block") { |
| 224 |
elem.style.display = "none"; |
| 225 |
document.getElementById("toggle_advanced_fields").innerHTML="_(SHOW_ADVANCED_OPTIONS)" |
| 226 |
} else { |
| 227 |
elem.style.display = "block"; |
| 228 |
document.getElementById("toggle_advanced_fields").innerHTML="_(HIDE_ADVANCED_OPTIONS)" |
| 229 |
} |
| 230 |
} |
| 231 |
} |
| 232 |
} |
| 233 |
function expandTextArea() { |
| 234 |
var elem = document.getElementById("main_text_area"); |
| 235 |
elem.style.width="1200px"; |
| 236 |
elem.style.height="800px"; |
| 237 |
elem.style.margin="10px 10px 10px -100px"; |
| 238 |
} |
| 239 |
</script> |
| 240 |
<input class="hidden" type="hidden" name="p" value="$node_name.post"/> |
| 241 |
<input class="hidden" type="hidden" name="post_token" value="$post_token"/> |
| 242 |
<input class="hidden" type="hidden" name="post_timestamp" value="$post_timestamp"/> |
| 243 |
<input class="hidden" type="hidden" name="post_fields" value="$post_fields"/> |
| 244 |
$if_preview[[ |
| 245 |
<h2>_(PREVIEWING_UNSAVED_CHANGES)</h2> |
| 246 |
<div class="preview">$preview</div> |
| 247 |
<a href="#new_page_content_header" class="button">_(CHANGE)</a> |
| 248 |
<input class="submit" type="submit" accesskey="s" name="action_save" value="_(SAVE)"/> |
| 249 |
<input class="submit" type="submit" accesskey="c" name="action_show" value="_(CANCEL)"/> |
| 250 |
<br/> |
| 251 |
]] |
| 252 |
$html_for_fields |
| 253 |
<input class="submit" type="submit" accesskey="s" name="action_save" value="_(SAVE)"/> |
| 254 |
<input class="submit" type="submit" accesskey="p" name="action_preview" value="_(PREVIEW)"/> |
| 255 |
<input class="submit" type="submit" accesskey="c" name="action_show" value="_(CANCEL)"/> |
| 256 |
</form> |
| 257 |
]===] |
| 258 |
|
| 259 |
EDIT_FORM_HEADER = [[<a name="$anchor"></a><h2>$label</h2>]] |
| 260 |
EDIT_FORM_NOTE = [[<h3>$label</h3>]] |
| 261 |
EDIT_FORM_LABEL = [[<label>$label</label>]] |
| 262 |
EDIT_FORM_HONEYPOT = [[<input type="text" value="$value" name="$name"/>]] |
| 263 |
EDIT_FORM_TEXT_FIELD = [[<input type="text" value="$value" name="$name"/>]] |
| 264 |
EDIT_FORM_READONLY_TEXT = [[<input type="text" value="$value" name="$name" class="readonly" readonly="readonly" />]] |
| 265 |
EDIT_FORM_PASSWORD = [[<input type="password" value="$value" name="$name" size="20"></input>]] |
| 266 |
EDIT_FORM_TEXTAREA = [[<textarea class="small" name="$name" rows="$rows">$value</textarea>]] |
| 267 |
EDIT_FORM_BIG_TEXTAREA = [[<textarea name="$name" id="main_text_area" rows="$rows" wrap="off">$value</textarea><br/> |
| 268 |
<a href="#" onclick="expandTextArea(); return false;">expand</a>]] |
| 269 |
EDIT_FORM_CHECKBOX = [[<input class="checkbox" style="border:1px solid black" |
| 270 |
type="checkbox" name="$name" value="yes" |
| 271 |
$if_checked[=[checked="checked"]=] /><br/>]] |
| 272 |
EDIT_FORM_SELECT = [[<select name="$name"> |
| 273 |
$do_options[===[<option $if_selected[=[selected="yes"]=]>$option</option>]===] |
| 274 |
</select>]] |
| 275 |
EDIT_FORM_SHOW_ADVANCED = [[<a id="more_fields" href="#" class="local" onclick="toggleElements('advanced_field')"> |
| 276 |
<div id="toggle_advanced_fields">_(SHOW_ADVANCED_OPTIONS)</div></a>]] |
| 277 |
|
| 278 |
|
| 279 |
LOGIN_FORM = [===[ |
| 280 |
$if_try_again[[ |
| 281 |
<br/><font color='red'><b>$alert</b></font><br/><br/> |
| 282 |
]] |
| 283 |
|
| 284 |
<form method="post" action="$action_url"> |
| 285 |
<input class="hidden" type="hidden" name="p" value="$node_name.post"/> |
| 286 |
<input class="hidden" type="hidden" name="post_token" value="$post_token"/> |
| 287 |
<input class="hidden" type="hidden" name="post_timestamp" value="$post_timestamp"/> |
| 288 |
<input class="hidden" type="hidden" name="post_fields" value="$post_fields"/> |
| 289 |
$html_for_fields |
| 290 |
<input class="submit" type="submit" accesskey="c" name="action_show_login_form" value="_(LOGIN)"/> |
| 291 |
</form> |
| 292 |
|
| 293 |
]===] |
| 294 |
-------------------------------------------------------------------------------- |
| 295 |
------- DEALING WITH LUA CODE -------------------------------------------------- |
| 296 |
-------------------------------------------------------------------------------- |
| 297 |
|
| 298 |
LUA_CODE = [===[ |
| 299 |
$if_ok[[<font color="green">_(THIS_LUA_CODE_PARSES_CORRECTLY)</font>]] |
| 300 |
$if_errors[[ |
| 301 |
<font color='red'> |
| 302 |
<p><b>_(THIS_LUA_CODE_HAS_PROBLEMS)</b></p> |
| 303 |
<code> $errors </code> |
| 304 |
</font>]] |
| 305 |
|
| 306 |
<div width="100%"> |
| 307 |
<style> |
| 308 |
table.code { |
| 309 |
width: 100%; |
| 310 |
border-collapse: collapse |
| 311 |
background: red; |
| 312 |
border-style: none; |
| 313 |
} |
| 314 |
table.body { |
| 315 |
background: yellow; |
| 316 |
} |
| 317 |
table.code tbody th { |
| 318 |
font-size: 90%; |
| 319 |
} |
| 320 |
table.code tbody th a{ |
| 321 |
text-decoration: none; |
| 322 |
color: white; |
| 323 |
} |
| 324 |
table.code th.lineno { |
| 325 |
width: 4em; |
| 326 |
} |
| 327 |
table.code th.bad { |
| 328 |
background: red; |
| 329 |
} |
| 330 |
table.code tbody td { |
| 331 |
//font: normal 120% monospace; |
| 332 |
border: none; |
| 333 |
//color: black; |
| 334 |
} |
| 335 |
table.code tbody td code { |
| 336 |
background: white; |
| 337 |
} |
| 338 |
table.code tbody td code.bad{ |
| 339 |
background: yellow; |
| 340 |
} |
| 341 |
</style> |
| 342 |
<table class="code"> |
| 343 |
<tbody> |
| 344 |
$do_lines[[ |
| 345 |
<tr> |
| 346 |
<th id="L$i" class="$class"><a href="#L$i">$i</a></th> |
| 347 |
<td><code class="$class">$line</code></td> |
| 348 |
</tr> |
| 349 |
]] |
| 350 |
</tbody> |
| 351 |
</table> |
| 352 |
</div> |
| 353 |
]===] |
| 354 |
|
| 355 |
ACTION_NOT_FOUND = [===[ |
| 356 |
<div class="error_message"> |
| 357 |
<p>_(PAGE_DOES_NOT_SUPPORT_ACTION)</p> |
| 358 |
$if_custom_actions[[ |
| 359 |
<p>_(THIS_PAGE_DEFINED_THE_FOLLOWING_ACTIONS)</p> |
| 360 |
<pre><code>$actions</code></pre> |
| 361 |
]] |
| 362 |
</div> |
| 363 |
]===] |
| 364 |
|