From 5839bab042760b5b33d2566c9d42ac6ffa22cbdd Mon Sep 17 00:00:00 2001 From: Eric Espie Date: Thu, 16 Sep 2021 11:14:50 +0200 Subject: [PATCH] =?UTF-8?q?N=C2=B03908=20-=20Polishing:=20Application=20Up?= =?UTF-8?q?grade=20-=20clickable=20checkbox=20label,=20remove=20history=20?= =?UTF-8?q?menu,=20filter=20history=20with=20most=20recent=20first,=20remo?= =?UTF-8?q?ve=20unnecessary=20columns=20in=20history?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../view/SelectUpdateFile.html.twig | 8 +++--- setup/moduleinstallation.class.inc.php | 5 ++-- .../UI/Base/Component/Input/Input.php | 27 +++++++++++++++++++ .../base/components/input/layout.html.twig | 1 + 4 files changed, 34 insertions(+), 7 deletions(-) diff --git a/datamodels/2.x/itop-core-update/view/SelectUpdateFile.html.twig b/datamodels/2.x/itop-core-update/view/SelectUpdateFile.html.twig index 5d500c10b..c109287a7 100644 --- a/datamodels/2.x/itop-core-update/view/SelectUpdateFile.html.twig +++ b/datamodels/2.x/itop-core-update/view/SelectUpdateFile.html.twig @@ -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 %} diff --git a/setup/moduleinstallation.class.inc.php b/setup/moduleinstallation.class.inc.php index f284a9caf..264ddf611 100644 --- a/setup/moduleinstallation.class.inc.php +++ b/setup/moduleinstallation.class.inc.php @@ -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 diff --git a/sources/application/UI/Base/Component/Input/Input.php b/sources/application/UI/Base/Component/Input/Input.php index 83189f5e5..5d794af5e 100644 --- a/sources/application/UI/Base/Component/Input/Input.php +++ b/sources/application/UI/Base/Component/Input/Input.php @@ -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); + } } \ No newline at end of file diff --git a/templates/base/components/input/layout.html.twig b/templates/base/components/input/layout.html.twig index dc0eeb774..3082b93f0 100644 --- a/templates/base/components/input/layout.html.twig +++ b/templates/base/components/input/layout.html.twig @@ -13,4 +13,5 @@ {% endif %} {% if oUIBlock.GetPlaceHolder() %} placeholder="{{ oUIBlock.GetPlaceHolder() }}" {% endif %} > + {% if oUIBlock.HasLabel() %}{% endif %} {% endblock %} \ No newline at end of file