{# # --------------------------------------------------------------------- # GLPI - Gestionnaire Libre de Parc Informatique # Copyright (C) 2015-2022 Teclib' and contributors. # # http://glpi-project.org # # based on GLPI - Gestionnaire Libre de Parc Informatique # Copyright (C) 2003-2014 by the INDEPNET Development Team. # # --------------------------------------------------------------------- # # LICENSE # # This file is part of GLPI. # # GLPI 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 2 of the License, or # (at your option) any later version. # # GLPI 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 GLPI. If not, see . # --------------------------------------------------------------------- #}
{{ 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'], '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 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 %}