Changeset 497 for trunk/services/templates/log_list.ihtml
- Timestamp:
- Sep 15, 2014 9:44:27 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/services/templates/log_list.ihtml
r457 r497 1 <form action="<?php echo oTxt($_SERVER['PHP_SELF']); ?>" method="get" class="sc-form"> 2 <?php $app->printHiddenSession(false); ?> 3 <div class="commandbox"> 4 <?php if (is_array($logs) && !empty($logs)) { ?> 5 <table> 6 <?php 7 foreach ($logs as $l) { 8 ?> 9 <tr> 10 <td> 11 <?php if ($l['filename'] == $tmp_prefs->get('log_file')) { ?> 12 <strong class="sc-padright"><?php echo sprintf(_("%s"), $l['filename']); ?></strong> 13 <?php } else { ?> 14 <a class="sc-padright" href="<?php echo $app->oHREF('/admin/logs.php?log=' . $l['filename']); ?>"><strong><?php echo sprintf(_("%s"), $l['filename']); ?></strong></a> 15 <?php } ?> 16 </td> 17 <td> 18 <em class="sc-padright"><?php echo sprintf(_("%01.1f KB, last modified %s"), ($l['filesize']/1024), date($app->getParam('date_format'), $l['modified'])); ?></em> 19 </td> 20 <td> 21 <?php if (!preg_match($no_download_files, $l['filename'])) { ?><a class="sc-padright" href="<?php echo $app->oHREF('/admin/logs.php?op=download&log=' . $l['filename']); ?>"><?php echo _("Download"); ?></a><?php } ?> 22 <?php if (!preg_match($no_archive_files, $l['filename'])) { ?><a class="sc-padright" href="<?php echo $app->oHREF('/admin/logs.php?op=archive&log=' . $l['filename']); ?>"><?php echo _("Archive"); ?></a><?php } ?> 23 <?php if (!preg_match($no_clear_files, $l['filename'])) { ?><a class="sc-padright" href="<?php echo $app->oHREF('/admin/logs.php?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 } ?> 24 <?php if (!preg_match($no_delete_files, $l['filename'])) { ?><a href="<?php echo $app->oHREF('/admin/logs.php?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 } ?> 25 </td> 26 </tr><?php 27 } 28 ?> 29 </table> 30 <?php } ?> 31 <div class="form"> 32 <input type="text" class="sc-small" size="20" name="search_query" value="<?php echo oTxt(getFormData('search_query')); ?>" title="<?php echo _("All lines in currently viewed log file are searched."); ?>" /> 33 <label class="sc-normal"><input type="checkbox" name="search_grep"<?php frmChecked(getFormData('search_grep')) ?> /><?php echo _("Use Regex"); ?></label> 34 <input class="sc-padleft" type="submit" name="list" value="<?php echo _("Search"); ?>" /> 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> 35 63 </div> 64 <?php } ?> 36 65 </div> 37 66 38 <?php include 'list_info.ihtml'; ?> 39 40 <pre style="font: 9px monaco;"> 67 <pre> 41 68 <?php 42 69 for ($i = $page->first_item; $i <= $page->last_item && $page->total_items; $i++) { … … 45 72 ?> 46 73 </pre> 74 <?php include 'list_info.ihtml'; ?> 47 75 48 <?php if ($page->total_pages > 1) { ?> 49 <div class="sc-nowrap commanditem" style="float: right;"><?php echo _("Pages:"); ?> <?php $page->printPageNumbers() ?></div> 50 <?php } ?> 51 </form> 76 <style> 77 td { padding: .1rem .5rem; } 78 pre { 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 TracChangeset
for help on using the changeset viewer.