Changed ocr status display sidebar from from based to text based
This commit is contained in:
@@ -30,8 +30,14 @@
|
||||
{% 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 %}
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
{% if side_bar %}
|
||||
<div class="block">
|
||||
<h3>{{ title }}</h3>
|
||||
<div class="content">
|
||||
<h3>{{ title|capfirst }}</h3>
|
||||
<div class="content">
|
||||
{% else %}
|
||||
<div class="content">
|
||||
<h2 class="title">{{ title }}</h2>
|
||||
<div class="inner">
|
||||
<h2 class="title">{{ title|capfirst }}</h2>
|
||||
<div class="inner">
|
||||
{% endif %}
|
||||
|
||||
{% if content %}
|
||||
<p>{{ content }}</p>
|
||||
<p>{{ content|safe }}</p>
|
||||
{% endif %}
|
||||
|
||||
{% for paragraph in paragraphs %}
|
||||
<p>{{ paragraph }}</p>
|
||||
<p>{{ paragraph|safe }}</p>
|
||||
{% endfor %}
|
||||
|
||||
</div></div>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %} :: {{ title }}{% endblock %}
|
||||
{% block title %} :: {{ title|capfirst }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% include "generic_subtemplate.html" %}
|
||||
|
||||
@@ -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'
|
||||
@@ -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(),
|
||||
}],
|
||||
},
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user