2013-05-18 14:53:17 +00:00
|
|
|
{% extends "admin2/bootstrap/base.html" %}
|
2013-05-18 11:37:46 +00:00
|
|
|
|
2013-05-25 17:44:48 +00:00
|
|
|
{% load admin2_tags i18n %}
|
2013-05-22 00:06:25 +00:00
|
|
|
|
2013-06-03 20:28:41 +00:00
|
|
|
{% block title %}{% blocktrans with action=action model_name=model_name %}{{ action }} {{ model_name }}{% endblocktrans %}{% endblock title %}
|
2013-05-26 00:55:43 +00:00
|
|
|
|
2013-06-03 20:28:41 +00:00
|
|
|
{% block page_title %}{% blocktrans with action=action model_name=model_name %}{{ action }} {{ model_name }}{% endblocktrans %}{% endblock page_title %}
|
2013-05-26 00:55:43 +00:00
|
|
|
|
|
|
|
|
{% block breadcrumbs %}
|
|
|
|
|
<li><a href="{% url "admin2:dashboard" %}">Home</a> <span class="divider">/</span></li>
|
2013-05-28 12:24:18 +00:00
|
|
|
<li><a href="{% url "admin2:app_index" app_label=app_label %}">{{ app_label|title }}</a> <span class="divider">/</span></li>
|
2013-05-26 00:55:43 +00:00
|
|
|
<li><a href="{% url view|admin2_urlname:"index" %}">{{ model_name_pluralized|title }}</a> <span class="divider">/</span></li>
|
|
|
|
|
{% if action == 'Add' %}
|
|
|
|
|
<li class="active">{{ action }}</li>
|
|
|
|
|
{% else %}
|
|
|
|
|
<li><a href="{% url view|admin2_urlname:"detail" pk=object.pk %}">{{ object }}</a> <span class="divider">/</span></li>
|
2013-05-28 12:24:18 +00:00
|
|
|
<li class="active">{% trans 'Change' %}</li>
|
2013-05-26 00:55:43 +00:00
|
|
|
{% endif %}
|
|
|
|
|
|
2013-06-03 20:28:41 +00:00
|
|
|
{% endblock breadcrumbs %}
|
2013-05-18 11:37:46 +00:00
|
|
|
|
2013-05-19 15:13:20 +00:00
|
|
|
|
2013-05-20 18:38:36 +00:00
|
|
|
{% block content %}
|
2013-05-19 15:13:20 +00:00
|
|
|
|
2013-05-31 20:21:04 +00:00
|
|
|
<div class="row-fluid">
|
2013-05-19 15:13:20 +00:00
|
|
|
<div class="span12">
|
|
|
|
|
<form method="post">
|
|
|
|
|
{% csrf_token %}
|
|
|
|
|
{{ form.as_p }}
|
2013-05-21 21:50:50 +00:00
|
|
|
|
2013-05-21 23:58:53 +00:00
|
|
|
{% for formset in inlines %}
|
2013-05-22 00:06:25 +00:00
|
|
|
<h4>{{ formset.model|model_verbose_name_plural|capfirst }}</h4>
|
|
|
|
|
{{ formset.management_form }}
|
|
|
|
|
<table class="table table-striped table-bordered">
|
|
|
|
|
<thead>
|
|
|
|
|
<tr>
|
|
|
|
|
{% for field in formset|formset_visible_fieldlist %}
|
|
|
|
|
<th>{{ field }}</th>
|
|
|
|
|
{% endfor %}
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
{% for inline_form in formset %}
|
|
|
|
|
<tr>
|
|
|
|
|
{% for field in inline_form.visible_fields %}
|
|
|
|
|
<td>
|
|
|
|
|
{% if forloop.first %}
|
|
|
|
|
{% for hidden_field in inline_form.hidden_fields %}
|
|
|
|
|
{{ hidden_field }}
|
|
|
|
|
{% endfor %}
|
|
|
|
|
{% endif %}
|
|
|
|
|
{{ field }}
|
|
|
|
|
</td>
|
2013-05-28 12:24:18 +00:00
|
|
|
{% endfor %}
|
2013-05-22 00:06:25 +00:00
|
|
|
</tr>
|
|
|
|
|
{% endfor %}
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
{% endfor %}
|
2013-05-21 23:58:53 +00:00
|
|
|
|
2013-05-31 20:21:04 +00:00
|
|
|
<hr/>
|
2013-06-01 10:54:15 +00:00
|
|
|
{% if object %}
|
2013-05-31 20:21:04 +00:00
|
|
|
<a class="btn btn-small btn-danger" href="{% url view|admin2_urlname:'delete' pk=object.pk %}">{% trans "Delete" %}</a>
|
2013-06-01 10:54:15 +00:00
|
|
|
{% endif %}
|
2013-05-31 20:21:04 +00:00
|
|
|
|
|
|
|
|
<div class="pull-right">
|
|
|
|
|
<button class="btn btn-small" type="submit" name="_addanother">{% trans "Save and add another" %}</button>
|
|
|
|
|
<button class="btn btn-small" type="submit" name="_continue">{% trans "Save and continue editing" %}</button>
|
|
|
|
|
<button class="btn btn-small btn-success" type="submit" name="_save">{% trans "Save" %}</button>
|
|
|
|
|
</div>
|
2013-05-19 15:13:20 +00:00
|
|
|
</form>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2013-05-18 11:37:46 +00:00
|
|
|
|
|
|
|
|
{% endblock content %}
|