From 835361b27224cb9ebc4f62b8ef12d045502802c3 Mon Sep 17 00:00:00 2001 From: Shish Date: Mon, 23 Sep 2013 13:09:47 +0100 Subject: [PATCH] make tags in the image info box clickable (#336) --- ext/tag_edit/theme.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/ext/tag_edit/theme.php b/ext/tag_edit/theme.php index 555be07a..4cd67bae 100644 --- a/ext/tag_edit/theme.php +++ b/ext/tag_edit/theme.php @@ -32,16 +32,26 @@ class TagEditTheme extends Themelet { public function get_tag_editor_html(Image $image) { global $user; + + $tag_links = array(); + foreach($image->get_tag_array() as $tag) { + $h_tag = html_escape($tag); + $u_tag = url_escape($tag); + $h_link = make_link("post/list/$u_tag/1"); + $tag_links[] = "$h_tag"; + } + $h_tag_links = implode(" ", $tag_links); $h_tags = html_escape($image->get_tag_list()); + return " Tags ".($user->can("edit_image_tag") ? " - $h_tags + $h_tag_links " : " - $h_tags + $h_tag_links ")."