From e1bfe9a3b6817898873a656fa3d0032aa18ac9c4 Mon Sep 17 00:00:00 2001 From: "xavier.guiboud-ribaud@combodo.com" Date: Mon, 25 Nov 2024 16:01:39 +0100 Subject: [PATCH 1/2] =?UTF-8?q?*=20N=C2=B07746=20-=20Caselog=20edition=20b?= =?UTF-8?q?utton=20active=20even=20if=20the=20user=20has=20a=20read-only?= =?UTF-8?q?=20access=20to=20the=20object?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../itop-portal-base/portal/public/css/portal.scss | 5 +++-- .../UI/Base/Layout/ActivityPanel/ActivityPanel.php | 11 ++++++++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/datamodels/2.x/itop-portal-base/portal/public/css/portal.scss b/datamodels/2.x/itop-portal-base/portal/public/css/portal.scss index b78828b016..b1e350bc3f 100644 --- a/datamodels/2.x/itop-portal-base/portal/public/css/portal.scss +++ b/datamodels/2.x/itop-portal-base/portal/public/css/portal.scss @@ -1150,12 +1150,13 @@ table .group-actions .item-action-wrapper .panel-body > p:last-child{ } } .form_field .form_mandatory .control-label:after{ - content: "\002a"; + content: "\1F6C8"; position: relative; left: 3px; color: $brand-primary; font-size: 0.9em; -} + font-weight: 200; +}; /* Note: We don't put the .form_field selector as it must work for read-only */ .form-control-static img{ max-width: 100% !important; diff --git a/sources/Application/UI/Base/Layout/ActivityPanel/ActivityPanel.php b/sources/Application/UI/Base/Layout/ActivityPanel/ActivityPanel.php index 2d38da6822..89454737d2 100644 --- a/sources/Application/UI/Base/Layout/ActivityPanel/ActivityPanel.php +++ b/sources/Application/UI/Base/Layout/ActivityPanel/ActivityPanel.php @@ -763,7 +763,7 @@ class ActivityPanel extends UIBlock */ public function IsComposeButtonEnabled(): bool { - return $this->HasAnEditableCaseLogTab() && $this->IsCaseLogsSubmitAutonomous(); + return $this->HasAnEditableCaseLogTab() && $this->IsCaseLogsSubmitAutonomous() && $this->HasUserModifyRights(); } /** @@ -974,4 +974,13 @@ class ActivityPanel extends UIBlock $this->bShowMultipleEntriesSubmitConfirmation = appUserPreferences::GetPref('activity_panel.show_multiple_entries_submit_confirmation', static::DEFAULT_SHOW_MULTIPLE_ENTRIES_SUBMI_CONFIRMATION) !== 'false'; return $this; } + + /** + * @return bool + * @throws \CoreException + */ + protected function HasUserModifyRights(): bool + { + return \UserRights::IsActionAllowed($this->GetObjectClass(), UR_ACTION_MODIFY); + } } \ No newline at end of file From 642a13ad0d51bd402aac83bf0acb8dc119759f36 Mon Sep 17 00:00:00 2001 From: "xavier.guiboud-ribaud@combodo.com" Date: Tue, 26 Nov 2024 08:05:52 +0100 Subject: [PATCH 2/2] =?UTF-8?q?N=C2=B07984=20-=20Change=20=3F=20for=20fiel?= =?UTF-8?q?d=20description=20(tooltip)=20by=20=F0=9F=9B=88=20in=20console?= =?UTF-8?q?=20and=20portal?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datamodel.itop-structure.xml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/datamodels/2.x/itop-structure/datamodel.itop-structure.xml b/datamodels/2.x/itop-structure/datamodel.itop-structure.xml index a4c80889cc..0707d1ac8c 100644 --- a/datamodels/2.x/itop-structure/datamodel.itop-structure.xml +++ b/datamodels/2.x/itop-structure/datamodel.itop-structure.xml @@ -2043,4 +2043,22 @@ + + + module + itop-structure + -1 + + .ibo-has-description::after, .ibo-input-with-label--label.ibo-has-description::after{content:"\1F6C8"; font-weight: 200;} '; + } + } + ]]> + + +