To participate you must create an account on apostrophenow.org. If you have already done so, click Login.

root/plugins/apostrophePlugin/branches/1.5/modules/a/templates/historySuccess.php @ 3135

Revision 3135, 1.6 KB (checked in by tboutell, 2 years ago)

* Viddler now supports wmode, so menus don't get lost behind the embeds

* John is having issues reproducing a bug with history and says it would be easier if history included time of day which is true. The dialog is big enough, so I'm calling aDate::pretty and aDate::time instead of some older stuff, and now he should be able to find that bug

Line 
1<?php
2  // Compatible with sf_escaping_strategy: true
3  $all = isset($all) ? $sf_data->getRaw('all') : null;
4  $id = isset($id) ? $sf_data->getRaw('id') : null;
5  $n = isset($n) ? $sf_data->getRaw('n') : null;
6  $name = isset($name) ? $sf_data->getRaw('name') : null;
7  $versions = isset($versions) ? $sf_data->getRaw('versions') : null;
8?>
9<?php use_helper('a', 'Date') ?>
10
11<?php $n=0; foreach ($versions as $data): ?>
12<tr class="a-history-item" id="a-history-item-<?php echo $data['version'] ?>">
13  <?php if (0): ?>
14          <td class="id">
15                  <?php echo __('ID#', null, 'apostrophe') ?>
16          </td>
17        <?php endif ?>
18        <td class="date">
19          <?php // Localize the date. We used to do: "j M Y - g:iA" ?>
20          <?php // Avoid a crash in some versions of PHP when date columns ?>
21          <?php // are null or all zeroes ?>
22          <?php if ($data['created_at'] > '0000-00-00 00:00:00'): ?>
23                  <?php echo aDate::pretty($data['created_at']) . ' ' . aDate::time($data['created_at']) ?>
24                <?php endif ?>
25        </td>
26        <td class="editor">
27                <?php echo $data['author'] ?>
28        </td>
29        <td class="preview">
30                <?php echo $data['diff'] ?>
31        </td>
32</tr>
33<?php $n++; endforeach ?>
34
35<?php a_js_call('apostrophe.historyOpen(?)', array('id' => $id, 'name' => $name, 'versionsInfo' => $versions, 'all' => $all, 'revert' => url_for('a/revert'), 'revisionsLabel' => a_(' Revisions'))) ?>
36
37<?php if (count($versions) == 0): ?>
38        <tr class="a-history-item">
39                <td class="id">
40                </td>
41                <td class="date">
42                        <?php echo __('No history found.', null, 'apostrophe') ?>
43                </td>
44                <td class="editor">
45                </td>
46                <td class="preview">
47                </td>
48        </tr>
49<?php endif ?>
50
51<?php include_partial('a/globalJavascripts') ?>
Note: See TracBrowser for help on using the browser.