Ignore:
Timestamp:
Sep 15, 2014 9:44:27 PM (10 years ago)
Author:
anonymous
Message:

Beginning the process of adapting codebase to foundation styles.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/services/templates/admin_list.ihtml

    r483 r497  
    1 
    2 <?php $fv->printErrorMessages(); ?>
    3 
    4 <div class="commandbox">
    5     <span class="sc-nowrap commanditem"><a href="<?php echo $app->oHREF($_SERVER['PHP_SELF'] . '?op=add'); ?>"><?php echo _("Add Administrator"); ?></a></span>
    6     <form action="<?php echo oTxt($_SERVER['PHP_SELF']); ?>" method="get" class="sc-form">
    7         <?php $app->printHiddenSession(false); ?>
    8         <input type="text" class="sc-small" size="20" name="search_query" value="<?php echo getFormData('search_query'); ?>" title="<?php echo oTxt(_("Fields searched: Admin id, Username, Userpass, First name, Last name, Email.")); ?>" />
    9         <input type="submit" value="<?php echo _("Search"); ?>" />
    10     </form>
     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"><a href="<?php echo $app->oHREF($_SERVER['PHP_SELF'] . '?op=add'); ?>" class="button"><i class="fa fa-plus"></i> <?php echo _("Add Administrator"); ?></a></li>
     10            </ul>
     11            <ul class="right">
     12                <li class="has-form">
     13                    <form action="<?php echo oTxt($_SERVER['PHP_SELF']); ?>" method="get">
     14                        <div class="row collapse">
     15                            <?php $app->printHiddenSession(false); ?>
     16                            <div class="small-8 columns">
     17                                <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.")); ?>" />
     18                            </div>
     19                            <div class="small-4 columns">
     20                                <input type="submit" class="button expand" value="<?php echo _("Search"); ?>" />
     21                            </div>
     22                        </div>
     23                    </form>
     24                </li>
     25                <?php if ('' != getFormData('search_query')): ?>
     26                    <li class="has-form"><a href="<?php echo $app->ohref($_SERVER['PHP_SELF'], false); ?>" class="button expand"><?php echo _("Show all"); ?></a></li>
     27                <?php endif ?>
     28            </ul>
     29        </section>
     30    </nav>
    1131</div>
    12 
     32<table>
     33    <thead>
     34        <tr>
     35            <th></th>
     36            <th><?php echo $so->printSortHeader('admin_tbl.admin_id', _("ID"), 'ASC'); ?></th>
     37            <th><?php echo $so->printSortHeader('admin_tbl.username', _("Username"), 'ASC'); ?></th>
     38            <th><?php echo $so->printSortHeader('admin_tbl.first_name', _("First"), 'ASC'); ?> <?php echo $so->printSortHeader('admin_tbl.last_name', _("Last name"), 'ASC'); ?></th>
     39            <th><?php echo $so->printSortHeader('admin_tbl.seconds_online', _("Min online"), 'ASC'); ?></th>
     40            <th><?php echo $so->printSortHeader('admin_tbl.last_login_datetime', _("Last login"), 'ASC'); ?></th>
     41            <th><?php echo $so->printSortHeader('admin_tbl.last_login_ip', _("Remote host"), 'ASC'); ?></th>
     42            <th><?php echo $so->printSortHeader('admin_tbl.added_datetime', _("Added"), 'ASC'); ?></th>
     43            <th><?php echo $so->printSortHeader('admin_tbl.added_by_user_id', _("by"), 'ASC'); ?></th>
     44            <th><?php echo $so->printSortHeader('admin_tbl.modified_datetime', _("Modified"), 'ASC'); ?></th>
     45            <th><?php echo $so->printSortHeader('admin_tbl.modified_by_user_id', _("by"), 'ASC'); ?></th>
     46        </tr>
     47    </thead>
     48    <tbody>
     49        <?php for ($i = 0; $i <= $page->last_item - $page->first_item && $page->total_items > 0; $i++) { ?>
     50        <tr>
     51            <td>
     52                <a href="#" data-dropdown="actions-for-id-<?php echo oTxt($list[$i]['admin_id']); ?>" aria-controls="actions-for-id-<?php echo oTxt($list[$i]['admin_id']); ?>" aria-expanded="false" class="sc-action dropdown" data-options="is_hover:false"><i class="fa fa-cog fa-lg"></i></a>
     53                <ul id="actions-for-id-<?php echo oTxt($list[$i]['admin_id']); ?>" data-dropdown-content class="f-dropdown sc-action" aria-hidden="true" tabindex="-1">
     54                    <li><a href="<?php echo $app->oHREF($_SERVER['PHP_SELF'] . '?op=edit&admin_id=' . $list[$i]['admin_id']); ?>"><i class="fa fa-pencil fa-fw"></i> <?php printf(_("Edit <em>%s</em>"), oTxt(truncate($list[$i]['username'], 30))) ?></a></li>
     55                    <li><a href="<?php echo $app->oHREF('/versions.php?record_table=admin_tbl&record_key=admin_id&boomerang=true&record_val=' . $list[$i]['admin_id']); ?>"><i class="fa fa-files-o fa-fw"></i> <?php printf(_("Versions of %s"), oTxt(truncate($list[$i]['username'], 30))) ?></a></li>
     56                    <li><a href="<?php echo $app->oHREF($_SERVER['PHP_SELF'] . "?op=del&admin_id=" . $list[$i]['admin_id']); ?>"><i class="fa fa-trash-o fa-fw"></i> <?php printf(_("Delete <em>%s</em>"), oTxt(truncate($list[$i]['username'], 30))) ?></a></li>
     57                </ul>
     58            </td>
     59            <td class="sc-nowrap"><?php echo oTxt($list[$i]['admin_id'], true); ?></td>
     60            <td class="sc-nowrap"><a href="<?php echo $app->oHREF($_SERVER['PHP_SELF'] . '?op=edit&admin_id=' . $list[$i]['admin_id']); ?>"><?php echo oTxt($list[$i]['username'], true); ?></a></td>
     61            <td class="sc-nowrap"><?php echo oTxt($list[$i]['first_name'], true); ?> <?php echo oTxt($list[$i]['last_name'], true); ?></td>
     62            <td class="sc-nowrap"><?php echo round($list[$i]['seconds_online'] / 60); ?></td>
     63            <td class="sc-nowrap"><?php
     64                if ($auth->isLoggedIn($list[$i]['admin_id'])) {
     65                    ?><strong><?php echo date($app->getParam('date_format'), strtotime($list[$i]['last_login_datetime'])) ?></strong><?php
     66                } else {
     67                    echo Validator::validateStrDate($list[$i]['last_login_datetime']) ? date($app->getParam('date_format'), strtotime($list[$i]['last_login_datetime'])) : '';
     68                }
     69            ?></td>
     70            <td class="sc-nowrap"><?php echo gethostbyaddr($list[$i]['last_login_ip']); ?></td>
     71            <td class="sc-nowrap"><?php echo Validator::validateStrDate($list[$i]['added_datetime']) ? date($app->getParam('date_format'), strtotime($list[$i]['added_datetime'])) : ''; ?></td>
     72            <td class="sc-nowrap"><?php echo oTxt($list[$i]['added_admin_username'], true); ?></td>
     73            <td class="sc-nowrap"><?php echo Validator::validateStrDate($list[$i]['modified_datetime']) ? date($app->getParam('date_format'), strtotime($list[$i]['modified_datetime'])) : ''; ?></td>
     74            <td class="sc-nowrap"><?php echo oTxt($list[$i]['modified_admin_username'], true); ?></td>
     75        </tr>
     76        <?php } ?>
     77    </tbody>
     78</table>
    1379<?php include 'list_info.ihtml'; ?>
    14 
    15 <form action="<?php echo oTxt($_SERVER['PHP_SELF']); ?>" method="get" class="sc-form">
    16 <table class="list">
    17     <tr>
    18         <th>&nbsp;</th>
    19         <th>&nbsp;</th>
    20         <th><?php echo $so->printSortHeader('admin_tbl.admin_id', _("ID"), 'ASC'); ?></th>
    21         <th><?php echo $so->printSortHeader('admin_tbl.username', _("Username"), 'ASC'); ?></th>
    22         <th><?php echo $so->printSortHeader('admin_tbl.first_name', _("First"), 'ASC'); ?> <?php echo $so->printSortHeader('admin_tbl.last_name', _("Last name"), 'ASC'); ?></th>
    23         <th><?php echo $so->printSortHeader('admin_tbl.seconds_online', _("Min online"), 'ASC'); ?></th>
    24         <th><?php echo $so->printSortHeader('admin_tbl.last_login_datetime', _("Last login"), 'ASC'); ?></th>
    25         <th><?php echo $so->printSortHeader('admin_tbl.last_login_ip', _("Remote host"), 'ASC'); ?></th>
    26         <th><?php echo $so->printSortHeader('admin_tbl.added_datetime', _("Added"), 'ASC'); ?></th>
    27         <th><?php echo $so->printSortHeader('admin_tbl.added_by_user_id', _("by"), 'ASC'); ?></th>
    28         <th><?php echo $so->printSortHeader('admin_tbl.modified_datetime', _("Modified"), 'ASC'); ?></th>
    29         <th><?php echo $so->printSortHeader('admin_tbl.modified_by_user_id', _("by"), 'ASC'); ?></th>
    30         <th>&nbsp;</th>
    31     </tr>
    32     <?php for ($i = 0; $i <= $page->last_item - $page->first_item && $page->total_items > 0; $i++) { ?>
    33     <tr>
    34         <td class="sc-padleft sc-nowrap"><a title="<?php printf(_("Edit %s"), oTxt($list[$i]['username'])) ?>" href="<?php echo $app->oHREF($_SERVER['PHP_SELF'] . '?op=edit&admin_id=' . $list[$i]['admin_id']); ?>"><img src="/admin/i/pen.gif" alt="Edit" width="12" height="12" border="0" /></a> &nbsp;</td>
    35         <td class="sc-padleft sc-nowrap"><a title="<?php printf(_("Versions of %s"), oTxt($list[$i]['username'])) ?>" href="<?php echo $app->oHREF(sprintf('/admin/versions.php?record_table=%s&record_key=%s&record_val=%s&boomerang=true', $auth->getParam('db_table'), $auth->getParam('db_primary_key'), $list[$i]['admin_id'])); ?>"><img src="/admin/i/multiple.png" alt="" width="12" height="12" border="0" /></a> &nbsp;</td>
    36         <td class="sc-nowrap"><?php echo oTxt($list[$i]['admin_id'], true); ?> &nbsp;</td>
    37         <td class="sc-nowrap"><?php echo oTxt($list[$i]['username'], true); ?> &nbsp;</td>
    38         <td class="sc-nowrap"><?php echo oTxt($list[$i]['first_name'], true); ?> <?php echo oTxt($list[$i]['last_name'], true); ?> &nbsp;</td>
    39         <td class="sc-nowrap"><?php echo round($list[$i]['seconds_online'] / 60); ?> &nbsp;</td>
    40         <td class="sc-nowrap"><?php
    41             if ($auth->isLoggedIn($list[$i]['admin_id'])) {
    42                 ?><strong><?php echo date($app->getParam('date_format'), strtotime($list[$i]['last_login_datetime'])) ?></strong><?php
    43             } else {
    44                 echo Validator::validateStrDate($list[$i]['last_login_datetime']) ? date($app->getParam('date_format'), strtotime($list[$i]['last_login_datetime'])) : '';
    45             }
    46         ?> &nbsp;</td>
    47         <td class="sc-nowrap"><?php echo gethostbyaddr($list[$i]['last_login_ip']); ?> &nbsp;</td>
    48         <td class="sc-nowrap"><?php echo Validator::validateStrDate($list[$i]['added_datetime']) ? date($app->getParam('date_format'), strtotime($list[$i]['added_datetime'])) : ''; ?> &nbsp;</td>
    49         <td class="sc-nowrap"><?php echo oTxt($list[$i]['added_admin_username'], true); ?> &nbsp;</td>
    50         <td class="sc-nowrap"><?php echo Validator::validateStrDate($list[$i]['modified_datetime']) ? date($app->getParam('date_format'), strtotime($list[$i]['modified_datetime'])) : ''; ?> &nbsp;</td>
    51         <td class="sc-nowrap"><?php echo oTxt($list[$i]['modified_admin_username'], true); ?> &nbsp;</td>
    52         <td class="sc-padleft sc-nowrap" align="right"><a title="<?php printf(_("Delete %s"), oTxt($list[$i]['username'])) ?>" href="<?php echo $app->oHREF($_SERVER['PHP_SELF'] . "?op=del&admin_id=" . $list[$i]['admin_id']); ?>" onclick="javascript:return confirm('<?php printf(_("Are you sure you want to delete the record %s? This action is permanent and cannot be undone."), oTxt($list[$i]['username'])) ?>')"><img src="/admin/i/trash.gif" alt="Delete" width="10" height="10" border="0" /></a> &nbsp;</td>
    53     </tr>
    54     <?php } ?>
    55 </table>
    56 
    57 <?php if ($page->total_pages > 1) { ?>
    58 <div class="sc-nowrap commanditem" style="float: right;"><?php echo _("Pages:"); ?>&nbsp;<?php $page->printPageNumbers() ?></div>
    59 <?php } ?>
    60 </form>
Note: See TracChangeset for help on using the changeset viewer.