diff --git a/apps/common/templates/generic_detail.html b/apps/common/templates/generic_detail.html index 6b2f05faf9..1c5ce5b020 100644 --- a/apps/common/templates/generic_detail.html +++ b/apps/common/templates/generic_detail.html @@ -43,8 +43,6 @@ {% endblock %} {% block content %} -
- {% if form %} {% with "true" as read_only %}
@@ -57,25 +55,27 @@ {% endif %} {% endwith %} {% endif %} - - {% for subtemplate in subtemplates_list %} -
- {% if subtemplate.form %} - {% render_subtemplate subtemplate.name subtemplate.context as rendered_subtemplate %} - {% with "true" as read_only %} -
+ +
+ {% for subtemplate in subtemplates_list %} +
+ {% if subtemplate.form %} + {% render_subtemplate subtemplate.name subtemplate.context as rendered_subtemplate %} + {% with "true" as read_only %} +
+ {{ rendered_subtemplate }} +
+ {% endwith %} + {% else %} + {% render_subtemplate subtemplate.name subtemplate.context as rendered_subtemplate %} {{ rendered_subtemplate }} -
- {% endwith %} - {% else %} - {% render_subtemplate subtemplate.name subtemplate.context as rendered_subtemplate %} - {{ rendered_subtemplate }} - {% endif %} + {% endif %}
{% if subtemplate.grid_clear or not subtemplate.grid %} -
+
{% endif %} - {% endfor %} -
+ {% endfor %} +
+ {% endblock %} diff --git a/apps/common/templates/generic_form.html b/apps/common/templates/generic_form.html index 29eb58ce16..f78216e987 100644 --- a/apps/common/templates/generic_form.html +++ b/apps/common/templates/generic_form.html @@ -20,18 +20,15 @@ {% endblock %} {% block content %} -
- {% if form %} -
- {% include "generic_form_subtemplate.html" %} -
- {% if form.grid_clear or not form.grid %} -
- {% endif %} - {% endif %} - - {% for subtemplate in subtemplates_list %} -
+ {% if form %} +
+ {% include "generic_form_subtemplate.html" %} +
+ {% endif %} + +
+ {% for subtemplate in subtemplates_list %} +
{% if subtemplate.form %} {% render_subtemplate subtemplate.name subtemplate.context as rendered_subtemplate %}
@@ -41,11 +38,10 @@ {% render_subtemplate subtemplate.name subtemplate.context as rendered_subtemplate %} {{ rendered_subtemplate }} {% endif %} -
- {% if subtemplate.grid_clear or not subtemplate.grid %} -
- {% endif %} - {% endfor %} - -
+
+ {% if subtemplate.grid_clear or not subtemplate.grid %} +
+ {% endif %} + {% endfor %} +
{% endblock %} diff --git a/apps/documents/views.py b/apps/documents/views.py index 9fc2c31cef..4347707012 100644 --- a/apps/documents/views.py +++ b/apps/documents/views.py @@ -211,9 +211,7 @@ def upload_document_with_type(request, multiple=True): 'context': { 'form': local_form, 'title': _(u'upload a local document'), - 'grid': 6, - 'grid_clear': False if USE_STAGING_DIRECTORY else True, - } + }, } if USE_STAGING_DIRECTORY: @@ -223,15 +221,16 @@ def upload_document_with_type(request, multiple=True): messages.error(request, e) filelist = [] finally: + local_upload_form.update({'grid': 6}) subtemplates_list.append(local_upload_form) subtemplates_list.append( { 'name': 'generic_form_subtemplate.html', + 'grid': 6, + 'grid_clear': True, 'context': { 'form': staging_form, 'title': _(u'upload a document from staging'), - 'grid': 6, - 'grid_clear': True, } }, ) @@ -247,14 +246,10 @@ def upload_document_with_type(request, multiple=True): ) else: subtemplates_list.append(local_upload_form) - context = { 'document_type_id': document_type_id, - 'subtemplates_list': subtemplates_list, - } - context.update({ 'sidebar_subtemplates_list': [ { 'name': 'generic_subtemplate.html', @@ -264,7 +259,7 @@ def upload_document_with_type(request, multiple=True): 'paragraphs': metadata_repr_as_list(decode_metadata_from_url(request.GET)) } }] - }) + } return render_to_response('generic_form.html', context, context_instance=RequestContext(request)) diff --git a/apps/main/templates/base.html b/apps/main/templates/base.html index 16bbd160ba..28c13164ca 100644 --- a/apps/main/templates/base.html +++ b/apps/main/templates/base.html @@ -30,7 +30,7 @@ {##} - {##} +