31
0
mirror of https://github.com/joomla-extensions/patchtester.git synced 2024-05-29 03:50:46 +00:00

Remove Hathor overrides

This commit is contained in:
Michael Babker 2019-08-27 18:18:54 -05:00
parent a39872f886
commit 3ad49d72ec
3 changed files with 5 additions and 189 deletions

View File

@ -23,7 +23,7 @@ class Com_PatchtesterInstallerScript extends InstallerScript
* @var array
* @since 2.0
*/
protected $templateOverrides = array('atum', 'hathor');
protected $templateOverrides = array('atum');
/**
* Extension script constructor.
@ -37,10 +37,14 @@ class Com_PatchtesterInstallerScript extends InstallerScript
$this->deleteFiles = array(
'/administrator/components/com_patchtester/PatchTester/View/Pulls/tmpl/default_errors.php',
'/administrator/templates/hathor/html/com_patchtester/pulls/default.php',
'/administrator/templates/hathor/html/com_patchtester/pulls/default_items.php',
);
$this->deleteFolders = array(
'/administrator/components/com_patchtester/PatchTester/Table',
'/administrator/templates/hathor/html/com_patchtester/pulls',
'/administrator/templates/hathor/html/com_patchtester',
'/components/com_patchtester',
);
}

View File

@ -1,119 +0,0 @@
<?php
/**
* Patch testing component for the Joomla! CMS
*
* @copyright Copyright (C) 2011 - 2012 Ian MacLennan, Copyright (C) 2013 - 2018 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later
*/
use Joomla\CMS\Factory;
use Joomla\CMS\Uri\Uri;
/** @var \PatchTester\View\Pulls\PullsHtmlView $this */
\JHtml::_('behavior.core');
\JHtml::_('bootstrap.tooltip');
\JHtml::_('stylesheet', 'com_patchtester/octicons.css', array('version' => 'auto', 'relative' => true));
\JHtml::_('script', 'com_patchtester/patchtester.js', array('version' => 'auto', 'relative' => 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'));
$filterBranch = $this->escape($this->state->get('filter.branch'));
$filterRtc = $this->escape($this->state->get('filter.rtc'));
$colSpan = $this->trackerAlias !== false ? 8 : 7;
Factory::getDocument()->addStyleDeclaration(
'
.icon-48-patchtester { background-image:url("/media/com_patchtester/images/icon-48-patchtester.png"); }
'
);
echo \JHtml::_(
'bootstrap.renderModal',
'modal-refresh',
array(
'url' => Uri::root() . 'administrator/index.php?option=com_patchtester&view=fetch&tmpl=component',
'title' => \JText::_('COM_PATCHTESTER_TOOLBAR_FETCH_DATA'),
'width' => '800px',
'height' => '300px'
)
);
?>
<form action="<?php echo \JRoute::_('index.php?option=com_patchtester&view=pulls'); ?>" method="post" name="adminForm" id="adminForm">
<div id="j-main-container">
<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="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>
<label class="selectlabel" for="filter_rtc"><?php echo \JText::_('COM_PATCHTESTER_FILTER_RTC_PATCHES'); ?></label>
<select name="filter_rtc" id="filter_rtc">
<option value=""><?php echo \JText::_('COM_PATCHTESTER_FILTER_RTC_PATCHES'); ?></option>
<option value="yes"<?php if ($filterRtc == 'yes') echo ' selected="selected"'; ?>><?php echo \JText::_('COM_PATCHTESTER_RTC'); ?></option>
<option value="no"<?php if ($filterRtc == 'no') echo ' selected="selected"'; ?>><?php echo \JText::_('COM_PATCHTESTER_NOT_RTC'); ?></option>
</select>
<label class="selectlabel" for="filter_branch"><?php echo \JText::_('COM_PATCHTESTER_FILTER_BRANCH'); ?></label>
<select name="filter_branch" id="filter_branch">
<option value=""><?php echo \JText::_('COM_PATCHTESTER_FILTER_BRANCH'); ?></option>
<?php echo \JHtml::_('select.options', $this->branches, 'text', 'text', $filterBranch, false);?>
</select>
<button type="submit" id="filter-go"><?php echo \JText::_('JSUBMIT'); ?></button>
</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', 'a.pull_id', $listDirn, $listOrder); ?>
</th>
<th class="nowrap">
<?php echo \JHtml::_('grid.sort', 'JGLOBAL_TITLE', 'a.title', $listDirn, $listOrder); ?>
</th>
<th width="8%" class="nowrap center">
<?php echo \JText::_('COM_PATCHTESTER_BRANCH'); ?>
</th>
<th width="8%" class="nowrap center">
<?php echo \JText::_('COM_PATCHTESTER_READY_TO_COMMIT'); ?>
</th>
<th width="8%" class="nowrap center">
<?php echo \JText::_('COM_PATCHTESTER_GITHUB'); ?>
</th>
<?php if ($this->trackerAlias !== false) : ?>
<th width="8%" class="nowrap center">
<?php echo \JText::_('COM_PATCHTESTER_JISSUES'); ?>
</th>
<?php endif; ?>
<th width="10%" class="nowrap center">
<?php echo \JHtml::_('grid.sort', 'JSTATUS', 'applied', $listDirn, $listOrder); ?>
</th>
<th width="15%" class="nowrap center">
<?php echo \JText::_('COM_PATCHTESTER_TEST_THIS_PATCH'); ?>
</th>
</tr>
</thead>
<tbody>
<?php echo $this->loadTemplate('items'); ?>
</tbody>
</table>
<?php echo $this->pagination->getListFooter(); ?>
<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'); ?>
</div>
</form>

View File

@ -1,69 +0,0 @@
<?php
/**
* Patch testing component for the Joomla! CMS
*
* @copyright Copyright (C) 2011 - 2012 Ian MacLennan, Copyright (C) 2013 - 2018 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later
*/
/** @var \PatchTester\View\DefaultHtmlView $this */
foreach ($this->items as $i => $item) :
$status = '';
if ($item->applied) :
$status = ' success';
endif;
?>
<tr class="row<?php echo $i % 2; ?><?php echo $status ?>">
<td class="center">
<?php echo $item->pull_id; ?>
</td>
<td>
<p class="hasTooltip" title="<?php echo $this->escape($item->description); ?>">
<?php echo $this->escape($item->title); ?>
</p>
<?php if ($item->applied) : ?>
<p class="smallsub">
<span class="label label-info"><?php echo \JText::sprintf('COM_PATCHTESTER_APPLIED_COMMIT_SHA', substr($item->sha, 0, 10)); ?></span>
</p>
<?php endif; ?>
</td>
<td class="center">
<?php echo $this->escape($item->branch); ?>
</td>
<td class="center">
<?php if ($item->is_rtc) : ?>
<span class="label label-success"><?php echo \JText::_('JYES'); ?></span>
<?php else : ?>
<span class="label label-primary"><?php echo \JText::_('JNO'); ?></span>
<?php endif; ?>
</td>
<td>
<a class="btn btn-small btn-info" href="<?php echo $item->pull_url; ?>" target="_blank">
<span class="octicon octicon-mark-github"></span> <?php echo \JText::_('COM_PATCHTESTER_GITHUB'); ?>
</a>
</td>
<?php if ($this->trackerAlias !== false) : ?>
<td>
<a class="btn btn-small btn-warning" href="https://issues.joomla.org/tracker/<?php echo $this->trackerAlias; ?>/<?php echo $item->pull_id; ?>" target="_blank">
<i class="icon-joomla"></i> <?php echo \JText::_('COM_PATCHTESTER_JISSUE'); ?>
</a>
</td>
<?php endif; ?>
<td class="center">
<?php if ($item->applied) : ?>
<span class="label label-success"><?php echo \JText::_('COM_PATCHTESTER_APPLIED'); ?></span>
<?php else : ?>
<span class="label"><?php echo \JText::_('COM_PATCHTESTER_NOT_APPLIED'); ?></span>
<?php endif; ?>
</td>
<td class="center">
<?php if ($item->applied) : ?>
<a class="btn btn-small btn-success" href="javascript:PatchTester.submitpatch('revert', '<?php echo (int) $item->applied; ?>');"><?php echo \JText::_('COM_PATCHTESTER_REVERT_PATCH'); ?></a><br />
<?php else : ?>
<a class="btn btn-small btn-primary" href="javascript:PatchTester.submitpatch('apply', '<?php echo (int) $item->pull_id; ?>');"><?php echo \JText::_('COM_PATCHTESTER_APPLY_PATCH'); ?></a>
<?php endif; ?>
</td>
</tr>
<?php endforeach;