N°3908 - Polishing: Application Upgrade - clickable checkbox label, remove history menu, filter history with most recent first, remove unnecessary columns in history

This commit is contained in:
Eric Espie
2021-09-16 11:14:50 +02:00
parent adc7666dd0
commit 5839bab042
4 changed files with 34 additions and 7 deletions

View File

@@ -63,13 +63,11 @@
{% EndUIAlert %}
{% UIContentBlock Standard {'aContainerClasses':['ibo-font-ral-nor-150']} %}
{% UIInput Standard {'sType':'checkbox', 'sId':'doBackup', 'sName':'doBackup', 'sValue':'1', 'IsChecked':true, 'CSSClasses':['ibo-input-checkbox', 'ibo-input--label-left']} %}
{{ 'iTopUpdate:UI:DoBackup:Label'|dict_s }}
{% UIInput Standard {'sType':'checkbox', 'sId':'doBackup', 'sName':'doBackup', 'sValue':'1', 'IsChecked':true, 'CSSClasses':['ibo-input-checkbox', 'ibo-input--label-left'], 'Label':'iTopUpdate:UI:DoBackup:Label'|dict_s} %}
{% EndUIContentBlock %}
{% UIContentBlock Standard {'aContainerClasses':['ibo-font-ral-nor-150']} %}
{% UIInput Standard {'sType':'checkbox', 'sId':'doFilesArchive', 'sName':'doFilesArchive', 'sValue':'1', 'IsChecked':true, 'CSSClasses':['ibo-input-checkbox', 'ibo-input--label-left']} %}
{{ 'iTopUpdate:UI:DoFilesArchive'|dict_s }}
{% UIInput Standard {'sType':'checkbox', 'sId':'doFilesArchive', 'sName':'doFilesArchive', 'sValue':'1', 'IsChecked':true, 'CSSClasses':['ibo-input-checkbox', 'ibo-input--label-left'], 'Label':'iTopUpdate:UI:DoFilesArchive'|dict_s} %}
{% EndUIContentBlock %}
{% UIContentBlock Standard {'aContainerClasses':['ibo_check_update_submit']} %}
@@ -82,7 +80,7 @@
{% EndUIFieldSet %}
{% UIFieldSet Standard {'sLegend':'iTopUpdate:UI:History'|dict_s} %}
{% UIDataTable ForResult {'oPage':oPage, 'sListId':'iboupdatehistory', 'oSet':oSet} %}{% EndUIDataTable %}
{% UIDataTable ForRendering {'sListId':'iboupdatehistory', 'oSet':oSet} %}{% EndUIDataTable %}
{% EndUIFieldSet %}
{% EndUIContentBlock %}

View File

@@ -33,12 +33,13 @@ class ModuleInstallation extends cmdbAbstractObject
(
"category" => "core,view_in_gui",
"key_type" => "autoincrement",
"name_attcode" => "",
'name_attcode' => array('name', 'version'),
"state_attcode" => "",
"reconc_keys" => array(),
"db_table" => "priv_module_install",
"db_key_field" => "id",
"db_finalclass_field" => "",
'order_by_default' => array('installed' => false),
);
MetaModel::Init_Params($aParams);
//MetaModel::Init_InheritAttributes();
@@ -51,7 +52,7 @@ class ModuleInstallation extends cmdbAbstractObject
// Display lists
MetaModel::Init_SetZListItems('details', array('name', 'version', 'installed', 'comment', 'parent_id')); // Attributes to be displayed for the complete details
MetaModel::Init_SetZListItems('list', array('name', 'version', 'installed', 'comment')); // Attributes to be displayed for a list
MetaModel::Init_SetZListItems('list', array('installed', 'comment')); // Attributes to be displayed for a list
// Search criteria
// MetaModel::Init_SetZListItems('standard_search', array('name')); // Criteria of the std search form
// MetaModel::Init_SetZListItems('advanced_search', array('name')); // Criteria of the advanced search form

View File

@@ -25,6 +25,8 @@ class Input extends AbstractInput
protected $bIsDisabled = false;
protected $bIsReadonly = false;
protected $sLabel = null;
/** @var string */
protected $sType;
@@ -101,4 +103,29 @@ class Input extends AbstractInput
$this->bIsReadonly = $bIsReadonly;
return $this;
}
/**
* @return string|null
*/
public function GetLabel()
{
return $this->sLabel;
}
/**
* @param null $sLabel
*
* @return $this
*/
public function SetLabel($sLabel)
{
$this->sLabel = $sLabel;
return $this;
}
public function HasLabel()
{
return !is_null($this->sLabel);
}
}

View File

@@ -13,4 +13,5 @@
{% endif %}
{% if oUIBlock.GetPlaceHolder() %} placeholder="{{ oUIBlock.GetPlaceHolder() }}" {% endif %}
>
{% if oUIBlock.HasLabel() %}<label for="{{ oUIBlock.GetId() }}">{{ oUIBlock.GetLabel() |raw }}</label>{% endif %}
{% endblock %}