Skip to content

Commit

Permalink
Merge pull request civicrm#9914 from civicrm/4.7.17-rc
Browse files Browse the repository at this point in the history
4.7.17 rc
  • Loading branch information
eileenmcnaughton authored Mar 2, 2017
2 parents 8896390 + 0d9598e commit 7012939
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
4 changes: 3 additions & 1 deletion CRM/Tag/Page/Tag.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ public function run() {
foreach ($result['values'] as $id => $tagset) {
$used = explode(',', CRM_Utils_Array::value('used_for', $tagset, ''));
$tagset['used_for_label'] = array_values(array_intersect_key($usedFor, array_flip($used)));
$tagset['display_name'] = $tagset['created_id.display_name'];
if (isset($tagset['created_id.display_name'])) {
$tagset['display_name'] = $tagset['created_id.display_name'];
}
unset($tagset['created_id.display_name']);
$tagsets[$id] = $tagset;
}
Expand Down
9 changes: 6 additions & 3 deletions templates/CRM/Tag/Page/Tag.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,11 @@
function formatTagSet(info) {
info.date = CRM.utils.formatDate(info.created_date);
info.used_for_label = [];
_.each(info.used_for.split(','), function(item) {
info.used_for_label.push(usedFor[item]);
});
if (undefined !== info.used_for) {
_.each(info.used_for.split(','), function(item) {
info.used_for_label.push(usedFor[item]);
});
}
}

_.each(tagSets, formatTagSet);
Expand Down Expand Up @@ -471,6 +473,7 @@
<script type="text/template" id="tagsetHelpTpl">
<div class="help">
<% if(is_reserved == 1) {ldelim} %><strong>{ts}Reserved{/ts}</strong><% {rdelim} %>
<% if(undefined === display_name) var display_name = null; %>
{ts 1="<%= used_for_label.join(', ') %>" 2="<%= date %>" 3="<%= display_name %>"}Tag Set for %1 (created %2 by %3).{/ts}
<% if(typeof description === 'string' && description.length) {ldelim} %><p><em><%- description %></em></p><% {rdelim} %>
</div>
Expand Down

0 comments on commit 7012939

Please sign in to comment.