diff --git a/apps/common/templates/generic_list.html b/apps/common/templates/generic_list.html index 71aba418b1..1000e8f420 100644 --- a/apps/common/templates/generic_list.html +++ b/apps/common/templates/generic_list.html @@ -29,9 +29,15 @@ {% with subtemplate.object_name as object_name %} {% with subtemplate.form_action as form_action %} {% with subtemplate.form as form %} + + {% with subtemplate.content as content %} + {% with subtemplate.paragraphs as paragraphs %} {% include subtemplate.name %} + {% endwith %} + {% endwith %} + {% endwith %} {% endwith %} {% endwith %} diff --git a/apps/common/templates/generic_subtemplate.html b/apps/common/templates/generic_subtemplate.html index 0372611fc3..4a6257639d 100644 --- a/apps/common/templates/generic_subtemplate.html +++ b/apps/common/templates/generic_subtemplate.html @@ -1,19 +1,19 @@ {% if side_bar %}
-

{{ title }}

-
+

{{ title|capfirst }}

+
{% else %}
-

{{ title }}

-
+

{{ title|capfirst }}

+
{% endif %} {% if content %} -

{{ content }}

+

{{ content|safe }}

{% endif %} {% for paragraph in paragraphs %} -

{{ paragraph }}

+

{{ paragraph|safe }}

{% endfor %}
diff --git a/apps/common/templates/generic_template.html b/apps/common/templates/generic_template.html index b11e5b2da3..2120613e7f 100644 --- a/apps/common/templates/generic_template.html +++ b/apps/common/templates/generic_template.html @@ -1,5 +1,5 @@ {% extends "base.html" %} -{% block title %} :: {{ title }}{% endblock %} +{% block title %} :: {{ title|capfirst }}{% endblock %} {% block content %} {% include "generic_subtemplate.html" %} diff --git a/apps/ocr/forms.py b/apps/ocr/forms.py deleted file mode 100644 index 07cf73e458..0000000000 --- a/apps/ocr/forms.py +++ /dev/null @@ -1,16 +0,0 @@ -from django import forms -from django.utils.translation import ugettext_lazy as _ - -from common.forms import DetailForm - -from models import DocumentQueue - - -class DocumentQueueForm_view(DetailForm): - class Meta: - model = DocumentQueue - exclude = ('name', 'label') - - def __init__(self, *args, **kwargs): - super(DocumentQueueForm_view, self).__init__(*args, **kwargs) - self.fields['state'].widget.attrs['class'] = 'undecorated_list' diff --git a/apps/ocr/views.py b/apps/ocr/views.py index 4def728b94..76c46c89ef 100644 --- a/apps/ocr/views.py +++ b/apps/ocr/views.py @@ -19,7 +19,7 @@ from models import DocumentQueue, QueueDocument, add_document_to_queue from literals import QUEUEDOCUMENT_STATE_PENDING, \ QUEUEDOCUMENT_STATE_PROCESSING, QUEUEDOCUMENT_STATE_ERROR, \ DOCUMENTQUEUE_STATE_STOPPED, DOCUMENTQUEUE_STATE_ACTIVE -from forms import DocumentQueueForm_view + def queue_document_list(request, queue_name='default'): check_permissions(request.user, 'ocr', [PERMISSION_OCR_DOCUMENT]) @@ -48,8 +48,8 @@ def queue_document_list(request, queue_name='default'): 'sidebar_subtemplates_list':[ { 'title':_(u'document queue properties'), - 'name':'generic_detail_subtemplate.html', - 'form':DocumentQueueForm_view(instance=document_queue), + 'name':'generic_subtemplate.html', + 'content':_(u'Current state: %s') % document_queue.get_state_display(), }], }, )