Ignore:
Timestamp:
Nov 14, 2005 6:22:44 AM (19 years ago)
Author:
scdev
Message:

Rebuilt the services/admins.php script and templates. Fixes since v2 conversion. Lots of bugs and more to come!

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

Legend:

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

    r18 r19  
    99    <tr>
    1010        <td>&nbsp;</td>
    11         <td valign="top">
    12         <?php if (!empty($frm['submit_caption'])) { ?><input type="submit" name="submit" value="<?php echo oTxt($frm['submit_caption']); ?>" /><?php } ?>
    13         <?php if (!empty($frm['repeat_caption'])) { ?><input type="submit" name="repeat" value="<?php echo oTxt($frm['repeat_caption']); ?>" /><?php } ?>
    14         <?php if (!empty($frm['reset_caption'])) { ?><input type="submit" name="reset" value="<?php echo oTxt($frm['reset_caption']); ?>" /><?php } ?>
    15         <?php if (!empty($frm['cancel_caption'])) { ?><input type="submit" name="cancel" value="<?php echo oTxt($frm['cancel_caption']); ?>" /><?php } ?>
    16         </td>
     11        <td valign="top"><?php printSubmitButtons($frm['submit_buttons']); ?></td>
    1712    </tr>
    1813%ADM_FORM_TABLE_ROWS%
    1914    <tr>
    2015        <td>&nbsp;</td>
    21         <td valign="top">
    22         <?php if (!empty($frm['submit_caption'])) { ?><input type="submit" name="submit" value="<?php echo oTxt($frm['submit_caption']); ?>" /><?php } ?>
    23         <?php if (!empty($frm['repeat_caption'])) { ?><input type="submit" name="repeat" value="<?php echo oTxt($frm['repeat_caption']); ?>" /><?php } ?>
    24         <?php if (!empty($frm['reset_caption'])) { ?><input type="submit" name="reset" value="<?php echo oTxt($frm['reset_caption']); ?>" /><?php } ?>
    25         <?php if (!empty($frm['cancel_caption'])) { ?><input type="submit" name="cancel" value="<?php echo oTxt($frm['cancel_caption']); ?>" /><?php } ?>
    26         </td>
     16        <td valign="top"><?php printSubmitButtons($frm['submit_buttons']); ?></td>
    2717    </tr>
    2818</table>
  • trunk/bin/module_maker/skel/adm_list.ihtml

    r18 r19  
    2727    <tr>
    2828        <td class="padleft nowrap"><a title="<?php printf(_("Edit %s"), oTxt($list[$i]['______RECORD_NAME______'])) ?>" href="<?php echo App::oHREF($_SERVER['PHP_SELF'] . '?op=edit&%PRIMARY_KEY%=' . $list[$i]['%PRIMARY_KEY%']); ?>"><img src="/admin/_widgets/edit.gif" alt="Edit" width="14" height="18" border="0"></a> &nbsp;</td>
    29         <td class="padleft nowrap"><a title="<?php printf(_("Versions of %s"), oTxt($list[$i]['______RECORD_NAME______'])) ?>" href="<?php echo App::oHREF('/admin/record_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>
     29        <td class="padleft nowrap"><a title="<?php printf(_("Versions of %s"), oTxt($list[$i]['______RECORD_NAME______'])) ?>" 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>
    3030%ADM_LIST_ROWS%
    3131        <td class="padleft nowrap" align="right"><a title="<?php printf(_("Delete %s"), oTxt($list[$i]['______RECORD_NAME______'])) ?>" 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]['______RECORD_NAME______'])) ?>')"><img src="/admin/_widgets/delete.gif" alt="Delete" width="16" height="17" border="0"></a> &nbsp;</td>
  • trunk/bin/module_maker/skel/admin.php

    r18 r19  
    217217
    218218    // Lock this record.
    219     $lock->set('%DB_TBL%', '%PRIMARY_KEY%', $id, $frm['address']);
     219    $lock->set('%DB_TBL%', '%PRIMARY_KEY%', $id, $frm['<##>']);
    220220   
    221221    // Set misc values for the form.
     
    277277
    278278    // Create version.
    279     $version = new RecordVersion();
     279    $version = new RecordVersion($GLOBALS['auth']);
    280280    $version->create('%DB_TBL%', '%PRIMARY_KEY%', $last_insert_id, $frm['<##>']);
    281281   
     
    300300       
    301301        // Create version.
    302         $version = new RecordVersion();
     302        $version = new RecordVersion($GLOBALS['auth']);
    303303        $version->create('%DB_TBL%', '%PRIMARY_KEY%', $frm['%PRIMARY_KEY%'], $frm['<##>']);
    304304   
     
    349349            a2.username AS modified_admin_username
    350350        FROM %DB_TBL%
    351         LEFT JOIN admin_tbl a1 ON (%DB_TBL%.added_by_admin_id = a1.admin_id)
    352         LEFT JOIN admin_tbl a2 ON (%DB_TBL%.modified_by_admin_id = a2.admin_id)
     351        LEFT JOIN admin_tbl a1 ON (%DB_TBL%.added_by_user_id = a1.admin_id)
     352        LEFT JOIN admin_tbl a2 ON (%DB_TBL%.modified_by_user_id = a2.admin_id)
    353353        $where_clause
    354354        " . $so->getSortOrderSQL() . "
Note: See TracChangeset for help on using the changeset viewer.