chrono/chrono/manager/templates/chrono/manager_resource_detail.html

60 lines
1.9 KiB
HTML

{% extends "chrono/manager_resource_list.html" %}
{% load i18n %}
{% block page-title-extra-label %}
- {{ resource.label }}
{% endblock %}
{% block breadcrumb %}
{{ block.super }}
<a href="{% url 'chrono-manager-resource-view' pk=resource.pk %}">{{ resource.label }}</a>
{% endblock %}
{% block appbar %}
{% block appbar-title %}
<h2>{{ resource }}</h2>
{% endblock %}
<span class="actions">
{% block appbar-extras %}
{% if request.user.is_staff %}
<a rel="popup" href="{% url 'chrono-manager-resource-edit' pk=resource.pk %}">{% trans 'Edit' %}</a>
<a rel="popup" href="{% url 'chrono-manager-resource-delete' pk=resource.pk %}">{% trans 'Delete' %}</a>
{% endif %}
{% now "Y" as today_year %}
{% now "n" as today_month %}
{% now "j" as today_day %}
<a href="{% url 'chrono-manager-resource-month-view' pk=resource.pk year=today_year month=today_month %}">{% trans 'Month view' %}</a>
<a href="{% url 'chrono-manager-resource-day-view' pk=resource.pk year=today_year month=today_month day=today_day %}">{% trans 'Day view' %}</a>
{% endblock %}
</span>
{% endblock %}
{% block content %}
<div class="section">
<h3>{% trans 'Used in meetings agendas' %}</h3>
<div>
{% with resource.agenda_set.all as agendas %}
{% if agendas %}
<ul class="objects-list single-links">
{% for agenda in agendas %}
<li>
<a href="{% url 'chrono-manager-agenda-settings' pk=agenda.pk %}">
{{ agenda.label }}
</a>
</li>
{% endfor %}
</ul>
{% else %}
<div class="big-msg-info">
{% blocktrans %}
This resource is not used yet.
{% endblocktrans %}
</div>
{% endif %}
{% endwith %}
</div>
</div>
{% endblock %}