A rough cut of the /search action.
[catagits/Gitalist.git] / templates / default.tt2
index c476c28..b8618e8 100644 (file)
@@ -9,10 +9,11 @@
   <meta http-equiv="content-type" content="[% content_type %]; charset=utf-8"/>
   <meta name="generator" content="gitweb/[% version %] git/[% git_version %][% mod_perl_version %]"/>
   <meta name="robots" content="index, nofollow"/>
-  <title>[% title %] (Gitalist)</title>
+  <title>[% title | html %] (Gitalist)</title>
   [% IF baseurl %]
   <base href="[% baseurl %]" />
   [% END %]
+  <link rel="stylesheet" type="text/css" href="/static/css/site.css"/>
   <link rel="stylesheet" type="text/css" href="[% stylesheet %]"/>
   [% FOR link IN links %]
             <link rel="[% link.rel %]"
 [% site_header %]
 
 <div class="page_header">
-  <a title="[% logo_label %]" href="[% logo_url %]"><img src="[% logo_img %]" alt="git" class="logo"/></a>
-  <a href="[% home_link %]">[% home_link_str %]</a>
+  <a title="[% logo_label | url %]" href="[% logo_url | url %]"><img src="[% logo_img %]" alt="git" class="logo"/></a>
+  <a href="[% home_link | url %]">[% home_link_str %]</a>
   [%- IF project %]
-  / <a href="/git/gitweb.cgi?p=[% project %];a=summary">[% project %]</a>
+  / <a href="/summary?p=[% project %]">[% project %]</a>
   [% IF action;  " / " _ action; END;
   END %]
 </div>
 
-[% IF project AND have_search %]
-<div class="search">
-  <form method="get" action="/" enctype="application/x-www-form-urlencoded">
-  <input name="p" type="hidden" value="[% project %]" />
-  <input name="a" type="hidden" value="search" />
-  <input name="h" type="hidden" value="[% search_hash %]" />
-  <select name="st" >
-      <option value="commit">commit</option>
-      <option value="grep">grep</option>
-      <option value="author">author</option>
-      <option value="committer">committer</option>
-      <option value="pickaxe">pickaxe</option>
-  </select><sup><a href="/?p=[% project %];a=search_help">?</a></sup> search:
-  <input type="text" name="s" value="[% search_text %]"/>
-  <span title="Extended regular expression"><label><input type="checkbox" name="sr" value="1" />re</label></span>
-  </form>
-</div>
-[% END %]
-
-[%- # / git_header_html
--%]
 [%
-  IF page_nav;
-    INCLUDE "page_nav.tt2";
+  IF project;
+    INCLUDE 'nav/search.tt2';
   END;
-
+# / git_header_html
+%]
+<div id='body'>
+[%
   IF action;
-    # XXX Err ... yeah, slight hack here ... ahem.
-    INCLUDE "index.tt2";
+    SET actmpl = action _ ".tt2";
+    INCLUDE $actmpl;
   ELSE;
     # The output of gitweb.cgi is injected at this point.
     content;
   END;
 %]
+</div>
 
 [%- # git_footer_html
 -%]
 <div class="page_footer">
 [% IF project AND project_description %]
-  <div class="page_footer_text">[% project_description %]</div>
+  <div class="page_footer_text">[% project_description | html %]</div>
 [% END %]
 [% FOR feed IN feeds %]
     <a class="[% feed.class %]" title="[% feed.title %]" href="[% feed.href %]">[% feed.name %]</a>