mirror of
https://github.com/joomla-extensions/patchtester.git
synced 2024-12-23 03:19:00 +00:00
Some tweaks on the Hathor layouts
This commit is contained in:
parent
d5fce78cb3
commit
5ca5795016
@ -1,42 +1,29 @@
|
||||
<?php
|
||||
/**
|
||||
* @package PatchTester
|
||||
* Patch testing component for the Joomla! CMS
|
||||
*
|
||||
* @copyright Copyright (C) 2011 - 2012 Ian MacLennan, Copyright (C) 2013 - 2015 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
/** @type \PatchTester\View\Pulls\PullsHtmlView $this */
|
||||
|
||||
JHtml::_('behavior.core');
|
||||
JHtml::_('bootstrap.tooltip');
|
||||
\JHtml::_('behavior.core');
|
||||
\JHtml::_('bootstrap.tooltip');
|
||||
|
||||
\JHtml::_('stylesheet', 'com_patchtester/octicons.css', array(), true);
|
||||
|
||||
$listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$filterApplied = $this->escape($this->state->get('filter.applied'));
|
||||
$sortFields = $this->getSortFields();
|
||||
|
||||
JFactory::getDocument()->addScriptDeclaration(
|
||||
\JFactory::getDocument()->addScriptDeclaration(
|
||||
"
|
||||
var submitpatch = function (task, id) {
|
||||
jQuery('#pull_id').val(id);
|
||||
console.log(id);
|
||||
task = task.substr(5);
|
||||
return Joomla.submitbutton(task);
|
||||
}
|
||||
|
||||
Joomla.orderTable = function() {
|
||||
table = document.getElementById('sortTable');
|
||||
direction = document.getElementById('directionTable');
|
||||
order = table.options[table.selectedIndex].value;
|
||||
if (order != '" . $listOrder . "') {
|
||||
dirn = 'asc';
|
||||
} else {
|
||||
dirn = direction.options[direction.selectedIndex].value;
|
||||
}
|
||||
|
||||
Joomla.tableOrdering(order, dirn, '');
|
||||
}
|
||||
"
|
||||
);
|
||||
|
||||
@ -56,49 +43,34 @@ echo JHtmlBootstrap::renderModal(
|
||||
?>
|
||||
<form action="<?php echo JRoute::_('index.php?option=com_patchtester&view=pulls'); ?>" method="post" name="adminForm" id="adminForm">
|
||||
<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'); ?>" />
|
||||
<fieldset id="filter-bar">
|
||||
<legend class="element-invisible"><?php echo JText::_('JSEARCH_FILTER_LABEL'); ?></legend>
|
||||
<div class="filter-search">
|
||||
<label class="filter-search-lbl" for="filter_search"><?php echo JText::_('JSEARCH_FILTER_LABEL'); ?></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_FILTER_SEARCH_DESCRIPTION'); ?>" />
|
||||
<button type="submit" class="btn"><?php echo JText::_('JSEARCH_FILTER_SUBMIT'); ?></button>
|
||||
<button type="button" onclick="document.getElementById('filter_search').value='';this.form.submit();"><?php echo JText::_('JSEARCH_FILTER_CLEAR'); ?></button>
|
||||
</div>
|
||||
<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.getElementById('filter_search').value='';this.form.submit();" title="<?php echo \JText::_('JSEARCH_FILTER_CLEAR'); ?>"><i class="icon-remove"></i></button>
|
||||
</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>
|
||||
<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 class="btn-group pull-right">
|
||||
<label for="filter_applied" class="element-invisible"><?php echo \JText::_('JGLOBAL_SORT_BY'); ?></label>
|
||||
<select name="filter_applied" class="input-medium" onchange="this.form.submit();">
|
||||
<div class="filter-select">
|
||||
<label class="selectlabel" for="filter_applied"><?php echo JText::_('COM_PATCHTESTER_FILTER_APPLIED_PATCHES'); ?></label>
|
||||
<select name="filter_applied" id="filter_applied">
|
||||
<option value=""><?php echo \JText::_('COM_PATCHTESTER_FILTER_APPLIED_PATCHES'); ?></option>
|
||||
<option value="yes"<?php if ($filterApplied == 'yes') echo ' selected="selected"'; ?>><?php echo \JText::_('COM_PATCHTESTER_APPLIED'); ?></option>
|
||||
<option value="no"<?php if ($filterApplied == 'no') echo ' selected="selected"'; ?>><?php echo \JText::_('COM_PATCHTESTER_NOT_APPLIED'); ?></option>
|
||||
</select>
|
||||
<button type="submit" id="filter-go"><?php echo JText::_('JSUBMIT'); ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<div class="clr"> </div>
|
||||
|
||||
<table class="adminlist">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="5%" class="nowrap center">
|
||||
<?php echo JHtml::_('grid.sort', 'COM_PATCHTESTER_PULL_ID', 'number', $listDirn, $listOrder); ?>
|
||||
<?php echo JHtml::_('grid.sort', 'COM_PATCHTESTER_PULL_ID', 'a.pull_id', $listDirn, $listOrder); ?>
|
||||
</th>
|
||||
<th class="nowrap">
|
||||
<?php echo JHtml::_('grid.sort', 'JGLOBAL_TITLE', 'title', $listDirn, $listOrder); ?>
|
||||
<?php echo JHtml::_('grid.sort', 'JGLOBAL_TITLE', 'a.title', $listDirn, $listOrder); ?>
|
||||
</th>
|
||||
<th width="8%" class="nowrap center">
|
||||
<?php echo \JText::_('COM_PATCHTESTER_GITHUB'); ?>
|
||||
@ -107,7 +79,7 @@ echo JHtmlBootstrap::renderModal(
|
||||
<?php echo \JText::_('COM_PATCHTESTER_JISSUES'); ?>
|
||||
</th>
|
||||
<th width="10%" class="nowrap center">
|
||||
<?php echo \JText::_('JSTATUS'); ?>
|
||||
<?php echo JHtml::_('grid.sort', 'JSTATUS', 'applied', $listDirn, $listOrder); ?>
|
||||
</th>
|
||||
<th width="15%" class="nowrap center">
|
||||
<?php echo \JText::_('COM_PATCHTESTER_TEST_THIS_PATCH'); ?>
|
||||
|
@ -1,14 +1,13 @@
|
||||
<?php
|
||||
/**
|
||||
* @package PatchTester
|
||||
* Patch testing component for the Joomla! CMS
|
||||
*
|
||||
* @copyright Copyright (C) 2011 - 2012 Ian MacLennan, Copyright (C) 2013 - 2015 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
/** @type \PatchTester\View\Pulls\PullsHtmlView $this */
|
||||
|
||||
JHtml::stylesheet("com_patchtester/octicons.css", false, true, false);
|
||||
foreach ($this->items as $i => $item) :
|
||||
$status = '';
|
||||
|
||||
@ -39,19 +38,19 @@ foreach ($this->items as $i => $item) :
|
||||
<td class="center">
|
||||
<?php if ($item->applied) : ?>
|
||||
<span class="label label-success">
|
||||
<?php echo JText::_('COM_PATCHTESTER_APPLIED'); ?>
|
||||
<?php echo \JText::_('COM_PATCHTESTER_APPLIED'); ?>
|
||||
</span>
|
||||
<?php else : ?>
|
||||
<span class="label">
|
||||
<?php echo JText::_('COM_PATCHTESTER_NOT_APPLIED'); ?>
|
||||
<?php echo \JText::_('COM_PATCHTESTER_NOT_APPLIED'); ?>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td class="center">
|
||||
<?php if ($item->applied) :
|
||||
echo '<a class="btn btn-small btn-success" href="javascript:submitpatch(\'pull.revert\', ' . (int) $item->id . ');">' . JText::_('COM_PATCHTESTER_REVERT_PATCH') . '</a>';
|
||||
echo '<a class="btn btn-small btn-success" href="javascript:submitpatch(\'revert\', ' . (int) $item->applied . ');">' . \JText::_('COM_PATCHTESTER_REVERT_PATCH') . '</a>';
|
||||
else :
|
||||
echo '<a class="btn btn-small btn-primary" href="javascript:submitpatch(\'pull.apply\', ' . (int) $item->id . ');">' . JText::_('COM_PATCHTESTER_APPLY_PATCH') . '</a>';
|
||||
echo '<a class="btn btn-small btn-primary" href="javascript:submitpatch(\'apply\', ' . (int) $item->pull_id . ');">' . \JText::_('COM_PATCHTESTER_APPLY_PATCH') . '</a>';
|
||||
endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
Loading…
Reference in New Issue
Block a user