Changeset 1313


Ignore:
Timestamp:
May 16, 2006, 12:19:48 AM (18 years ago)
Author:
plg
Message:

bug 373 fixed: if there is no tag defined, an explicit message is displayed
in the administration section. In the public search screen, tag fieldset is
not displayed if no reachable tag.

Location:
branches/branch-1_6
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/branch-1_6/admin/element_set_global.php

    r1309 r1313  
    278278}
    279279
     280$all_tags = get_all_tags();
     281
     282if (count($all_tags) == 0)
     283{
     284  $add_tag_selection =
     285    '<p>'.
     286    l10n('No tag defined. Use Administration>Pictures>Tags').
     287    '</p>';
     288}
     289else
     290{
     291  $add_tag_selection = get_html_tag_selection(
     292    get_all_tags(),
     293    'add_tags'
     294    );
     295}
     296
    280297// add tags
    281298$template->assign_vars(
    282299  array(
    283     'ADD_TAG_SELECTION' => get_html_tag_selection(get_all_tags(), 'add_tags'),
     300    'ADD_TAG_SELECTION' => $add_tag_selection,
    284301    )
    285302  );
  • branches/branch-1_6/admin/element_set_unit.php

    r1119 r1313  
    225225    {
    226226      list($year,$month,$day) = array('','','');
     227    }
     228
     229    if (count($all_tags) > 0)
     230    {
     231      $tag_selection = get_html_tag_selection(
     232        $all_tags,
     233        'tags-'.$row['id'],
     234        $selected_tags
     235        );
     236    }
     237    else
     238    {
     239      $tag_selection =
     240        '<p>'.
     241        l10n('No tag defined. Use Administration>Pictures>Tags').
     242        '</p>';
    227243    }
    228244   
     
    244260        'DATE_CREATION_YEAR' => $year,
    245261       
    246         'TAG_SELECTION' => get_html_tag_selection(
    247           $all_tags,
    248           'tags-'.$row['id'],
    249           $selected_tags
    250           ),
     262        'TAG_SELECTION' => $tag_selection,
    251263        )
    252264      );
  • branches/branch-1_6/admin/picture_modify.php

    r1121 r1313  
    199199  );
    200200
     201$all_tags = get_all_tags();
     202
     203if (count($all_tags) > 0)
     204{
     205  $tag_selection = get_html_tag_selection(
     206    get_all_tags(),
     207    'tags',
     208    $selected_tags
     209    );
     210}
     211else
     212{
     213  $tag_selection =
     214    '<p>'.
     215    l10n('No tag defined. Use Administration>Pictures>Tags').
     216    '</p>';
     217}
     218 
    201219$template->assign_vars(
    202220  array(
     
    226244    'CREATION_DATE' => $date,
    227245
    228     'TAG_SELECTION' => get_html_tag_selection(
    229       get_all_tags(),
    230       'tags',
    231       $selected_tags
    232       ),
     246    'TAG_SELECTION' => $tag_selection,
    233247
    234248    'DESCRIPTION' =>
  • branches/branch-1_6/language/en_UK.iso-8859-1/admin.lang.php

    r1233 r1313  
    111111$lang['New parent category'] = 'New parent category';
    112112$lang['New tag'] = 'New tag';
     113$lang['No tag defined. Use Administration>Pictures>Tags'] = 'No tag defined. Use Administration>Pictures>Tags';
    113114$lang['No'] = 'No';
    114115$lang['Number of comments per page'] = 'Number of comments per page';
     
    255256$lang['name'] = 'name';
    256257$lang['nbm_background_treatment_redirect'] = 'Execution time is out, treatment must be continue [Estmated time: %d secondes].';
    257 $lang['nbm_redirect_msg'] = 'Processing treatment.'."\n\n".'Please wait...';
    258 $lang['nbm_repost_submit'] = 'Continue processing treatment';
    259258$lang['nbm_break_timeout_list_user'] = 'Prepared time for list of users to send mail is limited. Others users are not listed.';
     259$lang['nbm_break_timeout_send_mail'] = 'Time to send mail is limited. Others mails are skipped.';
    260260$lang['nbm_col_check_user_send_mail'] = 'To send ?';
    261261$lang['nbm_col_last_send'] = 'Last send';
     
    281281$lang['nbm_msg_n_mails_sent'] = '%d mails were sent.';
    282282$lang['nbm_msg_no_mail_to_send'] = '%d mails were not sent.';
    283 $lang['nbm_break_timeout_send_mail'] = 'Time to send mail is limited. Others mails are skipped.';
    284283$lang['nbm_no_mail_to_send'] = 'No mail to send.';
    285284$lang['nbm_no_user_available_to_send_L1'] = 'No user are available in order to send mail.';
     
    291290$lang['nbm_object_unsubcribe'] = 'Unsubcribe from notification by mail';
    292291$lang['nbm_param_mode'] = 'Parameter';
     292$lang['nbm_redirect_msg'] = 'Processing treatment.'."\n\n".'Please wait...';
     293$lang['nbm_repost_submit'] = 'Continue processing treatment';
    293294$lang['nbm_send_check_all'] = 'Check All';
    294295$lang['nbm_send_complementary_mail_content'] = 'Complementary mail content';
  • branches/branch-1_6/language/fr_FR.iso-8859-1/admin.lang.php

    r1302 r1313  
    112112$lang['New parent category'] = 'Nouvelle catégorie parente';
    113113$lang['New tag'] = 'Nouveau tag';
     114$lang['No tag defined. Use Administration>Pictures>Tags'] = 'Aucun tag défini. Utiliser l\'écran Adminstration>Images>Tags';
    114115$lang['No'] = 'Non';
    115116$lang['Number of comments per page'] = 'Nombre de commentaires utilisateur par page';
     
    159160$lang['Submit'] = 'Valider';
    160161$lang['Sum of rates'] = 'Somme des notes';
     162$lang['Tag "%s" already exist'] = 'Le tag "%s" existe déjà';
     163$lang['Tag "%s" was added'] = 'Le tag "%s" a été ajouté';
    161164$lang['Tag selection'] = 'Sélection de tags';
    162 $lang['Tag "%s" was added'] = 'Le tag "%s" a été ajouté';
    163 $lang['Tag "%s" already exist'] = 'Le tag "%s" existe déjà';
    164165$lang['Take selected elements out of caddie'] = 'Sortir les éléments sélectionnés du panier';
    165166$lang['Unable to check for upgrade since allow_url_fopen is disabled.'] = 'Impossible de connaître la dernière version cat la fonction allow_url_fopen est désactivée.';
     
    258259$lang['name'] = 'nom';
    259260$lang['nbm_background_treatment_redirect'] = 'Le temps d\'exécution étant dépassé, le traitement doit continuer [Temps estimé: %d secondes].';
    260 $lang['nbm_redirect_msg'] = 'Traitement en cours.'."\n".'Veuillez patienter...';
    261 $lang['nbm_repost_submit'] = 'Continuer le traitement en cours...';
    262261$lang['nbm_break_timeout_list_user'] = 'Le temps de préparation de la liste des utilisateurs pour l\'envoi est limité. Les autres utilisateurs ne sont pas listés.';
     262$lang['nbm_break_timeout_send_mail'] = 'Le temps d\'envoi des mails est limité. Les autres envois de mail ont été ignorés.';
    263263$lang['nbm_col_check_user_send_mail'] = 'A envoyer ?';
    264264$lang['nbm_col_last_send'] = 'Dernier envoi';
     
    284284$lang['nbm_msg_n_mails_sent'] = '%s mails ont été envoyés.';
    285285$lang['nbm_msg_no_mail_to_send'] = '%s mails n\'ont pas été envoyés.';
    286 $lang['nbm_break_timeout_send_mail'] = 'Le temps d\'envoi des mails est limité. Les autres envois de mail ont été ignorés.';
    287286$lang['nbm_no_mail_to_send'] = 'Pas de mail à envoyer.';
    288287$lang['nbm_no_user_available_to_send_L1'] = 'Il n\'y a pas d\'utilisateur à notifier par mail.';
     
    294293$lang['nbm_object_unsubcribe'] = 'Désinscription à la notification par mail';
    295294$lang['nbm_param_mode'] = 'Paramétrage';
     295$lang['nbm_redirect_msg'] = 'Traitement en cours.'."\n".'Veuillez patienter...';
     296$lang['nbm_repost_submit'] = 'Continuer le traitement en cours...';
    296297$lang['nbm_send_check_all'] = 'Tout cocher';
    297298$lang['nbm_send_complementary_mail_content'] = 'Contenu complémentaire du mail';
  • branches/branch-1_6/search.php

    r1249 r1313  
    178178$template->set_filenames( array('search'=>'search.tpl') );
    179179
     180$template->assign_vars(
     181  array(
     182    'TODAY_DAY' => date('d', time()),
     183    'TODAY_MONTH' => date('m', time()),
     184    'TODAY_YEAR' => date('Y', time()),
     185    'S_SEARCH_ACTION' => 'search.php',
     186    'U_HELP' => PHPWG_ROOT_PATH.'popuphelp.php?page=search',
     187    'U_HOME' => make_index_url(),
     188    )
     189  );
     190
    180191$available_tags = get_available_tags(
    181192      isset($user['forbidden_categories'])
     
    183194      : null
    184195      );
    185 usort( $available_tags, 'name_compare');
    186 
    187 $template->assign_vars(array(
    188   'TODAY_DAY' => date('d', time()),
    189   'TODAY_MONTH' => date('m', time()),
    190   'TODAY_YEAR' => date('Y', time()),
    191   'S_SEARCH_ACTION' => 'search.php',
    192   'U_HELP' => PHPWG_ROOT_PATH.'popuphelp.php?page=search',
    193   'U_HOME' => make_index_url(),
    194 
    195   'TAG_SELECTION' => get_html_tag_selection(
    196     $available_tags,
    197     'tags',
    198     isset($_POST['tags']) ? $_POST['tags'] : array()
    199     ),
    200   )
    201 );
     196
     197if (count($available_tags) > 0)
     198{
     199  usort( $available_tags, 'name_compare');
     200
     201  $template->assign_block_vars('tags', array());
     202 
     203  $template->assign_vars(
     204    array(
     205      'TAG_SELECTION' => get_html_tag_selection(
     206        $available_tags,
     207        'tags',
     208        isset($_POST['tags']) ? $_POST['tags'] : array()
     209        ),
     210      )
     211    );
     212}
    202213
    203214//------------------------------------------------------------- categories form
  • branches/branch-1_6/template/yoga/search.tpl

    r1273 r1313  
    3737  </label>
    3838</fieldset>
     39
     40<!-- BEGIN tags -->
    3941<fieldset>
    4042  <legend>{lang:Search tags}</legend>
     
    4345  <label><span><input type="radio" name="tag_mode" value="OR" /> {lang:Any tag}</span></label>
    4446</fieldset>
     47<!-- END tags -->
    4548
    4649<fieldset>
Note: See TracChangeset for help on using the changeset viewer.