Hi
I have enabled front end editing in the site and in K2; some of the articles and modules show an "edit" button, but many do not. Is this a small bug in the template?
<?php if ($canEdit) : ?>
<ul class="item-info">
<li><?php echo preg_replace('@<img.*?alt="(.*?)".*?\/>@mis', '$1',JHtml::_('icon.edit', $this->item, $params)); ?></li>
</ul>
<?php endif; ?>
<?php if (
$params->get('show_category') ||
(
$params->get('show_parent_category') &&
$this->item->parent_slug != '1:root'
) ||
$params->get('show_hits')
) : ?>
<ul class="item-info">
<?php if ($params->get('show_category')) : ?>
<li>
<?php
$title = $this->escape($this->item->category_title);
$url = '<a href="'.JRoute::_(ContentHelperRoute::getCategoryRoute($this->item->catslug)) . '" itemprop="genre">'.$title.'</a>';
?>
<?php if ($params->get('link_category') and $this->item->catslug) : ?>
<?php echo JText::sprintf('TPL_GK_LANG_PUBLISHED_IN', $url); ?>
<?php else : ?>
<?php echo JText::sprintf('TPL_GK_LANG_PUBLISHED_IN', '<span itemprop="genre">' . $title . '</span>'); ?>
<?php endif; ?>
</li>
<?php endif; ?>
<?php if ($params->get('show_parent_category') && $this->item->parent_slug != '1:root') : ?>
<li class="parent-category-name">
<?php $title = $this->escape($this->item->parent_title);
$url = '<a href="'.JRoute::_(ContentHelperRoute::getCategoryRoute($this->item->parent_slug)) . '" itemprop="genre">'.$title.'</a>';?>
<?php if ($params->get('link_parent_category') and $this->item->parent_slug) : ?>
<?php echo JText::sprintf('COM_CONTENT_PARENT', $url); ?>
<?php else : ?>
<?php echo JText::sprintf('COM_CONTENT_PARENT', '<span itemprop="genre">' . $title . '</span>'); ?>
<?php endif; ?>
</li>
<?php endif; ?>
<?php if ($params->get('show_hits')) : ?>
<li class="itemHits"><?php echo JText::sprintf('TPL_GK_LANG_HITS', $this->item->hits); ?></li>
<?php endif; ?>
<?php if (!$this->print) : ?>
<?php if ($params->get('show_print_icon')) : ?>
<li><?php echo preg_replace('@<img.*?alt="(.*?)".*?\/>@mis', '$1',JHtml::_('icon.print_popup', $this->item, $params)); ?></li>
<?php endif; ?>
<?php if ($params->get('show_email_icon')) : ?>
<li><?php echo preg_replace('@<img.*?alt="(.*?)".*?\/>@mis', '$1',JHtml::_('icon.email', $this->item, $params)); ?></li>
<?php endif; ?>
<?php if ($canEdit) : ?>
<li><?php echo preg_replace('@<img.*?alt="(.*?)".*?\/>@mis', '$1',JHtml::_('icon.edit', $this->item, $params)); ?></li>
<?php endif; ?>
<?php else : ?>
<li><?php echo preg_replace('@<img.*?alt="(.*?)".*?\/>@mis', '$1',JHtml::_('icon.print_screen', $this->item, $params)); ?></li>
<?php endif; ?>
</ul>
<?php endif; ?>
<ul class="item-info">
<?php if ($params->get('show_category')) : ?>
<li>
<?php
$title = $this->escape($this->item->category_title);
$url = '<a href="'.JRoute::_(ContentHelperRoute::getCategoryRoute($this->item->catslug)) . '" itemprop="genre">'.$title.'</a>';
?>
<?php if ($params->get('link_category') and $this->item->catslug) : ?>
<?php echo JText::sprintf('TPL_GK_LANG_PUBLISHED_IN', $url); ?>
<?php else : ?>
<?php echo JText::sprintf('TPL_GK_LANG_PUBLISHED_IN', '<span itemprop="genre">' . $title . '</span>'); ?>
<?php endif; ?>
</li>
<?php endif; ?>
<?php if ($params->get('show_parent_category') && $this->item->parent_slug != '1:root') : ?>
<li class="parent-category-name">
<?php $title = $this->escape($this->item->parent_title);
$url = '<a href="'.JRoute::_(ContentHelperRoute::getCategoryRoute($this->item->parent_slug)) . '" itemprop="genre">'.$title.'</a>';?>
<?php if ($params->get('link_parent_category') and $this->item->parent_slug) : ?>
<?php echo JText::sprintf('COM_CONTENT_PARENT', $url); ?>
<?php else : ?>
<?php echo JText::sprintf('COM_CONTENT_PARENT', '<span itemprop="genre">' . $title . '</span>'); ?>
<?php endif; ?>
</li>
<?php endif; ?>
<?php if ($params->get('show_hits')) : ?>
<li class="itemHits"><?php echo JText::sprintf('TPL_GK_LANG_HITS', $this->item->hits); ?></li>
<?php endif; ?>
<?php if ($params->get('show_print_icon')) : ?>
<li><?php echo preg_replace('@<img.*?alt="(.*?)".*?\/>@mis', '$1',JHtml::_('icon.print_popup', $this->item, $params)); ?></li>
<?php endif; ?>
<?php if ($params->get('show_email_icon')) : ?>
<li><?php echo preg_replace('@<img.*?alt="(.*?)".*?\/>@mis', '$1',JHtml::_('icon.email', $this->item, $params)); ?></li>
<?php endif; ?>
<?php if ($canEdit) : ?>
<li><?php echo preg_replace('@<img.*?alt="(.*?)".*?\/>@mis', '$1',JHtml::_('icon.edit', $this->item, $params)); ?></li>
<?php endif; ?>
</ul>
.gk-menu-container {
margin: 0;
}
.gk-menu-container {
margin: 0;
}