Incorporate @Macrobb metadata widget and content visual changes.

GitLab issue #378

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2017-05-04 00:40:02 -04:00
parent a889a58a39
commit b91f7f685a
3 changed files with 97 additions and 6 deletions

75
docs/releases/3.0.rst Normal file
View File

@@ -0,0 +1,75 @@
=============================
Mayan EDMS v3.0 release notes
=============================
Released: XX XX, 2017
What's new
==========
Other changes
-------------
- Metadat widget appearance changes
- Content windows appearance changes
Removals
--------
- None
Upgrading from a previous version
---------------------------------
If installed via PIP
~~~~~~~~~~~~~~~~~~~~
Type in the console::
$ pip install -U mayan-edms
the requirements will also be updated automatically.
If installed 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.
Manually upgrade/add the new requirements::
$ pip install --upgrade -r requirements.txt
Remove deprecated requirements::
$ pip uninstall -y -r removals.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 #378 <https://gitlab.com/mayan-edms/mayan-edms/issues/378>`_ Add metadata widget changes from @Macrobb
.. _PyPI: https://pypi.python.org/pypi/mayan-edms/

View File

@@ -171,3 +171,19 @@ a i {
.tag-container .label {
margin-right: 2px;
}
/* Metadata */
.metadata-display {
display: inline-block;
min-width: 200px;
padding-right: 10px;
width: 49%;
}
/* Content */
@media (min-width:1200px) {
.container {
min-width: 1170px;
width: 95%;
}
}

View File

@@ -1,14 +1,14 @@
from __future__ import unicode_literals
from django.utils.html import format_html_join
def get_metadata_string(document):
"""
Return a formated representation of a document's metadata values
"""
return ', '.join(
[
'%s - %s' % (
document_metadata.metadata_type, document_metadata.value
) for document_metadata in document.metadata.all()
]
return format_html_join(
'\n', '<div class="metadata-display"><b>{}: </b><span data-metadata-type="{}" data-pk="{}">{}</span></div>',
((document_metadata.metadata_type,document_metadata.metadata_type_id,document_metadata.id,document_metadata.value)
for document_metadata in document.metadata.all()
)
)