Merge remote-tracking branch 'origin/master' into merge_master
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
@@ -4,6 +4,13 @@
|
||||
- Content windows appearance changes
|
||||
- Add new document's version list view permission
|
||||
|
||||
2.2.1 (2017-05-25)
|
||||
==================
|
||||
- Allow for bigger indexing expression templates.
|
||||
- Auto select checkbox when updating metadata values. GitLab issue #371.
|
||||
- Added support for passing the options allow-other and allow-root to the
|
||||
FUSE index mirror. GitLab issue #385
|
||||
|
||||
2.2 (2017-04-26)
|
||||
================
|
||||
- Remove the installation app (GitLab #301).
|
||||
|
||||
78
docs/releases/2.2.1.rst
Normal file
78
docs/releases/2.2.1.rst
Normal file
@@ -0,0 +1,78 @@
|
||||
===============================
|
||||
Mayan EDMS v2.2.1 release notes
|
||||
===============================
|
||||
|
||||
Released: May 25, 2017
|
||||
|
||||
What's new
|
||||
==========
|
||||
|
||||
This is a bug-fix and minor feature release and all users are encouraged to
|
||||
upgrade.
|
||||
|
||||
Changes
|
||||
-------------
|
||||
- Index node expression template field changed from a 128 character field to an
|
||||
unlimited size text field to allow for complex indexing expressions.
|
||||
- When updating the metadata of a document, any input in the value form field
|
||||
will select the adjacent checkbox.
|
||||
- Support for passing the FUSE option `allow-other` and `allow-root` was added
|
||||
to the index mirroring management command.
|
||||
|
||||
Removals
|
||||
--------
|
||||
* None
|
||||
|
||||
Upgrading from a previous version
|
||||
---------------------------------
|
||||
|
||||
Using PIP
|
||||
~~~~~~~~~
|
||||
|
||||
Type in the console::
|
||||
|
||||
$ pip install -U mayan-edms
|
||||
|
||||
the requirements will also be updated automatically.
|
||||
|
||||
Using Git
|
||||
~~~~~~~~~
|
||||
|
||||
If you installed Mayan EDMS by cloning the Git repository issue the commands::
|
||||
|
||||
$ git reset --hard HEAD
|
||||
$ git pull
|
||||
|
||||
otherwise download the compressed archived and uncompress it overriding the
|
||||
existing installation.
|
||||
|
||||
Next upgrade/add the new requirements::
|
||||
|
||||
$ pip install --upgrade -r requirements.txt
|
||||
|
||||
Common steps
|
||||
~~~~~~~~~~~~
|
||||
|
||||
Migrate existing database schema with::
|
||||
|
||||
$ mayan-edms.py performupgrade
|
||||
|
||||
Add new static media::
|
||||
|
||||
$ mayan-edms.py collectstatic --noinput
|
||||
|
||||
The upgrade procedure is now complete.
|
||||
|
||||
|
||||
Backward incompatible changes
|
||||
=============================
|
||||
|
||||
* None
|
||||
|
||||
Bugs fixed or issues closed
|
||||
===========================
|
||||
|
||||
* `GitLab issue #371 <https://gitlab.com/mayan-edms/mayan-edms/issues/371>`_ Auto select checkbox when updating metadata
|
||||
* `GitLab issue #385 <https://gitlab.com/mayan-edms/mayan-edms/issues/385>`_ mountindex: how to specify FUSE mount option allow_other?
|
||||
|
||||
.. _PyPI: https://pypi.python.org/pypi/mayan-edms/
|
||||
@@ -22,6 +22,7 @@ versions of the documentation contain the release notes for any later releases.
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
2.2.1
|
||||
2.2
|
||||
2.1.11
|
||||
2.1.10
|
||||
|
||||
@@ -126,3 +126,10 @@ dependent support Python 3 then will the project move to fully support Python 3.
|
||||
|
||||
Make sure that the Celery BEAT scheduler is running correctly as it is the element
|
||||
that triggers the periodics tasks.
|
||||
|
||||
**Q: How to do LDAP authentication**
|
||||
|
||||
A sample settings file called ldap_connection_settings.py is included in the
|
||||
contrib/settings/ folder of the repository showing how to setup LDAP
|
||||
authentication.
|
||||
|
||||
|
||||
@@ -33,6 +33,17 @@
|
||||
{% block stylesheets %}{% endblock %}
|
||||
|
||||
{% endcompress %}
|
||||
<script>
|
||||
function waitForJQuery(func) {
|
||||
if (window.jQuery) {
|
||||
func();
|
||||
} else {
|
||||
setTimeout(function() {
|
||||
waitForJQuery(func)
|
||||
}, 50);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
{% if appearance_type == 'plain' %}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.10.6 on 2017-05-24 04:56
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('document_indexing', '0010_documentindexinstancenode_indexinstance'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='indextemplatenode',
|
||||
name='expression',
|
||||
field=models.TextField(help_text="Enter a template to render. Use Django's default templating language (https://docs.djangoproject.com/en/1.7/ref/templates/builtins/)", verbose_name='Indexing expression'),
|
||||
),
|
||||
]
|
||||
@@ -114,8 +114,7 @@ class IndexTemplateNode(MPTTModel):
|
||||
index = models.ForeignKey(
|
||||
Index, related_name='node_templates', verbose_name=_('Index')
|
||||
)
|
||||
expression = models.CharField(
|
||||
max_length=128,
|
||||
expression = models.TextField(
|
||||
help_text=_(
|
||||
'Enter a template to render. '
|
||||
'Use Django\'s default templating language '
|
||||
|
||||
@@ -16,11 +16,16 @@ class DocumentMetadataForm(forms.Form):
|
||||
label=_('Name'), required=False,
|
||||
widget=forms.TextInput(attrs={'readonly': 'readonly'})
|
||||
)
|
||||
value = forms.CharField(label=_('Value'), required=False)
|
||||
value = forms.CharField(label=_('Value'), required=False,
|
||||
widget=forms.TextInput(attrs={'class': 'metadata-value'})
|
||||
)
|
||||
update = forms.BooleanField(
|
||||
initial=True, label=_('Update'), required=False
|
||||
)
|
||||
|
||||
class Media:
|
||||
js = ('metadata/js/metadata_form.js',)
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(DocumentMetadataForm, self).__init__(*args, **kwargs)
|
||||
|
||||
|
||||
11
mayan/apps/metadata/static/metadata/js/metadata_form.js
Normal file
11
mayan/apps/metadata/static/metadata/js/metadata_form.js
Normal file
@@ -0,0 +1,11 @@
|
||||
'use strict';
|
||||
|
||||
waitForJQuery(function() {
|
||||
jQuery(document).ready(function() {
|
||||
$('.metadata-value').on('input', function(event) {
|
||||
// Check the checkbox next to a metadata value input when there is
|
||||
// data entry in the value's input.
|
||||
$(event.target).parents('tr').find(':checkbox').prop('checked', true);
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -11,6 +11,7 @@ from fuse import FUSE, FuseOSError, Operations
|
||||
from django.core import management
|
||||
from django.core.cache import caches
|
||||
from django.core.exceptions import MultipleObjectsReturned
|
||||
from django.core.management.base import CommandError
|
||||
from django.db.models import Count
|
||||
|
||||
from document_indexing.models import Index, IndexInstanceNode
|
||||
@@ -214,15 +215,35 @@ class Command(management.BaseCommand):
|
||||
|
||||
def add_arguments(self, parser):
|
||||
parser.add_argument('slug', nargs='?', help='Index slug')
|
||||
|
||||
parser.add_argument('mount_point', nargs='?', help='Mount point')
|
||||
parser.add_argument(
|
||||
'--allow-other', action='store_true', dest='allow_other',
|
||||
default=False,
|
||||
help='All users (including root) can access the index files.'
|
||||
)
|
||||
parser.add_argument(
|
||||
'--allow-root', action='store_true', dest='allow_root',
|
||||
default=False,
|
||||
help='Mount access is limited to the user mounting the index and '
|
||||
'root. This option and --allow-other are mutually exclusive.'
|
||||
)
|
||||
|
||||
def handle(self, *args, **options):
|
||||
if not options.get('slug') or not options.get('mount_point'):
|
||||
self.stderr.write(self.style.ERROR('Incorrect number of arguments'))
|
||||
exit(1)
|
||||
|
||||
try:
|
||||
FUSE(
|
||||
operations=IndexFS(index_slug=options['slug']),
|
||||
mountpoint=options['mount_point'], nothreads=True, foreground=True
|
||||
mountpoint=options['mount_point'], nothreads=True, foreground=True,
|
||||
allow_other=options['allow_other'],
|
||||
allow_root=options['allow_root']
|
||||
)
|
||||
except RuntimeError as exception:
|
||||
if options['allow_other'] or options['allow_root']:
|
||||
raise CommandError(
|
||||
'Make sure \'user_allow_other\' is set in /etc/fuse.conf'
|
||||
)
|
||||
else:
|
||||
raise
|
||||
|
||||
Reference in New Issue
Block a user