33
0
mirror of https://github.com/joomla-extensions/patchtester.git synced 2024-11-14 01:04:07 +00:00
patchtester/administrator/components/com_patchtester/views/pulls/tmpl/default.php

122 lines
4.8 KiB
PHP
Raw Normal View History

2011-10-11 13:02:57 +00:00
<?php
/**
2013-07-13 02:26:21 +00:00
* @package PatchTester
*
2014-01-03 02:48:28 +00:00
* @copyright Copyright (C) 2011 - 2012 Ian MacLennan, Copyright (C) 2013 - 2014 Open Source Matters, Inc. All rights reserved.
2013-07-13 02:26:21 +00:00
* @license GNU General Public License version 2 or later
2011-10-11 13:02:57 +00:00
*/
defined('_JEXEC') or die;
/** @type PatchtesterViewPulls $this */
2011-10-11 13:02:57 +00:00
JHtml::_('behavior.tooltip');
JHtml::_('behavior.modal');
2011-10-11 13:02:57 +00:00
$listOrder = $this->escape($this->state->get('list.ordering'));
$listDirn = $this->escape($this->state->get('list.direction'));
$sortFields = $this->getSortFields();
2011-10-13 17:58:22 +00:00
if (count($this->envErrors)) :
$this->loadTemplate('errors');
else :
2011-10-11 13:02:57 +00:00
?>
<script type="text/javascript">
2012-06-12 18:42:03 +00:00
var submitpatch = function (task, id) {
2011-10-11 13:02:57 +00:00
document.id('pull_id').set('value', id);
return Joomla.submitbutton(task);
}
Joomla.orderTable = function() {
table = document.getElementById('sortTable');
direction = document.getElementById('directionTable');
order = table.options[table.selectedIndex].value;
if (order != '<?php echo $listOrder; ?>') {
dirn = 'asc';
} else {
dirn = direction.options[direction.selectedIndex].value;
}
Joomla.tableOrdering(order, dirn, '');
}
2011-10-11 13:02:57 +00:00
</script>
2013-07-13 02:26:21 +00:00
<form action="<?php echo JRoute::_('index.php?option=com_patchtester&view=pulls'); ?>" method="post" name="adminForm" id="adminForm">
<div id="filter-bar" class="btn-toolbar">
<div class="btn-group pull-right">
<label for="sortTable" class="element-invisible"><?php echo JText::_('JGLOBAL_SORT_BY'); ?></label>
<select name="sortTable" id="sortTable" class="input-medium" onchange="Joomla.orderTable()">
<option value=""><?php echo JText::_('JGLOBAL_SORT_BY'); ?></option>
<?php echo JHtml::_('select.options', $sortFields, 'value', 'text', $listOrder);?>
</select>
</div>
</div>
2013-07-13 02:51:14 +00:00
<div id="j-main-container">
<div id="filter-bar" class="btn-toolbar">
<div class="filter-search btn-group pull-left">
<label for="filter_search" class="element-invisible"><?php echo JText::_('COM_PATCHTESTER_FILTER_SEARCH_DESCRIPTION'); ?></label>
<input type="text" name="filter_search" placeholder="<?php echo JText::_('COM_PATCHTESTER_FILTER_SEARCH_DESCRIPTION'); ?>" id="filter_search" value="<?php echo $this->escape($this->state->get('filter.search')); ?>" title="<?php echo JText::_('COM_PATCHTESTER_FILTER_SEARCH_DESCRIPTION'); ?>" />
</div>
2013-07-13 02:51:14 +00:00
<div class="btn-group pull-left hidden-phone">
<button class="btn tip hasTooltip" type="submit" title="<?php echo JText::_('JSEARCH_FILTER_SUBMIT'); ?>"><i class="icon-search"></i></button>
<button class="btn tip hasTooltip" type="button" onclick="document.id('filter_search').value='';this.form.submit();" title="<?php echo JText::_('JSEARCH_FILTER_CLEAR'); ?>"><i class="icon-remove"></i></button>
2013-07-13 02:51:14 +00:00
</div>
<div class="btn-group pull-right hidden-phone">
<label for="limit" class="element-invisible"><?php echo JText::_('JFIELD_PLG_SEARCH_SEARCHLIMIT_DESC'); ?></label>
<?php echo $this->pagination->getLimitBox(); ?>
</div>
<div class="btn-group pull-right hidden-phone">
<label for="directionTable" class="element-invisible"><?php echo JText::_('JFIELD_ORDERING_DESC'); ?></label>
<select name="directionTable" id="directionTable" class="input-medium" onchange="Joomla.orderTable()">
<option value=""><?php echo JText::_('JFIELD_ORDERING_DESC');?></option>
<option value="asc" <?php if ($listDirn == 'asc') echo 'selected="selected"'; ?>><?php echo JText::_('JGLOBAL_ORDER_ASCENDING'); ?></option>
<option value="desc" <?php if ($listDirn == 'desc') echo 'selected="selected"'; ?>><?php echo JText::_('JGLOBAL_ORDER_DESCENDING'); ?></option>
</select>
</div>
2013-07-13 02:51:14 +00:00
</div>
<div class="clearfix"> </div>
2012-09-09 01:53:44 +00:00
2013-07-13 02:51:14 +00:00
<table class="table table-striped">
<thead>
2013-07-13 02:26:21 +00:00
<tr>
2013-07-13 02:51:14 +00:00
<th width="5%" class="nowrap center">
<?php echo JText::_('COM_PATCHTESTER_PULL_ID'); ?>
2013-07-13 02:51:14 +00:00
</th>
<th class="nowrap center">
<?php echo JText::_('JGLOBAL_TITLE'); ?>
2013-07-13 02:51:14 +00:00
</th>
<th class="nowrap center">I</th>
<th width="20%" class="nowrap center">
<?php echo JText::_('JSTATUS'); ?>
2013-07-13 02:51:14 +00:00
</th>
<th width="20%" class="nowrap center">
<?php echo JText::_('COM_PATCHTESTER_TEST_THIS_PATCH'); ?>
</th>
2013-07-13 02:26:21 +00:00
</tr>
2013-07-13 02:51:14 +00:00
</thead>
<tfoot>
<tr>
<td colspan="6">
</td>
</tr>
</tfoot>
<tbody>
<?php if (count($this->items)) :
echo $this->loadTemplate('items');
else : ?>
<td align="center" colspan="6"><?php echo JText::_('COM_PATCHTESTER_NO_ITEMS'); ?></td>
<?php endif; ?>
2013-07-13 02:51:14 +00:00
</tbody>
</table>
<?php echo $this->pagination->getListFooter(); ?>
2011-10-11 13:02:57 +00:00
2013-07-13 02:51:14 +00:00
<input type="hidden" name="task" value=""/>
<input type="hidden" name="boxchecked" value="0"/>
<input type="hidden" name="pull_id" id="pull_id" value=""/>
<input type="hidden" name="filter_order" value="<?php echo $listOrder; ?>"/>
<input type="hidden" name="filter_order_Dir" value="<?php echo $listDirn; ?>"/>
<?php echo JHtml::_('form.token'); ?>
2011-10-11 13:02:57 +00:00
</div>
</form>
<?php endif;