source: trunk/services/templates/log_list.ihtml @ 497

Last change on this file since 497 was 497, checked in by anonymous, 10 years ago

Beginning the process of adapting codebase to foundation styles.

File size: 4.9 KB
Line 
1<div class="sticky">
2    <nav class="top-bar list-bar" data-topbar role="navigation" data-options="sticky_on: large">
3        <ul class="title-area">
4            <li class="name"><h1><a href="#"><?php echo $nav->get('title'); ?></a></h1></li>
5            <li class="toggle-topbar"><a href="#"><span><?php echo _("Show commands"); ?></span></a></li>
6        </ul>
7        <section class="top-bar-section">
8            <ul class="left">
9                <li class="has-form">
10                    <button data-dropdown="loglist" aria-controls="loglist" aria-expanded="false" class="button"><?php echo _("Select log"); ?> <i class="fa fa-caret-down"></i></button>
11                </li>
12            </ul>
13            <ul class="right">
14                <li class="has-form">
15                    <form action="<?php echo oTxt($_SERVER['PHP_SELF']); ?>" method="get">
16                        <div class="row collapse">
17                            <?php $app->printHiddenSession(false); ?>
18                            <div class="small-5 columns">
19                                <input type="text" class="" size="20" name="search_query" value="<?php echo getFormData('search_query'); ?>" placeholder="<?php echo _("Search
"); ?>" title="<?php echo oTxt(_("Fields searched: question text.")); ?>" />
20                            </div>
21                            <div class="small-4 columns">
22                                <input type="checkbox" id="search_grep" name="search_grep"<?php frmChecked(getFormData('search_grep')) ?> /><label for="search_grep"><?php echo _("Regex"); ?></label>
23                            </div>
24                            <div class="small-3 columns">
25                                <input type="submit" class="button expand" value="<?php echo _("Search"); ?>" />
26                            </div>
27                        </div>
28                    </form>
29                </li>
30                <?php if ('' != getFormData('search_query')): ?>
31                    <li class="has-form"><a href="<?php echo $app->ohref($_SERVER['PHP_SELF'], false); ?>" class="button expand"><?php echo _("Show all"); ?></a></li>
32                <?php endif ?>
33            </ul>
34        </section>
35    </nav>
36    <?php if (is_array($logs) && !empty($logs)) { ?>
37    <div id="loglist" data-dropdown-content class="f-dropdown content large" aria-hidden="true" tabindex="-1">
38        <table>
39            <?php
40            foreach ($logs as $l) {
41                ?>
42                <tr>
43                    <td>
44                        <?php if ($l['filename'] == $tmp_prefs->get('log_file')) { ?>
45                            <strong class="sc-padright"><?php echo sprintf(_("%s"), $l['filename']); ?></strong>
46                        <?php } else { ?>
47                            <a class="sc-padright" href="<?php echo $app->oHREF('?log=' . $l['filename']); ?>"><strong><?php echo sprintf(_("%s"), $l['filename']); ?></strong></a>
48                        <?php } ?>
49                    </td>
50                    <td>
51                        <em class="sc-padright"><?php echo sprintf(_("%01.1f KB, last modified %s"), ($l['filesize']/1024), date($app->getParam('date_format'), $l['modified'])); ?></em>
52                    </td>
53                    <td>
54                        <?php if (!preg_match($no_download_files, $l['filename'])) { ?><a class="sc-padright" href="<?php echo $app->oHREF('?op=download&log=' . $l['filename']); ?>"><?php echo _("Download"); ?></a><?php } ?>
55                        <?php if (!preg_match($no_archive_files, $l['filename'])) { ?><a class="sc-padright" href="<?php echo $app->oHREF('?op=archive&log=' . $l['filename']); ?>"><?php echo _("Archive"); ?></a><?php } ?>
56                        <?php if (!preg_match($no_clear_files, $l['filename'])) { ?><a class="sc-padright" href="<?php echo $app->oHREF('?op=clear&log=' . $l['filename']); ?>" onclick="javascript:return confirm('<?php printf(_("Are you sure you want to clear the log file %s? This will empty this file of its contents. This action is not reversible."), $l['filename'])?>')"><?php echo _("Clear"); ?></a><?php } ?>
57                        <?php if (!preg_match($no_delete_files, $l['filename'])) { ?><a href="<?php echo $app->oHREF('?op=delete&log=' . $l['filename']); ?>" onclick="javascript:return confirm('<?php printf(_("Are you sure you want to delete the log file %s? This will remove this log file permanently. This action is not reversible."), $l['filename'])?>')"><?php echo _("Delete"); ?></a><?php } ?>
58                    </td>
59                </tr><?php
60            }
61            ?>
62        </table>
63    </div>
64    <?php } ?>
65</div>
66
67<pre>
68<?php
69for ($i = $page->first_item; $i <= $page->last_item && $page->total_items; $i++) {
70    echo $list[$i];
71}
72?>
73</pre>
74<?php include 'list_info.ihtml'; ?>
75
76<style>
77td { padding: .1rem .5rem; }
78pre {
79    font-family: monospace;
80    font-size: .75rem;
81    line-height: 1.2;
82    padding: 15px;
83}
84.right .has-form .columns {
85    padding: 0 .25rem;
86}
87</style>
Note: See TracBrowser for help on using the repository browser.