module_creator expanded now with minidetail and select in list

This commit is contained in:
OpenXE 2022-10-21 16:11:56 +00:00
parent a243d3b330
commit debe733f13
2 changed files with 10 additions and 7 deletions

View File

@ -13,7 +13,7 @@
* PLACEHOLDER_EDIT
* PLACEHOLDER_DELETE
* PLACEHOLDER_SQL_LIST
* PLACEHOLDER_SQL_LIST
* PLACEHOLDER_DROPNBOX
* PLACEHOLDER_GET_INPUT
* PLACEHOLDER_SET_INPUT
* PLACEHOLDER_COLUMNS
@ -21,9 +21,9 @@
*/
$host = 'localhost';
$user = 'openxedev';
$passwd = 'openxedev';
$schema = 'openxedev';
$user = 'openxe';
$passwd = 'openxe';
$schema = 'openxe';
if ($argc >= 2) {
@ -152,7 +152,8 @@ if ($argc >= 2) {
$php_file_contents = str_replace('PLACEHOLDER_LIST', $module_name . "_list", $php_file_contents);
$php_file_contents = str_replace('PLACEHOLDER_EDIT', $module_name . "_edit", $php_file_contents);
$php_file_contents = str_replace('PLACEHOLDER_DELETE', $module_name . "_delete", $php_file_contents);
$php_file_contents = str_replace('PLACEHOLDER_SQL_LIST', "SELECT SQL_CALC_FOUND_ROWS $table_short_name.id, $sql_list_of_columns, $table_short_name.id FROM $module_name $table_short_name", $php_file_contents);
$php_file_contents = str_replace('PLACEHOLDER_DROPNBOX',"'<img src=./themes/new/images/details_open.png class=details>' AS `open`, CONCAT('<input type=\\\"checkbox\\\" name=\\\"auswahl[]\\\" value=\\\"',".$table_short_name.".id,'\\\" />') AS `auswahl`", $php_file_contents);
$php_file_contents = str_replace('PLACEHOLDER_SQL_LIST', "SELECT SQL_CALC_FOUND_ROWS $table_short_name.id, \$dropnbox, $sql_list_of_columns, $table_short_name.id FROM $module_name $table_short_name", $php_file_contents);
$php_file_contents = str_replace('PLACEHOLDER_SQL_EDIT', "INSERT INTO $module_name ($list_of_columns, id) values ('\".implode('\', \'',\$input).\"', \$id) ON DUPLICATE KEY UPDATE SET ", $php_file_contents);
$php_file_contents = str_replace('PLACEHOLDER_GET_INPUT', $get_input, $php_file_contents);
$php_file_contents = str_replace('PLACEHOLDER_SET_INPUT', $set_input, $php_file_contents);

View File

@ -30,8 +30,8 @@ class PLACEHOLDER_MODULECLASSNAME {
switch ($name) {
case "PLACEHOLDER_LIST":
$allowed['PLACEHOLDER_LIST'] = array('list');
$heading = array(PLACEHOLDER_COLUMNS, 'Men&uuml;');
$width = array('10%'); // Fill out manually later
$heading = array('','',PLACEHOLDER_COLUMNS, 'Men&uuml;');
$width = array('1%','1%','10%'); // Fill out manually later
$findcols = array(PLACEHOLDER_SQL_COLUMNS);
$searchsql = array(PLACEHOLDER_SQL_COLUMNS);
@ -39,6 +39,8 @@ class PLACEHOLDER_MODULECLASSNAME {
$defaultorder = 1;
$defaultorderdesc = 0;
$dropnbox = "PLACEHOLDER_DROPNBOX";
$menu = "<table cellpadding=0 cellspacing=0><tr><td nowrap>" . "<a href=\"index.php?module=PLACEHOLDER_MODULENAME&action=edit&id=%value%\"><img src=\"./themes/{$app->Conf->WFconf['defaulttheme']}/images/edit.svg\" border=\"0\"></a>&nbsp;<a href=\"#\" onclick=DeleteDialog(\"index.php?module=PLACEHOLDER_MODULENAME&action=delete&id=%value%\");>" . "<img src=\"themes/{$app->Conf->WFconf['defaulttheme']}/images/delete.svg\" border=\"0\"></a>" . "</td></tr></table>";
$sql = "PLACEHOLDER_SQL_LIST";