Changeset 8408


Ignore:
Timestamp:
Dec 31, 2010, 3:06:27 PM (10 years ago)
Author:
plg
Message:

Batch Manager:

  • add l0n to the new Batch Manager where is was missing
  • change photo "name" to photo "title"
  • change the way we display "Select all" and "Select the whole set"
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/batch_manager.php

    r8404 r8408  
    248248$page['cat_elements_id'] = $current_set;
    249249
    250 //  // To element_set_(global|unit).php, we must provide the elements id of the
    251 //  // managed category in $page['cat_elements_id'] array.
    252 //  $page['cat_elements_id'] = array();
    253 
    254 //  else if ('duplicates' == $_GET['cat'])
    255 //  {
    256 //    $page['title'] = l10n('Files with same name in more than one physical category');
    257 //    $template->assign(array('U_ACTIVE_MENU' => 5 ));
    258 // 
    259 //    // we are searching related elements twice or more to physical categories
    260 //    // 1 - Retrieve Files
    261 //    $query = '
    262 //  SELECT DISTINCT(file)
    263 //    FROM '.IMAGES_TABLE.'
    264 //   GROUP BY file
    265 //  HAVING COUNT(DISTINCT storage_category_id) > 1
    266 //  ;';
    267 // 
    268 //    $duplicate_files = array_from_query($query, 'file');
    269 //    $duplicate_files[]='Nofiles';
    270 //    // 2 - Retrives related picture ids
    271 //    $query = '
    272 //  SELECT id, file
    273 //    FROM '.IMAGES_TABLE.'
    274 //  WHERE file IN (\''.implode("','", $duplicate_files).'\')
    275 //  ORDER BY file, id
    276 //  ;';
    277 // 
    278 //    $page['cat_elements_id'] = array_from_query($query, 'id');
    279 //  }
    280 
    281250// +-----------------------------------------------------------------------+
    282251// |                       first element to display                        |
  • trunk/admin/batch_manager_global.php

    r8404 r8408  
    192192  }
    193193
    194   // name
    195   if ('name' == $action)
     194  // title
     195  if ('title' == $action)
    196196  {
    197197    $datas = array();
     
    202202        array(
    203203          'id' => $image_id,
    204           'name' => $_POST['name']
     204          'name' => $_POST['title']
    205205          )
    206206        );
  • trunk/admin/themes/default/template/batch_manager_global.tpl

    r8407 r8408  
    175175    });
    176176
    177     if (nb_thumbs_page < nb_thumbs_set) {
    178       $("#selectSetMessage").show();
    179     }
    180 
    181177    checkPermitAction();
    182178
     
    199195
    200196  $("#selectInvert").click(function () {
    201     $("#selectSetMessage").hide();
    202197    $("input[name=setSelected]").attr('checked', false);
    203198
     
    234229  });
    235230
    236   $("input[name=remove_name]").click(function () {
     231  $("input[name=remove_title]").click(function () {
    237232    if ($(this).is(':checked')) {
    238       $("input[name=name]").hide();
    239     }
    240     else {
    241       $("input[name=name]").show();
     233      $("input[name=title]").hide();
     234    }
     235    else {
     236      $("input[name=title]").show();
    242237    }
    243238  });
     
    339334  </p>
    340335
    341 <h2>{'Batch manager'|@translate}</h2>
     336<h2>{'Batch Manager'|@translate}</h2>
    342337
    343338  <form action="{$F_ACTION}" method="post">
     
    348343    <ul id="filterList">
    349344      <li id="filter_prefilter" {if !isset($filter.prefilter)}style="display:none"{/if}>
    350         <a href="#" class="removeFilter" title="remove this filter"><span>[x]</span></a>
     345        <a href="#" class="removeFilter" title="{'remove this filter'|@translate}"><span>[x]</span></a>
    351346        <input type="checkbox" name="filter_prefilter_use" class="useFilterCheckbox" {if isset($filter.prefilter)}checked="checked"{/if}>
    352         predefined filter
     347        {'predefined filter'|@translate}
    353348        <select name="filter_prefilter">
    354           <option value="caddie" {if $filter.prefilter eq 'caddie'}selected="selected"{/if}>caddie</option>
    355           <option value="last import" {if $filter.prefilter eq 'last import'}selected="selected"{/if}>last import</option>
     349          <option value="caddie" {if $filter.prefilter eq 'caddie'}selected="selected"{/if}>{'caddie'|@translate}</option>
     350          <option value="last import" {if $filter.prefilter eq 'last import'}selected="selected"{/if}>{'last import'|@translate}</option>
    356351{if $ENABLE_SYNCHRONIZATION}
    357           <option value="with no virtual album" {if $filter.prefilter eq 'with no virtual album'}selected="selected"{/if}>with no virtual album</option>
     352          <option value="with no virtual album" {if $filter.prefilter eq 'with no virtual album'}selected="selected"{/if}>{'with no virtual album'|@translate}</option>
    358353{/if}
    359           <option value="duplicates" {if $filter.prefilter eq 'duplicates'}selected="selected"{/if}>duplicates</option>
     354          <option value="duplicates" {if $filter.prefilter eq 'duplicates'}selected="selected"{/if}>{'duplicates'|@translate}</option>
    360355<!--          <option value="with no album">with no album</option> -->
    361356<!--          <option value="with no tag">with no tag</option> -->
     
    365360        <a href="#" class="removeFilter" title="remove this filter"><span>[x]</span></a>
    366361        <input type="checkbox" name="filter_category_use" class="useFilterCheckbox" {if isset($filter.category)}checked="checked"{/if}>
    367         album
     362        {'album'|@translate}
    368363        <select style="width:400px" name="filter_category" size="1">
    369364          {html_options options=$filter_category_options selected=$filter_category_options_selected}
     
    383378    <p class="actionButtons" style="">
    384379      <select id="addFilter">
    385         <option value="-1">Add a filter</option>
     380        <option value="-1">{'Add a filter'|@translate}</option>
    386381        <option disabled="disabled">------------------</option>
    387         <option value="filter_prefilter">predefined filter</option>
    388         <option value="filter_category">album</option>
     382        <option value="filter_prefilter">{'predefined filter'|@translate}</option>
     383        <option value="filter_category">{'album'|@translate}</option>
    389384        <option value="filter_level">{'Who can see these photos?'|@translate}</option>
    390385      </select>
    391386<!--      <input id="removeFilters" class="submit" type="submit" value="Remove all filters" name="removeFilters"> -->
    392       <a id="removeFilters" href="">Remove all filters</a>
     387      <a id="removeFilters" href="">{'Remove all filters'|@translate}</a>
    393388    </p>
    394389
    395390    <p class="actionButtons" id="applyFilterBlock">
    396       <input id="applyFilter" class="submit" type="submit" value="Refresh photo set" name="submitFilter">
     391      <input id="applyFilter" class="submit" type="submit" value="{'Refresh photo set'|@translate}" name="submitFilter">
    397392    </p>
    398393
     
    406401  <p id="checkActions">
    407402    {'Select:'|@translate}
    408     <a href="#" id="selectAll">{'All'|@translate}</a>
    409     (<a href="#" id="selectSet">or the whole set</a>),
     403{if $nb_thumbs_set > $nb_thumbs_page}
     404    <a href="#" id="selectAll">{'The whole page'|@translate}</a>,
     405    <a href="#" id="selectSet">{'The whole set'|@translate}</a>,
     406{else}
     407    <a href="#" id="selectAll">{'All'|@translate}</a>,
     408{/if}
    410409    <a href="#" id="selectNone">{'None'|@translate}</a>,
    411410    <a href="#" id="selectInvert">{'Invert'|@translate}</a>
     
    456455      &middot; <a href="{$U_DISPLAY}&amp;display=100">100</a>
    457456      &middot; <a href="{$U_DISPLAY}&amp;display=all">{'all'|@translate}</a>
    458       thumbnails per page
     457      {'thumbnails per page'|@translate}
    459458    </div>
    460459  </div>
     
    462461
    463462  {else}
    464   <div>No photo in the current set.</div>
     463  <div>{'No photo in the current set.'|@translate}</div>
    465464  {/if}
    466465  </fieldset>
     
    469468
    470469    <legend>{'Action'|@translate}</legend>
    471       <div id="forbidAction"{if count($selection) != 0}style="display:none"{/if}>No photo selected, no action possible.</div>
     470      <div id="forbidAction"{if count($selection) != 0}style="display:none"{/if}>{'No photo selected, no action possible.'|@translate}</div>
    472471      <div id="permitAction"{if count($selection) == 0}style="display:none"{/if}>
    473472
    474473    <select name="selectAction">
    475       <option value="-1">Choose an action</option>
     474      <option value="-1">{'Choose an action'|@translate}</option>
    476475      <option disabled="disabled">------------------</option>
    477476  {if isset($show_delete_form) }
    478477      <option value="delete">{'Delete selected photos'|@translate}</option>
    479478  {/if}
    480       <option value="associate">{'associate to category'|@translate}</option>
     479      <option value="associate">{'Associate to album'|@translate}</option>
    481480  {if !empty($dissociate_options)}
    482       <option value="dissociate">{'dissociate from category'|@translate}</option>
     481      <option value="dissociate">{'Dissociate from album'|@translate}</option>
    483482  {/if}
    484483      <option value="add_tags">{'add tags'|@translate}</option>
     
    487486  {/if}
    488487      <option value="author">{'Set author'|@translate}</option>
    489       <option value="name">{'Set title'|@translate}</option>
     488      <option value="title">{'Set title'|@translate}</option>
    490489      <option value="date_creation">{'Set creation date'|@translate}</option>
    491490      <option value="level">{'Who can see these photos?'|@translate}</option>
     
    493492      <option value="remove_from_caddie">{'Remove from caddie'|@translate}</option>
    494493  {else}
    495       <option value="add_to_caddie">{'Add to caddie'|@translate}</option>
     494      <option value="add_to_caddie">{'add to caddie'|@translate}</option>
    496495  {/if}
    497496    </select>
     
    530529    <!-- author -->
    531530    <div id="action_author" class="bulkAction">
    532     <label><input type="checkbox" name="remove_author"> remove author</label><br>
    533     {assign var='authorDefaultValue' value='Type here the author name'}
     531    <label><input type="checkbox" name="remove_author"> {'remove author'|@translate}</label><br>
     532    {assign var='authorDefaultValue' value='Type here the author name'|@translate}
    534533<input type="text" class="large" name="author" value="{$authorDefaultValue}" onfocus="this.value=(this.value=='{$authorDefaultValue}') ? '' : this.value;" onblur="this.value=(this.value=='') ? '{$authorDefaultValue}' : this.value;">
    535534    </div>   
    536535
    537     <!-- name -->
    538     <div id="action_name" class="bulkAction">
    539     <label><input type="checkbox" name="remove_name"> remove name</label><br>
    540     {assign var='nameDefaultValue' value='Type here the name name'}
    541 <input type="text" class="large" name="name" value="{$nameDefaultValue}" onfocus="this.value=(this.value=='{$nameDefaultValue}') ? '' : this.value;" onblur="this.value=(this.value=='') ? '{$nameDefaultValue}' : this.value;">
     536    <!-- title -->
     537    <div id="action_title" class="bulkAction">
     538    <label><input type="checkbox" name="remove_title"> {'remove title'|@translate}</label><br>
     539    {assign var='titleDefaultValue' value='Type here the title'|@translate}
     540<input type="text" class="large" name="title" value="{$titleDefaultValue}" onfocus="this.value=(this.value=='{$titleDefaultValue}') ? '' : this.value;" onblur="this.value=(this.value=='') ? '{$titleDefaultValue}' : this.value;">
    542541    </div>
    543542
    544543    <!-- date_creation -->
    545544    <div id="action_date_creation" class="bulkAction">
    546       <label><input type="checkbox" name="remove_date_creation"> remove creation date</label><br>
     545      <label><input type="checkbox" name="remove_date_creation"> {'remove creation date'|@translate}</label><br>
    547546      <div id="set_date_creation">
    548547          <select id="date_creation_day" name="date_creation_day">
  • trunk/language/en_UK/admin.lang.php

    r8227 r8408  
    770770$lang['The high definition maximum height must be a number between %d and %d'] = 'The high definition maximum height must be a number between %d and %d';
    771771$lang['The high definition image quality must be a number between %d and %d'] = 'The high definition image quality must be a number between %d and %d';
     772
     773$lang['Batch Manager'] = 'Batch Manager';
     774$lang['include child albums'] = 'include child albums';
     775$lang['Selection'] = 'Selection';
     776$lang['Action'] = 'Action';
     777$lang['Set author'] = 'Set author';
     778$lang['Set title'] = 'Set title';
     779$lang['Set creation date'] = 'Set creation date';
     780$lang['Apply action'] = 'Apply action';
     781$lang['on the %d selected photos'] = 'on the %d selected photos';
     782$lang['%d of %d photos selected'] = '%d of %d photos selected';
     783$lang['No photo selected, %d photos in current set'] = 'No photo selected, %d photos in current set';
     784$lang['All %d photos are selected'] = 'All %d photos are selected';
     785$lang['remove this filter'] = 'remove this filter';
     786$lang['predefined filter'] = 'predefined filter';
     787$lang['last import'] = 'last import';
     788$lang['with no virtual album'] = 'with no virtual album';
     789$lang['duplicates'] = 'duplicates';
     790$lang['Add a filter'] = 'Add a filter';
     791$lang['Remove all filters'] = 'Remove all filters';
     792$lang['Refresh photo set'] = 'Refresh photo set';
     793$lang['The whole page'] = 'The whole page';
     794$lang['The whole set'] = 'The whole set';
     795$lang['thumbnails per page'] = 'thumbnails per page';
     796$lang['No photo in the current set.'] = 'No photo in the current set.';
     797$lang['No photo selected, no action possible.'] = 'No photo selected, no action possible.';
     798$lang['Choose an action'] = 'Choose an action';
     799$lang['remove author'] = 'remove author';
     800$lang['Type here the author name'] = 'Type here the author name';
     801$lang['remove title'] = 'remove title';
     802$lang['Type here the title'] = 'Type here the title';
     803$lang['remove creation date'] = 'remove creation date';
    772804?>
  • trunk/language/fr_FR/admin.lang.php

    r8227 r8408  
    775775$lang['The high definition maximum height must be a number between %d and %d'] = 'La hauteur maximum pour la haute définition doit être un chiffre compris entre %d et %d';
    776776$lang['The high definition image quality must be a number between %d and %d'] = 'La qualité d\'image pour la haute définition doit être un chiffre compris entre %d et %d';
     777
     778$lang['Batch Manager'] = 'Gestion par lot';
     779$lang['include child albums'] = 'inclure les sous albums';
     780$lang['Selection'] = 'Sélection';
     781$lang['Action'] = 'Action';
     782$lang['Set author'] = 'Définir l\'auteur';
     783$lang['Set title'] = 'Définir le titre';
     784$lang['Set creation date'] = 'Définir la date de création';
     785$lang['Apply action'] = 'Appliquer l\'action';
     786$lang['on the %d selected photos'] = 'sur les %d photos sélectionnées';
     787$lang['%d of %d photos selected'] = '%d photos sur %d sont sélectionnées';
     788$lang['No photo selected, %d photos in current set'] = 'Aucune photo sélectionnée parmi les %d photos du lot';
     789$lang['All %d photos are selected'] = 'Toute les %d photos du lot sont sélectionnées';
     790$lang['remove this filter'] = 'supprimer ce filtre';
     791$lang['predefined filter'] = 'filtre prédéfini';
     792$lang['last import'] = 'dernier import';
     793$lang['with no virtual album'] = 'sans album virtuel';
     794$lang['duplicates'] = 'doublons';
     795$lang['Add a filter'] = 'Ajouter un filtre';
     796$lang['Remove all filters'] = 'Supprimer tous les filtres';
     797$lang['Refresh photo set'] = 'Rafraîchir le lot de photos';
     798$lang['The whole page'] = 'Toutes la page';
     799$lang['The whole set'] = 'Tout le lot';
     800$lang['thumbnails per page'] = 'miniatures par page';
     801$lang['No photo in the current set.'] = 'Aucune photo dans le lot.';
     802$lang['No photo selected, no action possible.'] = 'Aucune photo sélectionnée, aucune action possible.';
     803$lang['Choose an action'] = 'Choisir une action';
     804$lang['remove author'] = 'supprimer l\'auteur';
     805$lang['Type here the author name'] = 'Entrez ici le nom de l\'auteur';
     806$lang['remove title'] = 'supprimer le titre';
     807$lang['Type here the title'] = 'Entrez ici le titre';
     808$lang['remove creation date'] = 'supprimer la date de création';
    777809?>
Note: See TracChangeset for help on using the changeset viewer.