2012-11-20 Dario Rodriguez <dario.rodriguez@artica.es>
* operation/integria_incidents/incident.php: Fixed an error printing messages which appear before the header. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7161 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
92301209b7
commit
8f198cebab
|
@ -1,3 +1,8 @@
|
|||
2012-11-20 Dario Rodriguez <dario.rodriguez@artica.es>
|
||||
|
||||
* operation/integria_incidents/incident.php: Fixed an error printing messages
|
||||
which appear before the header.
|
||||
|
||||
2012-11-19 Dario Rodriguez <dario.rodriguez@artica.es>
|
||||
|
||||
* operation/integria_incidents/incident.list.php,
|
||||
|
|
|
@ -34,6 +34,46 @@ $update_incident = get_parameter('update_incident', 0);
|
|||
|
||||
$integria_api = $config['integria_url']."/include/api.php?return_type=xml&user=".$config['id_user']."&pass=".$config['integria_api_password'];
|
||||
|
||||
// Header
|
||||
if($tab == 'list' || $tab == 'editor') {
|
||||
$buttons = array(
|
||||
'list' => array(
|
||||
'active' => false,
|
||||
'text' => '<a href="index.php?login=1&sec=incidencias&sec2=operation/integria_incidents/incident&tab=list">' .
|
||||
html_print_image ("images/page_white_text.png", true, array ("title" => __('Incidents'))) .'</a>'),
|
||||
'editor' => array(
|
||||
'active' => false,
|
||||
'text' => '<a href="index.php?login=1&sec=incidencias&sec2=operation/integria_incidents/incident&tab=editor">' .
|
||||
html_print_image ("images/add.png", true, array ("title" => __('New Incident'))) .'</a>'));
|
||||
}
|
||||
else {
|
||||
$buttons = array(
|
||||
'list' => array(
|
||||
'active' => false,
|
||||
'text' => '<a href="index.php?login=1&sec=incidencias&sec2=operation/integria_incidents/incident&tab=list">' .
|
||||
html_print_image ("images/page_white_text.png", true, array ("title" => __('Incidents'))) .'</a>'),
|
||||
'incident' => array(
|
||||
'active' => false,
|
||||
'text' => '<a href="index.php?login=1&sec=incidencias&sec2=operation/integria_incidents/incident&tab=incident&id_incident='.$id_incident.'">' .
|
||||
html_print_image ("images/eye.png", true, array ("title" => __('Incident details'))) .'</a>'),
|
||||
'workunits' => array(
|
||||
'active' => false,
|
||||
'text' => '<a href="index.php?login=1&sec=incidencias&sec2=operation/integria_incidents/incident&tab=workunits&id_incident='.$id_incident.'">' .
|
||||
html_print_image ("images/computer.png", true, array ("title" => __('Workunits'))) .'</a>'),
|
||||
'files' => array(
|
||||
'active' => false,
|
||||
'text' => '<a href="index.php?login=1&sec=incidencias&sec2=operation/integria_incidents/incident&tab=files&id_incident='.$id_incident.'"">' .
|
||||
html_print_image ("images/file.png", true, array ("title" => __('Files'))) .'</a>'),
|
||||
'tracking' => array(
|
||||
'active' => false,
|
||||
'text' => '<a href="index.php?login=1&sec=incidencias&sec2=operation/integria_incidents/incident&tab=tracking&id_incident='.$id_incident.'"">' .
|
||||
html_print_image ("images/comments.png", true, array ("title" => __('Tracking'))) .'</a>'));
|
||||
}
|
||||
|
||||
$buttons[$tab]['active'] = true;
|
||||
|
||||
ui_print_page_header (__('Incident management'), "images/book_edit.png", false, "", false, $buttons);
|
||||
|
||||
if($update_incident == 1) {
|
||||
$values[0] = $id_incident;
|
||||
$values[1] = str_replace(" ", "%20", io_safe_output(get_parameter('title')));
|
||||
|
@ -88,46 +128,6 @@ if($create_incident == 1) {
|
|||
}
|
||||
}
|
||||
|
||||
// Header
|
||||
if($tab == 'list' || $tab == 'editor') {
|
||||
$buttons = array(
|
||||
'list' => array(
|
||||
'active' => false,
|
||||
'text' => '<a href="index.php?login=1&sec=incidencias&sec2=operation/integria_incidents/incident&tab=list">' .
|
||||
html_print_image ("images/page_white_text.png", true, array ("title" => __('Incidents'))) .'</a>'),
|
||||
'editor' => array(
|
||||
'active' => false,
|
||||
'text' => '<a href="index.php?login=1&sec=incidencias&sec2=operation/integria_incidents/incident&tab=editor">' .
|
||||
html_print_image ("images/add.png", true, array ("title" => __('New Incident'))) .'</a>'));
|
||||
}
|
||||
else {
|
||||
$buttons = array(
|
||||
'list' => array(
|
||||
'active' => false,
|
||||
'text' => '<a href="index.php?login=1&sec=incidencias&sec2=operation/integria_incidents/incident&tab=list">' .
|
||||
html_print_image ("images/page_white_text.png", true, array ("title" => __('Incidents'))) .'</a>'),
|
||||
'incident' => array(
|
||||
'active' => false,
|
||||
'text' => '<a href="index.php?login=1&sec=incidencias&sec2=operation/integria_incidents/incident&tab=incident&id_incident='.$id_incident.'">' .
|
||||
html_print_image ("images/eye.png", true, array ("title" => __('Incident details'))) .'</a>'),
|
||||
'workunits' => array(
|
||||
'active' => false,
|
||||
'text' => '<a href="index.php?login=1&sec=incidencias&sec2=operation/integria_incidents/incident&tab=workunits&id_incident='.$id_incident.'">' .
|
||||
html_print_image ("images/computer.png", true, array ("title" => __('Workunits'))) .'</a>'),
|
||||
'files' => array(
|
||||
'active' => false,
|
||||
'text' => '<a href="index.php?login=1&sec=incidencias&sec2=operation/integria_incidents/incident&tab=files&id_incident='.$id_incident.'"">' .
|
||||
html_print_image ("images/file.png", true, array ("title" => __('Files'))) .'</a>'),
|
||||
'tracking' => array(
|
||||
'active' => false,
|
||||
'text' => '<a href="index.php?login=1&sec=incidencias&sec2=operation/integria_incidents/incident&tab=tracking&id_incident='.$id_incident.'"">' .
|
||||
html_print_image ("images/comments.png", true, array ("title" => __('Tracking'))) .'</a>'));
|
||||
}
|
||||
|
||||
$buttons[$tab]['active'] = true;
|
||||
|
||||
ui_print_page_header (__('Incident management'), "images/book_edit.png", false, "", false, $buttons);
|
||||
|
||||
$attach_file = get_parameter('attach_file', 0);
|
||||
|
||||
if($attach_file == 1) {
|
||||
|
@ -181,7 +181,7 @@ if($delete_file != 0 && !$attach_file) {
|
|||
// Call the integria API
|
||||
$result = incidents_call_api($url);
|
||||
|
||||
$result = incidents_call_api($url, array('params' => $params));
|
||||
$result = incidents_call_api($url);
|
||||
|
||||
$result_array = incidents_xml_to_array($result);
|
||||
|
||||
|
|
Loading…
Reference in New Issue