[Gnucash-changes] r14225 - htdocs/trunk/search/templates - Use PHP translation on the main Namazu head template.

Derek Atkins warlord at cvs.gnucash.org
Sun May 28 16:00:28 EDT 2006


Author: warlord
Date: 2006-05-28 16:00:27 -0400 (Sun, 28 May 2006)
New Revision: 14225
Trac: http://svn.gnucash.org/trac/changeset/14225

Added:
   htdocs/trunk/search/templates/NMZ.head.lists
Modified:
   htdocs/trunk/search/templates/NMZ.head.php_tmpl
Log:
Use PHP translation on the main Namazu head template.
Include the lists in an (optional) lang-specific include file.
This lets different languages have the ability to reorder the lists.



Added: htdocs/trunk/search/templates/NMZ.head.lists
===================================================================
--- htdocs/trunk/search/templates/NMZ.head.lists	2006-05-28 19:36:36 UTC (rev 14224)
+++ htdocs/trunk/search/templates/NMZ.head.lists	2006-05-28 20:00:27 UTC (rev 14225)
@@ -0,0 +1,8 @@
+<input type="checkbox" name="idxname" value="gnucash-announce">gnucash-announce
+<input type="checkbox" name="idxname" value="gnucash-devel" checked>gnucash-devel
+<input type="checkbox" name="idxname" value="gnucash-user" checked>gnucash-user
+<input type="checkbox" name="idxname" value="gnucash-br">gnucash-br
+<input type="checkbox" name="idxname" value="gnucash-de">gnucash-de
+<input type="checkbox" name="idxname" value="gnucash-es">gnucash-es
+<input type="checkbox" name="idxname" value="gnucash-fr">gnucash-fr
+<input type="checkbox" name="idxname" value="gnucash-it">gnucash-it

Modified: htdocs/trunk/search/templates/NMZ.head.php_tmpl
===================================================================
--- htdocs/trunk/search/templates/NMZ.head.php_tmpl	2006-05-28 19:36:36 UTC (rev 14224)
+++ htdocs/trunk/search/templates/NMZ.head.php_tmpl	2006-05-28 20:00:27 UTC (rev 14225)
@@ -1,6 +1,7 @@
 <?php
 $title = "Mailing List Search";
 include("externals/header.phtml");
+include("externals/menu.phtml");
 ?>
 <style type="text/css"><!--
   strong.keyword { color: Red; }
@@ -17,7 +18,6 @@
                    font-family: monospace; 
 		   font-weight: bold; }
 --></style>
-<?php include("externals/menu.phtml"); ?>
 <div id="content">
 <h1><?= _($title); ?></h1>
 
@@ -25,52 +25,51 @@
 <p>
 <strong>Query:</strong> 
 <input type="text" name="query" size="40">
-<input type="submit" name="submit" value="Search!">
+<input type="submit" name="submit" value="<?=_("Search!")?>">
 <!-- <input type="hidden" name="idxname" value="foobar"> -->
-<a href="{cgi}">[How to search]</a>
+<a href="{cgi}"><?=_("[How to search]")?></a>
 </p>
 <p>
-<strong>Display:</strong>
+<strong><?=_("Display")?>:</strong>
 <select name="max">
 <option value="10">10</option>
-<option selected="true" value="20">20</option>
+<option selected value="20">20</option>
 <option value="30">30</option>
 <option value="50">50</option>
 <option value="100">100</option>
 </select>
-<strong>Description:</strong>
+<strong><?=_("Description")?>:</strong>
 <select name="result">
-<option selected="true" value="normal">normal</option>
-<option value="short">short</option>
+<option selected value="normal"><?=_("normal")?></option>
+<option value="short"><?=_("short")?></option>
 </select>
-<strong>Sort:</strong>
+<strong><?=_("Sort")?>:</strong>
 <select name="sort">
-<option selected="true" value="score">by score</option>
-<option value="date:late">by date in late order</option>
-<option value="date:early">by date in early order</option>
-<option value="field:subject:ascending">by title in ascending order</option>
-<option value="field:subject:descending">by title in descending order</option>
-<option value="field:from:ascending">by author in ascending order</option>
-<option value="field:from:descending">by author in descending order</option>
-<option value="field:size:ascending">by size in ascending order</option>
-<option value="field:size:descending">by size in descending order</option>
-<option value="field:uri:ascending">by URI in ascending order</option>
-<option value="field:uri:descending">by URI in descending order</option>
+<option selected value="score"><?=_("by score")?></option>
+<option value="date:late"><?=_("by date in late order")?></option>
+<option value="date:early"><?=_("by date in early order")?></option>
+<option value="field:subject:ascending"><?=_("by title in ascending order")?></option>
+<option value="field:subject:descending"><?=_("by title in descending order")?></option>
+<option value="field:from:ascending"><?=_("by author in ascending order")?></option>
+<option value="field:from:descending"><?=_("by author in descending order")?></option>
+<option value="field:size:ascending"><?=_("by size in ascending order")?></option>
+<option value="field:size:descending"><?=_("by size in descending order")?></option>
+<option value="field:uri:ascending"><?=_("by URI in ascending order")?></option>
+<option value="field:uri:descending"><?=_("by URI in descending order")?></option>
 </select>
 </p>
 
 <p>
-<strong>Lists to Search:</strong>
-<blockquote style="white-space: nowrap">
-<input type="checkbox" name="idxname" value="gnucash-announce" />gnucash-announce
-<input type="checkbox" name="idxname" value="gnucash-devel" checked="true">gnucash-devel
-<input type="checkbox" name="idxname" value="gnucash-user" checked="true">gnucash-user
-<input type="checkbox" name="idxname" value="gnucash-br">gnucash-br<br />
-<input type="checkbox" name="idxname" value="gnucash-de">gnucash-de
-<input type="checkbox" name="idxname" value="gnucash-es">gnucash-es
-<input type="checkbox" name="idxname" value="gnucash-fr">gnucash-fr
-<input type="checkbox" name="idxname" value="gnucash-it">gnucash-it
-</blockquote>
+<strong><?=_("Lists to Search")?>:</strong>
+<ul>
+<?php
+  if (file_exists("search/templates/NMZ.head.lists.$lang_dir")) {
+    include("search/templates/NMZ.head.lists.$lang_dir");
+  } else {
+    include("search/templates/NMZ.head.lists");
+  }
+?>
+</ul>
 </p>
 </form>
 <hr />



More information about the gnucash-changes mailing list