Merge branch 'master' into multi

This commit is contained in:
Roberto Rosario
2011-03-18 10:22:41 -04:00
5 changed files with 32 additions and 15 deletions

View File

@@ -68,9 +68,9 @@
{% endif %}
{% for column in extra_columns %}
{% if column.keep_together %}
<div class="nowrap" style="word-wrap: normal">
<td>{{ object|object_property:column.attribute|safe|make_non_breakable }}</td>
</div>
<td>
{{ object|object_property:column.attribute|safe|make_non_breakable }}
</td>
{% else %}
<td>{{ object|object_property:column.attribute|safe }}</td>
{% endif %}

View File

@@ -22,6 +22,15 @@ from literals import QUEUEDOCUMENT_STATE_PENDING, \
from exceptions import AlreadyQueued
def _display_thumbnail(ocr_document):
try:
preview_url = reverse('document_preview', args=[ocr_document.document.pk])
thumbnail_url = reverse('document_thumbnail', args=[ocr_document.document.pk])
return u'<a class="fancybox" href="%s"><img src="%s" alt="%s" /></a>' % (preview_url, thumbnail_url, _(u'thumbnail'))
except:
return u''
def queue_document_list(request, queue_name='default'):
check_permissions(request.user, 'ocr', [PERMISSION_OCR_DOCUMENT])
@@ -38,10 +47,7 @@ def queue_document_list(request, queue_name='default'):
'object_name':_(u'document queue'),
'extra_columns':[
{'name':'document', 'attribute': lambda x: '<a href="%s">%s</a>' % (x.document.get_absolute_url(), x.document) if hasattr(x, 'document') else _(u'Missing document.')},
{'name':_(u'thumbnail'), 'attribute':
lambda x: '<a class="fancybox" href="%s"><img src="%s" /></a>' % (reverse('document_preview', args=[x.document.id]),
reverse('document_thumbnail', args=[x.document.id]))
},
{'name':_(u'thumbnail'), 'attribute': lambda x: _display_thumbnail(x) },
{'name':'submitted', 'attribute': lambda x: unicode(x.datetime_submitted).split('.')[0], 'keep_together':True},
{'name':'state', 'attribute': lambda x: x.get_state_display()},
{'name':'result', 'attribute':'result'},

View File

@@ -7,14 +7,14 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="{{ LANGUAGE_CODE }}" />
<meta http-equiv="X-UA-Compatible" content="IE-edge" /><!--Every day that passes, hating more this dark side IE9 I am-->
<title>{% block html_title %}{% endblock %}</title>
{% block keywords %}{% endblock %}
<link rel="stylesheet" href="{{ MEDIA_URL }}web_theme_media/stylesheets/base.css" type="text/css" media="screen" />
<link rel="stylesheet" id="current-theme" href="{{ MEDIA_URL }}web_theme_media/stylesheets/themes/{{ web_theme }}/style.css" type="text/css" media="screen" />
<style>
<style type="text/css">
.message span.dismiss {
padding:0 5px;
cursor:pointer;

17
docs/INSTALL Normal file
View File

@@ -0,0 +1,17 @@
apt-get update
apt-get install tesseract-ocr-spa unpaper imagemagick python-virtualenv -y
cd /usr/share
virtualenv --no-site-packages mayan
cd mayan
git clone git://github.com/rosarior/mayan.git
cd mayan
source ../bin/activate
pip install -r requirements/production.txt
#For MySQL support
apt-get install python-dev libmysqlclient-dev
pip install MySQL-python

View File

@@ -1,6 +0,0 @@
ISSUES
===========
1) Staging file hash colition when same file with different name, newhash = content hash + filename hash
2) Fix field error on search action for documents while processing OCR queue
3) Two documents might get the same UUID assigned, trigger(s) unknown
4) Import role_list in main.__init__.py is causing an import error only in production with apache