Ignore:
Timestamp:
Dec 16, 2007 7:21:57 AM (17 years ago)
Author:
quinn
Message:

Updated example config file. Added admin2.inc.css and minor corrections into HTML. Module maker fixes.

Location:
trunk/bin/module_maker/skel
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/bin/module_maker/skel/adm_form.ihtml

    r136 r295  
    66<input type="hidden" name="%PRIMARY_KEY%" value="<?php echo $frm['%PRIMARY_KEY%']; ?>" />
    77
    8 <?php printSubmitButtons($frm['submit_buttons']); ?>
     8<div class="sc-form-row sc-submit-buttons">
     9    <?php printSubmitButtons($frm['submit_buttons']); ?>
     10</div>
    911
    1012%ADM_FORM_TABLE_ROWS%
    1113
    12 <?php printSubmitButtons($frm['submit_buttons']); ?>
     14<div class="sc-form-row sc-submit-buttons">
     15    <?php printSubmitButtons($frm['submit_buttons']); ?>
     16</div>
    1317</form>
  • trunk/bin/module_maker/skel/adm_list.ihtml

    r270 r295  
    33
    44<div id="commandbox">
    5 <form action="<?php echo oTxt($_SERVER['PHP_SELF']); ?>" method="get">
    6 <?php $app->printHiddenSession(false); ?>
    75    <span class="sc-nowrap commandtext"><a href="<?php echo $app->oHREF($_SERVER['PHP_SELF'] . '?op=add'); ?>"><?php echo _("Add %ITEM_TITLE%"); ?></a></span>
    8     <br />
    9 
    10     <input type="text" class="sc-small" size="20" name="search_query" value="<?php echo getFormData('search_query'); ?>" title="<?php echo oTxt(_("Fields searched: __///__ %SEARCH_FIELDS%.")); ?>" />
    11     <select name="filter___///__">
    12         <?php // printSelectForm('__///___tbl', "CONCAT(__///___id, '&mdash;', city, '&mdash;', title)", '__///___id', getFormData('filter___///__'), array('Any __///__'), 'ORDER BY __///__ ASC'); ?>
    13     </select>
    14     <input type="submit" value="<?php echo _("Search"); ?>" />
    15 </form>
     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: __///__ %SEARCH_FIELDS%.")); ?>" />
     9        <select name="filter___///__" class="sc-small">
     10            <?php // printSelectForm('__///___tbl', "CONCAT(__///___id, '&mdash;', city, '&mdash;', title)", '__///___id', getFormData('filter___///__'), array('Any __///__'), 'ORDER BY __///__ ASC'); ?>
     11        </select>
     12        <input type="submit" value="<?php echo _("Filter"); ?>" />
     13    </form>
    1614</div>
    1715
     
    3129        <td class="sc-padleft sc-nowrap"><a title="<?php printf(_("Versions of %s"), oTxt($list[$i]['__///__'])) ?>" href="<?php echo $app->oHREF('/admin/versions.php?record_table=%DB_TBL%&record_key=%PRIMARY_KEY%&boomerang=true&record_val=' . $list[$i]['%PRIMARY_KEY%']); ?>"><img src="/admin/_widgets/subcategory.gif" alt="" width="18" height="14" border="0" /></a> &nbsp;</td>
    3230%ADM_LIST_ROWS%
    33         <td class="sc-padleft sc-nowrap" align="right"><a title="<?php printf(_("Delete %s"), oTxt($list[$i]['__///__'])) ?>" href="<?php echo $app->oHREF($_SERVER['PHP_SELF'] . "?op=del&%PRIMARY_KEY%=" . $list[$i]['%PRIMARY_KEY%']); ?>" 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]['__///__'])) ?>')"><img src="/admin/_widgets/delete.gif" alt="Delete" width="16" height="17" border="0" /></a> &nbsp;</td>
     31        <td class="sc-padleft sc-nowrap" align="right"><a title="<?php printf(_("Delete %s"), oTxt($list[$i]['__///__'])) ?>" href="<?php echo $app->oHREF($_SERVER['PHP_SELF'] . "?op=del&%PRIMARY_KEY%=" . $list[$i]['%PRIMARY_KEY%']); ?>" 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]['__///__'])) ?>');"><img src="/admin/_widgets/delete.gif" alt="Delete" width="16" height="17" border="0" /></a> &nbsp;</td>
    3432    </tr>
    3533    <?php } ?>
  • trunk/bin/module_maker/skel/admin.php

    r202 r295  
    203203        'new_op' => 'insert',
    204204        'submit_buttons' => array(
    205             'submit' => _("Add %ITEM_TITLE%"),
    206             'repeat' => _("Add &amp; repeat"),
    207             'cancel' => _("Cancel"),
     205            array('name' => 'submit', 'value' => _("Add %ITEM_TITLE%"), 'accesskey' => 's'),
     206            array('name' => 'repeat', 'value' => _("Add &amp; repeat"), 'accesskey' => 'r'),
     207            array('name' => 'cancel', 'value' => _("Cancel"), 'accesskey' => 'c'),
    208208        ),
    209209    );
     
    216216    global $lock;
    217217    $db =& DB::getInstance();
     218    $app =& App::getInstance();
    218219   
    219220    $lock->select('%DB_TBL%', '%PRIMARY_KEY%', $id);
     
    242243        'new_op' => 'update',
    243244        'submit_buttons' => array(
    244             'submit' => _("Save changes"),
    245             'repeat' => _("Save &amp; edit next"),
    246             'reset' => _("Reset"),
    247             'cancel' => _("Cancel"),
     245            array('name' => 'submit', 'value' => _("Save changes"), 'accesskey' => 's'),
     246            array('name' => 'repeat', 'value' => _("Save & edit next"), 'accesskey' => 'e'),
     247            array('name' => 'reset', 'value' => _("Reset"), 'accesskey' => 'r'),
     248            array('name' => 'cancel', 'value' => _("Cancel"), 'accesskey' => 'c'),
    248249        ),
    249250    ), $frm);
     
    257258    global $cache;
    258259    $db =& DB::getInstance();
     260    $app =& App::getInstance();
    259261   
    260262    $lock->select('%DB_TBL%', '%PRIMARY_KEY%', $id);
     
    292294    global $cache;
    293295    $db =& DB::getInstance();
     296    $app =& App::getInstance();
    294297   
    295298    // Remove any stale cached list data.
     
    313316    global $lock;
    314317    global $cache;
     318    $db =& DB::getInstance();
    315319    $app =& App::getInstance();
    316320   
     
    342346    global $cache;
    343347    $db =& DB::getInstance();   
     348    $app =& App::getInstance();
    344349   
    345350    $where_clause = '';
     
    374379        SELECT
    375380            %DB_TBL%.*,
    376             a1.username AS added_admin_username,
    377             a2.username AS modified_admin_username
     381            a1.username AS added_by_username,
     382            a2.username AS modified_by_username
    378383        FROM %DB_TBL%
    379         LEFT JOIN admin_tbl a1 ON (%DB_TBL%.added_by_user_id = a1.admin_id)
    380         LEFT JOIN admin_tbl a2 ON (%DB_TBL%.modified_by_user_id = a2.admin_id)
     384        LEFT JOIN user_tbl a1 ON (%DB_TBL%.added_by_user_id = a1.user_id)
     385        LEFT JOIN user_tbl a2 ON (%DB_TBL%.modified_by_user_id = a2.user_id)
    381386        $where_clause
    382387        " . $so->getSortOrderSQL() . "
     
    398403    // First try to return from the cache.
    399404    if ($cache->exists('list')) {
    400         return $cache->get('list');
     405        $list = $cache->get('list');
     406        return $list;
    401407    }
    402408   
     
    419425    global $cache;
    420426    $db =& DB::getInstance();
     427    $app =& App::getInstance();
    421428   
    422429    if (!is_array($ranks)) {
Note: See TracChangeset for help on using the changeset viewer.