<?php

/**
 * @package      pkg_projectfork
 * @subpackage   com_pfrepo
 *
 * @author       Tobias Kuhn (eaxs)
 * @copyright    Copyright (C) 2006-2013 Tobias Kuhn. All rights reserved.
 * @license      http://www.gnu.org/licenses/gpl.html GNU/GPL, see LICENSE.txt
 */
defined('_JEXEC') or die;
$file = $this->item;
$form_action = PFrepoHelperRoute::getNoteRevisionsRoute($file->slug, $file->project_slug, $file->dir_slug, $file->path);
$user = JFactory::getUser();
$uid = $user->get('id');
$list_order = $this->escape($this->state->get('list.ordering'));
$list_dir = $this->escape($this->state->get('list.direction'));
$project = (int) $this->state->get('filter.project');
$txt_root = JText::_('COM_PROJECTFORK_REV_ROOT');
$txt_head = JText::_('COM_PROJECTFORK_REV_HEAD');
$date_format = JText::_('DATE_FORMAT_LC4');
$filter_in = $this->state->get('filter.isset') ? 'in ' : '';
?>
<div id="projectfork" class="category-list<?php 
echo $this->pageclass_sfx;
?>
 view-repository">

    <?php 
if ($this->params->get('show_page_heading', 1)) {
    ?>
        ?>
                    <span class="item-count badge badge-info"><?php 
        echo $item->revision_count;
        ?>
</span>
                <?php 
    }
    ?>
        	</span>

        	<span class="dropdown pull-left">
	        	<?php 
    $this->menu->start(array('class' => 'btn-mini btn-link'));
    $this->menu->itemEdit('noteform', $item->id, $can_edit || $can_edit_own);
    if ($item->revision_count) {
        $link_revs = PFrepoHelperRoute::getNoteRevisionsRoute($item->slug, $item->project_slug, $item->dir_slug, $item->path);
        $this->menu->itemLink('icon-flag', 'COM_PROJECTFORK_VIEW_REVISIONS', JRoute::_($link_revs));
    }
    $this->menu->itemDelete('repository', $x, $can_edit || $can_edit_own);
    $this->menu->end();
    echo $this->menu->render(array('class' => 'btn-mini'));
    ?>
        	</span>

            <?php 
    if ($filter_project && $is_search) {
        ?>
                <div class="small">
                    <?php 
        echo str_replace($this_path, '.', $item->path) . '/';
        ?>