From 4103dc5c380191426f586644d670d7463f902fc3 Mon Sep 17 00:00:00 2001 From: Stanislas Date: Thu, 21 Nov 2024 11:59:15 +0100 Subject: [PATCH] Feat(Timeline): add 'blacklist' / 'whitelist' for doc --- .../timeline/form_document_item.html.twig | 15 +++++++++++++++ .../itilobject/timeline/sub_documents.html.twig | 16 ++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/templates/components/itilobject/timeline/form_document_item.html.twig b/templates/components/itilobject/timeline/form_document_item.html.twig index 6e29433dee5..74ec14ed52a 100644 --- a/templates/components/itilobject/timeline/form_document_item.html.twig +++ b/templates/components/itilobject/timeline/form_document_item.html.twig @@ -88,6 +88,21 @@ {% endif %} + {% if entry_i['_can_edit'] %} + {% set blacklisted_class = entry_i['is_blacklisted'] ? 'red' : '' %} + {% set blacklisted_title = entry_i['is_blacklisted'] ? _x('button', 'Remove from import exclusion list') : _x('button', 'Add to import exclusion list') %} + {% set blacklisted_value = entry_i['is_blacklisted'] ? 0 : 1 %} +
+ + + + +
+ {% endif %} diff --git a/templates/components/itilobject/timeline/sub_documents.html.twig b/templates/components/itilobject/timeline/sub_documents.html.twig index 9943b4574c2..90fb9ecc6bf 100644 --- a/templates/components/itilobject/timeline/sub_documents.html.twig +++ b/templates/components/itilobject/timeline/sub_documents.html.twig @@ -66,6 +66,22 @@ {% endif %} + + {% if document['item']['_can_edit'] %} + {% set blacklisted_class = document['item']['is_blacklisted'] ? 'red' : '' %} + {% set blacklisted_title = document['item']['is_blacklisted'] ? _x('button', 'Remove from import exclusion list') : _x('button', 'Add to import exclusion list') %} + {% set blacklisted_value = document['item']['is_blacklisted'] ? 0 : 1 %} +
+ + + + +
+ {% endif %} {% endset %}