PageRenderTime 15ms CodeModel.GetById 12ms app.highlight 1ms RepoModel.GetById 0ms app.codeStats 1ms

/administrator/templates/hathor/html/com_redirect/links/default.php

https://bitbucket.org/eternaware/joomus
PHP | 131 lines | 112 code | 11 blank | 8 comment | 5 complexity | bb9dbd823bb2e66dc71f4668f38b113f MD5 | raw file
Possible License(s): LGPL-2.1
  1<?php
  2/**
  3 * @package     Joomla.Administrator
  4 * @subpackage  Template.hathor
  5 *
  6 * @copyright   Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
  7 * @license     GNU General Public License version 2 or later; see LICENSE.txt
  8 */
  9
 10defined('_JEXEC') or die;
 11
 12// Include the component HTML helpers.
 13JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
 14JHtml::_('behavior.tooltip');
 15JHtml::_('behavior.multiselect');
 16
 17$user		= JFactory::getUser();
 18$listOrder	= $this->escape($this->state->get('list.ordering'));
 19$listDirn	= $this->escape($this->state->get('list.direction'));
 20?>
 21
 22<form action="<?php echo JRoute::_('index.php?option=com_redirect&view=links'); ?>" method="post" name="adminForm" id="adminForm">
 23	<fieldset id="filter-bar">
 24	<legend class="element-invisible"><?php echo JText::_('JSEARCH_FILTER_LABEL'); ?></legend>
 25		<div class="filter-search">
 26			<label class="filter-search-lbl" for="filter_search"><?php echo JText::_('JSEARCH_FILTER_LABEL'); ?></label>
 27			<input type="text" name="filter_search" id="filter_search" value="<?php echo $this->escape($this->state->get('filter.search')); ?>" title="<?php echo JText::_('COM_REDIRECT_SEARCH_LINKS'); ?>" />
 28			<button type="submit"><?php echo JText::_('JSEARCH_FILTER_SUBMIT'); ?></button>
 29			<button type="button" onclick="document.id('filter_search').value='';this.form.submit();"><?php echo JText::_('JSEARCH_FILTER_CLEAR'); ?></button>
 30		</div>
 31
 32		<div class="filter-select">
 33			<label class="selectlabel" for="filter_published">
 34				<?php echo JText::_('JOPTION_SELECT_PUBLISHED'); ?>
 35			</label>
 36			<select name="filter_state" class="inputbox" id="filter_published">
 37				<option value=""><?php echo JText::_('JOPTION_SELECT_PUBLISHED');?></option>
 38				<?php echo JHtml::_('select.options', RedirectHelper::publishedOptions(), 'value', 'text', $this->state->get('filter.state'), true);?>
 39			</select>
 40
 41			<button type="submit" id="filter-go">
 42				<?php echo JText::_('JSUBMIT'); ?></button>
 43		</div>
 44	</fieldset>
 45	<div class="clr"> </div>
 46
 47	<table class="adminlist">
 48		<thead>
 49			<tr>
 50				<th class="checkmark-col">
 51					<input type="checkbox" name="checkall-toggle" value="" title="<?php echo JText::_('JGLOBAL_CHECK_ALL'); ?>" onclick="Joomla.checkAll(this)" />
 52				</th>
 53				<th class="title">
 54					<?php echo JHtml::_('grid.sort', 'COM_REDIRECT_HEADING_OLD_URL', 'a.old_url', $listDirn, $listOrder); ?>
 55				</th>
 56				<th class="width-30">
 57					<?php echo JHtml::_('grid.sort', 'COM_REDIRECT_HEADING_NEW_URL', 'a.new_url', $listDirn, $listOrder); ?>
 58				</th>
 59				<th class="width-30">
 60					<?php echo JHtml::_('grid.sort', 'COM_REDIRECT_HEADING_REFERRER', 'a.referer', $listDirn, $listOrder); ?>
 61				</th>
 62				<th class="width-10">
 63					<?php echo JHtml::_('grid.sort', 'COM_REDIRECT_HEADING_CREATED_DATE', 'a.created_date', $listDirn, $listOrder); ?>
 64				</th>
 65				<th class="nowrap state-col">
 66					<?php echo JHtml::_('grid.sort', 'JSTATUS', 'a.published', $listDirn, $listOrder); ?>
 67				</th>
 68				<th class="nowrap id-col">
 69					<?php echo JHtml::_('grid.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?>
 70				</th>
 71			</tr>
 72		</thead>
 73
 74		<tbody>
 75		<?php foreach ($this->items as $i => $item) :
 76			$canCreate = $user->authorise('core.create',     'com_redirect');
 77			$canEdit   = $user->authorise('core.edit',       'com_redirect');
 78			$canChange = $user->authorise('core.edit.state', 'com_redirect');
 79			?>
 80			<tr class="row<?php echo $i % 2; ?>">
 81				<td class="center">
 82					<?php echo JHtml::_('grid.id', $i, $item->id); ?>
 83				</td>
 84				<td>
 85					<?php if ($canEdit) : ?>
 86						<a href="<?php echo JRoute::_('index.php?option=com_redirect&task=link.edit&id='.$item->id);?>" title="<?php echo $this->escape($item->old_url); ?>">
 87							<?php echo $this->escape(str_replace(JURI::root(), '', $item->old_url)); ?></a>
 88					<?php else : ?>
 89							<?php echo $this->escape(str_replace(JURI::root(), '', $item->old_url)); ?>
 90					<?php endif; ?>
 91				</td>
 92				<td>
 93					<?php echo $this->escape($item->new_url); ?>
 94				</td>
 95				<td>
 96					<?php echo $this->escape($item->referer); ?>
 97				</td>
 98				<td class="center">
 99					<?php echo JHtml::_('date', $item->created_date, JText::_('DATE_FORMAT_LC4')); ?>
100				</td>
101				<td class="center">
102					<?php echo JHtml::_('redirect.published', $item->published, $i); ?>
103				</td>
104				<td class="center">
105					<?php echo (int) $item->id; ?>
106				</td>
107			</tr>
108			<?php endforeach; ?>
109		</tbody>
110	</table>
111
112	<?php echo $this->pagination->getListFooter(); ?>
113	<p class="footer-tip">
114		<?php if ($this->enabled) : ?>
115			<span class="enabled"><?php echo JText::_('COM_REDIRECT_PLUGIN_ENABLED'); ?></span>
116		<?php else : ?>
117			<span class="disabled"><?php echo JText::_('COM_REDIRECT_PLUGIN_DISABLED'); ?></span>
118		<?php endif; ?>
119	</p>
120	<div class="clr"></div>
121
122	<?php if (!empty($this->items)) : ?>
123		<?php echo $this->loadTemplate('addform'); ?>
124	<?php endif; ?>
125
126	<input type="hidden" name="task" value="" />
127	<input type="hidden" name="boxchecked" value="0" />
128	<input type="hidden" name="filter_order" value="<?php echo $listOrder; ?>" />
129	<input type="hidden" name="filter_order_Dir" value="<?php echo $listDirn; ?>" />
130	<?php echo JHtml::_('form.token'); ?>
131</form>