Changed ocr status display sidebar from from based to text based
This commit is contained in:
@@ -29,9 +29,15 @@
|
|||||||
{% with subtemplate.object_name as object_name %}
|
{% with subtemplate.object_name as object_name %}
|
||||||
{% with subtemplate.form_action as form_action %}
|
{% with subtemplate.form_action as form_action %}
|
||||||
{% with subtemplate.form as form %}
|
{% with subtemplate.form as form %}
|
||||||
|
|
||||||
|
{% with subtemplate.content as content %}
|
||||||
|
{% with subtemplate.paragraphs as paragraphs %}
|
||||||
|
|
||||||
{% include subtemplate.name %}
|
{% include subtemplate.name %}
|
||||||
|
|
||||||
|
{% endwith %}
|
||||||
|
{% endwith %}
|
||||||
|
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
|
|||||||
@@ -1,19 +1,19 @@
|
|||||||
{% if side_bar %}
|
{% if side_bar %}
|
||||||
<div class="block">
|
<div class="block">
|
||||||
<h3>{{ title }}</h3>
|
<h3>{{ title|capfirst }}</h3>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
{% else %}
|
{% else %}
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<h2 class="title">{{ title }}</h2>
|
<h2 class="title">{{ title|capfirst }}</h2>
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if content %}
|
{% if content %}
|
||||||
<p>{{ content }}</p>
|
<p>{{ content|safe }}</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% for paragraph in paragraphs %}
|
{% for paragraph in paragraphs %}
|
||||||
<p>{{ paragraph }}</p>
|
<p>{{ paragraph|safe }}</p>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
</div></div>
|
</div></div>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
{% block title %} :: {{ title }}{% endblock %}
|
{% block title %} :: {{ title|capfirst }}{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% include "generic_subtemplate.html" %}
|
{% 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, \
|
from literals import QUEUEDOCUMENT_STATE_PENDING, \
|
||||||
QUEUEDOCUMENT_STATE_PROCESSING, QUEUEDOCUMENT_STATE_ERROR, \
|
QUEUEDOCUMENT_STATE_PROCESSING, QUEUEDOCUMENT_STATE_ERROR, \
|
||||||
DOCUMENTQUEUE_STATE_STOPPED, DOCUMENTQUEUE_STATE_ACTIVE
|
DOCUMENTQUEUE_STATE_STOPPED, DOCUMENTQUEUE_STATE_ACTIVE
|
||||||
from forms import DocumentQueueForm_view
|
|
||||||
|
|
||||||
def queue_document_list(request, queue_name='default'):
|
def queue_document_list(request, queue_name='default'):
|
||||||
check_permissions(request.user, 'ocr', [PERMISSION_OCR_DOCUMENT])
|
check_permissions(request.user, 'ocr', [PERMISSION_OCR_DOCUMENT])
|
||||||
@@ -48,8 +48,8 @@ def queue_document_list(request, queue_name='default'):
|
|||||||
'sidebar_subtemplates_list':[
|
'sidebar_subtemplates_list':[
|
||||||
{
|
{
|
||||||
'title':_(u'document queue properties'),
|
'title':_(u'document queue properties'),
|
||||||
'name':'generic_detail_subtemplate.html',
|
'name':'generic_subtemplate.html',
|
||||||
'form':DocumentQueueForm_view(instance=document_queue),
|
'content':_(u'Current state: %s') % document_queue.get_state_display(),
|
||||||
}],
|
}],
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user