{% extends "helpdesk/base.html" %}{% load i18n %}

{% block helpdesk_title %}{% trans "Ticket CC Settings" %}{% endblock %}

{% block helpdesk_body %}{% blocktrans with ticket.title as ticket_title and ticket.id as ticket_id %}
<h2>Ticket CC Settings</h2>

<p>The following people will receive an e-mail whenever <em><a href='../'>{{ ticket_title }}</a></em> is updated. Some people can also view or edit the ticket via the public ticket views.</p>

<p>You can add a new recipient to the list or delete any of the items below as required.</p>{% endblocktrans %}

            <div class="row">
                <div class="col-lg-12">
                    <div class="panel panel-primary">
                        <div class="panel-heading">
                            {% trans "Ticket CC List" %}
                        </div>
                        <!-- /.panel-heading -->
                        <div class="panel-body">
                            <div><a href='add/'><button class="btn btn-success btn-sm"><i class="fa fa-plus-circle"></i>{% trans "Add an Email or Helpdesk User" %}</button></a></div>
                            <div class="table-responsive">
                                <table class="table table-striped table-bordered table-hover">
                                    <thead>
                                        <tr>
                                            <th>{% trans "E-Mail Address or Helpdesk User" %}</th>
                                            <th>{% trans "View?" %}</th>
                                            <th>{% trans "Update?" %}</th>
                                            <th>{% trans "Delete" %}</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        {% for person in copies_to %}
                                        <tr class='row_{% cycle 'odd' 'even' %}'>
                                            <td>{{ person.display }}</td>
                                            <td>{{ person.can_view }}</td>
                                            <td>{{ person.can_update }}</td>
                                            <td><a href='{% url 'helpdesk:ticket_cc_del' ticket.id person.id %}'><button class="btn btn-danger btn-xs">{% trans "Delete" %}</button></a></td>
                                        </tr>
                                        {% endfor %}
                                    </tbody>
                                </table>
                            </div>
                            <!-- /.table-responsive -->
                        </div>
                        <!-- /.panel-body -->
                    </div>
                    <!-- /.panel -->
                </div>
                <!-- /.col-lg-12 -->
            </div>
            <!-- /.row -->

<p><a href='{% url 'helpdesk:view' ticket.id %}'><button class="btn btn-primary btn-lg">{% blocktrans with ticket.title as ticket_title %}Return to <em>{{ ticket_title }}</em>{% endblocktrans %}</button></a></p>

{% endblock %}
