Skip to content

Commit

Permalink
Changed visual of metaconsole
Browse files Browse the repository at this point in the history
  • Loading branch information
m-lopez-f committed Mar 6, 2015
1 parent c9a5663 commit 58722a5
Show file tree
Hide file tree
Showing 44 changed files with 970 additions and 251 deletions.
5 changes: 4 additions & 1 deletion pandora_console/godmode/alerts/alert_actions.php
Expand Up @@ -23,6 +23,8 @@

check_login ();

enterprise_hook('open_meta_frame');

if (! check_acl ($config['id_user'], 0, "LM")) {
db_pandora_audit("ACL Violation",
"Trying to access Alert actions");
Expand Down Expand Up @@ -65,7 +67,6 @@
}
}

enterprise_hook('open_meta_frame');

if ($copy_action) {
$id = get_parameter ('id');
Expand Down Expand Up @@ -333,6 +334,8 @@
}

$table->width = '98%';
if (defined('METACONSOLE'))
$table->width = '100%';
$table->data = array ();
$table->head = array ();
$table->head[0] = __('Name');
Expand Down
5 changes: 4 additions & 1 deletion pandora_console/godmode/alerts/alert_commands.php
Expand Up @@ -22,6 +22,8 @@

check_login ();

enterprise_hook('open_meta_frame');

if (! check_acl ($config['id_user'], 0, "LM")) {
db_pandora_audit("ACL Violation",
"Trying to access Alert Management");
Expand Down Expand Up @@ -166,7 +168,6 @@
else
ui_print_page_header (__('Alerts').' » '.__('Alert commands'), "images/gm_alerts.png", false, "alerts_config", true);

enterprise_hook('open_meta_frame');

$update_command = (bool) get_parameter ('update_command');
$create_command = (bool) get_parameter ('create_command');
Expand Down Expand Up @@ -293,6 +294,8 @@
}

$table->width = '98%';
if (defined('METACONSOLE'))
$table->width = '100%';
$table->data = array ();
$table->head = array ();
$table->head[0] = __('Name');
Expand Down
22 changes: 18 additions & 4 deletions pandora_console/godmode/alerts/alert_templates.php
Expand Up @@ -23,6 +23,8 @@

check_login ();

enterprise_hook('open_meta_frame');

if (is_ajax ()) {
$get_template_tooltip = (bool) get_parameter ('get_template_tooltip');

Expand Down Expand Up @@ -131,7 +133,6 @@
}
}

enterprise_hook('open_meta_frame');

