Ignore:
Timestamp:
Jun 16, 2014, 4:17:53 PM (10 years ago)
Author:
plg
Message:

feature 2563: do not display all tags as checkboxes on search.php. Use jQuery Selectize instead.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/themes/default/template/search.tpl

    r28707 r28708  
    99{footer_script}
    1010jQuery(document).ready(function() {
    11   jQuery("#authors").selectize({
     11  jQuery("#authors, #tags").selectize({
    1212    plugins: ['remove_button']
    1313  });
     
    4747    <select id="authors" placeholder="{'Type in a search term'|translate}" name="authors[]" multiple style="width:500px;">
    4848{foreach from=$AUTHORS item=author}
    49       <option value="{$author.author|strip_tags:false|escape:html}">{$author.author|strip_tags:false} ({'%d photos'|translate:$author.counter})</option>
     49      <option value="{$author.author|strip_tags:false|escape:html}">{$author.author|strip_tags:false} ({$author.counter|translate_dec:'%d photo':'%d photos'})</option>
    5050{/foreach}
    5151    </select>
     
    5353</fieldset>
    5454
    55 {if isset($TAG_SELECTION)}
     55{if isset($TAGS)}
    5656<fieldset>
    5757  <legend>{'Search tags'|@translate}</legend>
    58   {$TAG_SELECTION}
     58
     59  <select id="tags" placeholder="{'Type in a search term'|translate}" name="tags[]" multiple style="width:500px;">
     60{foreach from=$TAGS item=tag}
     61    <option value="{$tag.id}">{$tag.name} ({$tag.counter|translate_dec:'%d photo':'%d photos'})</option>
     62{/foreach}
     63  </select>
     64
    5965  <label><span><input type="radio" name="tag_mode" value="AND" checked="checked"> {'All tags'|@translate}</span></label>
    6066  <label><span><input type="radio" name="tag_mode" value="OR"> {'Any tag'|@translate}</span></label>
Note: See TracChangeset for help on using the changeset viewer.