Changeset 295 for trunk/bin/module_maker/skel
- Timestamp:
- Dec 16, 2007 7:21:57 AM (17 years ago)
- Location:
- trunk/bin/module_maker/skel
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bin/module_maker/skel/adm_form.ihtml
r136 r295 6 6 <input type="hidden" name="%PRIMARY_KEY%" value="<?php echo $frm['%PRIMARY_KEY%']; ?>" /> 7 7 8 <?php printSubmitButtons($frm['submit_buttons']); ?> 8 <div class="sc-form-row sc-submit-buttons"> 9 <?php printSubmitButtons($frm['submit_buttons']); ?> 10 </div> 9 11 10 12 %ADM_FORM_TABLE_ROWS% 11 13 12 <?php printSubmitButtons($frm['submit_buttons']); ?> 14 <div class="sc-form-row sc-submit-buttons"> 15 <?php printSubmitButtons($frm['submit_buttons']); ?> 16 </div> 13 17 </form> -
trunk/bin/module_maker/skel/adm_list.ihtml
r270 r295 3 3 4 4 <div id="commandbox"> 5 <form action="<?php echo oTxt($_SERVER['PHP_SELF']); ?>" method="get">6 <?php $app->printHiddenSession(false); ?>7 5 <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, '—', city, '—', 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, '—', city, '—', title)", '__///___id', getFormData('filter___///__'), array('Any __///__'), 'ORDER BY __///__ ASC'); ?> 11 </select> 12 <input type="submit" value="<?php echo _("Filter"); ?>" /> 13 </form> 16 14 </div> 17 15 … … 31 29 <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> </td> 32 30 %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> </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> </td> 34 32 </tr> 35 33 <?php } ?> -
trunk/bin/module_maker/skel/admin.php
r202 r295 203 203 'new_op' => 'insert', 204 204 'submit_buttons' => array( 205 'submit' => _("Add %ITEM_TITLE%"),206 'repeat' => _("Add & repeat"),207 'cancel' => _("Cancel"),205 array('name' => 'submit', 'value' => _("Add %ITEM_TITLE%"), 'accesskey' => 's'), 206 array('name' => 'repeat', 'value' => _("Add & repeat"), 'accesskey' => 'r'), 207 array('name' => 'cancel', 'value' => _("Cancel"), 'accesskey' => 'c'), 208 208 ), 209 209 ); … … 216 216 global $lock; 217 217 $db =& DB::getInstance(); 218 $app =& App::getInstance(); 218 219 219 220 $lock->select('%DB_TBL%', '%PRIMARY_KEY%', $id); … … 242 243 'new_op' => 'update', 243 244 'submit_buttons' => array( 244 'submit' => _("Save changes"),245 'repeat' => _("Save & 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'), 248 249 ), 249 250 ), $frm); … … 257 258 global $cache; 258 259 $db =& DB::getInstance(); 260 $app =& App::getInstance(); 259 261 260 262 $lock->select('%DB_TBL%', '%PRIMARY_KEY%', $id); … … 292 294 global $cache; 293 295 $db =& DB::getInstance(); 296 $app =& App::getInstance(); 294 297 295 298 // Remove any stale cached list data. … … 313 316 global $lock; 314 317 global $cache; 318 $db =& DB::getInstance(); 315 319 $app =& App::getInstance(); 316 320 … … 342 346 global $cache; 343 347 $db =& DB::getInstance(); 348 $app =& App::getInstance(); 344 349 345 350 $where_clause = ''; … … 374 379 SELECT 375 380 %DB_TBL%.*, 376 a1.username AS added_ admin_username,377 a2.username AS modified_ admin_username381 a1.username AS added_by_username, 382 a2.username AS modified_by_username 378 383 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) 381 386 $where_clause 382 387 " . $so->getSortOrderSQL() . " … … 398 403 // First try to return from the cache. 399 404 if ($cache->exists('list')) { 400 return $cache->get('list'); 405 $list = $cache->get('list'); 406 return $list; 401 407 } 402 408 … … 419 425 global $cache; 420 426 $db =& DB::getInstance(); 427 $app =& App::getInstance(); 421 428 422 429 if (!is_array($ranks)) {
Note: See TracChangeset
for help on using the changeset viewer.