{# # --------------------------------------------------------------------- # # GLPI - Gestionnaire Libre de Parc Informatique # # http://glpi-project.org # # @copyright 2015-2025 Teclib' and contributors. # @licence https://www.gnu.org/licenses/gpl-3.0.html # # --------------------------------------------------------------------- # # LICENSE # # This file is part of GLPI. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # # --------------------------------------------------------------------- #} {% extends 'pages/admin/profile/base_tab.html.twig' %} {% import 'components/form/fields_macros.html.twig' as fields %} {% set is_root_entity_active = has_access_to_entity(0) %} {% block content %} {{ fields.smallTitle(__('ITIL Templates')) }} {{ fields.dropdownField('TicketTemplate', 'tickettemplates_id', item.fields['tickettemplates_id'], __('Default ticket template'), { full_width: true, condition: {entities_id: 0}|merge(is_multi_entities_mode() ? {is_recursive: 1} : {}), addicon: is_root_entity_active }) }} {{ fields.dropdownField('ChangeTemplate', 'changetemplates_id', item.fields['changetemplates_id'], __('Default change template'), { full_width: true, condition: {entities_id: 0}|merge(is_multi_entities_mode() ? {is_recursive: 1} : {}), addicon: is_root_entity_active }) }} {{ fields.dropdownField('ProblemTemplate', 'problemtemplates_id', item.fields['problemtemplates_id'], __('Default problem template'), { full_width: true, condition: {entities_id: 0}|merge(is_multi_entities_mode() ? {is_recursive: 1} : {}), addicon: is_root_entity_active }) }} {{ _self.displayRightsMatrix(item, 'central', 'tracking', 'itilobjects', _n('ITIL object', 'ITIL objects', get_plural_number())) }} {{ _self.displayRightsMatrix(item, 'central', 'tracking', 'tickets', 'Ticket'|itemtype_name(get_plural_number())) }} {{ _self.displayRightsMatrix(item, 'central', 'tracking', 'changes', 'Change'|itemtype_name(get_plural_number())) }} {{ _self.displayRightsMatrix(item, 'central', 'tracking', 'problems', 'Problem'|itemtype_name(get_plural_number())) }} {{ _self.displayRightsMatrix(item, 'central', 'tracking', 'followups_tasks', 'ITILFollowup'|itemtype_name(get_plural_number()) ~ ' / ' ~ 'CommonITILTask'|itemtype_name(get_plural_number())) }} {% if config('use_notifications') == '0' %} {% set activation_msg %} {{ __('Notifications must be enabled to activate mentions.') }} {% endset %} {{ fields.htmlField('use_mentions', activation_msg, __('Mentions configuration'), {full_width: true}) }} {% else %} {% set user_mention_helper %} {{ __('Enables or disables the ability to mention users within the application.') }} {{ __('Disabled') ~ ': ' ~ __('User mentions are disabled for this profile.') }} {{ __('Full') ~ ': ' ~ __('Displays all users. Mentioned users will be added as observers if they are not already actors.') }} {{ __('Restricted') ~ ': ' ~ __('Limits the display to actors directly involved in the ticket.') }} {% endset %} {{ fields.dropdownArrayField( 'use_mentions', item.fields['use_mentions'], { (constant('Glpi\\RichText\\UserMention::USER_MENTION_DISABLED')): __('Disabled'), (constant('Glpi\\RichText\\UserMention::USER_MENTION_FULL')): __('Full'), (constant('Glpi\\RichText\\UserMention::USER_MENTION_RESTRICTED')): __('Restricted'), }, __('Mentions configuration'), {helper: user_mention_helper} ) }} {% endif %} {{ _self.displayRightsMatrix(item, 'central', 'tracking', 'validations', 'CommonITILValidation'|itemtype_name(get_plural_number())) }} {{ fields.smallTitle(__('Association')) }} {{ fields.checkboxField('_show_group_hardware', item.fields['show_group_hardware'], __('See hardware of my groups'), { full_width: true }) }} {% set helpdesk_hardware_field %} {% do call('Profile::getLinearRightChoice', [ call('Profile::getHelpdeskHardwareTypes', [true]), { field: 'helpdesk_hardware', value: item.fields['helpdesk_hardware'], } ]) %} {% endset %} {{ fields.htmlField('helpdesk_hardware', helpdesk_hardware_field, __('Link with items for the creation of tickets'), { full_width: true }) }} {% set associable_types_field %} {% do call('Profile::dropdownHelpdeskItemtypes', [{ values: item.fields['helpdesk_item_type'] }]) %} {% endset %} {{ fields.htmlField('helpdesk_item_type', associable_types_field, __('Associable items to tickets, changes and problems'), { full_width: true }) }} {{ _self.displayRightsMatrix(item, 'central', 'tracking', 'visibility', __('Visibility')) }} {{ _self.displayRightsMatrix(item, 'central', 'tracking', 'planning', __('Planning')) }} {% endblock %}