{# # --------------------------------------------------------------------- # # GLPI - Gestionnaire Libre de Parc Informatique # # http://glpi-project.org # # @copyright 2015-2023 Teclib' and contributors. # @copyright 2003-2014 by the INDEPNET Development Team. # @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 . # # --------------------------------------------------------------------- #} {% set anchor = entry['type'] ~ '_' ~ entry_i['id'] %}
{{ include('components/itilobject/timeline/timeline_item_header_badges.html.twig', { 'users_id': users_id, 'date_creation': date_creation, 'date_mod': date_mod, 'users_id_editor': entry_i['users_id_editor'], 'anchor': anchor, 'anonym_user': anonym_user, }, with_context = false) }}
{% set actions = {} %} {% if entry_i['can_edit'] and not status_closed and not (entry['type'] in ['Document_Item', 'Assign']) %} {% set edit_btn %}
  • {{ __('Edit') }}
  • {% endset %} {% set actions = actions|merge({edit_btn}) %} {% endif %} {% if is_private %} {% endif %} {% if is_promoted %} {% set promoted_btn %}
  • {{ __('%s was already promoted')|format(entry['type']|itemtype_name) }}
  • {% endset %} {% set actions = actions|merge({promoted_btn}) %} {% elseif get_current_interface() == 'central' and item.getType() is same as 'Ticket' and item.canCreate() and (entry['type'] is same as 'ITILFollowup' or entry['type'] is same as 'TicketTask') %} {% set promote_url = '?_promoted_fup_id=' ~ entry_i['id'] %} {% if entry['type'] is same as 'TicketTask' %} {% set promote_url = '?_promoted_task_id=' ~ entry_i['id'] %} {% endif %} {% set promote_btn %}
  • {{ __('Promote to Ticket') }}
  • {% endset %} {% set actions = actions|merge({promote_btn}) %} {% endif %} {% if actions|length %} {% endif %}