preview.php
1.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
/**
* @package Joomla.Administrator
* @subpackage com_contenthistory
*
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
JSession::checkToken('get') or die(JText::_('JINVALID_TOKEN'));
?>
<h3>
<?php echo JText::sprintf('COM_CONTENTHISTORY_PREVIEW_SUBTITLE_DATE', $this->item->save_date); ?>
<?php if ($this->item->version_note) : ?>
<?php echo JText::sprintf('COM_CONTENTHISTORY_PREVIEW_SUBTITLE', $this->item->version_note); ?>
<?php endif; ?>
</h3>
<table class="table table-striped" >
<thead><tr>
<th width="25%"><?php echo JText::_('COM_CONTENTHISTORY_PREVIEW_FIELD'); ?></th>
<th><?php echo JText::_('COM_CONTENTHISTORY_PREVIEW_VALUE'); ?></th>
</tr></thead>
<tbody>
<?php foreach ($this->item->data as $name => $value) : ?>
<tr>
<?php if (is_object($value->value)) : ?>
<td><strong><?php echo $value->label; ?></strong></td>
<td></td><tr>
<?php foreach ($value->value as $subName => $subValue) : ?>
<?php if ($subValue) : ?>
<tr>
<td><i> <?php echo $subValue->label; ?></i></td>
<td><?php echo $subValue->value; ?></td>
</tr>
<?php endif; ?>
<?php endforeach; ?>
<?php else : ?>
<td><strong><?php echo $value->label; ?></strong></td>
<td><?php echo $value->value; ?></td>
<?php endif; ?>
</tr>
<?php endforeach; ?>
</tbody>
</table>