Skip to content

Commit

Permalink
tree prefix for menu items
Browse files Browse the repository at this point in the history
  • Loading branch information
andrepereiradasilva committed May 19, 2016
1 parent 2e56a0a commit e524c23
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,8 @@
<?php echo JHtml::_('MenusHtml.Menus.state', $item->published, $i, $canChange, 'cb'); ?>
</td>
<td>
<?php echo str_repeat('<span class="gi">|&mdash;</span>', $item->level - 1) ?>
<?php $prefix = JLayoutHelper::render('joomla.html.treeprefix', array('level' => $item->level)); ?>
<?php echo $prefix; ?>
<?php if ($item->checked_out) : ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $item->editor, $item->checked_out_time, 'items.', $canCheckin); ?>
<?php endif; ?>
Expand All @@ -190,9 +191,9 @@
<?php echo JText::sprintf('JGLOBAL_LIST_NOTE', $this->escape($item->note));?>
<?php endif; ?>
</span>
<div class="small" title="<?php echo $this->escape($item->path);?>">
<?php echo str_repeat('<span class="gtr">&mdash;</span>', $item->level - 1) ?>
<span title="<?php echo isset($item->item_type_desc) ? htmlspecialchars($this->escape($item->item_type_desc), ENT_COMPAT, 'UTF-8') : ''; ?>">
<div title="<?php echo $this->escape($item->path); ?>">
<?php echo $prefix; ?>
<span class="small" title="<?php echo isset($item->item_type_desc) ? htmlspecialchars($this->escape($item->item_type_desc), ENT_COMPAT, 'UTF-8') : ''; ?>">
<?php echo $this->escape($item->item_type); ?></span>
</div>
</td>
Expand Down
2 changes: 1 addition & 1 deletion layouts/joomla/html/treeprefix.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@

if ($level > 1)
{
echo '<span class="muted">' . str_repeat('&#9482;&nbsp;&nbsp;&nbsp;', (int) $level - 2) . '</span>&ndash;&nbsp;';
echo '<span class="muted">' . str_repeat('&#9482;&nbsp;&nbsp;&nbsp;', (int) $level - 2) . '&#9482;</span>&nbsp;&nbsp;&nbsp;';
}

0 comments on commit e524c23

Please sign in to comment.