mirror of
https://github.com/jazzband/django-admin2.git
synced 2026-03-20 16:10:30 +00:00
70 lines
3.1 KiB
HTML
70 lines
3.1 KiB
HTML
{% extends "admin2/bootstrap/base.html" %}
|
|
{% load admin2_tags i18n %}
|
|
|
|
{% block title %}{% blocktrans with model_name=model_name %}Select {{ model_name }} to change{% endblocktrans %}{% endblock %}
|
|
|
|
{% block page_title %}{% blocktrans with model_name=model_name %}Select {{ model_name }} to change{% endblocktrans %}{% endblock %}
|
|
|
|
{% block extrajs %}
|
|
<script src="/static/themes/bootstrap/js/actions.js"></script>
|
|
{% endblock extrajs %}
|
|
|
|
{% block breadcrumbs %}
|
|
<li><a href="{% url "admin2:dashboard" %}">Home</a> <span class="divider">/</span></li>
|
|
<li><a href="{% url "admin2:app_index" app_label=app_label %}">{{ app_label|title }}</a> <span class="divider">/</span></li>
|
|
<li class="active">{{ model_name_pluralized|title }}</li>
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
|
|
<div id="model-list" class="row">
|
|
<form id="model-list-form" class="form-inline" method="post">
|
|
<div class="span12">
|
|
<div class="navbar">
|
|
{% csrf_token %}
|
|
<select name="action">
|
|
{% for action in actions %}
|
|
<option value="{{ action.name }}">{{ action.description }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
<button type="Submit" class="btn">Go</button>
|
|
<span id="selected-count">0</span> of {{ object_list|length }} selected
|
|
<div class="pull-right">
|
|
{% if permissions.has_add_permission %}
|
|
<a href="{% url view|admin2_urlname:'create' %}" class="btn"><i class="icon-plus"></i> {% blocktrans with model_verbose_name=model|model_verbose_name %}Add {{ model_verbose_name }}{% endblocktrans %}</a>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
|
|
<table class="table table-bordered table-striped">
|
|
<thead>
|
|
<th><input type="checkbox" class="model-select-all"></th>
|
|
<th>{{ model_name }}</th>
|
|
</thead>
|
|
<tbody>
|
|
{% for obj in object_list %}
|
|
<tr>
|
|
<td><input type="checkbox" class="model-select" name="selected_model_pk" value="{{ obj.pk }}"></td>
|
|
<td>
|
|
{{ obj }}
|
|
{% if permissions.has_view_permission %}
|
|
<a href="{% url view|admin2_urlname:'detail' pk=obj.pk %}">{% trans "Detail" %}</a>
|
|
{% endif %}
|
|
{% if permissions.has_change_permission %}
|
|
<a href="{% url view|admin2_urlname:'update' pk=obj.pk %}">{% trans "Edit" %}</a>
|
|
{% endif %}
|
|
{% if permissions.has_delete_permission %}
|
|
<a href="{% url view|admin2_urlname:'delete' pk=obj.pk %}">{% trans "Delete" %}</a>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
|
|
{{ object_list|length }} {{ model_name_pluralized }}
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
{% endblock content %}
|