31
0
mirror of https://github.com/joomla-extensions/patchtester.git synced 2024-06-01 05:10:48 +00:00
patchtester/administrator/components/com_patchtester/views/pulls/tmpl/default_items.php
2012-06-12 13:42:03 -05:00

90 lines
2.3 KiB
PHP

<?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;
foreach ($this->items as $i => $item) :
if (isset($this->patches[$item->number])) :
$patch = $this->patches[$item->number];
else :
$patch = false;
endif;
?>
<tr class="row<?php echo $i % 2; ?>">
<td class="center">
<?php echo JHtml::_('grid.id', $i, $item->id); ?>
</td>
<td class="center">
<?php echo $item->number; ?>
</td>
<td>
<a class="icon icon16-github hasTip"
title="<?php echo JText::_('COM_PATCHTESTER_OPEN_IN_GITHUB'); ?>"
href="<?php echo $item->html_url; ?>">
<?php echo $item->title; ?>
</a>
</td>
<td>
<?php
if ($item->body) :
echo JHtml::_('tooltip', htmlspecialchars($item->body), 'Info');
else :
echo '&nbsp;';
endif;
?>
</td>
<td>
<?php
if ($item->joomlacode_issue)
{
$title = ' title="Open link::'.JText::_('COM_PATCHTESTER_OPEN_IN_JOOMLACODE').'"';
if(is_int($item->joomlacode_issue))
{
echo '<a href="http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=';
echo $item->joomlacode_issue . '"'.$title.' class="modal hasTip" rel="{handler: \'iframe\', size: {x: 900, y: 500}}">';
echo '[#' . $item->joomlacode_issue . ']</a>';
}
else
{
echo '<a href="' . $item->joomlacode_issue . '"'.$title;
echo ' class="modal hasTip" rel="{handler: \'iframe\', size: {x: 900, y: 500}}">';
echo '[#joomlacode]</a>';
}
}
?>
</td>
<td class="center">
<?php
if ($patch && $patch->applied)
{
echo '<div class="patchApplied" style="background-color: #adff2f;">';
echo JText::_('COM_PATCHTESTER_APPLIED');
echo '</div>';
}
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;