aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
Diffstat (limited to 'admin')
-rw-r--r--admin/element_set_global.php19
-rw-r--r--admin/element_set_unit.php22
-rw-r--r--admin/picture_modify.php24
3 files changed, 54 insertions, 11 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']) ?