2012-12-31 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* godmode/tag/tag.php godmode/tag/edit_tag.php: Tag editor compatible with metaconsole. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7345 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
2d0eeb0720
commit
415dd9901b
|
@ -1,3 +1,8 @@
|
||||||
|
2012-12-31 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
||||||
|
|
||||||
|
* godmode/tag/tag.php
|
||||||
|
godmode/tag/edit_tag.php: Tag editor compatible with metaconsole.
|
||||||
|
|
||||||
2012-12-31 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
2012-12-31 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
||||||
|
|
||||||
* godmode/reporting/reporting_builder.php: Fixes in template
|
* godmode/reporting/reporting_builder.php: Fixes in template
|
||||||
|
|
|
@ -37,16 +37,29 @@ $url_tag = (string) get_parameter ("url_tag", "");
|
||||||
$email_tag = (string) get_parameter ("email_tag", "");
|
$email_tag = (string) get_parameter ("email_tag", "");
|
||||||
$tab = (string) get_parameter ("tab", "list");
|
$tab = (string) get_parameter ("tab", "list");
|
||||||
|
|
||||||
|
if (defined('METACONSOLE'))
|
||||||
|
$sec = 'advanced';
|
||||||
|
else
|
||||||
|
$sec = 'gmodules';
|
||||||
|
|
||||||
$buttons = array(
|
$buttons = array(
|
||||||
'list' => array(
|
'list' => array(
|
||||||
'active' => false,
|
'active' => false,
|
||||||
'text' => '<a href="index.php?sec=gmodules&sec2=godmode/tag/tag&tab=list">' .
|
'text' => '<a href="index.php?sec='.$sec.'&sec2=godmode/tag/tag&tab=list">' .
|
||||||
html_print_image ("images/god6.png", true, array ("title" => __('List tags'))) .'</a>'));
|
html_print_image ("images/god6.png", true, array ("title" => __('List tags'))) .'</a>'));
|
||||||
|
|
||||||
$buttons[$tab]['active'] = true;
|
$buttons[$tab]['active'] = true;
|
||||||
|
|
||||||
// Header
|
if (defined('METACONSOLE')) {
|
||||||
ui_print_page_header (__('Tags configuration'), "images/setup.png", false, "", true, $buttons);
|
// Print header
|
||||||
|
ui_meta_print_header(__('Tags'), "", $buttons);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
|
||||||
|
// Header
|
||||||
|
ui_print_page_header (__('Tags configuration'), "images/setup.png", false, "", true, $buttons);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// Two actions can performed in this page: update and create tags
|
// Two actions can performed in this page: update and create tags
|
||||||
// Update tag: update an existing tag
|
// Update tag: update an existing tag
|
||||||
|
@ -125,7 +138,7 @@ else {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create/Update tag form
|
// Create/Update tag form
|
||||||
echo '<form method="post" action="index.php?sec=gmodules&sec2=godmode/tag/edit_tag&action=' . $action . '&id_tag=' . $id_tag . '" enctype="multipart/form-data">';
|
echo '<form method="post" action="index.php?sec='.$sec.'&sec2=godmode/tag/edit_tag&action=' . $action . '&id_tag=' . $id_tag . '" enctype="multipart/form-data">';
|
||||||
|
|
||||||
echo '<div align=left style="width: 98%" class="pandora_form">';
|
echo '<div align=left style="width: 98%" class="pandora_form">';
|
||||||
|
|
||||||
|
|
|
@ -56,16 +56,31 @@ if (is_ajax ()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (defined('METACONSOLE'))
|
||||||
|
$sec = 'advanced';
|
||||||
|
else
|
||||||
|
$sec = 'gmodules';
|
||||||
|
|
||||||
$buttons = array(
|
$buttons = array(
|
||||||
'list' => array(
|
'list' => array(
|
||||||
'active' => false,
|
'active' => false,
|
||||||
'text' => '<a href="index.php?sec=galertas&sec2=godmode/tag/tag&tab=list">' .
|
'text' => '<a href="index.php?sec='.$sec.'&sec2=godmode/tag/tag&tab=list">' .
|
||||||
html_print_image ("images/god6.png", true, array ("title" => __('List tags'))) .'</a>'));
|
html_print_image ("images/god6.png", true, array ("title" => __('List tags'))) .'</a>'));
|
||||||
|
|
||||||
$buttons[$tab]['active'] = true;
|
$buttons[$tab]['active'] = true;
|
||||||
|
|
||||||
// Header
|
if (defined('METACONSOLE')) {
|
||||||
ui_print_page_header (__('Tags configuration'), "images/setup.png", false, "", true, $buttons);
|
|
||||||
|
// Print header
|
||||||
|
ui_meta_print_header(__('Tags'), "", $buttons);
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
|
||||||
|
// Header
|
||||||
|
ui_print_page_header (__('Tags configuration'), "images/setup.png", false, "", true, $buttons);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// Two actions can performed in this page: search and delete tags
|
// Two actions can performed in this page: search and delete tags
|
||||||
|
|
||||||
|
@ -106,7 +121,7 @@ echo "<td>";
|
||||||
echo '<b>' . __("Name") . "/" . __("Description") . '</b>';
|
echo '<b>' . __("Name") . "/" . __("Description") . '</b>';
|
||||||
echo "</td>";
|
echo "</td>";
|
||||||
echo "<td align=center>";
|
echo "<td align=center>";
|
||||||
echo '<form method=post action="index.php?sec=gmodules&sec2=godmode/tag/tag&delete_tag=0">';
|
echo '<form method=post action="index.php?sec='.$sec.'&sec2=godmode/tag/tag&delete_tag=0">';
|
||||||
html_print_input_hidden ("search_tag", "1");
|
html_print_input_hidden ("search_tag", "1");
|
||||||
html_print_input_text ('tag_name', $tag_name, '', 30, 255, false);
|
html_print_input_text ('tag_name', $tag_name, '', 30, 255, false);
|
||||||
echo " ";
|
echo " ";
|
||||||
|
@ -114,7 +129,7 @@ echo "<td align=center>";
|
||||||
echo "</form>";
|
echo "</form>";
|
||||||
echo "</td>";
|
echo "</td>";
|
||||||
echo "<td align=right>";
|
echo "<td align=right>";
|
||||||
echo '<form method="post" action="index.php?sec=gmodules&sec2=godmode/tag/edit_tag&action=new">';
|
echo '<form method="post" action="index.php?sec='.$sec.'&sec2=godmode/tag/edit_tag&action=new">';
|
||||||
html_print_input_hidden ("create_tag", "1", true);
|
html_print_input_hidden ("create_tag", "1", true);
|
||||||
html_print_submit_button (__('Create tag'), 'create_button', false, 'class="sub next"');
|
html_print_submit_button (__('Create tag'), 'create_button', false, 'class="sub next"');
|
||||||
echo "</form>";
|
echo "</form>";
|
||||||
|
@ -158,26 +173,22 @@ if (!empty($result)) {
|
||||||
|
|
||||||
$data = array ();
|
$data = array ();
|
||||||
|
|
||||||
$data[0] = "<a href='index.php?sec=gmodules&sec2=godmode/tag/edit_tag&action=update&id_tag=" . $tag["id_tag"] . "'>" . $tag["name"] . "</a>";
|
$data[0] = "<a href='index.php?sec=".$sec."&sec2=godmode/tag/edit_tag&action=update&id_tag=" . $tag["id_tag"] . "'>" . $tag["name"] . "</a>";
|
||||||
$data[1] = ui_print_truncate_text($tag["description"], 'description', false);
|
$data[1] = ui_print_truncate_text($tag["description"], 'description', false);
|
||||||
$data[2] = '<a href="' . $tag["url"] . '">' . $tag["url"] . '</a>';
|
$data[2] = '<a href="' . $tag["url"] . '">' . $tag["url"] . '</a>';
|
||||||
$data[3] = ' <a class="tag_details"
|
$data[3] = ' <a class="tag_details"
|
||||||
href="ajax.php?page=godmode/tag/tag&get_tag_tooltip=1&id_tag=' . $tag['id_tag'] . '">' .
|
href="' . ui_get_full_url(false, false, false, false) . '/ajax.php?page=godmode/tag/tag&get_tag_tooltip=1&id_tag=' . $tag['id_tag'] . '">' .
|
||||||
html_print_image("images/zoom.png", true, array("id" => 'tag-details-'.$tag['id_tag'], "class" => "img_help")) . '</a> ';
|
html_print_image("images/zoom.png", true, array("id" => 'tag-details-'.$tag['id_tag'], "class" => "img_help")) . '</a> ';
|
||||||
|
|
||||||
$data[3] .= tags_get_modules_count($tag["id_tag"]);
|
$data[3] .= tags_get_modules_count($tag["id_tag"]);
|
||||||
$data[4] = $tag["email"];
|
$data[4] = $tag["email"];
|
||||||
$data[5] = "<a href='index.php?sec=gmodules&sec2=godmode/tag/edit_tag&action=update&id_tag=".$tag["id_tag"] . "'>" . html_print_image("images/config.png", true, array("title" => "Edit")) . "</a> ";
|
$data[5] = "<a href='index.php?sec=".$sec."&sec2=godmode/tag/edit_tag&action=update&id_tag=".$tag["id_tag"] . "'>" . html_print_image("images/config.png", true, array("title" => "Edit")) . "</a> ";
|
||||||
$data[5] .= '<a href="index.php?sec=gmodules&sec2=godmode/tag/tag&delete_tag='.$tag["id_tag"] . '"onclick="if (! confirm (\''.__('Are you sure?').'\')) return false">' . html_print_image("images/cross.png", true, array("title" => "Delete")) . '</a>';
|
$data[5] .= '<a href="index.php?sec='.$sec.'&sec2=godmode/tag/tag&delete_tag='.$tag["id_tag"] . '"onclick="if (! confirm (\''.__('Are you sure?').'\')) return false">' . html_print_image("images/cross.png", true, array("title" => "Delete")) . '</a>';
|
||||||
array_push ($table->data, $data);
|
array_push ($table->data, $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
html_print_table ($table);
|
html_print_table ($table);
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
// No tags available or selected
|
|
||||||
echo "<div class='nf'>".__('No tags selected')."</div>";
|
|
||||||
}
|
|
||||||
|
|
||||||
ui_require_css_file ('cluetip');
|
ui_require_css_file ('cluetip');
|
||||||
ui_require_jquery_file ('cluetip');
|
ui_require_jquery_file ('cluetip');
|
||||||
|
|
Loading…
Reference in New Issue