Ignore:
Timestamp:
Jul 30, 2011, 6:53:18 AM (13 years ago)
Author:
rvelices
Message:

feature 2387: addd a filter by tag in the batch manager (merge from trunk)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2/admin/themes/default/template/batch_manager_global.tpl

    r11211 r11854  
    1010{footer_script require='jquery.tokeninput'}
    1111jQuery(document).ready(function() {ldelim}
     12        var tag_src = [{foreach from=$tags item=tag name=tags}{ldelim}name:"{$tag.name|@escape:'javascript'}",id:"{$tag.id}"{rdelim}{if !$smarty.foreach.tags.last},{/if}{/foreach}];
    1213  jQuery("#tags").tokenInput(
    13     [{foreach from=$tags item=tag name=tags}{ldelim}"name":"{$tag.name|@escape:'javascript'}","id":"{$tag.id}"{rdelim}{if !$smarty.foreach.tags.last},{/if}{/foreach}],
     14    tag_src,
    1415    {ldelim}
    1516      hintText: '{'Type in a search term'|@translate}',
     
    2223    }
    2324  );
     25       
     26  jQuery("#tagsFilter").tokenInput(
     27    tag_src,
     28    {ldelim}
     29      hintText: '{'Type in a search term'|@translate}',
     30      noResultsText: '{'No results'|@translate}',
     31      searchingText: '{'Searching...'|@translate}',
     32      animateDropdown: false,
     33      preventDuplicates: true,
     34      allowCreation: false
     35    }
     36  );
     37
    2438});
    2539{/footer_script}
     
    347361        <label><input type="checkbox" name="filter_category_recursive" {if isset($filter.category_recursive)}checked="checked"{/if}> {'include child albums'|@translate}</label>
    348362      </li>
     363                        <li id="filter_tags" {if !isset($filter.tags)}style="display:none"{/if}>
     364                                <a href="#" class="removeFilter" title="remove this filter"><span>[x]</span></a>
     365                                <input type="checkbox" name="filter_tags_use" class="useFilterCheckbox" {if isset($filter.tags)}checked="checked"{/if}>
     366                                {'Tags'|@translate}
     367                                <select id="tagsFilter" name="filter_tags">
     368                                        {foreach from=$filter_tags item=tag}
     369                                        <option value="{$tag.id}">{$tag.name}</option>
     370                                        {/foreach}
     371                                </select>
     372                        </li>
    349373      <li id="filter_level" {if !isset($filter.level)}style="display:none"{/if}>
    350374        <a href="#" class="removeFilter" title="remove this filter"><span>[x]</span></a>
     
    363387        <option value="filter_prefilter">{'predefined filter'|@translate}</option>
    364388        <option value="filter_category">{'album'|@translate}</option>
     389                                <option value="filter_tags">{'Tags'|@translate}</option>
    365390        <option value="filter_level">{'Who can see these photos?'|@translate}</option>
    366391      </select>
Note: See TracChangeset for help on using the changeset viewer.