From 0b2406d616758e35b0d7be102d49d0327b9fcd8c Mon Sep 17 00:00:00 2001 From: Jesaja Everling Date: Tue, 14 Feb 2017 19:56:11 +0200 Subject: [PATCH 1/3] Added DocumentTypeFilenameSerializer to display Quick links inline --- mayan/apps/documents/serializers.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/mayan/apps/documents/serializers.py b/mayan/apps/documents/serializers.py index fd3a80e022..0dde168a52 100644 --- a/mayan/apps/documents/serializers.py +++ b/mayan/apps/documents/serializers.py @@ -6,7 +6,8 @@ from common.models import SharedUploadedFile from .literals import DOCUMENT_IMAGE_TASK_TIMEOUT from .models import ( - Document, DocumentVersion, DocumentPage, DocumentType, RecentDocument + Document, DocumentVersion, DocumentPage, DocumentType, + DocumentTypeFilename, RecentDocument ) from .settings import setting_language from .tasks import task_get_document_page_image, task_upload_new_version @@ -45,11 +46,18 @@ class DocumentPageSerializer(serializers.HyperlinkedModelSerializer): model = DocumentPage +class DocumentTypeFilenameSerializer(serializers.ModelSerializer): + class Meta: + model = DocumentTypeFilename + fields = ('filename',) + + class DocumentTypeSerializer(serializers.HyperlinkedModelSerializer): documents_url = serializers.HyperlinkedIdentityField( view_name='rest_api:documenttype-document-list', ) documents_count = serializers.SerializerMethodField() + filenames = DocumentTypeFilenameSerializer(many=True, read_only=True) class Meta: extra_kwargs = { @@ -57,7 +65,7 @@ class DocumentTypeSerializer(serializers.HyperlinkedModelSerializer): } fields = ( 'delete_time_period', 'delete_time_unit', 'documents_url', - 'documents_count', 'id', 'label', 'trash_time_period', + 'documents_count', 'id', 'label', 'filenames', 'trash_time_period', 'trash_time_unit', 'url' ) model = DocumentType From 37f0597b344adb6bdd6ece4f0a3b93a6f20e8c67 Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Thu, 16 Feb 2017 01:50:00 -0400 Subject: [PATCH 2/3] Add Developer Certificate of Origin. Signed-off-by: Roberto Rosario --- CONTRIBUTING.md | 21 ++++++++++++++------- DCO | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 7 deletions(-) create mode 100644 DCO diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5e114863e9..ce1fd62061 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -17,7 +17,7 @@ same properties that can trigger the issue and upload that file instead. - Add steps that trigger the issue in a **repeatable manner**. - **Screenshots** go a long way in helping understand problems. - The issue must be related to the code only, do not open issues for problems -with webservers, cloud providers, etc. +with deployments, webservers, cloud providers, etc. - Do not open issues asking for **support or consulting**. Code @@ -40,7 +40,19 @@ following branches: are unstable and should not be used in production. 1. Start making your changes in your own separate branch. -1. Write a test which shows that the bug was fixed or that the feature works as expected. +1. Write a test which shows that the bug was fixed or that the feature works as + expected. +1. Sign your work. Your signature certifies your submission according to the + articles of the [Developer Certificate of Origin](https://gitlab.com/mayan-edms/mayan-edms/blob/master/DCO). + The sign-off should be in the form: + + ```` + Signed-off-by: John Doe + ```` + + You must use your real name and email, pseudonyms or anonymous contributions + are not allowed. If you set your user.name and user.email git configs, you can + sign your commit automatically with git commit -s. 1. Submit a merge request for your changes. Feature requests @@ -64,8 +76,3 @@ Code style ---------- - Refer to the [Development](http://mayan.readthedocs.io/en/latest/topics/development.html) chapter for information and examples of the code style. - -License -------- -By contributing your code, you agree to license your contribution under the -terms of the project's license. diff --git a/DCO b/DCO new file mode 100644 index 0000000000..716561d5d2 --- /dev/null +++ b/DCO @@ -0,0 +1,36 @@ +Developer Certificate of Origin +Version 1.1 + +Copyright (C) 2004, 2006 The Linux Foundation and its contributors. +660 York Street, Suite 102, +San Francisco, CA 94110 USA + +Everyone is permitted to copy and distribute verbatim copies of this +license document, but changing it is not allowed. + + +Developer's Certificate of Origin 1.1 + +By making a contribution to this project, I certify that: + +(a) The contribution was created in whole or in part by me and I + have the right to submit it under the open source license + indicated in the file; or + +(b) The contribution is based upon previous work that, to the best + of my knowledge, is covered under an appropriate open source + license and I have the right under that license to submit that + work with modifications, whether created in whole or in part + by me, under the same open source license (unless I am + permitted to submit under a different license), as indicated + in the file; or + +(c) The contribution was provided directly to me by some other + person who certified (a), (b) or (c) and I have not modified + it. + +(d) I understand and agree that this project and the contribution + are public and that a record of the contribution (including all + personal information I submit with it, including my sign-off) is + maintained indefinitely and may be redistributed consistent with + this project or the open source license(s) involved. From 9942da601eee9936f7de960ade68d31cdd75b22c Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Thu, 16 Feb 2017 02:05:24 -0400 Subject: [PATCH 3/3] Add links to the contributing document and the roadmap wiki. Signed-off-by: Roberto Rosario --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index d75efe7909..8289e70bbc 100644 --- a/README.md +++ b/README.md @@ -68,6 +68,8 @@ Step 3- Open a browser and go to http://localhost - [Videos](https://www.youtube.com/channel/UCJOOXHP1MJ9lVA7d8ZTlHPw) - [Documentation](http://mayan.readthedocs.io/en/stable/) - [Paid support](http://www.mayan-edms.com/providers/) +- [Roadmap](https://gitlab.com/mayan-edms/mayan-edms/wikis/roadmap) +- [Contributing](https://gitlab.com/mayan-edms/mayan-edms/blob/master/CONTRIBUTING.md) - [Community forum](https://groups.google.com/forum/#!forum/mayan-edms) - [Community forum archive](http://mayan-edms.1003.x6.nabble.com/) - [Source code, issues, bugs](https://gitlab.com/mayan-edms/mayan-edms)