trac-ticketlinks / templates / search.cs

<?cs include:"header.cs"?>
<script type="text/javascript">
addEvent(window, 'load', function() { document.getElementById('q').focus()}); 
<div id="ctxtnav" class="nav"><?cs
 with:links = chrome.links ?><?cs
  if:len(links.prev) || len( ?><ul><?cs
   if:len(links.prev) ?>
    <li class="first<?cs if:!len(links.up) && !len( ?> last<?cs /if ?>">
     &larr; <a href="<?cs var:links.prev.0.href ?>"><?cs
       var:links.prev.0.title ?></a>
   /if ?><?cs
   if:len( ?>
    <li class="<?cs if:!len(links.prev) && !len(links.up) ?>first <?cs /if ?>last">
     <a href="<?cs ?>"><?cs ?></a> &rarr;
   /if ?></ul><?cs
  /if ?><?cs
 /with ?>

<div id="content" class="search">

<h1><label for="q">Search</label></h1>
<form action="<?cs ?>" method="get">
  <input type="text" id="q" name="q" size="40" value="<?cs var:search.q ?>" />
  <input type="submit" value="Search" />
  each filter=search.filters ?>
   <input type="checkbox" id="<?cs>" 
          name="<?cs>" <?cs ?>checked="checked"<?cs /if ?> />
   <label for="<?cs ?>"><?cs var:filter.label?></label><?cs
  /each ?>
<?cs if:len(search.result) ?>
 <hr />
 <h2>Search results <?cs
  if:search.n_pages > 1 ?>(<?cs
   var:( * search.page_size + 1 ?> - <?cs
   var:( * search.page_size + len(search.result) ?> 
   of <?cs var:search.n_hits?>)<?cs
  /if ?></h2>
 <div id="searchable">
  <dl id="results"><?cs
   each item=search.result ?>
 <dt><a href="<?cs var:item.href ?>"><?cs var:item.title ?></a></dt>
 <dd><?cs var:item.excerpt ?></dd>
  <span class="author">By <?cs ?></span> &mdash;
  <span class="date"><?cs ?></span><?cs
  if:item.keywords ?> &mdash
   <span class="keywords">Keywords: <em><?cs var:item.keywords ?></em></span><?cs
  /if ?>
   /each ?>
  <hr />
 if search.n_pages > 1 ?>
  <div id="paging"><?cs
  if len(chrome.links.prev) ?>
    <a href="<?cs var:chrome.links.prev.0.href ?>" title="<?cs
       var:chrome.links.prev.0.title ?>">&larr;</a> <?cs
  /if ?><?cs
  loop:p = 1, search.n_pages ?><?cs
    if p == ?><?cs var:p ?><?cs
    else ?><a href="<?cs var:search.page_href + "&amp;page=" + p?>"><?cs
     var:p ?></a><?cs
    /if ?> <?cs
  /loop ?><?cs
  if len( ?>
    <a href="<?cs ?>" title="<?cs ?>">&rarr;</a><?cs
  /if ?>
 /if ?><?cs

elif:search.q ?>
 <div id="notfound">No matches found.</div><?cs
/if ?>

<div id="help">
 <strong>Note:</strong> See <a href="<?cs ?>/TracSearch">TracSearch</a>  for help on searching.

<?cs include:"footer.cs"?>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.