Your IP : 216.73.217.8


Current Path : /home/digilove/www/administrator/components/com_jmap/views/patterns/tmpl/
Upload File :
Current File : /home/digilove/www/administrator/components/com_jmap/views/patterns/tmpl/default_list.php

<?php 
/** 
 * @package JMAP::LINKS::administrator::components::com_jmap
 * @subpackage views
 * @subpackage links
 * @subpackage tmpl
 * @author Joomla! Extensions Store
 * @copyright (C) 2015 - Joomla! Extensions Store
 * @license GNU/GPLv2 http://www.gnu.org/licenses/gpl-2.0.html  
 */
defined ( '_JEXEC' ) or die ( 'Restricted access' ); 
?>
<form action="index.php" method="post" name="adminForm" id="adminForm">
	<table class="full headerlist">
		<tr>
			<td align="left" width="60%">
				<span class="input-group">
				  <span class="input-group-addon"><span class="glyphicon glyphicon-filter"></span> <?php echo JText::_('COM_JMAP_FILTER' ); ?>:</span>
				  <input type="text" name="search" id="search" value="<?php echo htmlspecialchars($this->searchword, ENT_COMPAT, 'UTF-8');?>" class="text_area"/>
				</span>

				<button class="btn btn-primary btn-xs" onclick="this.form.submit();"><?php echo JText::_('COM_JMAP_GO' ); ?></button>
				<button class="btn btn-primary btn-xs" onclick="document.getElementById('search').value='';this.form.submit();"><?php echo JText::_('COM_JMAP_RESET' ); ?></button>
			</td>
			<td nowrap="nowrap">
				<?php 
				echo $this->lists['state'];
				echo $this->pagination->getLimitBox();
				?>
			</td>
		</tr>
	</table>
	
	<table class="adminlist table table-striped table-hover">
	<thead>
		<tr>
			<th width="1%">
				<?php echo JText::_('COM_JMAP_NUM' ); ?>
			</th>
			<th width="1%">
				<input type="checkbox" name="toggle" value=""  onclick="Joomla.checkAll(this)" />
			</th>
			<th class="title" width="15%">
				<?php echo JHtml::_('grid.sort',  'COM_JMAP_PATTERNS_REPLACEMENT_ORIGINAL_LINK', 's.original_text', @$this->orders['order_Dir'], @$this->orders['order'], 'patterns.display' ); ?>
			</th>
			<th class="title" width="15%">
				<?php echo JHtml::_('grid.sort',  'COM_JMAP_PATTERNS_REPLACEMENT_TARGET_LINK', 's.target_text', @$this->orders['order_Dir'], @$this->orders['order'], 'patterns.display' ); ?>
			</th>
			<th style="width:5%">
				<?php echo JHtml::_('grid.sort',   'COM_JMAP_PUBLISHED', 's.published', @$this->orders['order_Dir'], @$this->orders['order'], 'patterns.display' ); ?>
			</th>
			<th class="title" width="2%">
				<?php echo JHtml::_('grid.sort',  'COM_JMAP_ID', 's.id', @$this->orders['order_Dir'], @$this->orders['order'], 'patterns.display' ); ?>
			</th>
		</tr>
	</thead>
	<?php
	$k = 0;
	$canCheckin = $this->user->authorise('core.manage', 'com_checkin');
	for ($i=0, $n=count( $this->items ); $i < $n; $i++) {
		$row = $this->items[$i];
		$link =  'index.php?option=com_jmap&task=patterns.editEntity&cid[]='. $row->id ;
		$altPublishing 	= !$row->published ? JText::_( 'Publish' ) : JText::_( 'Unpublish' );
		
		// Access check.
		if($this->user->authorise('core.edit.state')) {
			$taskPublishing	= !$row->published ? 'patterns.publish' : 'patterns.unpublish';
			
			$published = '<a href="javascript:void(0);" onclick="return Joomla.listItemTask(\'cb' . $i . '\',\'' . $taskPublishing . '\')">';
			$published .= $row->published ? 
						  '<img alt="' . $altPublishing . '" src="' . JUri::base(true) . '/components/com_jmap/images/icon-16-tick.png" width="16" height="16"/>' : 
						  '<img alt="' . $altPublishing . '" src="' . JUri::base(true) . '/components/com_jmap/images/publish_x.png" width="16" height="16"/>';
			$published .= '</a>';
		} else {
			$altPublishing 	= $row->published ? JText::_( 'Published' ) : JText::_( 'Unpublished' );
			$published = $row->published ? 
						'<img alt="' . $altPublishing . '" src="' . JUri::base(true) . '/components/com_jmap/images/icon-16-tick.png" width="16" height="16" border="0" alt="unpublish" />' : 
						'<img alt="' . $altPublishing . '" src="' . JUri::base(true) . '/components/com_jmap/images/publish_x.png" width="16" height="16"/>';
		}
		
		$checked = null;
		// Access check.
		if($this->user->authorise('core.edit')) {
			$checked = $row->checked_out && $row->checked_out != $this->user->id ? 
						JHtml::_('jgrid.checkedout', $i, JFactory::getUser($row->checked_out)->name, $row->checked_out_time, 'patterns.', $canCheckin) . '<input type="checkbox" style="display:none" data-enabled="false" id="cb' . $i . '" name="cid[]" value="' . $row->id . '"/>': 
						JHtml::_('grid.id', $i, $row->id);
		} else {
			$checked = '<input type="checkbox" style="display:none" data-enabled="false" id="cb' . $i . '" name="cid[]" value="' . $row->id . '"/>';
		}
		?>
		<tr>
			<td align="center">
				<?php echo $this->pagination->getRowOffset($i); ?>
			</td>
			<td>
				<?php echo $checked; ?>
			</td>
			<td>
				<?php
				if ( ($row->checked_out && ( $row->checked_out != $this->user->get ('id'))) || !$this->user->authorise('core.edit') ) {
					echo $row->original_text;
				} else {
					?>
					<a href="<?php echo $link; ?>" title="<?php echo JText::_('COM_JMAP_EDIT_LINK' ); ?>">
						<span class='fas fa-pen-square' aria-hidden='true'></span> 
						<?php echo htmlspecialchars($row->original_text, ENT_COMPAT, 'UTF-8', false); ?>
					</a>
					<?php
				}?>
			</td>
			<td>
				<?php
				if ( ($row->checked_out && ( $row->checked_out != $this->user->get ('id'))) || !$this->user->authorise('core.edit') ) {
					echo $row->target_text;
				} else {
					?>
					<a href="<?php echo $link; ?>" title="<?php echo JText::_('COM_JMAP_EDIT_LINK' ); ?>">
						<span class='fas fa-pen-square' aria-hidden='true'></span> 
						<?php echo htmlspecialchars($row->target_text, ENT_COMPAT, 'UTF-8', false); ?>
					</a>
					<?php
				}?>
			</td>
			<td>
				<?php echo $published;?>
			</td>
			<td>
				<?php echo $row->id;?>
			</td>
		</tr>
		<?php
	}
	?>
	<tfoot>
		<td colspan="13">
			<?php echo $this->pagination->getListFooter(); ?>
		</td>
	</tfoot>
	</table>

	<input type="hidden" name="option" value="<?php echo $this->option;?>" />
	<input type="hidden" name="task" value="patterns.display" />
	<input type="hidden" name="boxchecked" value="0" />
	<input type="hidden" name="filter_order" value="<?php echo @$this->orders['order'];?>" />
	<input type="hidden" name="filter_order_Dir" value="<?php echo @$this->orders['order_Dir'];?>" />
</form>