33
0
mirror of https://github.com/joomla-extensions/patchtester.git synced 2025-02-02 20:08:25 +00:00

Hathor is broken

This commit is contained in:
dgt41 2015-05-06 04:19:11 +03:00
parent 9e5c274e3c
commit 8d32494a93
2 changed files with 18 additions and 19 deletions

View File

@ -8,20 +8,21 @@
defined('_JEXEC') or die; defined('_JEXEC') or die;
JHtml::_('behavior.tooltip'); JHtml::_('behavior.core');
JHtml::_('behavior.modal'); JHtml::_('bootstrap.tooltip');
$listOrder = $this->escape($this->state->get('list.ordering')); $listOrder = $this->escape($this->state->get('list.ordering'));
$listDirn = $this->escape($this->state->get('list.direction')); $listDirn = $this->escape($this->state->get('list.direction'));
?> JFactory::getDocument()->addScriptDeclaration(
<script type="text/javascript"> "
var submitpatch = function (task, id) { var submitpatch = function (task, id) {
document.getElementById('pull_id').set('value', id); document.getElementById('pull_id').set('value', id);
return Joomla.submitbutton(task); return Joomla.submitbutton(task);
} }
</script> "
);
?>
<form action="<?php echo JRoute::_('index.php?option=com_patchtester&view=pulls'); ?>" method="post" name="adminForm" id="adminForm"> <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="j-main-container">
<fieldset id="filter-bar"> <fieldset id="filter-bar">

View File

@ -11,32 +11,30 @@ defined('_JEXEC') or die;
foreach ($this->items as $i => $item) : foreach ($this->items as $i => $item) :
$status = ''; $status = '';
if (isset($this->patches[$item->number])) : if ($item->applied) :
$patch = $this->patches[$item->number]; $status = ' success';
$status = ($patch->applied) ? ' success' : '';
else :
$patch = false;
endif; endif;
?> ?>
<tr class="row<?php echo $i % 2; ?><?php echo $status ?>"> <tr class="row<?php echo $i % 2; ?><?php echo $status ?>">
<td class="center"> <td class="center">
<?php echo $item->number; ?> <?php echo $item->pull_id; ?>
</td> </td>
<td> <td>
<a class="icon icon16-github hasTip" title="<?php echo JText::_('COM_PATCHTESTER_OPEN_IN_GITHUB'); ?>" href="<?php echo $item->html_url; ?>" target="_blank"> <a class="icon icon16-github hasTooltip" title="<?php echo JText::_('COM_PATCHTESTER_OPEN_IN_GITHUB'); ?>" href="<?php echo $item->pull_url; ?>" target="_blank">
<?php echo $this->escape($item->title); ?> <?php echo $this->escape($item->title); ?>
</a> </a>
</td> </td>
<td> <td>
<?php if ($item->body) : <?php if ($item->title) :
echo JHtml::_('tooltip', htmlspecialchars($item->body), 'Info'); echo JHtml::_('tooltip', htmlspecialchars($item->title), 'Info');
else : else :
echo '&nbsp;'; echo '&nbsp;';
endif; endif;
?> ?>
</td> </td>
<td class="center"> <td class="center">
<?php if ($patch && $patch->applied) : ?> <?php if ($item->applied) : ?>
<span class="label label-success"> <span class="label label-success">
<?php echo JText::_('COM_PATCHTESTER_APPLIED'); ?> <?php echo JText::_('COM_PATCHTESTER_APPLIED'); ?>
</span> </span>
@ -47,10 +45,10 @@ foreach ($this->items as $i => $item) :
<?php endif; ?> <?php endif; ?>
</td> </td>
<td class="center"> <td class="center">
<?php if ($patch && $patch->applied) : <?php if ($item->applied) :
echo '<a class="btn btn-small btn-success" href="javascript:submitpatch(\'pull.revert\', ' . (int) $patch->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 : else :
echo '<a class="btn btn-small btn-primary" href="javascript:submitpatch(\'pull.apply\', ' . (int) $item->number . ');">' . 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; ?> endif; ?>
</td> </td>
</tr> </tr>