diff --git a/include/ajax.content.php b/include/ajax.content.php index 02b3bd55061364170c7c323f2988aeeeb8f90f27..463248382493cbc58fd1bc302c03ac54c2d4efab 100644 --- a/include/ajax.content.php +++ b/include/ajax.content.php @@ -133,7 +133,7 @@ class ContentAjaxAPI extends AjaxController { Http::response(403, 'Login Required'); $content = Page::lookup($id, $lang); - include STAFFINC_DIR . 'templates/content-manage.tmpl'; + include STAFFINC_DIR . 'templates/content-manage.tmpl.php'; } function manageNamedContent($type, $lang=false) { diff --git a/include/staff/settings-access.inc.php b/include/staff/settings-access.inc.php index 08c8836a0d8f7deef7f1e64663a1d5e01a6e4ce6..7bfd4b4caa040561cfd99db44516bd79891513ee 100644 --- a/include/staff/settings-access.inc.php +++ b/include/staff/settings-access.inc.php @@ -131,34 +131,64 @@ if(!defined('OSTADMININC') || !$thisstaff || !$thisstaff->isAdmin() || !$config) Maximum idle time in minutes before a client must log in again (enter 0 to disable). </td> </tr> + </tbody> + <thead> <tr> <th colspan="2"> - <em><b>Authentication and Registration Templates</b></em> + <h4>Authentication and Registration Templates</h4> </th> </tr> -<?php $manage_content = function($title, $content) { - ?><a href="#ajax.php/content/<?php echo $content; ?>/manage" + </thead> + <tbody> +<?php +$res = db_query('select distinct(`type`), content_id, notes, name, updated from ' + .PAGE_TABLE + .' where isactive=1 group by `type`'); +$contents = array(); +while (list($type, $id, $notes, $name, $u) = db_fetch_row($res)) + $contents[$type] = array($id, $name, $notes, $u); + +$manage_content = function($title, $content) use ($contents) { + list($id, $name, $notes, $upd) = $contents[$content]; + ?><tr><td colspan="2"> + <a href="#ajax.php/content/<?php echo $id; ?>/manage" onclick="javascript: $.dialog($(this).attr('href').substr(1), 200); - return false;"><i class="icon-file-text"></i> <?php - echo Format::htmlchars($title); ?></a><?php + return false;"><i class="icon-file-text pull-left icon-2x" + style="color:#bbb;"></i> <?php + echo Format::htmlchars($title); ?></a><br/> + <span class="faded"><?php echo Format::display($notes); ?> + <em>(Last Updated <?php echo Format::db_datetime($upd); ?>)</em></span></td></tr><?php }; ?> - <tr><td>Password Reset Emails</td> - <td><?php $manage_content('Staff Members', 'pwreset-staff'); ?> - — <?php $manage_content('Clients', 'pwreset-client'); ?> - — <?php $manage_content('Guess Ticket Access', 'access-link'); ?> - </td></tr> - <tr><td>Sign-In Pages</td> - <td><?php $manage_content('Staff Login Banner', 'staff-banner'); ?> - — <?php $manage_content('Client Sign-In Page', 'registration-policy'); ?> - <tr><td>Client Account Registration</td> - <td><?php $manage_content('Please Confirm Email Address Page', 'registration-confirm'); ?> - — <?php $manage_content('Confirmation Email', 'registration-client'); ?> - — <?php $manage_content('Account Confirmed Page', 'registration-thanks'); ?> - </td></tr> - <tr><td>Staff Account Registration</td> - <td><?php $manage_content('Staff Welcome Email', 'registration-staff'); ?> - </td></tr> + <tr> + <th colspan="2"> + <em><b>Authentication and Registration Templates</b></em> + </th> + </tr> + <?php $manage_content('Staff Members', 'pwreset-staff'); ?> + <?php $manage_content('Clients', 'pwreset-client'); ?> + <?php $manage_content('Guess Ticket Access', 'access-link'); ?> + <tr> + <th colspan="2"> + <em><b>Sign-In Pages</b></em> + </th> + </tr> + <?php $manage_content('Staff Login Banner', 'staff-banner'); ?> + <?php $manage_content('Client Sign-In Page', 'registration-policy'); ?> + <tr> + <th colspan="2"> + <em><b>Client Account Registration</b></em> + </th> + </tr> + <?php $manage_content('Please Confirm Email Address Page', 'registration-confirm'); ?> + <?php $manage_content('Confirmation Email', 'registration-client'); ?> + <?php $manage_content('Account Confirmed Page', 'registration-thanks'); ?> + <tr> + <th colspan="2"> + <em><b>Staff Account Registration</b></em> + </th> + </tr> + <?php $manage_content('Staff Welcome Email', 'registration-staff'); ?> </tbody> </table> <p style="text-align:center">