112 lines
3.5 KiB
HTML
112 lines
3.5 KiB
HTML
{% extends "base.html" %}
|
|
{% load i18n %}
|
|
|
|
{% block content %}
|
|
|
|
{% if title %}
|
|
<h2>{{ title }}</h2>
|
|
{% else %}
|
|
<h2>{% trans "Modify an administration view" %}</h2>
|
|
{% endif %}
|
|
|
|
|
|
{% if messages %}
|
|
<p>
|
|
<ul class="messages">
|
|
{% for message in messages %}
|
|
<li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</p>
|
|
{% endif %}
|
|
|
|
<div>
|
|
<form method="post" action="">
|
|
|
|
{% if form.non_field_errors %}
|
|
<p>{{ form.non_field_errors }}</p>
|
|
{% endif %}
|
|
|
|
<p>
|
|
{{ form.name.errors }}
|
|
{{ form.name.label_tag }}
|
|
{{ form.name }}
|
|
</p>
|
|
|
|
{% if objects_to_display %}
|
|
<p>
|
|
<label>{% trans "Objects" %}</label>
|
|
<ul>
|
|
{% for object, checked in objects_to_display %}
|
|
<li><label for="id_objects_{{ object.id }}"><input type="checkbox" name="acs_objects" value="{{ object.id }}" id="id_objects_{{ object.id }}" {% if checked %}checked="checked"{% endif %}/>{{ object.name }}</label></li>
|
|
{% endfor %}
|
|
</ul>
|
|
</p>
|
|
{% endif %}
|
|
|
|
{% if views_to_display %}
|
|
<p>
|
|
<label>{% trans "Views" %}</label>
|
|
<ul>
|
|
{% for view, checked in views_to_display %}
|
|
<li><label for="id_views_{{ view.id }}"><input type="checkbox" name="views" value="{{ view.id }}" id="id_views_{{ view.id }}" {% if checked %}checked="checked"{% endif %}/>{{ view.name }}</label></li>
|
|
{% endfor %}
|
|
</ul>
|
|
</p>
|
|
{% endif %}
|
|
|
|
{% if users_to_display %}
|
|
<p>
|
|
<label>{% trans "Users" %}</label>
|
|
<ul>
|
|
{% for user, checked in users_to_display %}
|
|
<li><label for="id_users_{{ user.id }}"><input type="checkbox" name="users" value="{{ user.id }}" id="id_users_{{ user.id }}" {% if checked %}checked="checked"{% endif %}/>{{ user.alias }}</label></li>
|
|
{% endfor %}
|
|
</ul>
|
|
</p>
|
|
{% endif %}
|
|
|
|
{% if roles_to_display %}
|
|
<p>
|
|
<label>{% trans "Roles" %}</label>
|
|
<ul>
|
|
{% for role, checked in roles_to_display %}
|
|
<li><label for="id_roles_{{ role.id }}"><input type="checkbox" name="roles" value="{{ role.id }}" id="id_roles_{{ role.id }}" {% if checked %}checked="checked"{% endif %}/>{{ role.name }}</label></li>
|
|
{% endfor %}
|
|
</ul>
|
|
</p>
|
|
{% endif %}
|
|
|
|
{% if actions_to_display %}
|
|
<p>
|
|
<label>{% trans "Actions" %}</label>
|
|
<ul>
|
|
{% for action, checked in actions_to_display %}
|
|
<li><label for="id_actions_{{ action.id }}"><input type="checkbox" name="actions" value="{{ action.id }}" id="id_actions_{{ action.id }}" {% if checked %}checked="checked"{% endif %}/>{{ action.name }}</label></li>
|
|
{% endfor %}
|
|
</ul>
|
|
</p>
|
|
{% endif %}
|
|
|
|
{% if activities_to_display %}
|
|
<p>
|
|
<label>{% trans "Activities" %}</label>
|
|
<ul>
|
|
{% for activity, checked in activities_to_display %}
|
|
<li><label for="id_activities_{{ activity.id }}"><input type="checkbox" name="activities" value="{{ activity.id }}" id="id_activities_{{ activity.id }}" {% if checked %}checked="checked"{% endif %}/>{{ activity.name }}</label></li>
|
|
{% endfor %}
|
|
</ul>
|
|
</p>
|
|
{% endif %}
|
|
|
|
<input id="id_id" type="hidden" name="view" value="{{ view.id }}"/>
|
|
<input type="submit" name="{{ submit_name }}" value="{% trans "Modify" %}"/>
|
|
</form>
|
|
</div>
|
|
|
|
<div class="right">
|
|
<a class="back" href="{{ backlink }}">{% trans "Back" %}</a>
|
|
</div>
|
|
|
|
{% endblock %}
|