Added css grid support to generic_forms template

This commit is contained in:
Roberto Rosario
2011-02-07 17:30:41 -04:00
parent c096e95522
commit c618952f00
77 changed files with 19604 additions and 3 deletions

View File

@@ -1,8 +1,10 @@
{% extends "base.html" %}
{% block title %} :: {% with "true" as striptags %}{% include "calculate_form_title.html" %}{% endwith %}{% endblock %}
{% block stylesheets %}
<link rel="stylesheet" href="{{ MEDIA_URL }}packages/nathansmith-960-Grid-System-30906f2/code/css/960.css" type="text/css" media="screen" />
{% endblock %}
{% block content %}
<div class="container_12">
{% if form %}
{% include "generic_form_subtemplate.html" %}
{% endif %}
@@ -14,9 +16,19 @@
{% with form.object as object %}
{% with form.object_name as object_name %}
{% with form.form_action as form_action %}
{% if form.grid %}
<div class="grid_{{ form.grid }}">
{% endif %}
{% with form.form as form %}
{% include "generic_form_subtemplate.html" %}
{% endwith %}
{% if form.grid %}
</div>
{% if form.grid_clear %}
<div class="clear"></div>
{% endif %}
{% endif %}
{% endwith %}
{% endwith %}
{% endwith %}
@@ -24,6 +36,7 @@
{% endwith %}
{% endwith %}
{% endfor %}
</div>
{% for subtemplate in subtemplates_dict %}
{% with subtemplate.title as title %}

View File

@@ -143,7 +143,9 @@ def upload_document_with_type(request, document_type_id, multiple=True):
'form_list':[
{
'form':local_form,
'title':_(u'upload a local document')
'title':_(u'upload a local document'),
'grid':6,
'grid_clear':False if USE_STAGING_DIRECTORY else True,
},
],
}
@@ -169,6 +171,8 @@ def upload_document_with_type(request, document_type_id, multiple=True):
{
'form':staging_form,
'title':_(u'upload a document from staging'),
'grid':6,
'grid_clear':True,
},
)