33
0
mirror of https://github.com/joomla-extensions/patchtester.git synced 2024-12-27 04:32:48 +00:00
patchtester/administrator/components/com_patchtester/views/pulls/tmpl/default.php

133 lines
4.5 KiB
PHP
Raw Normal View History

2011-10-11 13:02:57 +00:00
<?php
/**
* @package PatchTester
* @copyright Copyright (C) 2011 Ian MacLennan, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// no direct access
defined('_JEXEC') or die;
JHtml::_('behavior.tooltip');
JHtml::_('behavior.modal');
2011-10-11 13:02:57 +00:00
2011-10-13 17:58:22 +00:00
$listOrder = $this->escape($this->state->get('list.ordering'));
$listDirn = $this->escape($this->state->get('list.direction'));
2011-10-11 13:02:57 +00:00
?>
<script type="text/javascript">
var submitpatch = function(task, id) {
document.id('pull_id').set('value', id);
return Joomla.submitbutton(task);
}
</script>
<form action="<?php echo JRoute::_('index.php?option=com_patchtester&view=pulls'); ?>" method="post" name="adminForm" id="adminForm">
2011-10-13 17:58:22 +00:00
<fieldset id="filter-bar">
<div class="filter-search fltlft">
2011-10-15 07:10:25 +00:00
<strong><?php echo JText::_('JSEARCH_FILTER_LABEL'); ?></strong><br />
<label class="filter-search-lbl" for="filter_searchid"><?php echo JText::_('COM_PATCHTESTER_SEARCH_IN_PULL_ID'); ?></label>
<input type="text" name="filter_searchid" id="filter_searchid" size="5"
value="<?php echo $this->escape($this->state->get('filter.searchid')); ?>"
title="<?php echo JText::_('COM_PATCHTESTER_SEARCH_IN_PULL_ID'); ?>" />
<label class="filter-search-lbl" for="filter_search"><?php echo JText::_('COM_PATCHTESTER_SEARCH_IN_TITLE'); ?></label>
<input type="text" name="filter_search" id="filter_search"
value="<?php echo $this->escape($this->state->get('filter.search')); ?>"
title="<?php echo JText::_('COM_PATCHTESTER_SEARCH_IN_TITLE'); ?>" />
2011-10-13 17:58:22 +00:00
<button type="submit"><?php echo JText::_('JSEARCH_FILTER_SUBMIT'); ?></button>
2011-10-15 07:10:25 +00:00
<button type="button" onclick="document.id('filter_search').value='';document.id('filter_searchid').value='';this.form.submit();">
<?php echo JText::_('JSEARCH_FILTER_CLEAR'); ?>
</button>
2011-10-13 17:58:22 +00:00
</div>
</fieldset>
<div class="clr"> </div>
2011-10-11 13:02:57 +00:00
<table class="adminlist">
<thead>
<tr>
<th width="1%">
<input type="checkbox" name="checkall-toggle" value="" title="<?php echo JText::_('JGLOBAL_CHECK_ALL'); ?>" onclick="Joomla.checkAll(this)" />
</th>
2011-10-13 17:58:22 +00:00
<th width="5%">
<?php echo JHtml::_('grid.sort', 'COM_PATCHTESTER_PULL_ID', 'number', $listDirn, $listOrder); ?>
</th>
2011-10-11 13:02:57 +00:00
<th class="title">
2011-10-13 17:58:22 +00:00
<?php echo JHtml::_('grid.sort', 'JGLOBAL_TITLE', 'title', $listDirn, $listOrder); ?>
2011-10-11 13:02:57 +00:00
</th>
<th class="title">
<?php echo JText::_('COM_PATCHTESTER_JOOMLACODE_ISSUE'); ?>
</th>
2011-10-11 13:02:57 +00:00
<th width="20%">
<?php echo JText::_('JSTATUS'); ?>
</th>
<th width="20%">
<?php echo JText::_('COM_PATCHTESTER_TEST_THIS_PATCH'); ?>
</th>
</tr>
</thead>
<tfoot>
<tr>
<td colspan="10">
</td>
</tr>
</tfoot>
<tbody>
<?php foreach ($this->items as $i => $item) :
if (isset($this->patches[$item->number])) {
$patch = $this->patches[$item->number];
} else {
$patch = false;
}
?>
<tr class="row<?php echo $i % 2; ?>">
<td class="center">
<?php echo JHtml::_('grid.id', $i, $item->id); ?>
</td>
2011-10-13 17:58:22 +00:00
<td class="center">
<?php echo $item->number; ?>
</td>
2011-10-11 13:02:57 +00:00
<td>
<a href="<?php echo $item->html_url; ?>" title="<?php echo htmlspecialchars($item->body); ?>"><?php echo $item->title; ?></a>
2011-10-11 13:02:57 +00:00
</td>
<td>
<?php
if ($item->joomlacode_issue > 0) {
echo '<a href="http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=';
echo $item->joomlacode_issue . '" class="modal" rel="{handler: \'iframe\', size: {x: 900, y: 500}}">';
echo '[#' . $item->joomlacode_issue . ']</a>';
}
?>
</td>
2011-10-11 13:02:57 +00:00
<td class="center">
<?php
if ($patch && $patch->applied) {
echo JText::_('COM_PATCHTESTER_APPLIED');
} else {
echo JText::_('COM_PATCHTESTER_NOT_APPLIED');
}
?>
</td>
<td class="center">
<?php
if ($patch && $patch->applied) {
echo '<a href="javascript:submitpatch(\'pull.revert\', '.(int)$patch->id.');">'.JText::_('COM_PATCHTESTER_REVERT_PATCH').'</a>';
} else {
echo '<a href="javascript:submitpatch(\'pull.apply\', '.(int)$item->number.');">'.JText::_('COM_PATCHTESTER_APPLY_PATCH').'</a>';
}
?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<div>
<input type="hidden" name="task" value="" />
<input type="hidden" name="boxchecked" value="0" />
<input type="hidden" name="pull_id" id="pull_id" value="" />
2011-10-13 17:58:22 +00:00
<input type="hidden" name="filter_order" value="<?php echo $listOrder; ?>" />
<input type="hidden" name="filter_order_Dir" value="<?php echo $listDirn; ?>" />
2011-10-11 13:02:57 +00:00
<?php echo JHtml::_('form.token'); ?>
</div>
</form>