From eb98e026746aea9ca1bc9a5ad7ab1df3158cc419 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Fri, 30 Dec 2016 16:12:37 -0500 Subject: [PATCH] CRM-19769 - Show title and more colors for tags --- CRM/Contact/Form/Edit/TagsAndGroups.php | 1 + CRM/Core/BAO/Tag.php | 1 + templates/CRM/Contact/Form/Edit/Tagtree.tpl | 3 +-- templates/CRM/Contact/Page/View/Summary.tpl | 2 +- templates/CRM/Tag/Form/Tag.tpl | 23 +++++++++------- templates/CRM/Tag/Form/Tagtree.hlp | 30 --------------------- templates/CRM/Tag/Form/Tagtree.tpl | 3 +-- 7 files changed, 18 insertions(+), 45 deletions(-) delete mode 100644 templates/CRM/Tag/Form/Tagtree.hlp diff --git a/CRM/Contact/Form/Edit/TagsAndGroups.php b/CRM/Contact/Form/Edit/TagsAndGroups.php index 69bf9d34e9..def736d726 100644 --- a/CRM/Contact/Form/Edit/TagsAndGroups.php +++ b/CRM/Contact/Form/Edit/TagsAndGroups.php @@ -175,6 +175,7 @@ class CRM_Contact_Form_Edit_TagsAndGroups { $form->assign('tag', $tree); $form->assign('entityID', $contactId); $form->assign('entityTable', 'civicrm_contact'); + $form->assign('allTags', CRM_Core_BAO_Tag::getTagsUsedFor('civicrm_contact', FALSE)); if ($isRequired) { $form->addRule($fName, ts('%1 is a required field.', array(1 => $tagName)), 'required'); diff --git a/CRM/Core/BAO/Tag.php b/CRM/Core/BAO/Tag.php index fab7bda40a..c1b4ae44f4 100644 --- a/CRM/Core/BAO/Tag.php +++ b/CRM/Core/BAO/Tag.php @@ -172,6 +172,7 @@ class CRM_Core_BAO_Tag extends CRM_Core_DAO_Tag { $tags[$tag->id]['parent_id'] = $tag->parent_id; $tags[$tag->id]['is_tagset'] = $tag->is_tagset; $tags[$tag->id]['used_for'] = $tag->used_for; + $tags[$tag->id]['description'] = $tag->description; $tags[$tag->id]['color'] = !empty($tag->color) ? $tag->color : NULL; } } diff --git a/templates/CRM/Contact/Form/Edit/Tagtree.tpl b/templates/CRM/Contact/Form/Edit/Tagtree.tpl index 118dead205..2f6d1c51b1 100644 --- a/templates/CRM/Contact/Form/Edit/Tagtree.tpl +++ b/templates/CRM/Contact/Form/Edit/Tagtree.tpl @@ -29,8 +29,7 @@
  • - - {if $node.description}{help id=$id title=$node.name file="CRM/Tag/Form/Tagtree"}{/if} + {if $node.children} {* Recurse... *} diff --git a/templates/CRM/Contact/Page/View/Summary.tpl b/templates/CRM/Contact/Page/View/Summary.tpl index 31dd626811..3e646f2801 100644 --- a/templates/CRM/Contact/Page/View/Summary.tpl +++ b/templates/CRM/Contact/Page/View/Summary.tpl @@ -166,7 +166,7 @@
    {foreach from=$contactTag item=tagName key=tagId} - + {$tagName} {/foreach} diff --git a/templates/CRM/Tag/Form/Tag.tpl b/templates/CRM/Tag/Form/Tag.tpl index 029adb6304..3ccbb5fdd7 100644 --- a/templates/CRM/Tag/Form/Tag.tpl +++ b/templates/CRM/Tag/Form/Tag.tpl @@ -26,11 +26,13 @@ {* this template is used for adding/editing tags *} {literal}