mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-16 13:58:45 +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' => '',
|
||||
'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)
|
||||
|
||||
36
pages/UI.php
36
pages/UI.php
@@ -1510,9 +1510,14 @@ EOF
|
||||
$iFieldIndex++;
|
||||
}
|
||||
}
|
||||
$oP->add('<div class="ui-widget-content">');
|
||||
$oObj->DisplayBareProperties($oP);
|
||||
$oP->add('</div>');
|
||||
$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("<form id=\"apply_stimulus\" method=\"post\" onSubmit=\"return OnSubmit('apply_stimulus');\">\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("</form>\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);
|
||||
$sJsonFieldsMap = json_encode($aFieldsMap);
|
||||
|
||||
@@ -1718,12 +1730,17 @@ EOF
|
||||
$oP->add("<h1>$sActionLabel - <span class=\"hilite\">{$oObj->GetName()}</span></h1>\n");
|
||||
$oP->set_title($sActionLabel);
|
||||
$oP->add("</div>\n");
|
||||
$oP->add('<div class="ui-widget-content">');
|
||||
$oObj->DisplayBareProperties($oP);
|
||||
$oP->add('</div>');
|
||||
$aTargetState = $aTargetStates[$sTargetState];
|
||||
$aExpectedAttributes = $aTargetState['attribute_list'];
|
||||
$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("<form id=\"apply_stimulus\" method=\"post\" onSubmit=\"return OnSubmit('apply_stimulus');\">\n");
|
||||
$aDetails = array();
|
||||
@@ -1798,6 +1815,13 @@ EOF
|
||||
$oP->add("<button type=\"submit\" class=\"action\"><span>$sActionLabel</span></button>\n");
|
||||
$oP->add("</form>\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);
|
||||
$sJsonFieldsMap = json_encode($aFieldsMap);
|
||||
|
||||
Reference in New Issue
Block a user