source: trunk/services/templates/versions_list.ihtml @ 720

Last change on this file since 720 was 720, checked in by anonymous, 4 years ago

Update CSS reset with inspiration from https://github.com/hankchizljaw/modern-css-reset

File size: 3.9 KB
Line 
1<header class="row">
2    <div class="large-12 columns">
3        <h1><?php echo $nav->get('title'); ?></h1>
4    </div>
5</header>
6<main role="main">
7    <form method="post" action="<?php echo oTxt($_SERVER['PHP_SELF']); ?>" class="sc-form">
8        <?php $app->printHiddenSession() ?>
9        <div class="row">
10            <div class="small-12 columns">
11                <table>
12                    <thead>
13                        <tr>
14                            <th></th>
15                            <th class="sc-padleft"><?php echo _("ID"); ?></th>
16                            <th class="sc-padleft"><?php echo _("Date"); ?></th>
17                            <th class="sc-padleft"><?php echo _("By"); ?></th>
18                        </tr>
19                    </thead>
20                    <tbody>
21                        <?php
22                        $first = true;
23                        foreach ($versions as $v) { ?>
24                        <tr>
25                            <td>
26                                <a href="#" data-dropdown="actions-for-id-<?php echo oTxt($v['version_id']); ?>" aria-controls="actions-for-id-<?php echo oTxt($v['version_id']); ?>" aria-expanded="false" class="sc-action dropdown" data-options="is_hover:false"><i class="fa fa-cog fa-lg"></i></a>
27                                <ul id="actions-for-id-<?php echo oTxt($v['version_id']); ?>" data-dropdown-content class="f-dropdown sc-action" aria-hidden="true" tabindex="-1">
28                                    <li><a href="<?php echo $app->oHREF($_SERVER['PHP_SELF'] . '?op=view&version_id=' . $v['version_id']); ?>"><i class="fa fa-eye fa-fw"></i> <?php printf(_("View version <em>%s</em>"), oTxt(truncate($v['version_id'], 30))) ?></a></li>
29                                    <?php if (!$first) { ?>
30                                        <li><a href="<?php echo $app->oHREF($_SERVER['PHP_SELF'] . '?op=diff&version_id=' . $v['version_id']); ?>"><i class="fa fa-columns fa-fw"></i> <?php printf(_("View differences from version %s"), oTxt(truncate($v['version_id'], 30))) ?></a></li>
31                                        <li><a href="<?php echo $app->oHREF($_SERVER['PHP_SELF'] . '?op=restore&version_id=' . $v['version_id']); ?>"><i class="fa fa-history fa-fw"></i> <?php printf(_("Restore version <em>%s</em>"), oTxt(truncate($v['version_id'], 30))) ?></a></li>
32                                    <?php } ?>
33                                </ul>
34                            </td>
35                            <td class="sc-padleft sc-nowrap"><?php echo $v['version_id']; ?></td>
36                            <td class="sc-padleft sc-nowrap"><?php
37                                echo date(sprintf('%s %s', $app->getParam('date_format'), $app->getParam('time_format')), strtotime($v['version_datetime']));
38                                if ($first) {
39                                    ?> <span><em>(<?php echo _("The current record"); ?>)</em></span><?php
40                                }
41                                ?></td>
42                            <td class="sc-padleft sc-nowrap"><?php echo $v['editor']; ?></td>
43                        </tr>
44                        <?php
45                        $first = false;
46                        }
47                        ?>
48                    </tbody>
49                </table>
50                <p class="sc-help"><?php printf(_("When there are more than %s versions, those over %s days old are deleted."), $version->getParam('min_qty'), $version->getParam('min_days')); ?></p>
51            </div>
52        </div>
53        <div class="row">
54            <div class="small-12 columns">
55                <?php
56                // Buttons.
57                $action_links = array();
58                $action_links[] = array('href' => $app->ohref('?op=cancel'), 'value' => _("Cancel"), 'class' => 'small button secondary', 'accesskey' => 'c');
59                HTML::printButtons($action_links);
60                ?>
61            </div>
62        </div>
63    </form>
64</main>
Note: See TracBrowser for help on using the repository browser.