aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2006-05-15 22:21:08 +0000
committerplegall <plg@piwigo.org>2006-05-15 22:21:08 +0000
commit875a6b15c89f168e15faf74af9efe180e1bb909e (patch)
tree60fcc0084adac992019a1357224b267a71b2ac89
parenta8e574e2b5d5f5c1c819d0050629c8c2267b06b7 (diff)
merge -r1312:1313 from branch 1.6 to trunk (bug 373 fixed)
git-svn-id: http://piwigo.org/svn/trunk@1314 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--admin/element_set_global.php19
-rw-r--r--admin/element_set_unit.php22
-rw-r--r--admin/picture_modify.php24
-rw-r--r--language/en_UK.iso-8859-1/admin.lang.php7
-rw-r--r--language/fr_FR.iso-8859-1/admin.lang.php11
-rw-r--r--search.php45
-rw-r--r--template/yoga/search.tpl3
7 files changed, 95 insertions, 36 deletions
diff --git a/admin/element_set_global.php b/admin/element_set_global.php
index 5dbe4a18b..c6a522106 100644
--- a/admin/element_set_global.php
+++ b/admin/element_set_global.php
@@ -277,10 +277,27 @@ SELECT DISTINCT(category_id) AS id, c.name, uppercats, global_rank
display_select_cat_wrapper($query, array(), $blockname, true);
}
+$all_tags = get_all_tags();
+
+if (count($all_tags) == 0)
+{
+ $add_tag_selection =
+ '<p>'.
+ l10n('No tag defined. Use Administration>Pictures>Tags').
+ '</p>';
+}
+else
+{
+ $add_tag_selection = get_html_tag_selection(
+ get_all_tags(),
+ 'add_tags'
+ );
+}
+
// add tags
$template->assign_vars(
array(
- 'ADD_TAG_SELECTION' => get_html_tag_selection(get_all_tags(), 'add_tags'),
+ 'ADD_TAG_SELECTION' => $add_tag_selection,
)
);
diff --git a/admin/element_set_unit.php b/admin/element_set_unit.php
index f6800f399..163602ad9 100644
--- a/admin/element_set_unit.php
+++ b/admin/element_set_unit.php
@@ -225,6 +225,22 @@ SELECT tag_id
{
list($year,$month,$day) = array('','','');
}
+
+ if (count($all_tags) > 0)
+ {
+ $tag_selection = get_html_tag_selection(
+ $all_tags,
+ 'tags-'.$row['id'],
+ $selected_tags
+ );
+ }
+ else
+ {
+ $tag_selection =
+ '<p>'.
+ l10n('No tag defined. Use Administration>Pictures>Tags').
+ '</p>';
+ }
$template->assign_block_vars(
'element',
@@ -243,11 +259,7 @@ SELECT tag_id
'DESCRIPTION' => @$row['comment'],
'DATE_CREATION_YEAR' => $year,
- 'TAG_SELECTION' => get_html_tag_selection(
- $all_tags,
- 'tags-'.$row['id'],
- $selected_tags
- ),
+ 'TAG_SELECTION' => $tag_selection,
)
);
diff --git a/admin/picture_modify.php b/admin/picture_modify.php
index ac7310ddd..54bb45d69 100644
--- a/admin/picture_modify.php
+++ b/admin/picture_modify.php
@@ -198,6 +198,24 @@ $template->set_filenames(
)
);
+$all_tags = get_all_tags();
+
+if (count($all_tags) > 0)
+{
+ $tag_selection = get_html_tag_selection(
+ get_all_tags(),
+ 'tags',
+ $selected_tags
+ );
+}
+else
+{
+ $tag_selection =
+ '<p>'.
+ l10n('No tag defined. Use Administration>Pictures>Tags').
+ '</p>';
+}
+
$template->assign_vars(
array(
'U_SYNC' =>
@@ -225,11 +243,7 @@ $template->assign_vars(
'CREATION_DATE' => $date,
- 'TAG_SELECTION' => get_html_tag_selection(
- get_all_tags(),
- 'tags',
- $selected_tags
- ),
+ 'TAG_SELECTION' => $tag_selection,
'DESCRIPTION' =>
isset($_POST['description']) ?
diff --git a/language/en_UK.iso-8859-1/admin.lang.php b/language/en_UK.iso-8859-1/admin.lang.php
index 16c483eef..a29ab89f4 100644
--- a/language/en_UK.iso-8859-1/admin.lang.php
+++ b/language/en_UK.iso-8859-1/admin.lang.php
@@ -110,6 +110,7 @@ $lang['Name'] = 'Name';
$lang['New name'] = 'New name';
$lang['New parent category'] = 'New parent category';
$lang['New tag'] = 'New tag';
+$lang['No tag defined. Use Administration>Pictures>Tags'] = 'No tag defined. Use Administration>Pictures>Tags';
$lang['No'] = 'No';
$lang['Number of comments per page'] = 'Number of comments per page';
$lang['Number of images per row'] = 'Number of images per row';
@@ -254,9 +255,8 @@ $lang['metadata_exif'] = 'EXIF';
$lang['metadata_iptc'] = 'IPTC';
$lang['name'] = 'name';
$lang['nbm_background_treatment_redirect'] = 'Execution time is out, treatment must be continue [Estmated time: %d secondes].';
-$lang['nbm_redirect_msg'] = 'Processing treatment.'."\n\n".'Please wait...';
-$lang['nbm_repost_submit'] = 'Continue processing treatment';
$lang['nbm_break_timeout_list_user'] = 'Prepared time for list of users to send mail is limited. Others users are not listed.';
+$lang['nbm_break_timeout_send_mail'] = 'Time to send mail is limited. Others mails are skipped.';
$lang['nbm_col_check_user_send_mail'] = 'To send ?';
$lang['nbm_col_last_send'] = 'Last send';
$lang['nbm_col_mail'] = 'email';
@@ -280,7 +280,6 @@ $lang['nbm_msg_error_sending_email_to'] = 'Error when sending email to %s [%s].'
$lang['nbm_msg_mail_sent_to'] = 'Mail sent to %s [%s].';
$lang['nbm_msg_n_mails_sent'] = '%d mails were sent.';
$lang['nbm_msg_no_mail_to_send'] = '%d mails were not sent.';
-$lang['nbm_break_timeout_send_mail'] = 'Time to send mail is limited. Others mails are skipped.';
$lang['nbm_no_mail_to_send'] = 'No mail to send.';
$lang['nbm_no_user_available_to_send_L1'] = 'No user are available in order to send mail.';
$lang['nbm_no_user_available_to_send_L2'] = 'A user is available, if there are new elements to notify.';
@@ -290,6 +289,8 @@ $lang['nbm_object_news'] = 'New elements added';
$lang['nbm_object_subcribe'] = 'Subcribe to notification by mail';
$lang['nbm_object_unsubcribe'] = 'Unsubcribe from notification by mail';
$lang['nbm_param_mode'] = 'Parameter';
+$lang['nbm_redirect_msg'] = 'Processing treatment.'."\n\n".'Please wait...';
+$lang['nbm_repost_submit'] = 'Continue processing treatment';
$lang['nbm_send_check_all'] = 'Check All';
$lang['nbm_send_complementary_mail_content'] = 'Complementary mail content';
$lang['nbm_send_detailed_content'] = 'Send detailed content';
diff --git a/language/fr_FR.iso-8859-1/admin.lang.php b/language/fr_FR.iso-8859-1/admin.lang.php
index 6ef55a814..6e2f4ea71 100644
--- a/language/fr_FR.iso-8859-1/admin.lang.php
+++ b/language/fr_FR.iso-8859-1/admin.lang.php
@@ -111,6 +111,7 @@ $lang['Name'] = 'Nom';
$lang['New name'] = 'Nouveau nom';
$lang['New parent category'] = 'Nouvelle catégorie parente';
$lang['New tag'] = 'Nouveau tag';
+$lang['No tag defined. Use Administration>Pictures>Tags'] = 'Aucun tag défini. Utiliser l\'écran Adminstration>Images>Tags';
$lang['No'] = 'Non';
$lang['Number of comments per page'] = 'Nombre de commentaires utilisateur par page';
$lang['Number of images per row'] = 'Nombre de miniatures par ligne';
@@ -158,9 +159,9 @@ $lang['Status'] = 'Statut';
$lang['Storage category'] = 'Catégorie de stockage';
$lang['Submit'] = 'Valider';
$lang['Sum of rates'] = 'Somme des notes';
-$lang['Tag selection'] = 'Sélection de tags';
-$lang['Tag "%s" was added'] = 'Le tag "%s" a été ajouté';
$lang['Tag "%s" already exist'] = 'Le tag "%s" existe déjà';
+$lang['Tag "%s" was added'] = 'Le tag "%s" a été ajouté';
+$lang['Tag selection'] = 'Sélection de tags';
$lang['Take selected elements out of caddie'] = 'Sortir les éléments sélectionnés du panier';
$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.';
$lang['User comments validation'] = 'Validation des commentaires utilisateur';
@@ -257,9 +258,8 @@ $lang['metadata_exif'] = 'EXIF';
$lang['metadata_iptc'] = 'IPTC';
$lang['name'] = 'nom';
$lang['nbm_background_treatment_redirect'] = 'Le temps d\'exécution étant dépassé, le traitement doit continuer [Temps estimé: %d secondes].';
-$lang['nbm_redirect_msg'] = 'Traitement en cours.'."\n".'Veuillez patienter...';
-$lang['nbm_repost_submit'] = 'Continuer le traitement en cours...';
$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.';
+$lang['nbm_break_timeout_send_mail'] = 'Le temps d\'envoi des mails est limité. Les autres envois de mail ont été ignorés.';
$lang['nbm_col_check_user_send_mail'] = 'A envoyer ?';
$lang['nbm_col_last_send'] = 'Dernier envoi';
$lang['nbm_col_mail'] = 'email';
@@ -283,7 +283,6 @@ $lang['nbm_msg_error_sending_email_to'] = 'Erreur lors de l\'envoi du mail à %s
$lang['nbm_msg_mail_sent_to'] = 'Mail envoyé à %s [%s].';
$lang['nbm_msg_n_mails_sent'] = '%s mails ont été envoyés.';
$lang['nbm_msg_no_mail_to_send'] = '%s mails n\'ont pas été envoyés.';
-$lang['nbm_break_timeout_send_mail'] = 'Le temps d\'envoi des mails est limité. Les autres envois de mail ont été ignorés.';
$lang['nbm_no_mail_to_send'] = 'Pas de mail à envoyer.';
$lang['nbm_no_user_available_to_send_L1'] = 'Il n\'y a pas d\'utilisateur à notifier par mail.';
$lang['nbm_no_user_available_to_send_L2'] = 'Un utilisateur est à notifier si de nouveaux éléments sont disponibles pour cet utilisateur.';
@@ -293,6 +292,8 @@ $lang['nbm_object_news'] = 'Nouveaux éléments ajoutés';
$lang['nbm_object_subcribe'] = 'Inscription à la notification par mail';
$lang['nbm_object_unsubcribe'] = 'Désinscription à la notification par mail';
$lang['nbm_param_mode'] = 'Paramétrage';
+$lang['nbm_redirect_msg'] = 'Traitement en cours.'."\n".'Veuillez patienter...';
+$lang['nbm_repost_submit'] = 'Continuer le traitement en cours...';
$lang['nbm_send_check_all'] = 'Tout cocher';
$lang['nbm_send_complementary_mail_content'] = 'Contenu complémentaire du mail';
$lang['nbm_send_detailed_content'] = 'Envoi d\'un contenu détaillé';
diff --git a/search.php b/search.php
index 0701eafa1..5131680d6 100644
--- a/search.php
+++ b/search.php
@@ -177,28 +177,39 @@ include(PHPWG_ROOT_PATH.'include/page_header.php');
$template->set_filenames( array('search'=>'search.tpl') );
+$template->assign_vars(
+ array(
+ 'TODAY_DAY' => date('d', time()),
+ 'TODAY_MONTH' => date('m', time()),
+ 'TODAY_YEAR' => date('Y', time()),
+ 'S_SEARCH_ACTION' => 'search.php',
+ 'U_HELP' => PHPWG_ROOT_PATH.'popuphelp.php?page=search',
+ 'U_HOME' => make_index_url(),
+ )
+ );
+
$available_tags = get_available_tags(
isset($user['forbidden_categories'])
? explode(',', $user['forbidden_categories'])
: null
);
-usort( $available_tags, 'name_compare');
-
-$template->assign_vars(array(
- 'TODAY_DAY' => date('d', time()),
- 'TODAY_MONTH' => date('m', time()),
- 'TODAY_YEAR' => date('Y', time()),
- 'S_SEARCH_ACTION' => 'search.php',
- 'U_HELP' => PHPWG_ROOT_PATH.'popuphelp.php?page=search',
- 'U_HOME' => make_index_url(),
-
- 'TAG_SELECTION' => get_html_tag_selection(
- $available_tags,
- 'tags',
- isset($_POST['tags']) ? $_POST['tags'] : array()
- ),
- )
-);
+
+if (count($available_tags) > 0)
+{
+ usort( $available_tags, 'name_compare');
+
+ $template->assign_block_vars('tags', array());
+
+ $template->assign_vars(
+ array(
+ 'TAG_SELECTION' => get_html_tag_selection(
+ $available_tags,
+ 'tags',
+ isset($_POST['tags']) ? $_POST['tags'] : array()
+ ),
+ )
+ );
+}
//------------------------------------------------------------- categories form
$query = '
diff --git a/template/yoga/search.tpl b/template/yoga/search.tpl
index d2089a756..156820f9c 100644
--- a/template/yoga/search.tpl
+++ b/template/yoga/search.tpl
@@ -36,12 +36,15 @@
<input type="text" style="width: 300px" name="search_author" size="30" onfocus="this.className='focus';" onblur="this.className='nofocus';"/>
</label>
</fieldset>
+
+<!-- BEGIN tags -->
<fieldset>
<legend>{lang:Search tags}</legend>
{TAG_SELECTION}
<label><span><input type="radio" name="tag_mode" value="AND" checked="checked" /> {lang:All tags}</span></label>
<label><span><input type="radio" name="tag_mode" value="OR" /> {lang:Any tag}</span></label>
</fieldset>
+<!-- END tags -->
<fieldset>
<legend>{lang:search_date}</legend>