private function _getTagHtml($tagger, $id, $type)
{
$tags = $tagger->getTags($id, 'calendar');
- $html = '';
$js = '';
if ($type == 'calendar') {
$hasEdit = $event->hasPermission(PERMS_EDIT, Auth::getAuth());
}
+ $html = count($tags) ? '<h5>' . _("Tags") . '</h5>': '';
+ $html .= '<ul>';
foreach ($tags as $tag_id => $tag) {
$html .= '<li>' . $tag . ($hasEdit ? '<a href="#" onclick="removeTag(\'' . $id . '\', \'' . $type . '\',' . $tag_id . ', \'' . Horde::url('imple.php', true) . '\'); Event.stop(event)" id="remove' . md5($id . $tag_id) . '">' . Horde::img('delete-small.png', _("Remove Tag"), '', $GLOBALS['registry']->getImageDir('horde')) . '</a>' : '') . '</li>';
}
- return $html;
+ return $html . '</ul><div class="clear"> </div>';
}
}
<ul id="mycalendars">
<?php foreach ($my_calendars as $id => $cal): ?>
<li><label><input type="checkbox" class="checkbox" name="display_cal[]" value="<?php echo htmlspecialchars($id) ?>"<?php echo (in_array($id, $display_calendars) ? ' checked="checked"' : '') . ' /> ' . htmlspecialchars($cal->get('name')) ?></label> <?php echo $info_img ?>
- <div class="panel-tags">
+ <div class="panel-tags" id="tags-<?php echo $id?>">
<?php $tags = $tagger->getTags($id, 'calendar'); ?>
<h5><?php echo (count($tags) ? _("Tags") : '');?></h5>
- <ul id="tags-<?php echo $id?>" style="margin-left: 10px;">
+ <ul style="margin-left: 10px;">
<?php foreach ($tags as $tag_id => $tag): ?>
<li><?php echo $tag . ($cal->hasPermission(Auth::getAuth(), PERMS_EDIT) ? '<a href="#" id="remove' . md5($id . $tag_id) . '">' . Horde::img('delete-small.png', _("Remove Tag"), '', $registry->getImageDir('horde')) . '</a>' : '') . '</li>'?>
<?php