Moved philo files into a philo subdirectory and added a setup.py file. Philo can...
[philo.git] / philo / templates / admin / philo / edit_inline / grappelli_tabular_container.html
diff --git a/philo/templates/admin/philo/edit_inline/grappelli_tabular_container.html b/philo/templates/admin/philo/edit_inline/grappelli_tabular_container.html
new file mode 100644 (file)
index 0000000..621fea6
--- /dev/null
@@ -0,0 +1,43 @@
+{% load i18n adminmedia %}
+
+<!-- group -->
+{{ inline_admin_formset.formset.management_form }}
+{% comment %}Don't render the formset at all if there aren't any forms.{% endcomment %}
+{% if inline_admin_formset.formset.forms %}
+       <fieldset class="module{% if inline_admin_formset.opts.classes %} {{ inline_admin_formset.opts.classes|join:" " }}{% endif %}">
+               <h2{% if "collapse" in inline_admin_formset.opts.classes %} class="collapse-handler"{% endif %}>{{ inline_admin_formset.opts.verbose_name_plural|capfirst }}</h2>
+               {{ inline_admin_formset.formset.non_form_errors }}
+               {% for inline_admin_form in inline_admin_formset %}
+                       {% if inline_admin_form.has_auto_field %}{{ inline_admin_form.pk_field.field }}{% endif %}
+                       {{ inline_admin_form.fk_field.field }}
+                       {% spaceless %}
+                       {% for fieldset in inline_admin_form %}
+                       {% for line in fieldset %}
+                               {% for field in line %}
+                                       {% if field.is_hidden %} {{ field.field }} {% endif %}
+                               {% endfor %}
+                       {% endfor %}
+                       {% endfor %}{% endspaceless %}
+               {% endfor %}
+               {% for form in inline_admin_formset.formset.forms %}
+                       <div class="row cells-{{ form.fields|length }} cells{% if form.errors %} errors{% endif %}{% for field in form %} {{ field.field.name }}{% endfor %}">
+                               {{ form.non_field_errors }}
+                               <div>
+                               {% for field in form %}
+                                       {% if not field.is_hidden %}
+                                       {% comment %}This will be true for one field: the content/content reference{% endcomment %}
+                                       <div class="column span-4"><label class='required' for="{{ form.content.auto_id }}{{ form.content_id.auto_id }}">{{ form.verbose_name|capfirst }}:</label></div>
+                                       <div class="column span-flexible">
+                                               {{ field }}
+                                               {{ field.errors }}
+                                               {% if field.field.help_text %}
+                                                       <p class="help">{{ field.field.help_text|safe }}</p>
+                                               {% endif %}
+                                       </div>
+                                       {% endif %}
+                               {% endfor %}
+                               </div>
+                       </div>
+               {% endfor %}
+       </fieldset>
+{% endif %}