if ($update_template) {
$id = (int) get_parameter ('id');
Expand Down Expand Up @@ -230,11 +231,18 @@
$search_type = (string) get_parameter ('search_type');

$table->width = '98%';
if (defined("METACONSOLE")){
$table->width = '50%';
$table->class = 'databox_filters';
}
$table->data = array ();
$table->head = array ();
$table->style = array ();
$table->style[0] = 'font-weight: bold';
$table->style[2] = 'font-weight: bold';

if (!defined("METACONSOLE")){
$table->style[0] = 'font-weight: bold';
$table->style[2] = 'font-weight: bold';
}

$table->data[0][0] = __('Type');
$table->data[0][1] = html_print_select (alerts_get_alert_templates_types (), 'search_type',
Expand All @@ -247,7 +255,11 @@
'class="sub search"', true);
$table->data[0][4] .= '</div>';

echo '<form method="post" action="' . $url . '">';
if (defined("METACONSOLE"))
echo '<form class="filters_form" method="post" action="' . $url . '">';
else
echo '<form method="post" action="' . $url . '">';

html_print_table ($table);
echo '</form>';

Expand All @@ -271,6 +283,8 @@
$templates = array ();

$table->width = '98%';
if (defined("METACONSOLE"))
$table->width = '100%';
$table->data = array ();
$table->head = array ();
$table->head[0] = __('Name');
Expand Down
16 changes: 15 additions & 1 deletion pandora_console/godmode/alerts/configure_alert_action.php
Expand Up @@ -22,6 +22,8 @@

check_login ();

enterprise_hook('open_meta_frame');

if (! check_acl ($config['id_user'], 0, "LM")) {
db_pandora_audit("ACL Violation",
"Trying to access Alert Management");
Expand Down Expand Up @@ -61,7 +63,6 @@
ui_print_page_header (__('Alerts').' &raquo; '.__('Configure alert action'), "images/gm_alerts.png", false, "alert_config", true);
}

enterprise_hook('open_meta_frame');

$name = '';
$id_command = '';
Expand All @@ -82,6 +83,19 @@

$table->id = 'table_macros';
$table->width = '98%';
if (defined('METACONSOLE')){
$table->class = 'databox data';
$table->width = '100%';
if ($id) {
$table->head[0] = __('Update Action');
}
else {
$table->head[0] = __('Create Action');
}

$table->head_colspan[0] = 4;
$table->headstyle[0] = 'text-align: center';
}
$table->style = array ();
$table->style[0] = 'font-weight: bold';
$table->size = array ();
Expand Down
22 changes: 19 additions & 3 deletions pandora_console/godmode/alerts/configure_alert_command.php
Expand Up @@ -20,6 +20,8 @@

check_login ();

enterprise_hook('open_meta_frame');

if (! check_acl ($config['id_user'], 0, "LM")) {
db_pandora_audit("ACL Violation",
"Trying to access Alert Management");
Expand Down Expand Up @@ -60,12 +62,26 @@
ui_print_page_header (__('Alerts') . ' &raquo; ' .
__('Configure alert command'), "images/gm_alerts.png", false, "alerts_config", true);

enterprise_hook('open_meta_frame');

$table->width = '98%';
if (defined('METACONSOLE')){
$table->width = '100%';
$table->class = 'databox data';
if ($id) {
$table->head[0] = __('Update Command');
}
else {
$table->head[0] = __('Create Command');
}

$table->head_colspan[0] = 4;
$table->headstyle[0] = 'text-align: center';
}
$table->style = array ();
$table->style[0] = 'font-weight: bold';
$table->style[2] = 'font-weight: bold';
if (!defined('METACONSOLE')){
$table->style[0] = 'font-weight: bold';
$table->style[2] = 'font-weight: bold';
}
$table->size = array ();
$table->size[0] = '20%';
$table->data = array ();
Expand Down
16 changes: 13 additions & 3 deletions pandora_console/godmode/alerts/configure_alert_template.php
Expand Up @@ -21,6 +21,8 @@

check_login ();

enterprise_hook('open_meta_frame');

if (! check_acl ($config['id_user'], 0, "LM")) {
db_pandora_audit("ACL Violation",
"Trying to access Alert Management");
Expand Down Expand Up @@ -99,7 +101,6 @@
}
}

enterprise_hook('open_meta_frame');

if ($duplicate_template) {
$source_id = (int) get_parameter ('source_id');
Expand Down Expand Up @@ -470,9 +471,18 @@ function update_template ($step) {

$table->id = 'template';
$table->width = '98%';
if(defined("METACONSOLE")){
$table->width = '100%';
$table->class = 'databox data';
$table->head[0] = __('Create Template');
$table->head_colspan[0] = 4;
$table->headstyle[0] = 'text-align: center';
}
$table->style = array ();
$table->style[0] = 'font-weight: bold; vertical-align: top';
$table->style[2] = 'font-weight: bold; vertical-align: top';
if(!defined("METACONSOLE")){
$table->style[0] = 'font-weight: bold; vertical-align: top';
$table->style[2] = 'font-weight: bold; vertical-align: top';
}
$table->size = array ();
$table->size[0] = '20%';
$table->size[2] = '20%';
Expand Down
59 changes: 43 additions & 16 deletions pandora_console/godmode/category/category.php
Expand Up @@ -19,6 +19,8 @@
// Check login and ACLs
check_login ();

enterprise_hook('open_meta_frame');

if (! check_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_user'])) {
db_pandora_audit("ACL Violation", "Trying to access Categories Management");
require ("general/noaccess.php");
Expand All @@ -34,11 +36,20 @@
$category_name = (string) get_parameter ("category_name","");
$tab = (string) get_parameter ("tab", "list");

$buttons = array(
'list' => array(
'active' => false,
'text' => '<a href="index.php?sec=galertas&sec2=godmode/category/category&tab=list&pure='.(int)$config['pure'].'">' .
html_print_image ("images/list.png", true, array ("title" => __('List categories'))) .'</a>'));
if(defined('METACONSOLE')) {
$buttons = array(
'list' => array(
'active' => false,
'text' => '<a href="index.php?sec=advanced&sec2=godmode/category/category&tab=list&pure='.(int)$config['pure'].'">' .
html_print_image ("images/list.png", true, array ("title" => __('List categories'))) .'</a>'));
}
else{
$buttons = array(
'list' => array(
'active' => false,
'text' => '<a href="index.php?sec=galertas&sec2=godmode/category/category&tab=list&pure='.(int)$config['pure'].'">' .
html_print_image ("images/list.png", true, array ("title" => __('List categories'))) .'</a>'));
}

$buttons[$tab]['active'] = true;

Expand All @@ -50,7 +61,6 @@
ui_print_page_header (__('Categories configuration'), "images/gm_modules.png", false, "", true, $buttons);
}

enterprise_hook('open_meta_frame');

// Two actions can performed in this page: search and delete categories

Expand Down Expand Up @@ -79,16 +89,18 @@
$result = categories_get_all_categories ();

// Form to add new categories or search categories
echo "<table border=0 cellpadding=4 cellspacing=4 class=databox width=98%>";
echo "<tr>";
echo "<td align=right>";
echo '<form method="post" action="index.php?sec=gmodules&sec2=godmode/category/edit_category&action=new&pure='.(int)$config['pure'].'">';
html_print_input_hidden ("create_category", "1", true);
html_print_submit_button (__('Create category'), 'create_button', false, 'class="sub next"');
echo "</form>";
echo "</td>";
echo "</tr>";
echo "</table>";
if(!defined('METACONSOLE')){
echo "<table border=0 cellpadding=4 cellspacing=4 class='databox' width=98%>";
echo "<tr>";
echo "<td align=right>";
echo '<form method="post" action="index.php?sec=gmodules&sec2=godmode/category/edit_category&action=new&pure='.(int)$config['pure'].'">';
html_print_input_hidden ("create_category", "1", true);
html_print_submit_button (__('Create category'), 'create_button', false, 'class="sub next"');
echo "</form>";
echo "</td>";
echo "</tr>";
echo "</table>";
}

// Prepare pagination
ui_pagination ($total_categories, $url);
Expand All @@ -100,6 +112,8 @@
if (!empty($result)) {

$table->width = '98%';
if(defined('METACONSOLE'))
$table->width = '100%';
$table->data = array ();
$table->head = array ();
$table->align = array ();
Expand All @@ -126,6 +140,19 @@
}

html_print_table ($table);

if(defined('METACONSOLE')){
echo "<table border=0 cellpadding=0 cellspacing=0 class='' width=100%>";
echo "<tr>";
echo "<td align=right>";
echo '<form method="post" action="index.php?sec=gmodules&sec2=godmode/category/edit_category&action=new&pure='.(int)$config['pure'].'">';
html_print_input_hidden ("create_category", "1", true);
html_print_submit_button (__('Create category'), 'create_button', false, 'class="sub next"');
echo "</form>";
echo "</td>";
echo "</tr>";
echo "</table>";
}
}
else {
// No categories available or selected
Expand Down

0 comments on commit 58722a5

Please sign in to comment.