Files
luos/gulliver/bin/tasks/templates/pluginDelete.tpl

36 lines
1.2 KiB
Smarty
Raw Normal View History

2010-12-02 23:34:41 +00:00
<?php
//to do: improve the way to pass two or more parameters in the paged-table (link)
2010-12-02 23:34:41 +00:00
$aux = explode('|', $_GET['id']);
$index = 0;
2010-12-02 23:34:41 +00:00
<!-- START BLOCK : keys -->
${phpName} = str_replace('"', '', $aux[$index++]);
2010-12-02 23:34:41 +00:00
<!-- END BLOCK : keys -->
<!-- START BLOCK : plugin -->
require_once (PATH_PLUGINS . '{pluginName}' . PATH_SEP . 'class.{pluginName}.php');
2010-12-02 23:34:41 +00:00
$pluginObj = new {pluginName}Class ();
<!-- END BLOCK : plugin -->
require_once ("classes/model/{className}.php");
2010-12-02 23:34:41 +00:00
//if exists the row in the database propel will update it, otherwise will insert.
$tr = {className}Peer::retrieveByPK({keylist});
2010-12-02 23:34:41 +00:00
if ((is_object($tr) && get_class($tr) == '{className}')) {
2010-12-02 23:34:41 +00:00
<!-- START BLOCK : fields -->
$fields['{name}'] = $tr->get{phpName}();
$fields['LABEL_{name}'] = $tr->get{phpName}();
2010-12-02 23:34:41 +00:00
<!-- END BLOCK : fields -->
}
else
$fields = array();
2010-12-02 23:34:41 +00:00
$G_MAIN_MENU = '{projectName}';
$G_SUB_MENU = '{phpClassName}';
$G_ID_MENU_SELECTED = '{menuId}';
$G_ID_SUB_MENU_SELECTED = '{menuId}';
$G_PUBLISH = new Publisher;
$G_PUBLISH->AddContent('xmlform', 'xmlform', '{phpFolderName}/{phpClassName}Delete', '', $fields, '{phpClassName}DeleteExec');
G::RenderPage('publish');
2010-12-02 23:34:41 +00:00
?>