Blame Artworks/Webenv/Trac/0.10.4/Modern/templates/search.cs

Alain Reguera Delgado 46de3c
Alain Reguera Delgado 46de3c
<script type="text/javascript">
Alain Reguera Delgado 46de3c
addEvent(window, 'load', function() { document.getElementById('q').focus()}); 
Alain Reguera Delgado 46de3c
</script>
Alain Reguera Delgado 46de3c
Alain Reguera Delgado 46de3c
 with:links = chrome.links ?>
Alain Reguera Delgado 46de3c
  if:len(links.prev) || len(links.next) ?>
    Alain Reguera Delgado 46de3c
       if:len(links.prev) ?>
    Alain Reguera Delgado 46de3c
        
  • Alain Reguera Delgado 46de3c
    Alain Reguera Delgado 46de3c
           var:links.prev.0.title ?>
    Alain Reguera Delgado 46de3c
        
    Alain Reguera Delgado 46de3c
       /if ?>
    Alain Reguera Delgado 46de3c
       if:len(links.next) ?>
    Alain Reguera Delgado 46de3c
        
  • Alain Reguera Delgado 46de3c
         
    Alain Reguera Delgado 46de3c
           var:links.next.0.title ?> →
    Alain Reguera Delgado 46de3c
        
    Alain Reguera Delgado 46de3c
       /if ?>
    Alain Reguera Delgado 46de3c
      /if ?>
    Alain Reguera Delgado 46de3c
     /with ?>
    Alain Reguera Delgado 46de3c
    Alain Reguera Delgado 46de3c
    Alain Reguera Delgado 46de3c
    Alain Reguera Delgado 46de3c
    Alain Reguera Delgado 46de3c

    <label for="q">Search</label>

    Alain Reguera Delgado 46de3c
    <form action="<?cs var:trac.href.search ?>" method="get">
    Alain Reguera Delgado 46de3c
     

    Alain Reguera Delgado 46de3c
      <input type="text" id="q" name="q" size="40" value="<?cs var:search.q ?>" />
    Alain Reguera Delgado 46de3c
      <input type="hidden" name="noquickjump" value="1" />
    Alain Reguera Delgado 46de3c
      <input type="submit" value="Search" />
    Alain Reguera Delgado 46de3c
     

    Alain Reguera Delgado 46de3c
     

    Alain Reguera Delgado 46de3c
      each filter=search.filters ?>
    Alain Reguera Delgado 46de3c
       
    Alain Reguera Delgado 46de3c
              name="" 
    Alain Reguera Delgado 46de3c
         if:filter.active ?>checked="checked" />
    Alain Reguera Delgado 46de3c
       <label for="<?cs var:filter.name ?>"></label>
    Alain Reguera Delgado 46de3c
      /each ?>
    Alain Reguera Delgado 46de3c
     

    Alain Reguera Delgado 46de3c
    </form>
    Alain Reguera Delgado 46de3c
    Alain Reguera Delgado 46de3c
    if:len(search.result) || len(search.quickjump) ?>
    Alain Reguera Delgado 46de3c
     
    Alain Reguera Delgado 46de3c
     if:len(search.result) ?>
    Alain Reguera Delgado 46de3c
     

    Search results

    Alain Reguera Delgado 46de3c
      if:search.n_pages > 1 ?>(
    Alain Reguera Delgado 46de3c
       var:(search.page-1) * search.page_size + 1 ?> - 
    Alain Reguera Delgado 46de3c
       var:(search.page-1) * search.page_size + len(search.result) ?> 
    Alain Reguera Delgado 46de3c
       of )
    Alain Reguera Delgado 46de3c
      /if ?>
    Alain Reguera Delgado 46de3c
     /if ?>
    Alain Reguera Delgado 46de3c
     
    Alain Reguera Delgado 46de3c
      
    Alain Reguera Delgado 46de3c
       if:len(search.quickjump) ?>
    Alain Reguera Delgado 46de3c
        
    Quickjump to
    Alain Reguera Delgado 46de3c
        
    Alain Reguera Delgado 46de3c
       /if ?>
    Alain Reguera Delgado 46de3c
       each item=search.result ?>
    Alain Reguera Delgado 46de3c
        
    Alain Reguera Delgado 46de3c
        
    Alain Reguera Delgado 46de3c
        
    Alain Reguera Delgado 46de3c
         By 
    Alain Reguera Delgado 46de3c
         
    Alain Reguera Delgado 46de3c
         if:item.keywords ?> &mdash
    Alain Reguera Delgado 46de3c
          Keywords: 
    Alain Reguera Delgado 46de3c
         /if ?>
    Alain Reguera Delgado 46de3c
        
    Alain Reguera Delgado 46de3c
       /each ?>
    Alain Reguera Delgado 46de3c
      
    Alain Reguera Delgado 46de3c
      
    Alain Reguera Delgado 46de3c
     
    Alain Reguera Delgado 46de3c
     if search.n_pages > 1 ?>
    Alain Reguera Delgado 46de3c
      
    Alain Reguera Delgado 46de3c
      if len(chrome.links.prev) ?>
    Alain Reguera Delgado 46de3c
        
    Alain Reguera Delgado 46de3c
           var:chrome.links.prev.0.title ?>">← 
    Alain Reguera Delgado 46de3c
      /if ?>
    Alain Reguera Delgado 46de3c
      loop:p = 1, search.n_pages ?>
    Alain Reguera Delgado 46de3c
        if p == search.page ?>
    Alain Reguera Delgado 46de3c
        else ?>
    Alain Reguera Delgado 46de3c
         var:p ?>
    Alain Reguera Delgado 46de3c
        /if ?> 
    Alain Reguera Delgado 46de3c
      /loop ?>
    Alain Reguera Delgado 46de3c
      if len(chrome.links.next) ?>
    Alain Reguera Delgado 46de3c
        
    Alain Reguera Delgado 46de3c
           var:chrome.links.next.0.title ?>">→
    Alain Reguera Delgado 46de3c
      /if ?>
    Alain Reguera Delgado 46de3c
      
    Alain Reguera Delgado 46de3c
     /if ?>
    Alain Reguera Delgado 46de3c
    Alain Reguera Delgado 46de3c
    elif:search.q && !search.quickjump ?>
    Alain Reguera Delgado 46de3c
     
    No matches found.
    Alain Reguera Delgado 46de3c
    /if ?>
    Alain Reguera Delgado 46de3c
    Alain Reguera Delgado 46de3c
    Alain Reguera Delgado 46de3c
     Note: See 
    Alain Reguera Delgado 46de3c
       var:trac.href.wiki ?>/TracSearch">TracSearch  for help on searching.
    Alain Reguera Delgado 46de3c
    Alain Reguera Delgado 46de3c
    Alain Reguera Delgado 46de3c
    Alain Reguera Delgado 46de3c