mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-19 15:22:17 +02:00
New configuration parameter: display_actions_at_top: avoid scrolling to see the buttons when assigning a ticket !
SVN:trunk[1425]
This commit is contained in:
@@ -401,6 +401,15 @@ class Config
|
|||||||
'source_of_value' => '',
|
'source_of_value' => '',
|
||||||
'show_in_conf_sample' => true,
|
'show_in_conf_sample' => true,
|
||||||
),
|
),
|
||||||
|
'display_actions_at_top' => array(
|
||||||
|
'type' => 'bool',
|
||||||
|
'description' => 'Whether or not the actions/buttons should be displayed at the top of the screen',
|
||||||
|
// examples... not used
|
||||||
|
'default' => true,
|
||||||
|
'value' => false,
|
||||||
|
'source_of_value' => '',
|
||||||
|
'show_in_conf_sample' => true,
|
||||||
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
public function IsProperty($sPropCode)
|
public function IsProperty($sPropCode)
|
||||||
|
|||||||
30
pages/UI.php
30
pages/UI.php
@@ -1510,9 +1510,14 @@ EOF
|
|||||||
$iFieldIndex++;
|
$iFieldIndex++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$bDisplayFormAtTop = MetaModel::GetConfig()->Get('display_actions_at_top');
|
||||||
|
if (!$bDisplayFormAtTop)
|
||||||
|
{
|
||||||
|
// Displays the ticket details BEFORE the actions
|
||||||
$oP->add('<div class="ui-widget-content">');
|
$oP->add('<div class="ui-widget-content">');
|
||||||
$oObj->DisplayBareProperties($oP);
|
$oObj->DisplayBareProperties($oP);
|
||||||
$oP->add('</div>');
|
$oP->add('</div>');
|
||||||
|
}
|
||||||
$oP->add("<div class=\"wizContainer\">\n");
|
$oP->add("<div class=\"wizContainer\">\n");
|
||||||
$oP->add("<form id=\"apply_stimulus\" method=\"post\" onSubmit=\"return OnSubmit('apply_stimulus');\">\n");
|
$oP->add("<form id=\"apply_stimulus\" method=\"post\" onSubmit=\"return OnSubmit('apply_stimulus');\">\n");
|
||||||
$oP->add("<table><tr><td>\n");
|
$oP->add("<table><tr><td>\n");
|
||||||
@@ -1532,6 +1537,13 @@ EOF
|
|||||||
$oP->add("<button type=\"submit\" class=\"action\"><span>$sActionLabel</span></button>\n");
|
$oP->add("<button type=\"submit\" class=\"action\"><span>$sActionLabel</span></button>\n");
|
||||||
$oP->add("</form>\n");
|
$oP->add("</form>\n");
|
||||||
$oP->add("</div>\n");
|
$oP->add("</div>\n");
|
||||||
|
if ($bDisplayFormAtTop)
|
||||||
|
{
|
||||||
|
// Displays the ticket details BEFORE the actions
|
||||||
|
$oP->add('<div class="ui-widget-content">');
|
||||||
|
$oObj->DisplayBareProperties($oP);
|
||||||
|
$oP->add('</div>');
|
||||||
|
}
|
||||||
$iFieldsCount = count($aFieldsMap);
|
$iFieldsCount = count($aFieldsMap);
|
||||||
$sJsonFieldsMap = json_encode($aFieldsMap);
|
$sJsonFieldsMap = json_encode($aFieldsMap);
|
||||||
|
|
||||||
@@ -1718,12 +1730,17 @@ EOF
|
|||||||
$oP->add("<h1>$sActionLabel - <span class=\"hilite\">{$oObj->GetName()}</span></h1>\n");
|
$oP->add("<h1>$sActionLabel - <span class=\"hilite\">{$oObj->GetName()}</span></h1>\n");
|
||||||
$oP->set_title($sActionLabel);
|
$oP->set_title($sActionLabel);
|
||||||
$oP->add("</div>\n");
|
$oP->add("</div>\n");
|
||||||
$oP->add('<div class="ui-widget-content">');
|
|
||||||
$oObj->DisplayBareProperties($oP);
|
|
||||||
$oP->add('</div>');
|
|
||||||
$aTargetState = $aTargetStates[$sTargetState];
|
$aTargetState = $aTargetStates[$sTargetState];
|
||||||
$aExpectedAttributes = $aTargetState['attribute_list'];
|
$aExpectedAttributes = $aTargetState['attribute_list'];
|
||||||
$oP->add("<h1>$sActionDetails</h1>\n");
|
$oP->add("<h1>$sActionDetails</h1>\n");
|
||||||
|
$bDisplayFormAtTop = MetaModel::GetConfig()->Get('display_actions_at_top');
|
||||||
|
if (!$bDisplayFormAtTop)
|
||||||
|
{
|
||||||
|
// Displays the ticket details BEFORE the actions
|
||||||
|
$oP->add('<div class="ui-widget-content">');
|
||||||
|
$oObj->DisplayBareProperties($oP);
|
||||||
|
$oP->add('</div>');
|
||||||
|
}
|
||||||
$oP->add("<div class=\"wizContainer\">\n");
|
$oP->add("<div class=\"wizContainer\">\n");
|
||||||
$oP->add("<form id=\"apply_stimulus\" method=\"post\" onSubmit=\"return OnSubmit('apply_stimulus');\">\n");
|
$oP->add("<form id=\"apply_stimulus\" method=\"post\" onSubmit=\"return OnSubmit('apply_stimulus');\">\n");
|
||||||
$aDetails = array();
|
$aDetails = array();
|
||||||
@@ -1798,6 +1815,13 @@ EOF
|
|||||||
$oP->add("<button type=\"submit\" class=\"action\"><span>$sActionLabel</span></button>\n");
|
$oP->add("<button type=\"submit\" class=\"action\"><span>$sActionLabel</span></button>\n");
|
||||||
$oP->add("</form>\n");
|
$oP->add("</form>\n");
|
||||||
$oP->add("</div>\n");
|
$oP->add("</div>\n");
|
||||||
|
if ($bDisplayFormAtTop)
|
||||||
|
{
|
||||||
|
// Displays the ticket details AFTER the actions
|
||||||
|
$oP->add('<div class="ui-widget-content">');
|
||||||
|
$oObj->DisplayBareProperties($oP);
|
||||||
|
$oP->add('</div>');
|
||||||
|
}
|
||||||
|
|
||||||
$iFieldsCount = count($aFieldsMap);
|
$iFieldsCount = count($aFieldsMap);
|
||||||
$sJsonFieldsMap = json_encode($aFieldsMap);
|
$sJsonFieldsMap = json_encode($aFieldsMap);
|
||||||
|
|||||||
Reference in New Issue
Block a user