<?php

/**
 * @version        1.9.7
 * @package        Joomla
 * @subpackage     EDocman
 * @author         Tuan Pham Ngoc
 * @copyright      Copyright (C) 2011 - 2024 Ossolution Team
 * @license        GNU/GPL, see LICENSE.php
 */

// No direct access
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Toolbar\ToolbarHelper;

/**
 * View class for a list of Edocman.
 */
class EDocmanViewDownloadlogsHtml extends OSViewList
{
	protected function addToolbar()
	{	
		$user = Factory::getApplication()->getIdentity();		
		ToolbarHelper::title(Text::_('EDOCMAN_DOWNLOAD_LOGS'), 'download');
		ToolbarHelper::custom('export', 'download', 'download', 'EDOCMAN_EXPORT_DOWNLOAD_LOG', false);
		if ($user->authorise('core.delete')) 
		{
			ToolbarHelper::custom('delete', 'delete', 'delete', 'Empty', false) ;
		}
		
		// We don't need toolbar in the modal window.
		if (version_compare(JVERSION, '3.0', 'ge')) {
			if ($this->getLayout() !== 'modal')
			{
				//EdocmanHelper::addSideBarmenus('downloadlogs');
				//$this->sidebar = JHtmlSidebar::render();
			}
		}
		//EDocmanHelperHtml::renderSubmenu('downloadlogs');
	}
}
