Compare commits

...

218 Commits

Author SHA1 Message Date
Roberto Rosario
78b9df972c Initial generic error log refactor
Signed-off-by: Roberto Rosario <Roberto.Rosario.Gonzalez@gmail.com>
2019-01-09 23:17:54 -04:00
Roberto Rosario
da1d32f6cd Rename common app migration
Rename migration 0011_auto_20181229_0738 to 0012_auto_20181229_0738
to avoid conflict with an existing 0011_* migration.

Signed-off-by: Roberto Rosario <Roberto.Rosario.Gonzalez@gmail.com>
2019-01-09 13:09:39 -04:00
Roberto Rosario
8f24b2ed80 Improve Template hash calculation
Calculate the Template hash from the content actually returned.
Remove the newlines as these are irrelevant for HTML.

Signed-off-by: Roberto Rosario <Roberto.Rosario.Gonzalez@gmail.com>
2019-01-09 12:38:38 -04:00
Roberto Rosario
58e38c1ff9 Improve FilteredSelectionForm
Improve the configuration process of the FilteredSelectionForm form
by adding Meta child class support. The child Meta class
is defined in FilteredSelectionFormOptions.

Signed-off-by: Roberto Rosario <Roberto.Rosario.Gonzalez@gmail.com>
2019-01-09 12:24:09 -04:00
Roberto Rosario
3dc8df46b9 Initial audit of the document index app
Add keyword arguments to calls. Sort methods and parameters.

Signed-off-by: Roberto Rosario <Roberto.Rosario.Gonzalez@gmail.com>
2019-01-02 19:16:32 -04:00
Roberto Rosario
82651ff32c Improve and fix failing metadata tests
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-29 20:43:33 -04:00
Roberto Rosario
23a4a56aae Fix failing tests
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-29 04:47:40 -04:00
Roberto Rosario
c40e0c136a Add group create and edit events
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-29 04:06:11 -04:00
Roberto Rosario
000fe87c37 Remove use of storage wrappers
Use a dynamic subclass instead that always deconstructs to a fake
subclass with a __eq__ method that always returns True. This should
trick makemigrations into never creating a new migrations for
changes to the storage class or the arguments.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-29 03:45:56 -04:00
Roberto Rosario
442bf5dc4b Wrap storages
Wrap storages directly connected to file model fields to avoid
Django triggering a migration change when an attribute of the
storage is changed, like the location.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-28 00:22:49 -04:00
Roberto Rosario
f96057b0fd Add more new icons
Add new icons for the apps: Document comments, documents, file metadata,
parsing and OCR.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-27 05:45:01 -04:00
Roberto Rosario
e687430cf0 Use new icon classes, improve URLs layouts
Use the new icon classes to add custom icons. Improve
the URL schemes of some apps for uniformity.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-27 04:46:56 -04:00
Roberto Rosario
24066c494e Better menu restore, add hover, active class
Improve the code that restores the menu state after a refresh.
Add hover styling for menu sub links. Add an active class
for the menu sub links and JavaScript to assign it to the
link clicked or restored.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-27 04:43:48 -04:00
Roberto Rosario
945eed7ad5 Add two new icon classes
Add new icon classes based on Font Awesome that support
layering, masking and combining glyphs.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-27 04:42:06 -04:00
Roberto Rosario
0ee82e9efe Add support for SourceColumn label display
Update the class to disable displaying the column label by default
and only so when the include_label argument is True.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-27 00:33:33 -04:00
Roberto Rosario
8d3f26bd7f Tweak panel highlight style
Increase the width of the border for hightlighted panels.
Add a hover shadow to selectable panels.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-26 17:30:10 -04:00
Roberto Rosario
eeceb52c06 Fix failing source tests
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-26 06:09:48 -04:00
Roberto Rosario
57269ca7f9 Improve request object resolution
Add an additional method to obtain the request when it is
not available from the context.

Add support for SourceColumn resolution of inherited
sub models.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-26 06:08:46 -04:00
Roberto Rosario
c9ce90ea31 Improve source column definitions
Update usage of SourceColumns in the sources app.
Move some colum definitions from the view to the app
module using SourceColumn instances.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-26 06:03:03 -04:00
Roberto Rosario
50ea0c15df Support list mode in staging folder source
Add no-result content to display when there are no files
in the staging folder.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-26 06:00:21 -04:00
Roberto Rosario
5a90d76005 Make list mode code its own mixin
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-26 05:59:31 -04:00
Roberto Rosario
43691de6b7 Don't override list view mode in cabinet view
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-26 05:58:53 -04:00
Roberto Rosario
fe2cf70d93 Display action dropdown only if there are links
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-26 05:58:26 -04:00
Roberto Rosario
49c9fbbce1 Remove unused file
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-26 02:40:07 -04:00
Roberto Rosario
4ff9794286 Update and move JavaScript install code
Update the JavaScript dependency installation code to handle scoped
packages. The code is also updated to use pathlib's Path.

Move the JavaScript dependency installation to its own app named
dependencies.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-26 02:15:44 -04:00
Roberto Rosario
d6c7a0d765 Update renamed template variable
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-25 04:55:55 -04:00
Roberto Rosario
5e4cbbe2bc Remove MultiItemForm
Remove the HTML based MultiItemForm and use a Bootstrap dropdown
menu for the bulk actions list.

Add a text message explaining that items must be selected in
other to activate the bulk action menu.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-25 04:53:06 -04:00
Roberto Rosario
9e4ebf4e04 New sidebar layout
Update UI code to display a fixed location sidebar. The sidebar is
also of a fixed width instead of being a certain number columns
wide. The action dropdown is also now in a fixed location.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-25 03:39:22 -04:00
Roberto Rosario
bd194a70cb Add spaceless tags
Add spaceless tags to the invalid document template.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-24 19:18:54 -04:00
Roberto Rosario
6dcd8bd9aa Add a template list API view
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-24 19:18:36 -04:00
Roberto Rosario
2c3e2e2bef Shorten and reorganize menu names
Change the left hand side menu designation to be the 'main'
menu from 'sidebar', the menu at the top goes from 'main'
to 'topside'. All menus are referenced by their name only
and the fragment 'menu' is dropped from all as it is obvious
that they are menus and the Menu class doesn't supply any
other kind of object.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-24 19:15:20 -04:00
Roberto Rosario
2402668e16 Restore the side bar menu state after a refresh
Add code to detect the current URL and open the parent of
the menu entry that correlates to it.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-24 18:51:53 -04:00
Roberto Rosario
38228b4fe8 Control the height of thumbnails in table view
Since tables row height can't be controlled using CSS (they
will always resize to the size of their elements), this commit
adds a table cell container whose size can be controlled from
the view. This way big thumbnail images won't break the appearance
of the table.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-24 14:29:14 -04:00
Roberto Rosario
91465ef9b0 PEP8 cleanup
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-24 04:31:20 -04:00
Roberto Rosario
ff24e17eb6 Expose Separator and Text for easier imports
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-24 04:26:05 -04:00
Roberto Rosario
d687e62106 Unify and remove events view and widgets
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-24 04:25:35 -04:00
Roberto Rosario
15bec5fcdb Add/Remove: Enable double click, add help text
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-24 04:23:41 -04:00
Roberto Rosario
9be8f02829 Make sure the ChoiceForm is full height
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-24 04:23:06 -04:00
Roberto Rosario
fd7e937cef Move current user views and add user events
Move the current user detail and edit views from the common app
to the user_management app. Add the user created and edited events.
Add an user detail view.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-24 04:21:25 -04:00
Roberto Rosario
931b17a447 Display facets and object list facet links
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-24 04:15:23 -04:00
Roberto Rosario
32fb40548a Display resolved attribute URL or fallback
Update template code to display the resolved attribute's absolute_url
and if it doesn't provide it, fallback to display the main object's
absolute_url.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-24 04:12:39 -04:00
Roberto Rosario
b848737515 Render the resolve attribute not the literal
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-24 02:45:05 -04:00
Roberto Rosario
4a0e9ffa15 Remove document_link widget
The SourceColumn class has now the ability to render a link's
absolute_url, turn this on for the document parsing error and
OCR error list columns and remove the document_link widget.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-24 02:43:26 -04:00
Roberto Rosario
ae22e0f70c Common: Small system menu fixes
Add a separator under the setup link in the system menu.
Fix the user menu separator which is at the top of the username
and should be udner it.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-24 01:36:20 -04:00
Roberto Rosario
012c027994 Events: Improve and merge views
Merge the current user event, the user events and the object events
views.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-24 01:34:42 -04:00
Roberto Rosario
c1c8d1dc2d Converter: Add transformation edit view tests
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-23 21:28:05 -04:00
Roberto Rosario
25edc73100 Add support for sortable columns
Add a new argument to the SourceColumn class to flag a column as
sortable. The SourceColum will generate a request querystring to
be used as the table header archor href. The SingleObjectListView
will capture the querystring and call the order_by on the queryset
to sort it.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-23 05:11:14 -04:00
Roberto Rosario
36101dfea6 Documents: Improve slice of recent document list
Improve the method of slicing the document list to produce
a queryset that can be further sorted.

Add a new date added column to the recently added document list.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-23 02:04:54 -04:00
Roberto Rosario
28cc228b5a Apperance: Remove obsolete variables and a filter
Remove the variable multi_select_item_properties and the
get_encoded_parameter custom filter.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-23 02:02:07 -04:00
Roberto Rosario
64e1c6bb67 Add widget support to SourceColumn
Allow passing a widget class to SourceColumn. This makes
using lambdas to render model column unnecesary and are
mostly removed too.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-22 05:35:31 -04:00
Roberto Rosario
360e756093 Disable user groups link if superuser or staff
Disable the link to view an user's (or current user)
group list if the user is a superuser or staff.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-22 02:04:46 -04:00
Roberto Rosario
b79c168dab SourceColumn label optimization
Compute the SourceColumn at definition instead of doing it
during the resolve method. This move the label calculation
from the rendering to the startup.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-21 23:53:17 -04:00
Roberto Rosario
14f31d5614 Add new list templates toolbar
Add the new generic list and generic list items toolbar which allow
switching the list display mode.

This toolbar also includes a stylized button to select and deselect
all items emulating the check-all checkbox.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-21 23:51:20 -04:00
Roberto Rosario
9784798118 Tweak the vertical spacing of the viewport
Update the CSS to prefer a margin to the current padding.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-21 23:49:24 -04:00
Roberto Rosario
8ca6c563bc Update the invalid document template
Update the invalid document template to use the new font awesome
defitions.

Increase the size of the default template.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-21 23:48:26 -04:00
Roberto Rosario
213f3c1fb4 Cleanup SourceColumn invocations
Update the code of some SourceColumn invocations to be model methods
instead of lambda wapped functions.

Move the translated labels to the models too.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-21 23:47:14 -04:00
Roberto Rosario
5623f0b3a4 Improve the server error template appearance
Add a red alert for faster visual scanning. Place the
status code output in the same line as the initial message to
save some vertical space for debug output.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-21 23:44:19 -04:00
Roberto Rosario
79cba7abe1 Improve the resolve_attribute function
Update the arguments of the function to be full length and more explicit.
Use exceptions to find the correct way of using the attribute of the
object passed instead of trying to use introspection.
Add support for passing key word arguments to the attribute being
resolved even if it is a class method.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-21 23:41:38 -04:00
Roberto Rosario
9bcaf1849b Appearance: Update fontawesome version
Update fontawesome to version 5.6.3 and install it via NPM.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-21 20:03:44 -04:00
Roberto Rosario
c2fc10c344 Highlight selected panels
Add event handler and style sheet to highlight panels when selected.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-20 20:54:54 -04:00
Roberto Rosario
263d646c7c Appearance: Select card by clicking on the card
Add support for selecting a document from the UI by just clicking
on the title of the body of the card, not just on the checkbox
next to the title.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-20 20:40:26 -04:00
Roberto Rosario
bd54877e0c Add missing file
An __init__.py file was missing from commit
76853147c8.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-20 16:47:52 -04:00
Roberto Rosario
60ac63ead4 Add new sidebar main menu
Add a left side menu navigation style. The main app navigation links
will be displayed here. The notification, user and system tools are now
displayed at the top navigation bar.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-20 16:47:02 -04:00
Roberto Rosario
f77f64cc71 Source: Change source test behavior
Update sourcs to accept a test argument to their check methods.
This is to allow for explicit test behavior like running the
check method code even when the source is disabled and to
not deleted downloaded content during a test.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-18 17:27:40 -04:00
Roberto Rosario
7672aca7a9 Add button widget for forms
This widget will allow displaying HTML anchor buttons inside
the forms. It uses by default the navigation instance template
from the navigation app.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-18 17:21:21 -04:00
Roberto Rosario
76853147c8 Split sources models into separate modules
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-18 03:23:23 -04:00
Roberto Rosario
798446f362 Add klass argument to get_object_or_404 usage
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-16 01:55:33 -04:00
Roberto Rosario
727d2ecd71 Convert the title calculation into a template tag
Convert the calculate form title template into a template tag.
The result of the template tag is applied as the title property
of the <H3> HTML tag allowing users to view the full title on
mouse hover if the title was truncated.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-16 01:09:32 -04:00
Roberto Rosario
3a6a250d1b Move dashboard code to its own app
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-16 00:34:21 -04:00
Roberto Rosario
6ed18926cc Move appearance templates to their apps
Move the authenticaton and navigation templates to their respective
apps.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-16 00:14:15 -04:00
Roberto Rosario
c2f10fd38d Styling: Unify styling of signal handlers
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-15 23:57:33 -04:00
Roberto Rosario
1d1600c5dd Improve the partial navigation error reporting
Add a HTTP status code display. If status code is 0 assume
there is a communication error and display such.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-15 21:02:54 -04:00
Roberto Rosario
b83ab1b528 Improve how settings are loaded from config file
Update the way settings are loaded. Instead of loading the
entire config file now settings are loaded from the config
file on demand when the cache misses.

Improve the smart settings classes tests and add another test
for the config file loading.

Add support for variable config file path.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-15 21:00:51 -04:00
Roberto Rosario
8559565dca Signatures: No terminal raises NeedPassphrase
Update the Key model's sign_file method to raise the NeedPassphrase
exception when GPG has no terminal available and not just when the
GPG backend specifically asks for a passphrase.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-15 15:27:26 -04:00
Roberto Rosario
77468a87be Tests: Fix failing tests after last refactor
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-15 15:26:19 -04:00
Roberto Rosario
0e86f2ad8a Refactor the model accesors
Refactor the accesors to behave like methods instead of properties.
This means all accesors will be prepended with the string
"get_" and will include a set of parenthesis.

Improve the ModeAttribute class to use the method's
short_description. This commit also adds support for a
new method .help_text attribute has been added.

Move accessors to their own module, named "methods.py".

Remove the PropertyHelper class as the accessors no longer
need it.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-15 04:49:40 -04:00
Roberto Rosario
8c63ef4c69 Styling: PermissionNamespace keyword arguments
Add keyword arguments to all called instances of PermissionNamespace.
Sort name and label arguments.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-14 21:58:38 -04:00
Roberto Rosario
3adb9d4ea0 Sort method arguments
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-14 18:08:44 -04:00
Roberto Rosario
4d46ca3343 Unify document type selection forms
Merge all document type selection forms into a single smarter form
that can perform permission filtering and allow single or multiple
selections.

This commit also add the document type selection for submit
view to the file metadata app.

This commit also updates the document type selection views
for the OCR, document parsing, and upload wizard to use
the new document type selection form and removes their
respective document type selection forms.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-14 18:06:23 -04:00
Roberto Rosario
315e70309b Documents: Split monolith forms.py
Split the documents/forms.py into sub modules for each logical
unit: types, document, pages, versions.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-14 15:44:25 -04:00
Roberto Rosario
34443a715c Tests: Remove unused override_settings
Now that the automatic OCR, parsing and file metadata processing
are turned off by the test setting file, these overrides in the
tests are not needed anymore.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-14 03:12:42 -04:00
Roberto Rosario
46c2192d9a Mirroring: Fix failing tests
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-14 02:54:54 -04:00
Roberto Rosario
108744cdd5 Styling: Remove extra semicolon from line
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-14 02:45:52 -04:00
Roberto Rosario
15180e95bf Styling: Add keyword arguments to add_to_class usage
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-14 02:44:50 -04:00
Roberto Rosario
503af584d5 Migrations: Remove superfluous code comments
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-14 02:35:24 -04:00
Roberto Rosario
b28281be5a Tests: Turn on parsing and OCR
The base test file now turns off OCR, parsing and file metadata
processing. Apps that rely on those must now turn them on
explicitly.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-14 02:24:56 -04:00
Roberto Rosario
feb92a105f Add exiftool to documentation and the Dockerfile
This binary is required by the new file metadata app.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-14 02:24:06 -04:00
Roberto Rosario
0a7908baca File metadata: Add file metadata app
Add the file metadata app. This app uses binary wrappers called drivers
to extract properties from the file of documents. The default driver
uses the exiftool to extract the EXIF record from JPEG images.
The exiftool can also extra some properties from other files like
PDFs, office files and sound file.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-14 02:16:38 -04:00
Roberto Rosario
1efec6bd41 Navigation: Related field support to SourceColumn
Add support to the SourceColumn class to resolve related fields
using the double underscore as separator. Columns that use related
no longer have to use throw away lambdas.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-14 02:15:49 -04:00
Roberto Rosario
68995adb7f AJAX: Improve error display during debugging
Add message body display when the Django debug flag is True.
Add a CSS to simulate the appearence and legibility of the
debug message.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-13 00:21:35 -04:00
Roberto Rosario
2b52ee11b2 Documents: Fix typo in UUID field help text
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-12 23:20:33 -04:00
Roberto Rosario
5d944b922f Appearance: Remove markup and reuse template
Remove markup in the base.html template to render the Actions dropdown
and use instead the built in navigation/generic_navigation.html
template.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-12 23:19:04 -04:00
Roberto Rosario
ae2205fe30 Documents, Signatures: Add icons
Add icons to document version action links. Add icons to
detached and embedded signing action links.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-12 23:18:04 -04:00
Roberto Rosario
84e78f16d9 Appearance: Remove fadeIn animation
Remove the fade in animation in document thumbnails. Tweak
the match height refresh interval to reduce scrollbar
jitter in Firefox. Change the fancybox display animation from
zoom to fade in.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-12 23:14:43 -04:00
Roberto Rosario
e83f6e55a0 Permission: Permission reference to property
Convert the volatile permission reference in the stored permission
model from a method to a property to allow future caching optimization.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-12 23:12:52 -04:00
Roberto Rosario
bc816ccdda OCR: Turn off parsing in OCR tests properly
The document parsing was being turned off in the OCR tests
by setting the binary to an invalid value. A proper way
to disable automatic parsing was added in a previous commit
and this commit updates the test case class to use that method.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-12 21:06:58 -04:00
Roberto Rosario
c7dec2ee09 Documents: Add missing migration for model rename
Add the migration for the DocumentPageResult model rename in
commit 2d4a710999.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-12 21:05:50 -04:00
Roberto Rosario
f8c25af796 Tests: Modernize some test cases
Update some view tests in the tags, sources and linking apps
to use the test case classes provided by the common app.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-09 17:10:27 -04:00
Roberto Rosario
e048f31f85 Workflows: Use full path reference to tags widget
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-09 15:10:41 -04:00
Roberto Rosario
278fdc3c9a Workflows: Don't capture form exceptions
Instead of capturing the form save exceptions in the subclass
let the base class do the work.

Use the base class get_instance_extra_data method to avoid
some code repetition.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-09 15:04:05 -04:00
Roberto Rosario
6832450221 Generic forms: Don't raise, display exceptions
Update the generic single object create and edit views to display
critical exceptions instead of just raising them and stoping
execution. The should allow removing duplicated exception to message
code in subclasses of these views.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-09 14:59:59 -04:00
Roberto Rosario
e699e39c37 Celery: Remove use of autoretry_for and retry_backoff
These features were for Celery 4.2.1, since this version
has a regression, version 4.1.1 is used instead.
The version 4.2.1 features are removed also and implemented
in code.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-09 01:31:56 -04:00
Roberto Rosario
55e9b2263c Celery: Update Celery to version 4.1.1
Upgrade Celery version used from 3.1.26 to 4.1.1. The following
settings have been renamed: CELERY_ALWAYS_EAGER to
CELERY_TASK_ALWAYS_EAGER, BROKER_URL to CELERY_BROKER_URL.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-08 22:49:15 -04:00
Roberto Rosario
034e0668f4 Caching: Remove caching migration from common app
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-08 17:07:24 -04:00
Roberto Rosario
da6d7cbc0c Converter: Sort ConverterBase methods
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-08 16:34:34 -04:00
Roberto Rosario
2f3d640799 Convert: Move initalization of Pillow
Pillow was being initialized on import. This commit
moves the initialization to the __init__ method of the
Python backend subclass.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-08 16:33:35 -04:00
Roberto Rosario
fad2ae3683 Migrations: Squash migrations
Squash together the following migrations:

  - Common: 0010 to 0011
  - Documents: 0029 to 0037
  - Documents: 0042 to 0043
  - Tags: 0001 to 0008

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-08 03:02:04 -04:00
Roberto Rosario
aaea84b386 Caching: Turn the new caching into its own app
Extract the new smart file caching code from the common app
and convert it into its own new app called file_caching.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-08 01:38:59 -04:00
Roberto Rosario
0c7f9f50af Tests: Mute database convertion tests output
Mute the root mixin to mute all the database conversion tests.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-07 21:16:07 -04:00
Roberto Rosario
f744eb8871 Documents: Split document.models module
Split the .model module from the document app into separate
modules by purpose. The new modules containing the documents
app models are: document_models.py, document_page_models.py,
document_type_models.py, and document_version_models.py.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-07 21:11:34 -04:00
Roberto Rosario
3ae991c9cd Style: Minor PEP8 code cleanups
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-07 20:24:18 -04:00
Roberto Rosario
60233e0b89 Merge branch 'features/explicit_app_paths' into versions/next
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-07 20:17:45 -04:00
Roberto Rosario
50e72fdb4e Style: Move document model functions
Move the document UUID and document hash functions
to the documents.utils module.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-07 18:08:47 -04:00
Roberto Rosario
255b1c75ea Style: Prepend "operation_" to data migrations
Prepend "operation_" to the data migration functions
for clear purpose. Add keyword arguments to the RunPython
migration opration.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-07 17:28:22 -04:00
Roberto Rosario
ab1482152e Documents, Mailer: Sort imports, minor style fix
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-07 17:20:00 -04:00
Roberto Rosario
adab93fad6 Development: Add a default isort configuration
Add a config file for isort that most closely approaches Mayan's
best practices.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-07 16:09:14 -04:00
Roberto Rosario
99a1d143ee Tests: Silence expected debug output during tests
Several tests cause errors on purpose to test behaviors.
This commit mute these tests setting their debug level
to critical or by using a context manager to null their
stdout descriptor.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-07 16:06:53 -04:00
Roberto Rosario
28f387cf6c Metadata: Use generator to prepare lookup choices
Change the use of the list/zip combinarion to generate
the full list of metadata lookup choices to a generator.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-07 03:34:02 -04:00
Roberto Rosario
8039dfa30a Autoadmin: Incorporate the autoadmin app
Incorporate the external django-autoadmin app as a core app
and convert it into a Mayan app. This change adds the new
settings: "COMMON_AUTOADMIN_EMAIL", "AUTOADMIN_PASSWORD", and
"AUTOADMIN_USERNAME".

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-07 03:09:59 -04:00
Roberto Rosario
28a1ecb685 Events: Display current user events
Add a new view to display the events of the current user.
The link to this view is added to the user menu in the main menu
bar.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-06 22:01:41 -04:00
Roberto Rosario
3ab41e6b63 Events: Update subscription icon
Update the subscription icon to match other instances.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-06 22:00:28 -04:00
Roberto Rosario
46cd7353dc Multiple apps: Sort imports and minor style fixes
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-06 16:38:24 -04:00
Roberto Rosario
4d84b5f28f Common app: Move HOME_VIEW setting
The HOME_VIEW setting is not a Django setting but a setting from the
common app. Move the HOME_VIEW to the COMMON namespace and rename it
to COMMON_HOME_VIEW.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-06 15:58:19 -04:00
Roberto Rosario
0d9bda0ccf Merge branch 'features/explicit_app_paths' of gitlab.com:mayan-edms/mayan-edms into features/explicit_app_paths 2018-12-06 05:09:54 -04:00
Roberto Rosario
dc255da362 Multiple apps: Default binary path by platform
Use Python's platform library to detect the operating system and
use different default paths for the binary dependencies.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-06 05:08:35 -04:00
Roberto Rosario
ef126d56b2 Documents: Allow version upload task stubs access
Update which Document model manager the new version upload task
uses to fetch the document. Changing to the passthrough manager
allows the task to access document stubs which is the expected
behavior as new document with no versions are considered stubs.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-06 03:04:53 -04:00
Roberto Rosario
d6435b7735 Django GPG: 3rd party app compatibility update
Update the django_gpg app to work with the latest version of the
python-gnupg package (0.4.3).

The python-gnupg now returns a more clear error message to
differentiate between a bad passphrase and a missing passphrase.
This improments allows the django_gpg to simplify its error
message parsing and remove the literals:
"ERROR_MSG_NEED_PASSPHRASE" and "ERROR_MSG_GOOD_PASSPHRASE".

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-06 02:58:40 -04:00
Roberto Rosario
d1a4cb875b Document signatures: Rename settings
Rename the setting "SIGNATURES_STORAGE_BACKEND" to
"DOCUMENT_SIGNATURES_STORAGE_BACKEND" and the setting
"SIGNATURES_STORAGE_BACKEND_ARGUMENTS" to
"DOCUMENT_SIGNATURES_STORAGE_BACKEND_ARGUMENTS". This is
to differentiate these from the settings of the django_gpg
app.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-06 02:37:25 -04:00
Roberto Rosario
8d8ec59e03 Django GPG: Setting options changes
Remove the SIGNATURES_GPG_HOME settings. The GPG keys are no longer
stored in disk but in the database itself making this setting obsolete.
This changed happened several versions ago and this removal doesn't affect
any code path.

Add two new settings to the app: SIGNATURES_GPG_BACKEND and
SIGNATURES_GPG_BACKEND_ARGUMENTS. These settings allow changing the
GPG backend that the app will use.

Remove the settings SIGNATURES_GPG_PATH. The path to the GPG binary
is now passed via the SIGNATURES_GPG_BACKEND_ARGUMENTS.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-06 02:34:15 -04:00
Roberto Rosario
55a30379bd Various apps: Sort imports
Run imports as per Mayan EDMS best practices.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-06 01:57:24 -04:00
Roberto Rosario
8740707d1d Documentation: Minor edit in the releases text
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-12-06 00:48:05 -04:00
Roberto Rosario
27c04ed9be Converter: Remove base64 image support
The get_page method had support to return the image in
base64 format. This feature is no longer used by any
other app.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-05 14:47:12 -04:00
Roberto Rosario
fd4c2e7f00 Converter: Remove base64 image support
The get_page method had support to return the image in
base64 format. This feature is no longer used by any
other app.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-05 14:45:20 -04:00
Roberto Rosario
685d9b6d3e Converter: Replace deprecated string_concat
Change the use of string_concat with format_lazy.
string_concat is deprecated in Django 1.11 and removed in
Django 2.1.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-12-05 04:48:31 -04:00
Roberto Rosario
c430d471e6 Setting: Improve type checking
Update the type checking from using Django's six port
to use direct list and tuple instance checking.

Needed for Python 3.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-12-05 04:43:47 -04:00
Roberto Rosario
8aeb7f01fe Converter: Fix failing tests
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-12-05 04:43:20 -04:00
Roberto Rosario
d1945b6190 OCR: Update app to use document image cache
Update the OCR app to use the document image cache instead
of trying to read the image file directly from
the document storage.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-12-05 04:35:12 -04:00
Roberto Rosario
c466c44dfb Search: Fix failing tests
The SearchModel class no longer returns an elapsed time
value. Update the tests and views that expect this removed
variable.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-12-05 03:19:27 -04:00
Roberto Rosario
55cd928069 Documents: Add default filtering of stubs
Add filter(is_stub) to the default Document model manager.

Now only the Passthrough manager can access document stubs.

Remove the explicit filtering of stubs from code that obtains
the queryset from the default document manager.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-12-05 03:05:39 -04:00
Roberto Rosario
f6a675c9db Documents: Decrease thumbnail fadein duration
Reduce the document thumbnail fadein animation length
to speed up display of resolved thumbnails.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-12-05 02:49:29 -04:00
Roberto Rosario
2d4a710999 Document: Rename DocumentPageResult model
Rename the DocumentPageResult to DocumentPageSearchResult for
clarity of purpose.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-12-05 02:48:34 -04:00
Roberto Rosario
f9dfc00b30 Project: Fix partial references to apps
All apps references now need to be prepended with mayan.apps.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-12-05 02:19:36 -04:00
Roberto Rosario
2379f6963f Common: Add colorized log formatter
New log formatter that color the output depending on the log
level of the message. The default palette handles: INFO,
SUCCESS, ERROR, DEBUG and CRITICAL.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-12-05 02:12:32 -04:00
Roberto Rosario
59fbbd82e2 Common: Add colorized log formatter
New log formatter that color the output depending on the log
level of the message. The default palette handles: INFO,
SUCCESS, ERROR, DEBUG and CRITICAL.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-12-05 02:07:34 -04:00
Roberto Rosario
8e69178e07 Project: Switch to full app paths
Instead of inserting the path of the apps into the Python app,
the apps are now referenced by their full import path.

This app name claves with external or native Python libraries.
Example: Mayan statistics app vs. Python new statistics library.

Every app reference is now prepended with 'mayan.apps'.

Existing config.yml files need to be updated manually.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-12-05 02:04:20 -04:00
Roberto Rosario
146ebb7032 Documents: Update cache size on setting update
Add a setting callback to update the size of the document
cache when the DOCUMENTS_CACHE_MAXIMUM_SIZE setting is
updated.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-12-04 15:48:44 -04:00
Roberto Rosario
1515c0170f Cache: Prune the cache on property updates
Execute the prune method of a cache when its properties
are changed. This ensures the size of the cache matches
the maximum size set when last saved.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-12-04 15:46:05 -04:00
Roberto Rosario
984a1903ce Settings: Add support for post edit callbacks
Settings can be provided with a function via the new
"post_edit_function" argument. This function will be called
when the setting's value is updated. The function will only
receive one argument: The instance of the setting being
changed.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-12-04 15:44:08 -04:00
Roberto Rosario
f4e0e06c66 Documents: Remove old image caching model
With the creation of the new general use file Cache system
the old DocumentPageCachedImage model and manager are no longer
needed. This commit removed the model and the manager, and add
a migration to remove any data in the model before removing it
from the database.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-12-04 15:21:57 -04:00
Roberto Rosario
66b04296f5 Documentation: Update release notes and changelog
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-12-04 00:11:58 -04:00
Roberto Rosario
d6394c5e3b List template: Add missing closing tag
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-12-04 00:05:28 -04:00
Roberto Rosario
396f9f6fca Search: Refactor classes
Add additional classes to split existing classes that are too complex.

Remove search timming.

Add query explainer.

Move literals to their own module.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-12-04 00:04:41 -04:00
Roberto Rosario
1d1b4f5f5f Documents: Organize methods per best practices
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-12-04 00:00:42 -04:00
Roberto Rosario
89d3fb9922 Cache: Beta stage
Add retry to race condition in intermediate image generation.

Remove DB index from cache file size field.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-12-03 04:26:00 -04:00
Roberto Rosario
77fc9b5831 Caching: MVP stage
Working implementation with three levels of organization per cache.
Cache -> Partition -> File.

Current non blocking lock for the intermediate file generation needs
to be replaced to a blocking lock.

Needs tests.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-12-02 05:00:35 -04:00
Roberto Rosario
a414b8df92 Caching: Initial experitmental cache model
signed-off-by: Roberto Rosario <rosarior@t60.lan>
2018-11-30 19:48:26 -04:00
Roberto Rosario
f25174bd15 Configuration: Sane empty result
The settings/base.py file is expeting a dictionary of configuration
options. If there is no config.yml, return and empty dictionary
instead of a None result.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-30 14:55:00 -04:00
Roberto Rosario
7a4d230195 Appearance: Don't hide icons on small screens
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-30 04:36:11 -04:00
Roberto Rosario
d210f05aa6 Appearance: Homogenize the no-result template look
Make sure the no-result template looks the same when included from
all the parent templates.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-30 04:35:54 -04:00
Roberto Rosario
8bf484051e Documents: Delay error handler
Add a delay to the image error handler attachment code to avoid
triggering a false image error event. This is cause when the error
handler is attached before the image is assigned a src attribute.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-30 04:31:59 -04:00
Roberto Rosario
ab045c499c Indexing: Update the default index
Update the default date-based index for the new Jinja2
template language.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-30 04:30:38 -04:00
Roberto Rosario
abfc8b0c09 Navigation: Add list facet menu
Add the new list facet navigation menu. Used to provide facets
to the list subtemplate. The list facet allows separating the object
action links from the object navigation links. The list facet
links are displayed before the list object links on the list
subtemplate. In the object views, the list facet menu behaves
exactly the same as the form facet menu.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-29 04:17:53 -04:00
Roberto Rosario
52bbf62e26 Documents: PEP8 and code style cleanups
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-29 02:11:26 -04:00
Roberto Rosario
e0d900d952 Workflows: Refactor workflow preview generation
Refactor the workflow preview generation to work as a
background task API service. Solves GitLab issue #532.

The image generation runs as an out of process task
ensuring that the HTTP request is never compromised.

A new task queue named "document_states_fast" was created.
The settings WORKFLOWS_IMAGE_CACHE_TIME,
WORKFLOWS_IMAGE_CACHE_STORAGE_BACKEND,
WORKFLOWS_IMAGE_CACHE_STORAGE_BACKEND_ARGUMENTS we added.

Images generated are stored by default under /mayan/media/workflows.

The Dockerfile and deployment instructions are updated
to include the new queue.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-29 02:10:31 -04:00
Roberto Rosario
cfe1934b9b Appearance: Fix form CSS media rendering
Fix the way the form CSS contained in the media attribute
is rendered. This is now an interator and not a single value.
Replace the current method with a for loop.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-29 01:12:36 -04:00
Roberto Rosario
ef3453b48c Documentation: Fix error in example setting
The example MAYAN_DATABASES setting was missing the 'default'
database key.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-28 15:15:39 -04:00
Roberto Rosario
2bd649ab52 Documentation: Add install troubleshooting
Add section to outline common pitfalls when installing.
Reference GitLab issue #487.

Update installation instructons to use the setting
MAYAN_DATABASES instead of the old MAYAN_DATABASE_*.

Unify the installation instructions by converting the
chapters into partials that are now included in the
topic file.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-28 05:09:49 -04:00
Roberto Rosario
13524f5ce0 Documentation: Update watch folder description
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-28 04:14:33 -04:00
Roberto Rosario
c6104e0080 Mirroring: Increase cache timeouts
Increase the default value of the index mirroring cache timeout
from 10 seconds to 5 minutes. Since version 3.1.5, mirror
cache invalidation is tied to index updates. This makes the
timeout less relevant. The purpose of the cache timeout is
now avoid runaway memory usage.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-28 04:13:48 -04:00
Roberto Rosario
f9a0fb2e79 Watch folders: Add support for subfolders
Add support for subfolder scanning to watch folders. Closes
GitLab issue #498.

This commit adds a new field to watch folders called
"include_subdirectories".

The directory walk was also updated to use pathlib2.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-28 04:00:15 -04:00
Roberto Rosario
d973a20c30 Mailing: Add support for a from field
Add support to the mailing profiles for specifying a "from"
address. Closes GitLab issue #522.

This commit adds a new backend class property "class_fields"
which differs from the normal "fields" property. The "class_fields"
property specifies which of the backend fields will be used to
initialize a backend's driver class. This is to avoid passing
fields that the driver doesn't expect and getting an error.

When sending emails, the "send" method will attempt to get
a "from" key from the backend data and use that when sending
emails. If no "from" key is found a None is passes. Django's
behavior in this situation dictates that the "from" value will
then be taken from the DEFAULT_FROM_EMAIL setting.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-28 02:59:12 -04:00
Roberto Rosario
b8b10592c7 Mailing: Display a message when testing
A success or failure message will be now displayed when
testing a mailing profile.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-28 02:57:23 -04:00
Roberto Rosario
96ee283226 Documentation: Improve app chapter formatting
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-28 00:36:42 -04:00
Roberto Rosario
0188737e74 Settings: Delay initialization of setting
Delay the usage and initialization of Django settings
by removing their reference from the "save_configuration"
method declaration.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-28 00:35:05 -04:00
Roberto Rosario
46bd5b0a17 Documentation: Improve versioning section
Fix formatting of the versioning section
and turn the list of version examples into a table.
Add further examples for minor and micro releases.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-28 00:33:42 -04:00
Roberto Rosario
10ccab662f Password validations: Add two new validators
Add two new custom password validators. One ensures
passwords have a minimum number of uppercase letters and the
other ensures passwords have a minimum amount of numbers.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-27 20:07:18 -04:00
Roberto Rosario
77dc53f244 Documentation: Add mention to DEFAULT_FROM_EMAIL
Add mention and example of this new settings option
that is now available.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-27 20:05:27 -04:00
Roberto Rosario
21d7ec2428 Documentation: Cleanup and code documentation
Cleanup the Sphinx configuration file to comply with PEP8.

Enable the viewcode and autodoc extensions to start adding
code snippets in code.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-27 20:04:50 -04:00
Roberto Rosario
2ca38c20b0 Tests: Fix failing tests
Fix failing tests in the OCR and parsing apps.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-27 17:17:07 -04:00
Roberto Rosario
67e79d0e19 OCR, Parsing: Revert iterator stop
Revert how the OCR and document parsing generators end
their iteration. Originally they issue an empty return,
then a blank yield was added. This commit reverts the
blank yield and restores the original 'return' behavior.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-27 17:15:38 -04:00
Roberto Rosario
141d79afa6 Documentation: Add initial 3.2 release notes file
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-27 05:31:18 -04:00
Roberto Rosario
e9411514c7 PEP8: Code cleanup
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-27 05:28:55 -04:00
Roberto Rosario
2f70a57f18 Documentation: Update OCR and parsing indexing examples
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-27 05:27:01 -04:00
Roberto Rosario
5a626861ae Parsing: Add the 'content' attribute
Add the 'content' attribute to documents to allow access
to a document's parsed content for indexing and other purposes.

Fixes the document parsing indexing failing test.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-27 05:24:55 -04:00
Roberto Rosario
aaf9f7a8be OCR: Add 'ocr_content' attribute
Add the 'ocr_content' attribute to documents to allow access
to a document's OCR content for indexing and other purposes.

Fixes the OCR indexing failing test.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-27 05:20:31 -04:00
Roberto Rosario
0f5625a356 Tags: Update test indexing template for Jinja2
Jinja2 doesn't support the {% empty %} node, instead it uses
the {% else %} node for the same purpose.

Fixed the tag indexing failing test.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-27 05:16:18 -04:00
Roberto Rosario
cb408c768d PEP8: Code cleanups
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-27 04:26:56 -04:00
Roberto Rosario
03d51fe8e1 PEP8: Code cleanups
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-27 04:19:35 -04:00
Roberto Rosario
3394f97b25 Settings: Improve lazy values expression
Settings with lazy values are now more carefully checked
and converteed before serializing them.

Previously only the entire value was checked to see if it
was a promise. Now the value is checked to see if it is a
list or tuple and its members checked to see if they are
promises.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-27 04:17:59 -04:00
Roberto Rosario
7c6d466ab1 Settings: Expose new Django and Celery settings
Expose new Django settings via the UI: AUTH_PASSWORD_VALIDATORS,
DEBUG, DEFAULT_FROM_EMAIL, INTERNAL_IPS, LANGUAGES,
LANGUAGE_CODE, STATIC_URL, STATICFILES_STORAGE,
TIME_ZONE, WSGI_APPLICATION.

Expose a new Celery setting via the UI: CELERY_ALWAYS_EAGER.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-27 04:15:52 -04:00
Roberto Rosario
ba4858e77f Initial settings: Refactor setting bootstrapping
Refactor the initial environment settings and configuration file loading
fixing some issues loading Django settings.

Consolidate all database settings into a new single setting
called "DATABASES". This mirrors Django database setting
structure. This changes makes it possible to use configure
multiple databases and database routers from the environment
variables or configuration file.

Remove usage of django-environ. Only a small set of the
features provided by django-environ were being used.
Variable typecasting is now only YAML. YAML parsing
is implemented in code.

Previously the initial setting code added all settings
it found into the global symbol table. Now the settings
found are matched to a explicit list of allowed settings.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-27 04:06:21 -04:00
Roberto Rosario
544edea54a Mailer: Code cleanup
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-26 17:51:08 -04:00
Roberto Rosario
2738e3facf Converter: Move literal to the literls.py module
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-26 17:50:31 -04:00
Roberto Rosario
51f15a3131 Settings: Update defaults formats
Update the default values of the settings which pass
arguments to backends to be valid Python values and not
YAML strings.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-26 17:45:43 -04:00
Roberto Rosario
5c1eb59a1a Converter: Rename setting
Change the CONVERTER_GRAPHICS_BACKEND_CONFIG settings
to CONVERTER_GRAPHICS_BACKEND_ARGUMENTS for uniformity
and to convey it real purpose which is initializing a backend.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-26 17:39:48 -04:00
Roberto Rosario
f5f6470697 Settings: Make namespace a navigation link
Currently the link to navigate back to the settings
namespace is registered as an action when it is a link.
This commits changes it to a link in the facet menu.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-26 17:29:56 -04:00
Roberto Rosario
d5224d93a7 Settings: Remove support for quoted settings
Instead of passing strings as arguments to backends, all settings must
be formatted according to YAML specifications. This is to remove the
need to add separate YAML parsing to each backend argument in each
app that needs it. Argument passing to backends is not fully
uniform.

Users need to update their config files.
  Example:

    DOCUMENTS_STORAGE_BACKEND_ARGUMENTS: '{location: /home/rosarior/development/mayan-edms/mayan/media/document_storage}'

  must be changed to:

    DOCUMENTS_STORAGE_BACKEND_ARGUMENTS:
      location: /home/rosarior/development/mayan-edms/mayan/media/document_storage

  Example 2:

    CONVERTER_GRAPHICS_BACKEND_CONFIG: '        {            libreoffice_path: /usr/bin/libreoffice,            pdftoppm_dpi:
    300,            pdftoppm_format: jpeg,            pdftoppm_path: /usr/bin/pdftoppm,            pdfinfo_path:
    /usr/bin/pdfinfo,            pillow_format: JPEG        }    '

  must be changed to:

    CONVERTER_GRAPHICS_BACKEND_CONFIG:
      libreoffice_path: /usr/bin/libreoffice
      pdftoppm_dpi: 300
      pdftoppm_format: jpeg
      pdftoppm_path: /usr/bin/pdftoppm
      pdfinfo_path: /usr/bin/pdfinfo
      pillow_format: JPEG

  Example 3:

    OCR_BACKEND_ARGUMENTS: ''

  must be changed to:

    OCR_BACKEND_ARGUMENTS: {}

  Settings that need to be updated are:

  - COMMON_SHARED_STORAGE_ARGUMENTS
  - CONVERTER_GRAPHICS_BACKEND_CONFIG
  - DOCUMENTS_CACHE_STORAGE_BACKEND_ARGUMENTS
  - DOCUMENTS_STORAGE_BACKEND_ARGUMENTS
  - OCR_BACKEND_ARGUMENTS
  - SIGNATURES_STORAGE_BACKEND_ARGUMENTS
  - SOURCES_STAGING_FILE_CACHE_STORAGE_BACKEND_ARGUMENTS

  The following error will appear in the console if a setting is not yet
  updated to this new format::

      TypeError: type object argument after ** must be a mapping, not str

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-26 17:27:57 -04:00
Roberto Rosario
2047fb7b17 Development: Don't add dev apps blindly
Try to import the development apps before adding them
as installed apps.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-26 16:43:34 -04:00
Roberto Rosario
4b727662ef Settings: Update MIDDLEWARE_CLASSES to MIDDLEWARE
Update mentions of MIDDLEWARE_CLASSES to MIDDLEWARE in the
development and testing settings.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-25 02:15:50 -04:00
Roberto Rosario
6a7cd09bc1 Use Jinja2 as the template engine
Use Jinja2 to render the templates of the indexing,
workflows, smart links, user mailer and metadata apps.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-25 02:13:26 -04:00
Roberto Rosario
42d434f7bb Upload Wizard: Add double click support
Add support to select the document type using a Double Click action
on the form.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-25 01:34:44 -04:00
Roberto Rosario
e72b4e82a3 Forms: Add support for form hotkeys
Adds JavaScript support to monitor keypresses or mouse events
of forms with the classes .form-hotkey-enter or form-hotkey-double-click,
and trigger the click event of the button with the CSS class
.btn-hotkey-default.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-25 01:32:22 -04:00
Roberto Rosario
8e896a54f9 Middleware: Modernize middleware classes
Make the custom middleware provided by Mayan to use the
MiddlewareMixin provide by Django. This make the middleware
classes behave like classes or callables. This change ensures
compatibility with Django 2.x.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-25 00:59:39 -04:00
Roberto Rosario
2d5a646940 URLs: Remove development URLs from main URL file
Move the development URL definitions for Rosetta and Debug toolbar
to a separate URL file. Convert the single urls.py to a module to
allow multiple URL files to be used.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-25 00:32:17 -04:00
Roberto Rosario
b3c0b622b8 App: Remove admindocs
Remove admindocs which is not used in production.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-24 22:59:16 -04:00
Roberto Rosario
b04b205fb6 Add docstrings for almost all models
Also adds docstring to some managers and model methods.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-24 22:56:35 -04:00
Roberto Rosario
8c98679687 Dependencies: Remove django-suit from apps
Signed-off-by: Roberto Rosario <Roberto.Rosario.Gonzalez@gmail.com>
2018-11-22 04:59:10 -04:00
Roberto Rosario
6d39f3b716 Documents: Add missing import
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-16 22:02:33 -04:00
Roberto Rosario
21a6ed4756 Documents: Add document page icons
Add icons to the document page image and document page reset
views.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-16 21:58:10 -04:00
Roberto Rosario
3b247bfb5f Documents: Document task transformations
Add support to pass serialized transformation lists to the
document page generation task.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-16 21:51:57 -04:00
Roberto Rosario
823083a76c Converter: Add transformation serialization
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-16 21:51:32 -04:00
Roberto Rosario
4ee6add201 Documents: Document image API transformations
Add transformations support to the document image API.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-16 21:43:49 -04:00
Roberto Rosario
894a25ccce Appearance: Allow subclassing the TextArea widget
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-16 18:55:47 -04:00
Roberto Rosario
ecdc4a9a51 Appearance: Remove unused form_empty_label flag
This is superseded by the empty results template.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-16 18:48:32 -04:00
Roberto Rosario
2ae56d2cf4 Dependencies: Update Python dependencies version.
Remove django suit as a dependency.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-16 18:41:02 -04:00
Roberto Rosario
810558659d Documents: Add invalid document server template
Invalid document template is now served or included from
a specific template file. Documents with invalid
API image URLs now return None instead of the template code
specific '#'.  The new template is called invalid_document.html.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-16 18:23:43 -04:00
Roberto Rosario
957cf64fe5 Pagination: Add custom pure pagination subclasses
Add Paginator and Page subclasses that supports custom page
querystring keys.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-16 18:04:42 -04:00
Roberto Rosario
e8c70cbd08 Pagination: Fix unintented pagination AJAX reload
Add CSS class to disable reload when clicking on pagination active page
link.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-16 17:59:28 -04:00
4064 changed files with 30585 additions and 105108 deletions

6
.isort.cfg Normal file
View File

@@ -0,0 +1,6 @@
[settings]
default_section = THIRDPARTY
known_first_party = mayan
known_django = django
multi_line_output = 5
sections = FUTURE,STDLIB,DJANGO,THIRDPARTY,FIRSTPARTY,LOCALFOLDER

View File

@@ -19,6 +19,12 @@ source_lang = en
source_file = mayan/apps/authentication/locale/en/LC_MESSAGES/django.po
type = PO
[mayan-edms.autoadmin-2-0]
file_filter = mayan/apps/autoadmin/locale/<lang>/LC_MESSAGES/django.po
source_lang = en
source_file = mayan/apps/autoadmin/locale/en/LC_MESSAGES/django.po
type = PO
[mayan-edms.cabinets-2-0]
file_filter = mayan/apps/cabinets/locale/<lang>/LC_MESSAGES/django.po
source_lang = en
@@ -43,6 +49,12 @@ source_lang = en
source_file = mayan/apps/converter/locale/en/LC_MESSAGES/django.po
type = PO
[mayan-edms.dashboards-2-0]
file_filter = mayan/apps/dashboards/locale/<lang>/LC_MESSAGES/django.po
source_lang = en
source_file = mayan/apps/dashboards/locale/en/LC_MESSAGES/django.po
type = PO
[mayan-edms.django_gpg-2-0]
file_filter = mayan/apps/django_gpg/locale/<lang>/LC_MESSAGES/django.po
source_lang = en
@@ -97,6 +109,12 @@ source_lang = en
source_file = mayan/apps/events/locale/en/LC_MESSAGES/django.po
type = PO
[mayan-edms.file_caching-2-0]
file_filter = mayan/apps/file_caching/locale/<lang>/LC_MESSAGES/django.po
source_lang = en
source_file = mayan/apps/file_caching/locale/en/LC_MESSAGES/django.po
type = PO
[mayan-edms.linking-2-0]
file_filter = mayan/apps/linking/locale/<lang>/LC_MESSAGES/django.po
source_lang = en

View File

@@ -1,171 +1,388 @@
4.0 (2019-XX-XX)
================
- Documents: Add a server side template for invalid documents.
The new template can be accessed via the templates API.
Improve the way invalid documents are detected in the JavaScript
code.
- Pagination: Fix page AJAX reload when clicking on pagination active page
link.
- Pagination: Add pure pagination subclass that supports custom page
querystring keys
- Dependencies: Update Python dependencies version. Remove django suit
as a dependency.
- Appearance: Remove unused form_empty_label flag.
- Appearance: Allow subclassing the text area widget.
- Documents: Add transformation support to document image API with serialized
transformations.
- Documents: Add icons to the document page image and document page reset
views.
- Remove support for quoted settings. Instead all settings must be formatted
according to YAML specifications. Users need to update their config files.
Example:
DOCUMENTS_STORAGE_BACKEND_ARGUMENTS: '{location: /home/rosarior/development/mayan-edms/mayan/media/document_storage}'
must be changed to:
DOCUMENTS_STORAGE_BACKEND_ARGUMENTS:
location: /home/rosarior/development/mayan-edms/mayan/media/document_storage
Example 2:
CONVERTER_GRAPHICS_BACKEND_CONFIG: ' { libreoffice_path: /usr/bin/libreoffice, pdftoppm_dpi:
300, pdftoppm_format: jpeg, pdftoppm_path: /usr/bin/pdftoppm, pdfinfo_path:
/usr/bin/pdfinfo, pillow_format: JPEG } '
must be changed to:
CONVERTER_GRAPHICS_BACKEND_CONFIG:
libreoffice_path: /usr/bin/libreoffice
pdftoppm_dpi: 300
pdftoppm_format: jpeg
pdftoppm_path: /usr/bin/pdftoppm
pdfinfo_path: /usr/bin/pdfinfo
pillow_format: JPEG
Example 3:
OCR_BACKEND_ARGUMENTS: ''
must be changed to:
OCR_BACKEND_ARGUMENTS: {}
Settings that need to be updated are:
- COMMON_SHARED_STORAGE_ARGUMENTS
- CONVERTER_GRAPHICS_BACKEND_CONFIG
- DOCUMENTS_CACHE_STORAGE_BACKEND_ARGUMENTS
- DOCUMENTS_STORAGE_BACKEND_ARGUMENTS
- OCR_BACKEND_ARGUMENTS
- SIGNATURES_STORAGE_BACKEND_ARGUMENTS
- SOURCES_STAGING_FILE_CACHE_STORAGE_BACKEND_ARGUMENTS
The following error will appear in the console if a setting is not yet
updated to this new format::
TypeError: type object argument after ** must be a mapping, not str
- Rename the CONVERTER_GRAPHICS_BACKEND_CONFIG to
CONVERTER_GRAPHICS_BACKEND_ARGUMENTS.
- Refactor the initial environment settings and configuration file loading.
- Consolidate all database settings into a new single setting called
"DATABASES".
- Remove usage of django-environ.
- Reduce attach surface by only loading a restricted list of
settings during the initial configuration loading.
- Exposed new Django settings via the UI: AUTH_PASSWORD_VALIDATORS,
DEBUG, DEFAULT_FROM_EMAIL, INTERNAL_IPS, LANGUAGES,
LANGUAGE_CODE, STATIC_URL, STATICFILES_STORAGE,
TIME_ZONE, WSGI_APPLICATION.
- Exposed a new Celery setting via the UI: CELERY_ALWAYS_EAGER.
- Settings with lazy values are now more carefully checked
and converteed before serializing them.
- Add the 'ocr_content' attribute to documents to allow access
to a document's OCR content for indexing and other purposes.
- Add the 'content' attribute to documents to allow access
to a document's parsed content for indexing and other purposes.
- Two new custom password validators added. One ensures
passwords have a minimum number of uppercase letters and the
other ensures passwords have a minimum amount of numbers.
- Add support to the mailing profiles for specifying a from
address. Closes GitLab issue #522.
- Add support for subfolder scanning to watchfolders. Closes
GitLab issue #498.
- Increased the default value of the index mirroring cache timeout
from 10 seconds to 5 minutes. Since version 3.1.5, mirror
cache invalidation is tied to index updates. This makes the
timeout less relevant. The purpose of the cache timeout is
now avoid runaway memory usage.
- Refactored the workflow preview generation to work as an
background task API service. Solves GitLab issue #532.
A new task queue named "document_states_fast" was created.
The settings WORKFLOWS_IMAGE_CACHE_TIME,
WORKFLOWS_IMAGE_CACHE_STORAGE_BACKEND,
WORKFLOWS_IMAGE_CACHE_STORAGE_BACKEND_ARGUMENTS we added.
- Added new list facet navigation menu. Used to provide facets
to the setup menu items.
- Add reusable, smart file caching system.
- Use the new caching system to cache document version images,
document page images and transformes document page images.
The maximum size of the document cache is controlled
by the new DOCUMENTS_CACHE_MAXIMUM_SIZE setting.
This setting defaults to 500 megabytes.
- Add support for post edit callbacks to settings. This
callback willl execute when a settings's value is changed.
- Switch to full app paths. Instead of inserting the path
of the apps into the Python app, the apps are now
referenced by their full import path. This avoid app name
clashes with external or native Python libraries.
Example: Mayan statistics app vs. Python new statistics library.
Every app reference is now prepended with 'mayan.apps'.
Existing config.yml files need to be updated manually.
- Added a colorized console log formatter. New log formatter
that colors the output depending on the log level of the
message. The default palette handles: INFO, SUCCESS, ERROR,
DEBUG and CRITICAL.
- Decreased the thumbnail fade-in duration. Reduce the
document thumbnail fadein animation length to speed up
display of resolved thumbnails. Seems to reduce browser
load in FireFox.
- Document stubs are now filtered from the search results.
- Replaced deprecated string_concat in preparation for an
eventual Django 2.x upgrade.
- Removed the converter's base64 image support as it was
no longer being used by any stock app.
- Removed the SIGNATURES_GPG_HOME settings. The GPG keys
are no longer stored in disk but in the database itself
making this setting obsolete. This changed happened
several versions ago and this removal doesn't affect
any code path.
- Added two new settings to the django_gpg app:
SIGNATURES_GPG_BACKEND and SIGNATURES_GPG_BACKEND_ARGUMENTS.
These settings allow changing the GPG backend that the
app will use.
- Removed the settings SIGNATURES_GPG_PATH. The path to the
GPG binary is now passed via the
SIGNATURES_GPG_BACKEND_ARGUMENTS.
- Renamed the setting ``SIGNATURES_STORAGE_BACKEND`` to
``DOCUMENT_SIGNATURES_STORAGE_BACKEND`` and the setting
``SIGNATURES_STORAGE_BACKEND_ARGUMENTS`` to
``DOCUMENT_SIGNATURES_STORAGE_BACKEND_ARGUMENTS``. This
change differentiates them from the setting from the
django_gpg app.
- Updated the django_gpg app to work with the latest
version of the python-gnupg package (0.4.3).
- Set sensible default path for binaries by detecting
the operating system.
- The HOME_VIEW setting is not a Django setting but a setting
from the common app. The HOME_VIEW has been moved to the
COMMON namespace and renamed to COMMON_HOME_VIEW.
- New link added to display the events of the current user.
- Incorporate the django-autoadmin app and convert it
into a Mayan app. With change adds the new settings:
"COMMON_AUTOADMIN_EMAIL", "AUTOADMIN_PASSWORD", and
"AUTOADMIN_USERNAME".
- Changed the use of the list/zip combinarion to generate
the full list of metadata lookup choices to a generator.
- Squash migrations:
- Common: 0010 to 0011
- Documents: 0029 to 0037
- Documents: 0042 to 0043
- Tags: 0001 to 0008
- Upgraded from Celery 3.1.26 to 4.1.1. The following settings have been
renamed: CELERY_ALWAYS_EAGER to CELERY_TASK_ALWAYS_EAGER,
BROKER_URL to CELERY_BROKER_URL.
- Internal change. Add support to the SourceColumn class to resolve
related fields using the double underscore as separator.
- Refactored the model accesors to behave like methods instead of
properties. This means all accessors will be prepended with the
string "get_" and will include a set of parenthesis.
- The ModeAttribute class has been improved to use the method's
short_description. Support for a new method .help_text attribute
has been added.
- Add accessors have been moved to their own module, named
"methods.py".
- The PropertyHelper class has been removed as the accessors
no longer need it.
- Raise the NeedPassphrase exception when GPG has no terminal
available.
- Unified styling of signal handlers functions.
- Moved the authentication templates from the appearance app to
the authenticaton app.
- Moved the navigation templates from the appearance app to the
navigation app.
- Moved the dashboard and dashboard widgets to their own app.
- Converted the calculate form title template into a template tag.
The result of the template tag is applied as the title property
of the H3 HTML tag allowing users to view the full title on
mouse hover if it was truncated.
- Updated the source test behavior to allow testing a source
even when the source is disabled and to not deleted downloaded
content during a test.
- Update the user interface to add new sidebar main menu for a
more common left side menu navigation style. The main app
navigation links will be displayed here. The notification,
user and system tools are now displayed at the top navigation
bar.
- Added support for selecting a document from the UI by just
clicking on the title of the body of the card, not just on
the checkbox next to the title.
- Event handler to highlight panels when selected.
- Improve duplicated document display.
- Filter document duplicted count by access.
3.1.9 (2018-11-01)
==================
* Convert the furl instance to text to allow serializing it into
- Convert the furl instance to text to allow serializing it into
JSON to be passed as arguments to the background task.
3.1.8 (2018-10-31)
==================
* Reorganize documentation into topics and chapters.
* Add Workflows and API chapters.
* Add new material from the Wiki to the documentation.
* Add data migrations to the sources app migraton 0019 to ensure all labels
- Reorganize documentation into topics and chapters.
- Add Workflows and API chapters.
- Add new material from the Wiki to the documentation.
- Add data migrations to the sources app migraton 0019 to ensure all labels
are unique before performing the schema migations.
* Add improvements to the metadata URL encoding and decoding to support
- Add improvements to the metadata URL encoding and decoding to support
ampersand characters as part of the metadata value. GitLab issue
#529. Thanks to Mark Maglana @relaxdiego for the report.
* Add custom validator for multiple emails in a single text field.
- Add custom validator for multiple emails in a single text field.
Change the widget of the email fields in the mailer app to avoid
browser side email validation. Closes GitLab issue #530.
Thanks to Mark Maglana @relaxdiego for the report.
* Add configuration option to change the project/installation URL.
- Add configuration option to change the project/installation URL.
This is used in the password reset emails and in the default
document mailing templates.
* Increase the size of the workflow preview image.
* Center the workflow preview image.
* Move the noop OCR backend to the right place.
* Add new management command to display the current configuration
- Increase the size of the workflow preview image.
- Center the workflow preview image.
- Move the noop OCR backend to the right place.
- Add new management command to display the current configuration
settings.
* Default the YAML flow format to False which never uses inline.
* Add support for reindexing documents when their base properties like
- Default the YAML flow format to False which never uses inline.
- Add support for reindexing documents when their base properties like
the label and description are edited.
3.1.7 (2018-10-14)
==================
* Fix an issue with some browsers not firing the .load event on cached
- Fix an issue with some browsers not firing the .load event on cached
images. Ref: http://api.jquery.com/load-event/
* Remove duplicate YAML loading of environment variables.
* Don't load development apps if they are already loaded.
* Make sure all key used as input for the cache key hash are
- Remove duplicate YAML loading of environment variables.
- Don't load development apps if they are already loaded.
- Make sure all key used as input for the cache key hash are
bytes and not unicode. GitLab issue #520. Thanks to TheOneValen
@TheOneValen for the report.
* Ignore document stub from the index mirror. GitLab issue
- Ignore document stub from the index mirror. GitLab issue
#520. Thanks to TheOneValen @TheOneValen for the report.
* Fix for the Docker image INSTALL_FLAG path. Thanks to
- Fix for the Docker image INSTALL_FLAG path. Thanks to
Mark Maglana @relaxdiego for the report and to Hamish Farroq @farroq_HAM
for the patch. GitLab issue #525.
* Fix the typo in the Docker variable for worker concurrency. Thanks to
- Fix the typo in the Docker variable for worker concurrency. Thanks to
Mark Maglana @relaxdiego for the report and to Hamish Farroq @farroq_HAM
for the patch. GitLab issue #527.
* Add a noop OCR backend that disables OCR and the check for the
- Add a noop OCR backend that disables OCR and the check for the
Tesseract OCR binaries. Set the OCR_BACKEND setting or MAYAN_OCR_BACKEND
environment variable to ocr.backends.pyocr.PyOCR to use this.
* All tests pass on Python 3.
* documentation: Add Docker installation method using a dedicated
- All tests pass on Python 3.
- documentation: Add Docker installation method using a dedicated
Docker network.
* documentation: Add scaling up chapter.
* documentation: Add S3 storage configuration section.
- documentation: Add scaling up chapter.
- documentation: Add S3 storage configuration section.
3.1.6 (2018-10-09)
==================
* Improve index mirroring value clean up code to remove the spaces at the
- Improve index mirroring value clean up code to remove the spaces at the
starts and at the end of directories. Closes again GitLab issue #520
Thanks to TheOneValen @ for the report.
* Improve index mirroring cache class to use the hash of the keys
- Improve index mirroring cache class to use the hash of the keys
instead of the literal keys. Avoid warning about invalid key
characters. Closes GitLab issue #518. Thanks to TheOneValen @ for the
report.
* Only render the Template API view for authenticated users.
- Only render the Template API view for authenticated users.
Thanks rgarcia for the report.
* Add icon to the cabinet "Add new level" link.
* Display the cabinet "Add new level" link in the top level view too.
- Add icon to the cabinet "Add new level" link.
- Display the cabinet "Add new level" link in the top level view too.
3.1.5 (2018-10-08)
==================
* Consolidate some document indexing test code into a new mixin.
* Split the code of the mountindex command to be able to add tests.
* Fix the way the children of IndexInstanceNode are accessed. Fixes GitLab
- Consolidate some document indexing test code into a new mixin.
- Split the code of the mountindex command to be able to add tests.
- Fix the way the children of IndexInstanceNode are accessed. Fixes GitLab
issue #518. Thanks to TheOneValen @TheOneValen for the report.
* Remove newlines from the index name levels before using them as FUSE
- Remove newlines from the index name levels before using them as FUSE
directories.
* Fixed duplicated FUSE directory removal.
* Add link and view to show the parsed content of each document page.
* Add a modelform for adding and editing transformation and perform YAML
- Fixed duplicated FUSE directory removal.
- Add link and view to show the parsed content of each document page.
- Add a modelform for adding and editing transformation and perform YAML
validation of arguments.
* Add stricted error checking to the crop transformation.
* Update compressed files class module to work with Python 3.
* Update document parsing app tests to work with Python 3.
* Handle office files in explicit binary mode for Python 3.
* Return a proper list of SearchModel instances (Python 3).
* Specify FUSE literals in explicit octal notation (Python 3).
* URL quote the encoded names of the staging files using Django's compat
- Add stricted error checking to the crop transformation.
- Update compressed files class module to work with Python 3.
- Update document parsing app tests to work with Python 3.
- Handle office files in explicit binary mode for Python 3.
- Return a proper list of SearchModel instances (Python 3).
- Specify FUSE literals in explicit octal notation (Python 3).
- URL quote the encoded names of the staging files using Django's compat
module. (Python 3)
* Open staging file in explicit binary mode. (Python 3)
* Add separate Python 2 and Python 3 versions of the MetadataType model
- Open staging file in explicit binary mode. (Python 3)
- Add separate Python 2 and Python 3 versions of the MetadataType model
.comma_splitter() static method.
* Update the metadata app tests to work on Python 3.
* Make sure metadata lookup choices are a list to be able to add the
- Update the metadata app tests to work on Python 3.
- Make sure metadata lookup choices are a list to be able to add the
optional marker (Python 3).
* Make sure the image in the document preview view is centered when it is
- Make sure the image in the document preview view is centered when it is
smaller than the viewport.
* Restore use of the .store_body variable accidentally remove in
- Restore use of the .store_body variable accidentally remove in
63a77d0235ffef3cd49924ba280879313c622682. Closes GitLab issue #519.
Thanks to TheOneValen @TheOneValen for the report.
* Add shared cache class and add mounted index cache invalidation when
- Add shared cache class and add mounted index cache invalidation when
document and index instance nodes are updated or deleted.
* Fix document metadata app view error when adding multiple optional
- Fix document metadata app view error when adding multiple optional
metadata types. Closes GitLab issue #521. Thanks to the TheOneValen
@TheOneValen for the report.
3.1.4 (2018-10-04)
==================
* Fix the link to the documenation. Closes GitLab issue #516.
- Fix the link to the documenation. Closes GitLab issue #516.
Thanks to Matthias Urlichs @smurfix for the report.
* Update related links. Add links to the new Wiki and Forum.
* Add Redis config entries in the Docker images to disable
- Update related links. Add links to the new Wiki and Forum.
- Add Redis config entries in the Docker images to disable
saving the database and to only provision 1 database.
* Remove use of hard coded font icon for document page
- Remove use of hard coded font icon for document page
rendering busy indicator.
* Disable the fancybox caption link if the document is
- Disable the fancybox caption link if the document is
in the trash.
* Load the DropZone CSS from package and remove the
- Load the DropZone CSS from package and remove the
hard code CSS from appearance/base.css.
* Add support for indexing on OCR content changes.
* Add support for reindexing document on content parsing
- Add support for indexing on OCR content changes.
- Add support for reindexing document on content parsing
changes.
* Strip HTML entities from the browser's window title.
- Strip HTML entities from the browser's window title.
Closes GitLab issue #517. Thanks to Daniel Carrico @daniel1113
for the report.
* Improve search app. Refactored to resolve search queries
- Improve search app. Refactored to resolve search queries
by terms first then by field.
* Add explanation to the launch workflows tool.
- Add explanation to the launch workflows tool.
3.1.3 (2018-09-27)
==================
* Make sure template API renders in non US languages.
* Fix user groups view.
* Add no results help text to the document type -> metadata type
- Make sure template API renders in non US languages.
- Fix user groups view.
- Add no results help text to the document type -> metadata type
association view.
* Expose the Django INSTALLED_APPS setting.
* Add support for changing the concurrency of the Celery workers in the
- Expose the Django INSTALLED_APPS setting.
- Add support for changing the concurrency of the Celery workers in the
Docker image. Add environment variables MAYAN_WORKER_FAST_CONCURRENCY,
MAYAN_WORKER_MEDIUM_CONCURRENCY and MAYAN_WORKER_SLOW_CONCURRENCY.
* Add latest translation updates.
* Fixes a few text typos.
* Documentation updates in the deployment and docker chapters.
- Add latest translation updates.
- Fixes a few text typos.
- Documentation updates in the deployment and docker chapters.
3.1.2 (2018-09-21)
==================
* Database access in data migrations defaults to the 'default' database.
- Database access in data migrations defaults to the 'default' database.
Force it to the user selected database instead.
* Don't use a hardcoded database alias for the destination of the database
- Don't use a hardcoded database alias for the destination of the database
conversion.
* Improve natural key support in the UserOptions model.
* Update from Django 1.11.11 to 1.11.15.
* Add support to the convertdb command to operate on specified apps too.
* Add test mixin to test the db conversion (dumping and loading) of a specific app.
* Add an user test mixin to group user testing.
* Add test the user managament app for database conversion.
* Add support for natural keys to the DocumentPageImageCache model.
* Add database conversion test to the common app.
* Fix label display for resolved smart links when not using a dynamic label.
* Only show smart link resolution errors to the user with the smart link edit
- Improve natural key support in the UserOptions model.
- Update from Django 1.11.11 to 1.11.15.
- Add support to the convertdb command to operate on specified apps too.
- Add test mixin to test the db conversion (dumping and loading) of a specific app.
- Add an user test mixin to group user testing.
- Add test the user managament app for database conversion.
- Add support for natural keys to the DocumentPageImageCache model.
- Add database conversion test to the common app.
- Fix label display for resolved smart links when not using a dynamic label.
- Only show smart link resolution errors to the user with the smart link edit
permission.
* Intercept document list view exception and display them as an error message.
- Intercept document list view exception and display them as an error message.
3.1.1 (2018-09-18)
==================
* CSS tweak to make sure the AJAX spinner stays in place.
* Fix 90, 180 and 270 degrees rotation transformations.
- CSS tweak to make sure the AJAX spinner stays in place.
- Fix 90, 180 and 270 degrees rotation transformations.
3.1 (2018-09-17)
================

View File

@@ -283,7 +283,7 @@ test-with-docker-frontend:
./manage.py runserver --settings=mayan.settings.staging.docker
test-with-docker-worker:
./manage.py celery worker --settings=mayan.settings.staging.docker -B -l INFO -O fair
./manage.py celery worker --settings=mayan.settings.staging.docker -B -l INFO
docker-mysql-on:
docker run -d --name mysql -p 3306:3306 -e MYSQL_ALLOW_EMPTY_PASSWORD=True -e MYSQL_DATABASE=mayan_edms mysql

View File

@@ -18,7 +18,7 @@ sudo apt-get -qq update
sudo apt-get -y upgrade
echo -e "\n -> Installing core binaries \n"
sudo apt-get -y install git-core python-virtualenv gcc python-dev libjpeg-dev libpng-dev libtiff-dev tesseract-ocr poppler-utils libreoffice
sudo apt-get -y install exiftool git-core python-virtualenv gcc python-dev libjpeg-dev libpng-dev libtiff-dev tesseract-ocr poppler-utils libreoffice
echo -e "\n -> Cloning development branch of repository \n"
git clone /mayan-edms-repository/ $INSTALLATION_DIRECTORY

View File

@@ -1452,8 +1452,8 @@ cat > /etc/supervisor/conf.d/mayan.conf <<EOF
[supervisord]
environment=
MAYAN_ALLOWED_HOSTS="*", # Allow access to other network hosts other than localhost
MAYAN_CELERY_BROKER_URL="redis://127.0.0.1:6379/0",
MAYAN_CELERY_RESULT_BACKEND="redis://127.0.0.1:6379/0",
MAYAN_BROKER_URL="redis://127.0.0.1:6379/0",
PYTHONPATH=${MAYAN_INSTALLATION_FOLDER}/lib/python2.7/site-packages:$MAYAN_MEDIA_ROOT,
MAYAN_DATABASE_ENGINE=django.db.backends.postgresql,
MAYAN_DATABASE_HOST=127.0.0.1,
@@ -1473,7 +1473,7 @@ user = mayan
[program:mayan-worker-fast]
autorestart = true
autostart = true
command = nice -n 1 ${MAYAN_BIN} celery worker -Ofair -l ERROR -Q converter -n mayan-worker-fast.%%h --concurrency=1
command = nice -n 1 ${MAYAN_BIN} celery worker -l ERROR -Q converter -n mayan-worker-fast.%%h --concurrency=1
killasgroup = true
numprocs = 1
priority = 998
@@ -1484,7 +1484,7 @@ user = mayan
[program:mayan-worker-medium]
autorestart = true
autostart = true
command = nice -n 18 ${MAYAN_BIN} celery worker -Ofair -l ERROR -Q checkouts_periodic,documents_periodic,indexing,metadata,sources,sources_periodic,uploads,documents -n mayan-worker-medium.%%h --concurrency=1
command = nice -n 18 ${MAYAN_BIN} celery worker -l ERROR -Q checkouts_periodic,documents_periodic,indexing,metadata,sources,sources_periodic,uploads,documents -n mayan-worker-medium.%%h --concurrency=1
killasgroup = true
numprocs = 1
priority = 998
@@ -1495,7 +1495,7 @@ user = mayan
[program:mayan-worker-slow]
autorestart = true
autostart = true
command = nice -n 19 ${MAYAN_BIN} celery worker -Ofair -l ERROR -Q mailing,tools,statistics,parsing,ocr -n mayan-worker-slow.%%h --concurrency=1
command = nice -n 19 ${MAYAN_BIN} celery worker -l ERROR -Q mailing,tools,statistics,parsing,ocr -n mayan-worker-slow.%%h --concurrency=1
killasgroup = true
numprocs = 1
priority = 998

View File

@@ -20,7 +20,7 @@ apt-get -qq update
apt-get -y upgrade
echo -e "\n -> Installing core binaries \n"
apt-get install nginx supervisor redis-server postgresql libpq-dev libjpeg-dev libmagic1 libpng-dev libreoffice libtiff-dev gcc ghostscript gpgv python-dev python-virtualenv tesseract-ocr poppler-utils -y
apt-get install exiftool nginx supervisor redis-server postgresql libpq-dev libjpeg-dev libmagic1 libpng-dev libreoffice libtiff-dev gcc ghostscript gpgv python-dev python-virtualenv tesseract-ocr poppler-utils -y
echo -e "\n -> Setting up virtualenv \n"
rm -f ${INSTALLATION_DIRECTORY}
@@ -133,7 +133,7 @@ EOF
echo -e "\n -> Creating the supervisor file for the Celery worker, /etc/supervisor/conf.d/mayan-celery.conf \n"
cat > /etc/supervisor/conf.d/mayan-celery.conf << EOF
[program:mayan-worker]
command = ${INSTALLATION_DIRECTORY}bin/python ${INSTALLATION_DIRECTORY}bin/mayan-edms.py celery --settings=mayan.settings.production worker -Ofair -l ERROR
command = ${INSTALLATION_DIRECTORY}bin/python ${INSTALLATION_DIRECTORY}bin/mayan-edms.py celery --settings=mayan.settings.production worker -l ERROR
directory = ${INSTALLATION_DIRECTORY}
user = www-data
stdout_logfile = /var/log/mayan/worker-stdout.log

View File

@@ -9,13 +9,14 @@ import sh
APP_LIST = (
'acls', 'appearance', 'authentication', 'cabinets', 'checkouts', 'common',
'converter', 'django_gpg', 'document_comments', 'document_indexing',
'document_parsing', 'document_signatures', 'document_states', 'documents',
'dynamic_search', 'events', 'linking', 'lock_manager', 'mayan_statistics',
'mailer', 'metadata', 'mirroring', 'motd', 'navigation', 'ocr', 'permissions',
'rest_api', 'smart_settings', 'sources', 'storage', 'tags', 'task_manager',
'user_management'
'acls', 'appearance', 'authentication', 'autoadmin', 'cabinets',
'checkouts', 'common', 'converter', 'dashboards', 'django_gpg',
'document_comments', 'document_indexing', 'document_parsing',
'document_signatures', 'document_states', 'documents', 'dynamic_search',
'events', 'file_caching', 'linking', 'lock_manager', 'mayan_statistics',
'mailer', 'metadata', 'mirroring', 'motd', 'navigation', 'ocr',
'permissions', 'rest_api', 'smart_settings', 'sources', 'storage',
'tags', 'task_manager', 'user_management'
)
LANGUAGE_LIST = (

View File

@@ -21,6 +21,7 @@ RUN if [ "${APT_PROXY}" ]; then echo "Acquire::http { Proxy \"http://${APT_PROXY
# Install base Ubuntu libraries
RUN apt-get update && \
apt-get install -y --no-install-recommends \
exiftool \
g++ \
gcc \
ghostscript \

View File

@@ -126,13 +126,13 @@ Defaults to `None`. This optional environment variable is used to set the hostna
Defaults to `None`. This optional environment variable is used to set the port number to use when connecting to the database. An empty string means the default port. Not used with SQLite. For more information read the pertinent Django documentation page: [Settings, PORT](https://docs.djangoproject.com/en/1.11/ref/settings/#port)
### `MAYAN_BROKER_URL`
### `MAYAN_CELERY_BROKER_URL`
Defaults to 'redis://127.0.0.1:6379/0'. This optional environment variable is determines the broker that Celery will use to relay task messages between the frontend code and the background workers. For more information read the pertinent Celery Kombu documentation page: [Broker URL](http://kombu.readthedocs.io/en/latest/userguide/connections.html#connection-urls)
This Docker image supports using Redis and RabbitMQ as brokers.
Caveat: If the `MAYAN_BROKER_URL` and `MAYAN_CELERY_RESULT_BACKEND` environment variables are specified, the built-in Redis server inside the container will be disabled.
Caveat: If the `MAYAN_CELERY_BROKER_URL` and `MAYAN_CELERY_RESULT_BACKEND` environment variables are specified, the built-in Redis server inside the container will be disabled.
### `MAYAN_CELERY_RESULT_BACKEND`
@@ -140,7 +140,7 @@ Defaults to 'redis://127.0.0.1:6379/0'. This optional environment variable is de
This Docker image supports using Redis and RabbitMQ as result backends.
Caveat: If the `MAYAN_BROKER_URL` and `MAYAN_CELERY_RESULT_BACKEND` environment variables are specified, the built-in Redis server inside the container will be disabled.
Caveat: If the `MAYAN_CELERY_BROKER_URL` and `MAYAN_CELERY_RESULT_BACKEND` environment variables are specified, the built-in Redis server inside the container will be disabled.
### `MAYAN_NGINX_CLIENT_MAX_BODY_SIZE`

View File

@@ -126,13 +126,13 @@ Defaults to `None`. This optional environment variable is used to set the hostna
Defaults to `None`. This optional environment variable is used to set the port number to use when connecting to the database. An empty string means the default port. Not used with SQLite. For more information read the pertinent Django documentation page: [Settings, PORT](https://docs.djangoproject.com/en/1.11/ref/settings/#port)
### `MAYAN_BROKER_URL`
### `MAYAN_CELERY_BROKER_URL`
Defaults to 'redis://127.0.0.1:6379/0'. This optional environment variable is determines the broker that Celery will use to relay task messages between the frontend code and the background workers. For more information read the pertinent Celery Kombu documentation page: [Broker URL](http://kombu.readthedocs.io/en/latest/userguide/connections.html#connection-urls)
This Docker image supports using Redis and RabbitMQ as brokers.
Caveat: If the `MAYAN_BROKER_URL` and `MAYAN_CELERY_RESULT_BACKEND` environment variables are specified, the built-in Redis server inside the container will be disabled.
Caveat: If the `MAYAN_CELERY_BROKER_URL` and `MAYAN_CELERY_RESULT_BACKEND` environment variables are specified, the built-in Redis server inside the container will be disabled.
### `MAYAN_CELERY_RESULT_BACKEND`
@@ -140,7 +140,7 @@ Defaults to 'redis://127.0.0.1:6379/0'. This optional environment variable is de
This Docker image supports using Redis and RabbitMQ as result backends.
Caveat: If the `MAYAN_BROKER_URL` and `MAYAN_CELERY_RESULT_BACKEND` environment variables are specified, the built-in Redis server inside the container will be disabled.
Caveat: If the `MAYAN_CELERY_BROKER_URL` and `MAYAN_CELERY_RESULT_BACKEND` environment variables are specified, the built-in Redis server inside the container will be disabled.
### `MAYAN_NGINX_CLIENT_MAX_BODY_SIZE`

View File

@@ -59,7 +59,7 @@ services:
results:
condition: service_healthy
environment:
MAYAN_BROKER_URL: amqp://mayan:mayan@broker:5672/mayan
MAYAN_CELERY_BROKER_URL: amqp://mayan:mayan@broker:5672/mayan
MAYAN_CELERY_RESULT_BACKEND: redis://results:6379/0
MAYAN_DATABASE_ENGINE: django.db.backends.postgresql
MAYAN_DATABASE_HOST: db

View File

@@ -45,7 +45,7 @@ services:
results:
condition: service_healthy
environment:
MAYAN_BROKER_URL: amqp://mayan:mayan@broker:5672/mayan
MAYAN_CELERY_BROKER_URL: amqp://mayan:mayan@broker:5672/mayan
MAYAN_CELERY_RESULT_BACKEND: redis://results:6379/0
MAYAN_DATABASE_ENGINE: django.db.backends.postgresql
MAYAN_DATABASE_HOST: db

View File

@@ -6,12 +6,12 @@ INSTALL_FLAG=/var/lib/mayan/system/SECRET_KEY
CONCURRENCY_ARGUMENT=--concurrency=
export DOCKER_ROOT=/opt/mayan-edms
export MAYAN_DEFAULT_BROKER_URL=redis://127.0.0.1:6379/0
export MAYAN_DEFAULT_CELERY_BROKER_URL=redis://127.0.0.1:6379/0
export MAYAN_DEFAULT_CELERY_RESULT_BACKEND=redis://127.0.0.1:6379/0
export MAYAN_ALLOWED_HOSTS='["*"]'
export MAYAN_BIN=/opt/mayan-edms/bin/mayan-edms.py
export MAYAN_BROKER_URL=${MAYAN_BROKER_URL:-${MAYAN_DEFAULT_BROKER_URL}}
export MAYAN_CELERY_BROKER_URL=${MAYAN_CELERY_BROKER_URL:-${MAYAN_DEFAULT_CELERY_BROKER_URL}}
export MAYAN_CELERY_RESULT_BACKEND=${MAYAN_CELERY_RESULT_BACKEND:-${MAYAN_DEFAULT_CELERY_RESULT_BACKEND}}
export MAYAN_INSTALL_DIR=/opt/mayan-edms
export MAYAN_PYTHON_BIN_DIR=/opt/mayan-edms/bin/

View File

@@ -12,7 +12,7 @@ user = mayan
[program:redis]
autorestart = false
autostart = true
command = /bin/bash -c "if [ ${MAYAN_BROKER_URL} == ${MAYAN_DEFAULT_BROKER_URL} ] && [ ${MAYAN_CELERY_RESULT_BACKEND} == ${MAYAN_DEFAULT_CELERY_RESULT_BACKEND} ];then /usr/bin/redis-server /etc/redis/;fi"
command = /bin/bash -c "if [ ${MAYAN_CELERY_BROKER_URL} == ${MAYAN_DEFAULT_BROKER_URL} ] && [ ${MAYAN_CELERY_RESULT_BACKEND} == ${MAYAN_DEFAULT_CELERY_RESULT_BACKEND} ];then /usr/bin/redis-server /etc/redis/;fi"
stderr_logfile = /dev/fd/2
stderr_logfile_maxbytes = 0
stdout_logfile = /dev/fd/1
@@ -22,7 +22,7 @@ user = root
[program:mayan-worker-fast]
autorestart = false
autostart = true
command = nice -n 1 /bin/bash -c "${MAYAN_BIN} celery --settings=${MAYAN_SETTINGS_MODULE} worker -Ofair -l ERROR -Q converter,sources_fast -n mayan-worker-fast.%%h ${MAYAN_WORKER_FAST_CONCURRENCY}"
command = nice -n 1 /bin/bash -c "${MAYAN_BIN} celery --settings=${MAYAN_SETTINGS_MODULE} worker -l ERROR -Q converter,document_states_fast,sources_fast -n mayan-worker-fast.%%h ${MAYAN_WORKER_FAST_CONCURRENCY}"
killasgroup = true
numprocs = 1
priority = 998
@@ -37,7 +37,7 @@ user = mayan
[program:mayan-worker-medium]
autorestart = false
autostart = true
command = nice -n 18 /bin/bash -c "${MAYAN_BIN} celery --settings=${MAYAN_SETTINGS_MODULE} worker -Ofair -l ERROR -Q checkouts_periodic,documents_periodic,indexing,metadata,sources,sources_periodic,uploads,documents -n mayan-worker-medium.%%h ${MAYAN_WORKER_MEDIUM_CONCURRENCY}"
command = nice -n 18 /bin/bash -c "${MAYAN_BIN} celery --settings=${MAYAN_SETTINGS_MODULE} worker -l ERROR -Q checkouts_periodic,documents_periodic,indexing,metadata,sources,sources_periodic,uploads,documents -n mayan-worker-medium.%%h ${MAYAN_WORKER_MEDIUM_CONCURRENCY}"
killasgroup = true
numprocs = 1
priority = 998
@@ -52,7 +52,7 @@ user = mayan
[program:mayan-worker-slow]
autorestart = false
autostart = true
command = nice -n 19 /bin/bash -c "${MAYAN_BIN} celery --settings=${MAYAN_SETTINGS_MODULE} worker -Ofair -l ERROR -Q mailing,tools,statistics,parsing,ocr -n mayan-worker-slow.%%h ${MAYAN_WORKER_SLOW_CONCURRENCY}"
command = nice -n 19 /bin/bash -c "${MAYAN_BIN} celery --settings=${MAYAN_SETTINGS_MODULE} worker -l ERROR -Q mailing,tools,statistics,parsing,ocr -n mayan-worker-slow.%%h ${MAYAN_WORKER_SLOW_CONCURRENCY}"
killasgroup = true
numprocs = 1
priority = 998

View File

@@ -136,8 +136,8 @@ Views
The module common.generics provides custom generic class based views to be used.
The basic views used to create, edit, view and delete objects in Mayan EDMS
are: SingleObjectCreateView, SingleObjectDetailView, SingleObjectEditView,
and SingleObjectListView
are: ``SingleObjectCreateView``, ``SingleObjectDetailView``,
``SingleObjectEditView``, and ``SingleObjectListView``.
These views handle aspects relating to view permissions, object permissions,
post action redirection and template context generation.

View File

@@ -21,10 +21,10 @@ Binary dependencies
If using a Debian_ or Ubuntu_ based Linux distribution, get the executable
requirements using::
sudo apt-get install g++ gcc ghostscript gnupg1 graphviz libfuse2 \
libjpeg-dev libmagic1 libpq-dev libpng-dev libreoffice libtiff-dev \
poppler-utils postgresql python-dev python-virtualenv redis-server \
sane-utils supervisor tesseract-ocr zlib1g-dev -y
sudo apt-get install exiftool g++ gcc ghostscript gnupg1 graphviz \
libfuse2 libjpeg-dev libmagic1 libpq-dev libpng-dev libreoffice \
libtiff-dev poppler-utils postgresql python-dev python-virtualenv \
redis-server sane-utils supervisor tesseract-ocr zlib1g-dev -y
Create an user account for the installation:
--------------------------------------------
@@ -73,9 +73,8 @@ Initialize the project:
-----------------------
::
sudo -u mayan MAYAN_DATABASE_ENGINE=django.db.backends.postgresql MAYAN_DATABASE_NAME=mayan \
MAYAN_DATABASE_PASSWORD=mayanuserpass MAYAN_DATABASE_USER=mayan \
MAYAN_DATABASE_HOST=127.0.0.1 MAYAN_MEDIA_ROOT=/opt/mayan-edms/media \
sudo -u mayan MAYAN_DATABASES='{default: {ENGINE: django.db.backends.postgresql, NAME: mayan, PASSWORD: mayanuserpass, USER: mayan, HOST=127.0.0.1}}' \
MAYAN_MEDIA_ROOT=/opt/mayan-edms/media \
/opt/mayan-edms/bin/mayan-edms.py initialsetup
Collect the static files:
@@ -92,16 +91,11 @@ Create the supervisor file at ``/etc/supervisor/conf.d/mayan.conf``:
[supervisord]
environment=
MAYAN_ALLOWED_HOSTS='["*"]', # Allow access to other network hosts other than localhost
MAYAN_CELERY_BROKER_URL="redis://127.0.0.1:6379/0",
MAYAN_CELERY_RESULT_BACKEND="redis://127.0.0.1:6379/0",
MAYAN_BROKER_URL="redis://127.0.0.1:6379/0",
PYTHONPATH=/opt/mayan-edms/lib/python2.7/site-packages:/opt/mayan-edms/data,
MAYAN_MEDIA_ROOT=/opt/mayan-edms/media,
MAYAN_DATABASE_ENGINE=django.db.backends.postgresql,
MAYAN_DATABASE_HOST=127.0.0.1,
MAYAN_DATABASE_NAME=mayan,
MAYAN_DATABASE_PASSWORD=mayanuserpass,
MAYAN_DATABASE_USER=mayan,
MAYAN_DATABASE_CONN_MAX_AGE=60,
MAYAN_DATABASES='{default: {ENGINE: django.db.backends.postgresql, HOST: 127.0.0.1, NAME: mayan, PASSWORD: mayanuserpass, USER: mayan, CONN_MAX_AGE: 60}}',
DJANGO_SETTINGS_MODULE=mayan.settings.production
[program:mayan-gunicorn]
@@ -113,7 +107,7 @@ Create the supervisor file at ``/etc/supervisor/conf.d/mayan.conf``:
[program:mayan-worker-fast]
autorestart = true
autostart = true
command = nice -n 1 /opt/mayan-edms/bin/mayan-edms.py celery worker -Ofair -l ERROR -Q converter,sources_fast -n mayan-worker-fast.%%h --concurrency=1
command = nice -n 1 /opt/mayan-edms/bin/mayan-edms.py celery worker -l ERROR -Q converter,document_states_fast,sources_fast -n mayan-worker-fast.%%h --concurrency=1
killasgroup = true
numprocs = 1
priority = 998
@@ -124,7 +118,7 @@ Create the supervisor file at ``/etc/supervisor/conf.d/mayan.conf``:
[program:mayan-worker-medium]
autorestart = true
autostart = true
command = nice -n 18 /opt/mayan-edms/bin/mayan-edms.py celery worker -Ofair -l ERROR -Q checkouts_periodic,documents_periodic,indexing,metadata,sources,sources_periodic,uploads,documents -n mayan-worker-medium.%%h --concurrency=1
command = nice -n 18 /opt/mayan-edms/bin/mayan-edms.py celery worker -l ERROR -Q checkouts_periodic,documents_periodic,indexing,metadata,sources,sources_periodic,uploads,documents -n mayan-worker-medium.%%h --concurrency=1
killasgroup = true
numprocs = 1
priority = 998
@@ -135,7 +129,7 @@ Create the supervisor file at ``/etc/supervisor/conf.d/mayan.conf``:
[program:mayan-worker-slow]
autorestart = true
autostart = true
command = nice -n 19 /opt/mayan-edms/bin/mayan-edms.py celery worker -Ofair -l ERROR -Q mailing,tools,statistics,parsing,ocr -n mayan-worker-slow.%%h --concurrency=1
command = nice -n 19 /opt/mayan-edms/bin/mayan-edms.py celery worker -l ERROR -Q mailing,tools,statistics,parsing,ocr -n mayan-worker-slow.%%h --concurrency=1
killasgroup = true
numprocs = 1
priority = 998
@@ -188,10 +182,11 @@ Binary dependencies
If using a Debian_ or Ubuntu_ based Linux distribution, get the executable
requirements using::
sudo apt-get install g++ gcc ghostscript gnupg1 graphviz libfuse2 \
libjpeg-dev libmagic1 libpq-dev libpng-dev libreoffice libtiff-dev \
poppler-utils postgresql python-dev python-virtualenv rabbitmq-server \
redis-server sane-utils supervisor tesseract-ocr zlib1g-dev -y
sudo apt-get install exiftool g++ gcc ghostscript gnupg1 graphviz \
libfuse2 libjpeg-dev libmagic1 libpq-dev libpng-dev libreoffice \
libtiff-dev poppler-utils postgresql python-dev python-virtualenv \
rabbitmq-server redis-server sane-utils supervisor tesseract-ocr \
zlib1g-dev -y
Create an user account for the installation:
--------------------------------------------
@@ -240,9 +235,8 @@ Initialize the project:
-----------------------
::
sudo -u mayan MAYAN_DATABASE_ENGINE=django.db.backends.postgresql MAYAN_DATABASE_NAME=mayan \
MAYAN_DATABASE_PASSWORD=mayanuserpass MAYAN_DATABASE_USER=mayan \
MAYAN_DATABASE_HOST=127.0.0.1 MAYAN_MEDIA_ROOT=/opt/mayan-edms/media \
sudo -u mayan MAYAN_DATABASES='{default: {ENGINE: django.db.backends.postgresql, NAME: mayan, PASSWORD: mayanuserpass, USER: mayan, HOST=127.0.0.1}}' \
MAYAN_MEDIA_ROOT=/opt/mayan-edms/media \
/opt/mayan-edms/bin/mayan-edms.py initialsetup
Collect the static files:
@@ -267,16 +261,11 @@ Create the supervisor file at ``/etc/supervisor/conf.d/mayan.conf``:
[supervisord]
environment=
MAYAN_ALLOWED_HOSTS='["*"]', # Allow access to other network hosts other than localhost
MAYAN_CELERY_BROKER_URL="amqp://mayan:mayanrabbitmqpassword@localhost:5672/mayan",
MAYAN_CELERY_RESULT_BACKEND="redis://127.0.0.1:6379/0",
MAYAN_BROKER_URL="amqp://mayan:mayanrabbitmqpassword@localhost:5672/mayan",
PYTHONPATH=/opt/mayan-edms/lib/python2.7/site-packages:/opt/mayan-edms/data,
MAYAN_MEDIA_ROOT=/opt/mayan-edms/media,
MAYAN_DATABASE_ENGINE=django.db.backends.postgresql,
MAYAN_DATABASE_HOST=127.0.0.1,
MAYAN_DATABASE_NAME=mayan,
MAYAN_DATABASE_PASSWORD=mayanuserpass,
MAYAN_DATABASE_USER=mayan,
MAYAN_DATABASE_CONN_MAX_AGE=360,
MAYAN_DATABASES='{default: {ENGINE: django.db.backends.postgresql, HOST: 127.0.0.1, NAME: mayan, PASSWORD: mayanuserpass, USER: mayan, CONN_MAX_AGE: 60}}',
DJANGO_SETTINGS_MODULE=mayan.settings.production
[program:mayan-gunicorn]
@@ -288,7 +277,7 @@ Create the supervisor file at ``/etc/supervisor/conf.d/mayan.conf``:
[program:mayan-worker-fast]
autorestart = true
autostart = true
command = nice -n 1 /opt/mayan-edms/bin/mayan-edms.py celery worker -Ofair -l ERROR -Q converter,sources_fast -n mayan-worker-fast.%%h
command = nice -n 1 /opt/mayan-edms/bin/mayan-edms.py celery worker -l ERROR -Q converter,document_states_fast,sources_fast -n mayan-worker-fast.%%h
killasgroup = true
numprocs = 1
priority = 998
@@ -299,7 +288,7 @@ Create the supervisor file at ``/etc/supervisor/conf.d/mayan.conf``:
[program:mayan-worker-medium]
autorestart = true
autostart = true
command = nice -n 18 /opt/mayan-edms/bin/mayan-edms.py celery worker -Ofair -l ERROR -Q checkouts_periodic,documents_periodic,indexing,metadata,sources,sources_periodic,uploads,documents -n mayan-worker-medium.%%h --concurrency=1
command = nice -n 18 /opt/mayan-edms/bin/mayan-edms.py celery worker -l ERROR -Q checkouts_periodic,documents_periodic,indexing,metadata,sources,sources_periodic,uploads,documents -n mayan-worker-medium.%%h --concurrency=1
killasgroup = true
numprocs = 1
priority = 998
@@ -310,7 +299,7 @@ Create the supervisor file at ``/etc/supervisor/conf.d/mayan.conf``:
[program:mayan-worker-slow]
autorestart = true
autostart = true
command = nice -n 19 /opt/mayan-edms/bin/mayan-edms.py celery worker -Ofair -l ERROR -Q mailing,tools,statistics,parsing,ocr -n mayan-worker-slow.%%h --concurrency=1
command = nice -n 19 /opt/mayan-edms/bin/mayan-edms.py celery worker -l ERROR -Q mailing,tools,statistics,parsing,ocr -n mayan-worker-slow.%%h --concurrency=1
killasgroup = true
numprocs = 1
priority = 998
@@ -345,6 +334,36 @@ Enable and restart the services [1_]:
systemctl enable supervisor
systemctl restart supervisor
Troubleshooting
===============
- Due to OS differences some binaries might reside in different locations.
Use environment variables or the configuration file to tell Mayan EDMS where
to file these binaries.
Example: OpenBSD. Add the following entries to supervisor configuration files.
::
MAYAN_DOCUMENT_PARSING_PDFTOTEXT_PATH=/usr/local/bin/pdftotext,
MAYAN_SIGNATURES_GPG_PATH=/usr/local/bin/gpg,
MAYAN_SOURCES_SCANIMAGE_PATH: /usr/local/bin/scanimage,
Alternatively a symlink from the actual binary location to where Mayan
EDMS is expecting them to be found by default also works for some users::
ln -s /usr/local/bin/gpg /usr/bin/gpg1
Example 2: Ubuntu 16.04. Add the following entries to supervisor
configuration files.
::
MAYAN_SIGNATURES_GPG_PATH=/usr/bin/gpg1,
Or add a symlink::
ln -s /usr/bin/gpg /usr/bin/gpg1
[1]: https://bugs.launchpad.net/ubuntu/+source/supervisor/+bug/1594740
.. _Debian: https://www.debian.org/

View File

@@ -447,13 +447,28 @@ Version numbering
=================
Mayan EDMS uses the Semantic Versioning (http://semver.org/) method to choose
version numbers along with Python's PEP-0440 (https://www.python.org/dev/peps/pep-0440/)
to format them.
version numbers along with Python's PEP-0440
(https://www.python.org/dev/peps/pep-0440/) to format them.
X.YaN # Alpha release
X.YbN # Beta release
X.YrcN # Release Candidate
X.Y # Final release
+----------------+-------------------+-----------------------------------------+
| Version number | Name | Description |
+================+===================+=========================================+
| X.YalphaN | Alpha release | Usable but unstable, API changes. |
+----------------+-------------------+-----------------------------------------+
| X.YbetaN | Beta release | Code is frozen, testing. |
+----------------+-------------------+-----------------------------------------+
| X.YrcN | Release Candidate | Almost ready for production, not major |
| | | changes between this version and the |
| | | final release. |
+----------------+-------------------+-----------------------------------------+
| X.Y | Final release | API changes, many backward incompatible |
| | | changes. |
+----------------+-------------------+-----------------------------------------+
| X.Y+1 | Minor release | Minor changes, minor backwards |
| | | incompatible changes |
+----------------+-------------------+-----------------------------------------+
| X.Y.Z | Micro release | Minor changes, bugfixes. |
+----------------+-------------------+-----------------------------------------+
Release checklist

View File

@@ -1,118 +1,10 @@
============
************
Docker image
============
************
How to use this image
=====================
.. _docker_install:
Start a Mayan EDMS image
------------------------
With Docker properly installed, proceed to download the Mayan EDMS image using the command::
docker pull mayanedms/mayanedms:<version>
Then download version 9.5 of the Docker PostgreSQL image::
docker pull postgres:9.5
Create and run a PostgreSQL container::
docker run -d \
--name mayan-edms-postgres \
--restart=always \
-p 5432:5432 \
-e POSTGRES_USER=mayan \
-e POSTGRES_DB=mayan \
-e POSTGRES_PASSWORD=mayanuserpass \
-v /docker-volumes/mayan-edms/postgres:/var/lib/postgresql/data \
-d postgres:9.5
The PostgreSQL container will have one database named ``mayan``, with an user
named ``mayan`` too, with a password of ``mayanuserpass``. The container will
expose its internal 5432 port (PostgreSQL's default port) via the host's
5432 port. The data of this container will reside on the host's
``/docker-volumes/mayan-edms/postgres`` folder.
Finally create and run a Mayan EDMS container. Change <version> with the
latest version in numeric form (example: 2.7.3) or use the ``latest``
identifier::
docker run -d \
--name mayan-edms \
--restart=always \
-p 80:8000 \
-e MAYAN_DATABASE_ENGINE=django.db.backends.postgresql \
-e MAYAN_DATABASE_HOST=172.17.0.1 \
-e MAYAN_DATABASE_NAME=mayan \
-e MAYAN_DATABASE_PASSWORD=mayanuserpass \
-e MAYAN_DATABASE_USER=mayan \
-e MAYAN_DATABASE_CONN_MAX_AGE=60 \
-v /docker-volumes/mayan-edms/media:/var/lib/mayan \
mayanedms/mayanedms:<version>
The Mayan EDMS container will connect to the PostgreSQL container via the
``172.17.0.1`` IP address (the Docker host's default IP address). It will
connect using the ``django.db.backends.postgresql`` database driver and
connect to the ``mayan`` database using the ``mayan`` user with the password
``mayanuserpass``. The container will keep connections to the database
for up to 60 seconds in an attempt to reuse them increasing response time
and reducing memory usage. The files of the container will be store in the
host's ``/docker-volumes/mayan-edms/media`` folder. The container will
expose its web service running on port 8000 on the host's port 80.
The container will be available by browsing to ``http://localhost`` or to
the IP address of the computer running the container.
If another web server is running on port 80 use a different port in the
``-p`` option. For example: ``-p 81:8000``.
Using a dedicated Docker network
--------------------------------
Use this method to avoid having to expose PostreSQL port to the host's network
or if you have other PostgreSQL instances but still want to use the default
port of 5432 for this installation.
Create the network::
docker network create mayan
Launch the PostgreSQL container with the network option and remove the port
binding (``-p 5432:5432``)::
docker run -d \
--name mayan-edms-postgres \
--network=mayan \
--restart=always \
-e POSTGRES_USER=mayan \
-e POSTGRES_DB=mayan \
-e POSTGRES_PASSWORD=mayanuserpass \
-v /docker-volumes/mayan-edms/postgres:/var/lib/postgresql/data \
-d postgres:9.5
Launch the Mayan EDMS container with the network option and change the
database hostname to the PostgreSQL container name (``mayan-edms-postgres``)
instead of the IP address of the Docker host (``172.17.0.1``)::
docker run -d \
--name mayan-edms \
--network=mayan \
--restart=always \
-p 80:8000 \
-e MAYAN_DATABASE_ENGINE=django.db.backends.postgresql \
-e MAYAN_DATABASE_HOST=mayan-edms-postgres \
-e MAYAN_DATABASE_NAME=mayan \
-e MAYAN_DATABASE_PASSWORD=mayanuserpass \
-e MAYAN_DATABASE_USER=mayan \
-e MAYAN_DATABASE_CONN_MAX_AGE=60 \
-v /docker-volumes/mayan-edms/media:/var/lib/mayan \
mayanedms/mayanedms:<version>
Stopping and starting the container
-----------------------------------
===================================
To stop the container use::
@@ -127,9 +19,11 @@ To start the container again::
.. _docker_environment_variables:
Environment Variables
---------------------
=====================
The Mayan EDMS image can be configure via environment variables.
In addition to the all the environment variables supported by Mayan EDMS, the
Mayan EDMS image provides some additional variables to configure the Docker
specifics of the image.
``MAYAN_DATABASE_ENGINE``
@@ -145,27 +39,6 @@ When using the SQLite backend, the database file will be saved in the Docker
volume. The SQLite database as used by Mayan EDMS is meant only for development
or testing, never use it in production.
``MAYAN_DATABASE_NAME``
Defaults to 'mayan'. This optional environment variable can be used to define
the database name that Mayan EDMS will connect to. For more information read
the pertinent Django documentation page:
:django-docs:`Connecting to the database <ref/databases/#connecting-to-the-database>`
``MAYAN_DATABASE_USER``
Defaults to 'mayan'. This optional environment variable is used to set the
username that will be used to connect to the database. For more information
read the pertinent Django documentation page:
:django-docs:`Settings, USER <ref/settings/#user>`
``MAYAN_DATABASE_PASSWORD``
Defaults to ''. This optional environment variable is used to set the
password that will be used to connect to the database. For more information
read the pertinent Django documentation page:
:django-docs:`Settings, PASSWORD <ref/settings/#password>`
``MAYAN_DATABASE_HOST``
Defaults to `None`. This optional environment variable is used to set the
@@ -182,7 +55,7 @@ the default port. Not used with SQLite. For more information read the
pertinent Django documentation page:
:django-docs:`Settings, PORT <ref/settings/#port>`
``MAYAN_BROKER_URL``
``MAYAN_CELERY_BROKER_URL``
This optional environment variable determines the broker that Celery will use
to relay task messages between the frontend code and the background workers.
@@ -192,7 +65,7 @@ For more information read the pertinent Celery Kombu documentation page: `Broker
This Docker image supports using Redis and RabbitMQ as brokers.
Caveat: If the `MAYAN_BROKER_URL` and `MAYAN_CELERY_RESULT_BACKEND` environment
Caveat: If the `MAYAN_CELERY_BROKER_URL` and `MAYAN_CELERY_RESULT_BACKEND` environment
variables are specified, the built-in Redis server inside the container will
be disabled.
@@ -207,7 +80,7 @@ code. For more information read the pertinent Celery Kombu documentation page:
This Docker image supports using Redis and RabbitMQ as result backends.
Caveat: If the `MAYAN_BROKER_URL` and `MAYAN_CELERY_RESULT_BACKEND` environment
Caveat: If the `MAYAN_CELERY_BROKER_URL` and `MAYAN_CELERY_RESULT_BACKEND` environment
variables are specified, the built-in Redis server inside the container will
be disabled.
@@ -215,12 +88,6 @@ be disabled.
Optional. Allows loading an alternate settings file.
``MAYAN_DATABASE_CONN_MAX_AGE``
Amount in seconds to keep a database connection alive. Allow reuse of database
connections. For more information read the pertinent Django documentation
page: :django-docs:`Settings, CONN_MAX_AGE <ref/settings/#conn-max-age>`
``MAYAN_GUNICORN_WORKERS``
Optional. This environment variable controls the number of frontend workers
@@ -252,6 +119,7 @@ category. Default is 1. Use 0 to disable hardcoded concurrency and allow the
Celery worker to launch its default number of child processes (equal to the
number of CPUs detected).
Accessing outside data
======================
@@ -297,6 +165,7 @@ too need to be backed up using their respective procedures. A simple solution
is to copy the entire database container volume after the container has
been stopped.
Restoring from a backup
=======================
@@ -304,6 +173,7 @@ Uncompress the backup archive in the original docker volume using::
sudo tar -xvzf backup.tar.gz -C /
Upgrading
=========
@@ -333,6 +203,7 @@ Start the container again with the new image version::
docker run -d --name mayan-edms --restart=always -p 80:8000 -v /docker-volumes/mayan:/var/lib/mayan mayanedms/mayanedms:latest
Building the image
==================
@@ -355,9 +226,11 @@ Or using an apt cacher to speed up the build::
Replace the IP address `172.17.0.1` with the IP address of the computer
running the APT proxy and caching service.
Customizing the image
=====================
Simple method
-------------
@@ -379,6 +252,7 @@ Specifies a list of Python packages to be installed via ``pip``. Packages will
be downloaded from the Python Package Index (https://pypi.python.org) by
default.
Using Docker compose
====================

View File

@@ -0,0 +1,109 @@
*******************
Docker installation
*******************
Docker is a system that allows running programs in isolated areas which
have restricted access to resources, devices, and memory. Docker usage also
distributing software as a single file.
Make sure Docker is properly installed and working before attempting to install
Mayan EDMS.
Docker can be installed using their automated script::
wget -qO- https://get.docker.com/ | sh
This installs the latest versions of Docker. If you don't want run an automated
script follow the instructions outlined in their documentation:
https://docs.docker.com/install/
With Docker properly installed, proceed to download the Mayan EDMS image using the command::
docker pull mayanedms/mayanedms:<version>
Then download version 9.5 of the Docker PostgreSQL image::
docker pull postgres:9.5
Create and run a PostgreSQL container::
docker run -d \
--name mayan-edms-postgres \
--restart=always \
-p 5432:5432 \
-e POSTGRES_USER=mayan \
-e POSTGRES_DB=mayan \
-e POSTGRES_PASSWORD=mayanuserpass \
-v /docker-volumes/mayan-edms/postgres:/var/lib/postgresql/data \
-d postgres:9.5
The PostgreSQL container will have one database named ``mayan``, with an user
named ``mayan`` too, with a password of ``mayanuserpass``. The container will
expose its internal 5432 port (PostgreSQL's default port) via the host's
5432 port. The data of this container will reside on the host's
``/docker-volumes/mayan-edms/postgres`` folder.
Finally create and run a Mayan EDMS container. Change <version> with the
latest version in numeric form (example: 2.7.3) or use the ``latest``
identifier::
docker run -d \
--name mayan-edms \
--restart=always \
-p 80:8000 \
-e MAYAN_DATABASES='{default: {ENGINE: django.db.backends.postgresql, HOST: 172.17.0.1, NAME: mayan, PASSWORD: mayanuserpass, USER: mayan, CONN_MAX_AGE: 60}}' \
-v /docker-volumes/mayan-edms/media:/var/lib/mayan \
mayanedms/mayanedms:<version>
The Mayan EDMS container will connect to the PostgreSQL container via the
``172.17.0.1`` IP address (the Docker host's default IP address). It will
connect using the ``django.db.backends.postgresql`` database driver and
connect to the ``mayan`` database using the ``mayan`` user with the password
``mayanuserpass``. The container will keep connections to the database
for up to 60 seconds in an attempt to reuse them increasing response time
and reducing memory usage. The files of the container will be store in the
host's ``/docker-volumes/mayan-edms/media`` folder. The container will
expose its web service running on port 8000 on the host's port 80.
The container will be available by browsing to ``http://localhost`` or to
the IP address of the computer running the container.
If another web server is running on port 80 use a different port in the
``-p`` option. For example: ``-p 81:8000``.
Using a dedicated Docker network
================================
Use this method to avoid having to expose PostreSQL port to the host's network
or if you have other PostgreSQL instances but still want to use the default
port of 5432 for this installation.
Create the network::
docker network create mayan
Launch the PostgreSQL container with the network option and remove the port
binding (``-p 5432:5432``)::
docker run -d \
--name mayan-edms-postgres \
--network=mayan \
--restart=always \
-e POSTGRES_USER=mayan \
-e POSTGRES_DB=mayan \
-e POSTGRES_PASSWORD=mayanuserpass \
-v /docker-volumes/mayan-edms/postgres:/var/lib/postgresql/data \
-d postgres:9.5
Launch the Mayan EDMS container with the network option and change the
database hostname to the PostgreSQL container name (``mayan-edms-postgres``)
instead of the IP address of the Docker host (``172.17.0.1``)::
docker run -d \
--name mayan-edms \
--network=mayan \
--restart=always \
-p 80:8000 \
-e MAYAN_DATABASES='{default: {ENGINE: django.db.backends.postgresql, HOST: mayan-edms-postgres, NAME: mayan, PASSWORD: mayanuserpass, USER: mayan, CONN_MAX_AGE: 60}}' \
-v /docker-volumes/mayan-edms/media:/var/lib/mayan \
mayanedms/mayanedms:<version>

View File

@@ -86,11 +86,11 @@ Index by OCR content
This example indexes documents in a "quarterly report" level if they have the
fragment “quarterly report” in the OCR text::
{% if "quarterly report" in document.latest_version.ocr_content|join:" "|lower %}Quarterly reports{% endif %}
{% if "quarterly report" in document.ocr_content.lower() %}Quarterly reports{% endif %}
The same applies to text content extracted for the document::
{% if "quarterly report" in document.latest_version.content|join:" "|lower %}Quarterly reports{% endif %}
{% if "quarterly report" in document.content.lower() %}Quarterly reports{% endif %}

View File

@@ -15,6 +15,7 @@ via the :ref:`configuration file <configuration_file>`.
Example::
DEFAULT_FROM_EMAIL: '<your administrator email>'
EMAIL_BACKEND: django.core.mail.backends.smtp.EmailBackend
EMAIL_HOST: '<your smtp ip address or hostname>'
EMAIL_HOST_PASSWORD: '<your smtp password>'

View File

@@ -0,0 +1,48 @@
*******************
Password validation
*******************
To help reduce the use of weak passwords, Mayan EDMS includes support for
password validators. Password validator enforce policies by rejecting
password that don't conform with the validator's logic.
By default, Mayan EDMS sets this password validation setup:
- That the password is not similar no any user attributes.
- A minimum password size of 8 characters.
- The password is not one of the 20,000 commonly used weak password.
- That the password is not entirely numeric.
This default is coded in the following manner by the default Python setup file::
AUTH_PASSWORD_VALIDATORS = [
{
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
},
]
If using the YAML configuration file the same setup would be coded in the
following manner::
AUTH_PASSWORD_VALIDATORS:
- NAME: django.contrib.auth.password_validation.UserAttributeSimilarityValidator
- NAME: django.contrib.auth.password_validation.MinimumLengthValidator
- NAME: django.contrib.auth.password_validation.CommonPasswordValidator
- NAME: django.contrib.auth.password_validation.NumericPasswordValidator
In addition to the password validators provided by Django
:django-docs:`validators provided by Django <topics/auth/passwords/#included-validators>`,
Mayan EDMS adds the following validators:
.. autoclass:: mayan.apps.authentication.validators.MinimumCapitalLettersContentValidator
.. autoclass:: mayan.apps.authentication.validators.MinimumNumberContentValidator

View File

@@ -116,11 +116,11 @@ For the Docker image, launch a separate RabbitMQ container
docker run -d --name mayan-edms-rabbitmq -e RABBITMQ_DEFAULT_USER=mayan -e RABBITMQ_DEFAULT_PASS=mayanrabbitmqpassword -e RABBITMQ_DEFAULT_VHOST=mayan rabbitmq:3
Pass the MAYAN_BROKER_URL environment variable (https://kombu.readthedocs.io/en/latest/userguide/connections.html#connection-urls)
Pass the MAYAN_CELERY_BROKER_URL environment variable (https://kombu.readthedocs.io/en/latest/userguide/connections.html#connection-urls)
to the Mayan EDMS container so that it uses the RabbitMQ container the
message broker::
-e MAYAN_BROKER_URL="amqp://mayan:mayanrabbitmqpassword@localhost:5672/mayan",
-e MAYAN_CELERY_BROKER_URL="amqp://mayan:mayanrabbitmqpassword@localhost:5672/mayan",
When tasks finish, they leave behind a return status or the result of a
calculation, these are stored for a while so that whoever requested the

View File

@@ -37,6 +37,7 @@ http://yaml.org/). Here is an example of what the looks like::
DOCUMENT_PARSING_AUTO_PARSING: true
DOCUMENT_PARSING_PDFTOTEXT_PATH: /usr/bin/pdftotext
DEFAUL_FROM_EMAIL: mayan.admin@example.com
EMAIL_BACKEND: django.core.mail.backends.smtp.EmailBackend
EMAIL_HOST: localhost
EMAIL_HOST_PASSWORD: ''

View File

@@ -15,7 +15,7 @@ The current document sources supported are:
- IMAP email - Same as the ``POP3`` email source but for email accounts using
the ``IMAP`` protocol.
- Watch folder - A filesystem folder that is scanned periodically for files.
Any file in the watch folder is automatically uploaded.
Any file found in the watch folder is uploaded and subsequently deleted.
- Staging folder - Folder where networked attached scanned can save image
files. The files in these staging folders are scanned and a preview is
generated to help the process of upload. Staging folders and Watch folders

View File

@@ -13,7 +13,8 @@ from __future__ import unicode_literals
# All configuration values have a default; values that are commented out
# serve to show the default.
import sys, os
import os
import sys
sys.path.insert(0, os.path.abspath('..'))
@@ -22,7 +23,9 @@ import mayan
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "_ext")))
sys.path.append(
os.path.abspath(os.path.join(os.path.dirname(__file__), '_ext'))
)
# -- General configuration -----------------------------------------------------
@@ -31,15 +34,14 @@ sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "_ext"))
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
#extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode']
#extensions = ["djangodocs", "sphinx.ext.intersphinx"]
extensions = [
'sphinx.ext.extlinks', 'sphinxcontrib.blockdiag', 'sphinxcontrib.spelling'
'sphinx.ext.autodoc', 'sphinx.ext.extlinks', 'sphinxcontrib.blockdiag',
'sphinxcontrib.spelling', 'sphinx.ext.viewcode'
]
blockdiag_antialias = True
blockdiag_html_image_format = "SVG"
blockdiag_latex_image_format = "PDF"
blockdiag_html_image_format = 'SVG'
blockdiag_latex_image_format = 'PDF'
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
@@ -196,8 +198,10 @@ html_show_sphinx = False
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
('index', 'MayanEDMS.tex', 'Mayan EDMS Documentation',
mayan.__author__, 'manual'),
(
'index', 'MayanEDMS.tex', 'Mayan EDMS Documentation',
mayan.__author__, 'manual'
),
]
# The name of an image file (relative to this directory) to place at the top of
@@ -223,7 +227,6 @@ latex_documents = [
# If false, no module index is generated.
# latex_domain_indices = True
# -- Options for manual page output --------------------------------------------
# One entry per manual page. List of tuples

View File

@@ -9,10 +9,10 @@ Changes
* Improve index mirroring value clean up code to remove the spaces at the
starts and at the end of directories. Closes again GitLab issue #520
Thanks to TheOneValen @ for the report.
Thanks to @TheOneValen for the report.
* Improve index mirroring cache class to use the hash of the keys
instead of the literal keys. Avoid warning about invalid key
characters. Closes GitLab issue #518. Thanks to TheOneValen @ for the
characters. Closes GitLab issue #518. Thanks to @TheOneValen for the
report.
* Only render the Template API view for authenticated users.
Thanks rgarcia for the report.

View File

@@ -12,10 +12,10 @@ Changes
* Remove duplicate YAML loading of environment variables.
* Don't load development apps if they are already loaded.
* Make sure all key used as input for the cache key hash are
bytes and not unicode. GitLab issue #520. Thanks to TheOneValen
@TheOneValen for the report.
bytes and not unicode. GitLab issue #520. Thanks to @TheOneValen for
the report.
* Ignore document stub from the index mirror. GitLab issue
#520. Thanks to TheOneValen @TheOneValen for the report.
#520. Thanks to @TheOneValen for the report.
* Fix for the Docker image INSTALL_FLAG path. Thanks to
Mark Maglana @relaxdiego for the report and to Hamish Farroq @farroq_HAM
for the patch. GitLab issue #525.

View File

@@ -8,7 +8,8 @@ Changes
-------
* Convert the furl instance to text to allow serializing it into
JSON to be passed as arguments to the background task.
JSON and be passed as arguments to the background task. Fixes
metadata assignment issues when uploading new documents.
Removals
--------

88
docs/releases/3.2.rst Normal file
View File

@@ -0,0 +1,88 @@
Version 4.0
===========
Released: XX XX, 2019
Changes
-------
Removals
--------
* Django suit
* django-environ
Upgrading from a previous version
---------------------------------
If installed via Python's PIP
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Remove deprecated requirements::
$ curl https://gitlab.com/mayan-edms/mayan-edms/raw/master/removals.txt | pip uninstall -r /dev/stdin
Type in the console::
$ pip install mayan-edms==3.2
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.
Remove deprecated requirements::
$ pip uninstall -y -r removals.txt
Next upgrade/add the new requirements::
$ pip install --upgrade -r requirements.txt
Common steps
^^^^^^^^^^^^
Perform these steps after updating the code from either step above.
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:`395` Add support to limit the size of the cache.
* :gitlab-issue:`487` gnupg1 Issue with Ubuntu 16.04 - Could not show/view documents
* :gitlab-issue:`498` Can't scan subdirectories
* :gitlab-issue:`522` Office 365 SMTP
* :gitlab-issue:`532` Workflow preview isn't updated right after transitions are modified
* :gitlab-issue:`539` Setting for default email sender is missing
.. _PyPI: https://pypi.python.org/pypi/mayan-edms/

View File

@@ -20,6 +20,7 @@ versions of the documentation contain the release notes for any later releases.
.. toctree::
:maxdepth: 1
3.2
3.1.9
3.1.8
3.1.7

View File

@@ -9,3 +9,4 @@ Administration
.. include:: ../chapters/backups.rst
.. include:: ../chapters/scaling_up.rst
.. include:: ../chapters/database_conversion.rst
.. include:: ../chapters/docker.rst

View File

@@ -8,3 +8,4 @@ Advanced topics
.. include:: ../chapters/metadata.rst
.. include:: ../chapters/transformations.rst
.. include:: ../chapters/versioning.rst
.. include:: ../chapters/password_validation.rst

View File

@@ -2,9 +2,11 @@
Installation
############
The easiest way to use Mayan EDMS is by using the official Docker_ image.
Make sure Docker is properly installed and working before attempting to install
Mayan EDMS.
Mayan EDMS can be install in several way. The two recommended ways are: by
using Docker_, and by doing a direct installation.
The Docker method provides the easiest installation process while the direct
installation provides better performance and customization.
*****************************
Minimum hardware requirements
@@ -15,34 +17,9 @@ Minimum hardware requirements
- Unix-like operating system like Linux and OpenBSD. For other operating systems
user container technologies like Docker or virtual machines.
****************
Docker procedure
****************
Docker is a computer program that performs operating-system-level
virtualization also known as containerization. It allows independent
"containers" to run within a single Linux instance, avoiding the overhead
of starting and maintaining virtual machines (VMs).
Docker can be installed using their automated script::
wget -qO- https://get.docker.com/ | sh
This installs the latest versions of Docker. If you don't want run an automated
script follow the instructions outlined in their documentation: https://docs.docker.com/install/
Once the Docker installation is finished, proceed to the link below to install
the Docker image for Mayan EDMS.
Docker image chapter: :ref:`docker_install`
*******************
Direct installation
*******************
For users with knowledge of Python, Django, Ubuntu, and databases.
Deployments chapter: :doc:`../chapters/deploying`
.. include:: ../chapters/docker_installation.rst
.. include:: ../chapters/deploying.rst
.. _Docker: https://www.docker.com/

View File

@@ -2,4 +2,4 @@ from __future__ import unicode_literals
from .classes import ModelPermission # NOQA
default_app_config = 'acls.apps.ACLsApp'
default_app_config = 'mayan.apps.acls.apps.ACLsApp'

View File

@@ -2,7 +2,6 @@ from __future__ import absolute_import, unicode_literals
from django.contrib.contenttypes.models import ContentType
from django.shortcuts import get_object_or_404
from rest_framework import generics
from .models import AccessControlList
@@ -21,12 +20,12 @@ class APIObjectACLListView(generics.ListCreateAPIView):
"""
def get_content_object(self):
content_type = get_object_or_404(
ContentType, app_label=self.kwargs['app_label'],
klass=ContentType, app_label=self.kwargs['app_label'],
model=self.kwargs['model']
)
content_object = get_object_or_404(
content_type.model_class(), pk=self.kwargs['object_pk']
klass=content_type.model_class(), pk=self.kwargs['object_pk']
)
if self.request.method == 'GET':
@@ -85,12 +84,12 @@ class APIObjectACLView(generics.RetrieveDestroyAPIView):
permission_required = permission_acl_edit
content_type = get_object_or_404(
ContentType, app_label=self.kwargs['app_label'],
klass=ContentType, app_label=self.kwargs['app_label'],
model=self.kwargs['model']
)
content_object = get_object_or_404(
content_type.model_class(), pk=self.kwargs['object_pk']
klass=content_type.model_class(), pk=self.kwargs['object_pk']
)
AccessControlList.objects.check_access(
@@ -111,17 +110,17 @@ class APIObjectACLPermissionListView(generics.ListCreateAPIView):
"""
def get_acl(self):
return get_object_or_404(
self.get_content_object().acls, pk=self.kwargs['pk']
klass=self.get_content_object().acls, pk=self.kwargs['pk']
)
def get_content_object(self):
content_type = get_object_or_404(
ContentType, app_label=self.kwargs['app_label'],
klass=ContentType, app_label=self.kwargs['app_label'],
model=self.kwargs['model']
)
content_object = get_object_or_404(
content_type.model_class(), pk=self.kwargs['object_pk']
klass=content_type.model_class(), pk=self.kwargs['object_pk']
)
AccessControlList.objects.check_access(
@@ -168,17 +167,17 @@ class APIObjectACLPermissionView(generics.RetrieveDestroyAPIView):
def get_acl(self):
return get_object_or_404(
self.get_content_object().acls, pk=self.kwargs['pk']
klass=self.get_content_object().acls, pk=self.kwargs['pk']
)
def get_content_object(self):
content_type = get_object_or_404(
ContentType, app_label=self.kwargs['app_label'],
klass=ContentType, app_label=self.kwargs['app_label'],
model=self.kwargs['model']
)
content_object = get_object_or_404(
content_type.model_class(), pk=self.kwargs['object_pk']
klass=content_type.model_class(), pk=self.kwargs['object_pk']
)
AccessControlList.objects.check_access(

View File

@@ -2,16 +2,18 @@ from __future__ import unicode_literals
from django.utils.translation import ugettext_lazy as _
from common import MayanAppConfig, menu_object, menu_sidebar
from navigation import SourceColumn
from mayan.apps.common import MayanAppConfig, menu_object, menu_sidebar
from mayan.apps.navigation import SourceColumn
from .links import link_acl_create, link_acl_delete, link_acl_permissions
class ACLsApp(MayanAppConfig):
app_namespace = 'acls'
app_url = 'acls'
has_rest_api = True
has_tests = True
name = 'acls'
name = 'mayan.apps.acls'
verbose_name = _('ACLs')
def ready(self):

View File

@@ -1,4 +1,4 @@
from __future__ import unicode_literals, absolute_import
from __future__ import absolute_import, unicode_literals
import logging
@@ -8,23 +8,9 @@ logger = logging.getLogger(__name__)
class ModelPermission(object):
_registry = {}
_proxies = {}
_inheritances = {}
@classmethod
def register(cls, model, permissions):
from django.contrib.contenttypes.fields import GenericRelation
cls._registry.setdefault(model, [])
for permission in permissions:
cls._registry[model].append(permission)
AccessControlList = apps.get_model(
app_label='acls', model_name='AccessControlList'
)
model.add_to_class('acls', GenericRelation(AccessControlList))
_proxies = {}
_registry = {}
@classmethod
def get_classes(cls, as_content_type=False):
@@ -72,13 +58,29 @@ class ModelPermission(object):
return StoredPermission.objects.filter(pk__in=pks)
@classmethod
def register_proxy(cls, source, model):
cls._proxies[model] = source
def get_inheritance(cls, model):
return cls._inheritances[model]
@classmethod
def register(cls, model, permissions):
from django.contrib.contenttypes.fields import GenericRelation
cls._registry.setdefault(model, [])
for permission in permissions:
cls._registry[model].append(permission)
AccessControlList = apps.get_model(
app_label='acls', model_name='AccessControlList'
)
model.add_to_class(
name='acls', value=GenericRelation(to=AccessControlList)
)
@classmethod
def register_inheritance(cls, model, related):
cls._inheritances[model] = related
@classmethod
def get_inheritance(cls, model):
return cls._inheritances[model]
def register_proxy(cls, source, model):
cls._proxies[model] = source

View File

@@ -1,6 +1,9 @@
from __future__ import absolute_import, unicode_literals
from appearance.classes import Icon
from mayan.apps.appearance.classes import Icon
icon_acl_list = Icon(driver_name='fontawesome', symbol='lock')
icon_acl_new = Icon(driver_name='fontawesome', symbol='plus')
icon_acl_new = Icon(
driver_name='fontawesome-dual', primary_symbol='lock',
secondary_symbol='plus'
)

View File

@@ -3,10 +3,10 @@ from __future__ import unicode_literals
from django.apps import apps
from django.utils.translation import ugettext_lazy as _
from navigation import Link
from mayan.apps.navigation import Link
from .icons import icon_acl_list, icon_acl_new
from .permissions import permission_acl_view, permission_acl_edit
from .permissions import permission_acl_edit, permission_acl_view
def get_kwargs_factory(variable_name):

View File

@@ -6,14 +6,15 @@ from django.contrib.contenttypes.models import ContentType
from django.core.exceptions import PermissionDenied
from django.db import models
from django.db.models import Q
from django.utils.translation import ugettext, ugettext_lazy as _
from django.utils.translation import ugettext
from django.utils.translation import ugettext_lazy as _
from common.utils import return_attrib, return_related
from permissions import Permission
from permissions.models import StoredPermission
from mayan.apps.common.utils import resolve_attribute, return_related
from mayan.apps.permissions import Permission
from mayan.apps.permissions.models import StoredPermission
from .exceptions import PermissionNotValidForClass
from .classes import ModelPermission
from .exceptions import PermissionNotValidForClass
logger = logging.getLogger(__name__)
@@ -45,7 +46,7 @@ class AccessControlListManager(models.Manager):
stored_permissions = (permissions.stored_permission,)
if related:
obj = return_attrib(obj, related)
obj = resolve_attribute(obj=obj, attribute=related)
try:
parent_accessor = ModelPermission.get_inheritance(
@@ -198,8 +199,8 @@ class AccessControlListManager(models.Manager):
return StoredPermission.objects.none()
else:
try:
parent_object = return_attrib(
obj=instance, attrib=parent_accessor
parent_object = resolve_attribute(
obj=instance, attribute=parent_accessor
)
except AttributeError:
# Parent accessor is not an attribute, try it as a related

View File

@@ -1,7 +1,6 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.db import migrations, models
class Migration(migrations.Migration):

View File

@@ -1,7 +1,6 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.db import migrations, models
class Migration(migrations.Migration):

View File

@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.11 on 2018-04-02 03:39
from __future__ import unicode_literals
from django.db import migrations
@@ -14,6 +12,9 @@ class Migration(migrations.Migration):
operations = [
migrations.AlterModelOptions(
name='accesscontrollist',
options={'ordering': ('pk',), 'verbose_name': 'Access entry', 'verbose_name_plural': 'Access entries'},
options={
'ordering': ('pk',), 'verbose_name': 'Access entry',
'verbose_name_plural': 'Access entries'
},
),
]

View File

@@ -8,7 +8,7 @@ from django.db import models
from django.utils.encoding import force_text, python_2_unicode_compatible
from django.utils.translation import ugettext_lazy as _
from permissions.models import Role, StoredPermission
from mayan.apps.permissions.models import Role, StoredPermission
from .managers import AccessControlListManager
@@ -70,6 +70,9 @@ class AccessControlList(models.Model):
)
def get_permission_titles(self):
"""
Returns the descriptibe labels for the permissions.
"""
result = ', '.join(
[force_text(permission) for permission in self.permissions.all()]
)

View File

@@ -2,9 +2,9 @@ from __future__ import absolute_import, unicode_literals
from django.utils.translation import ugettext_lazy as _
from permissions import PermissionNamespace
from mayan.apps.permissions import PermissionNamespace
namespace = PermissionNamespace('acls', _('Access control lists'))
namespace = PermissionNamespace(label=_('Access control lists'), name='acls')
permission_acl_edit = namespace.add_permission(
name='acl_edit', label=_('Edit ACLs')

View File

@@ -9,10 +9,12 @@ from rest_framework import serializers
from rest_framework.exceptions import ValidationError
from rest_framework.reverse import reverse
from common.serializers import ContentTypeSerializer
from permissions import Permission
from permissions.models import Role, StoredPermission
from permissions.serializers import PermissionSerializer, RoleSerializer
from mayan.apps.common.serializers import ContentTypeSerializer
from mayan.apps.permissions import Permission
from mayan.apps.permissions.models import Role, StoredPermission
from mayan.apps.permissions.serializers import (
PermissionSerializer, RoleSerializer
)
from .models import AccessControlList

View File

@@ -2,8 +2,8 @@ from __future__ import unicode_literals
from django.contrib.contenttypes.models import ContentType
from document_states.tests.test_actions import ActionTestCase
from documents.permissions import permission_document_view
from mayan.apps.document_states.tests.test_actions import ActionTestCase
from mayan.apps.documents.permissions import permission_document_view
from ..workflow_actions import GrantAccessAction, RevokeAccessAction

View File

@@ -1,20 +1,18 @@
from __future__ import absolute_import, unicode_literals
from django.contrib.contenttypes.models import ContentType
from django.test import override_settings
from rest_framework import status
from documents.permissions import permission_document_view
from documents.tests import DocumentTestMixin
from permissions.tests.literals import TEST_ROLE_LABEL
from rest_api.tests import BaseAPITestCase
from mayan.apps.documents.permissions import permission_document_view
from mayan.apps.documents.tests import DocumentTestMixin
from mayan.apps.permissions.tests.literals import TEST_ROLE_LABEL
from mayan.apps.rest_api.tests import BaseAPITestCase
from ..models import AccessControlList
from ..permissions import permission_acl_view
@override_settings(OCR_AUTO_OCR=False)
class ACLAPITestCase(DocumentTestMixin, BaseAPITestCase):
def setUp(self):
super(ACLAPITestCase, self).setUp()

View File

@@ -3,10 +3,10 @@ from __future__ import unicode_literals
from django.contrib.contenttypes.models import ContentType
from django.urls import reverse
from documents.tests import GenericDocumentViewTestCase
from mayan.apps.documents.tests import GenericDocumentViewTestCase
from ..links import (
link_acl_delete, link_acl_list, link_acl_create, link_acl_permissions
link_acl_create, link_acl_delete, link_acl_list, link_acl_permissions
)
from ..models import AccessControlList
from ..permissions import permission_acl_edit, permission_acl_view

View File

@@ -1,20 +1,18 @@
from __future__ import absolute_import, unicode_literals
from django.core.exceptions import PermissionDenied
from django.test import override_settings
from common.tests import BaseTestCase
from documents.models import Document, DocumentType
from documents.permissions import permission_document_view
from documents.tests import (
TEST_SMALL_DOCUMENT_PATH, TEST_DOCUMENT_TYPE_LABEL,
TEST_DOCUMENT_TYPE_2_LABEL
from mayan.apps.common.tests import BaseTestCase
from mayan.apps.documents.models import Document, DocumentType
from mayan.apps.documents.permissions import permission_document_view
from mayan.apps.documents.tests import (
TEST_DOCUMENT_TYPE_2_LABEL, TEST_DOCUMENT_TYPE_LABEL,
TEST_SMALL_DOCUMENT_PATH
)
from ..models import AccessControlList
@override_settings(OCR_AUTO_OCR=False)
class PermissionTestCase(BaseTestCase):
def setUp(self):
super(PermissionTestCase, self).setUp()

View File

@@ -2,7 +2,7 @@ from __future__ import absolute_import, unicode_literals
from django.contrib.contenttypes.models import ContentType
from documents.tests import GenericDocumentViewTestCase
from mayan.apps.documents.tests import GenericDocumentViewTestCase
from ..models import AccessControlList
from ..permissions import permission_acl_edit, permission_acl_view

View File

@@ -11,12 +11,12 @@ from django.urls import reverse
from django.utils.encoding import force_text
from django.utils.translation import ugettext_lazy as _
from common.views import (
from mayan.apps.common.views import (
AssignRemoveView, SingleObjectCreateView, SingleObjectDeleteView,
SingleObjectListView
)
from permissions import PermissionNamespace, Permission
from permissions.models import StoredPermission
from mayan.apps.permissions import Permission, PermissionNamespace
from mayan.apps.permissions.models import StoredPermission
from .classes import ModelPermission
from .icons import icon_acl_list
@@ -33,7 +33,7 @@ class ACLCreateView(SingleObjectCreateView):
def dispatch(self, request, *args, **kwargs):
self.object_content_type = get_object_or_404(
ContentType, app_label=self.kwargs['app_label'],
klass=ContentType, app_label=self.kwargs['app_label'],
model=self.kwargs['model']
)
@@ -89,7 +89,7 @@ class ACLDeleteView(SingleObjectDeleteView):
model = AccessControlList
def dispatch(self, request, *args, **kwargs):
acl = get_object_or_404(AccessControlList, pk=self.kwargs['pk'])
acl = get_object_or_404(klass=AccessControlList, pk=self.kwargs['pk'])
AccessControlList.objects.check_access(
permissions=permission_acl_edit, user=request.user,
@@ -117,7 +117,7 @@ class ACLDeleteView(SingleObjectDeleteView):
class ACLListView(SingleObjectListView):
def dispatch(self, request, *args, **kwargs):
self.object_content_type = get_object_or_404(
ContentType, app_label=self.kwargs['app_label'],
klass=ContentType, app_label=self.kwargs['app_label'],
model=self.kwargs['model']
)
@@ -173,8 +173,8 @@ class ACLPermissionsView(AssignRemoveView):
entries = sorted(
entries, key=lambda x: (
x.get_volatile_permission().namespace.label,
x.get_volatile_permission().label
x.volatile_permission.namespace.label,
x.volatile_permission.label
)
)
@@ -183,17 +183,17 @@ class ACLPermissionsView(AssignRemoveView):
(force_text(permission.pk), permission) for permission in permissions
]
results.append(
(PermissionNamespace.get(namespace), permission_options)
(PermissionNamespace.get(name=namespace), permission_options)
)
return results
def add(self, item):
permission = get_object_or_404(StoredPermission, pk=item)
permission = get_object_or_404(klass=StoredPermission, pk=item)
self.get_object().permissions.add(permission)
def dispatch(self, request, *args, **kwargs):
acl = get_object_or_404(AccessControlList, pk=self.kwargs['pk'])
acl = get_object_or_404(klass=AccessControlList, pk=self.kwargs['pk'])
AccessControlList.objects.check_access(
permissions=permission_acl_edit, user=request.user,
@@ -242,7 +242,7 @@ class ACLPermissionsView(AssignRemoveView):
return StoredPermission.objects.filter(pk__in=merged_pks)
def get_object(self):
return get_object_or_404(AccessControlList, pk=self.kwargs['pk'])
return get_object_or_404(klass=AccessControlList, pk=self.kwargs['pk'])
def get_right_list_help_text(self):
if self.get_object().get_inherited_permissions():
@@ -257,7 +257,7 @@ class ACLPermissionsView(AssignRemoveView):
return ACLPermissionsView.generate_choices(self.get_available_list())
def remove(self, item):
permission = get_object_or_404(StoredPermission, pk=item)
permission = get_object_or_404(klass=StoredPermission, pk=item)
self.get_object().permissions.remove(permission)
def right_list(self):

View File

@@ -7,10 +7,10 @@ from django.contrib.contenttypes.models import ContentType
from django.core.exceptions import ValidationError
from django.utils.translation import ugettext_lazy as _
from acls.models import AccessControlList
from document_states.classes import WorkflowAction
from permissions.classes import Permission
from permissions.models import Role
from mayan.apps.acls.models import AccessControlList
from mayan.apps.document_states.classes import WorkflowAction
from mayan.apps.permissions.classes import Permission
from mayan.apps.permissions.models import Role
from .classes import ModelPermission
from .permissions import permission_acl_edit

View File

@@ -1,3 +1,3 @@
from __future__ import unicode_literals
default_app_config = 'appearance.apps.AppearanceApp'
default_app_config = 'mayan.apps.appearance.apps.AppearanceApp'

View File

@@ -2,13 +2,13 @@ from __future__ import unicode_literals
from django.utils.translation import ugettext_lazy as _
from common import MayanAppConfig
from mayan.apps.common import MayanAppConfig
from .licenses import * # NOQA
class AppearanceApp(MayanAppConfig):
name = 'appearance'
name = 'mayan.apps.appearance'
verbose_name = _('Appearance')
def ready(self):

View File

@@ -28,6 +28,34 @@ class FontAwesomeDriver(IconDriver):
)
class FontAwesomeDualDriver(IconDriver):
name = 'fontawesome-dual'
template_name = 'appearance/icons/font_awesome_layers.html'
def __init__(self, primary_symbol, secondary_symbol):
self.primary_symbol = primary_symbol
self.secondary_symbol = secondary_symbol
def render(self):
return get_template(self.template_name).render(
context={
'data': (
{
'class': 'fas fa-circle',
'transform': 'down-3 right-10',
'mask': 'fas fa-{}'.format(self.primary_symbol)
},
{'class': 'far fa-circle', 'transform': 'down-3 right-10'},
{
'class': 'fas fa-{}'.format(self.secondary_symbol),
'transform': 'shrink-4 down-3 right-10'
},
)
}
)
class FontAwesomeCSSDriver(IconDriver):
name = 'fontawesomecss'
template_name = 'appearance/icons/font_awesome_css.html'
@@ -41,6 +69,32 @@ class FontAwesomeCSSDriver(IconDriver):
)
class FontAwesomeMasksDriver(IconDriver):
name = 'fontawesome-masks'
template_name = 'appearance/icons/font_awesome_masks.html'
def __init__(self, data):
self.data = data
def render(self):
return get_template(self.template_name).render(
context={'data': self.data}
)
class FontAwesomeLayersDriver(IconDriver):
name = 'fontawesome-layers'
template_name = 'appearance/icons/font_awesome_layers.html'
def __init__(self, data):
self.data = data
def render(self):
return get_template(self.template_name).render(
context={'data': self.data}
)
class Icon(object):
def __init__(self, driver_name, **kwargs):
self.driver = IconDriver.get(name=driver_name)(**kwargs)
@@ -49,5 +103,8 @@ class Icon(object):
return self.driver.render(**kwargs)
IconDriver.register(driver_class=FontAwesomeDriver)
IconDriver.register(driver_class=FontAwesomeCSSDriver)
IconDriver.register(driver_class=FontAwesomeDriver)
IconDriver.register(driver_class=FontAwesomeDualDriver)
IconDriver.register(driver_class=FontAwesomeLayersDriver)
IconDriver.register(driver_class=FontAwesomeMasksDriver)

View File

@@ -1,6 +1,6 @@
from __future__ import unicode_literals
from common.classes import Package
from mayan.apps.common.classes import Package
Package(label='Bootstrap', license_text='''
The MIT License (MIT)

View File

@@ -2,11 +2,12 @@ from __future__ import unicode_literals
from django.utils.translation import ugettext_lazy as _
from smart_settings import Namespace
from mayan.apps.smart_settings import Namespace
from .literals import DEFAULT_MAXIMUM_TITLE_LENGTH
namespace = Namespace(name='appearance', label=_('Appearance'))
setting_max_title_length = namespace.add_setting(
default=DEFAULT_MAXIMUM_TITLE_LENGTH,
global_name='APPEARANCE_MAXIMUM_TITLE_LENGTH', help_text=_(

View File

@@ -49,10 +49,6 @@
url('../fonts/Lato_400italic.ttf') format('truetype');
}
body {
padding-top: 70px;
}
.navbar-brand {
font-family: "IM Fell English SC", serif;
}
@@ -71,7 +67,7 @@ body {
}
#carousel-container {
overflow-x: scroll; height: 500px;
overflow: scroll; height: 100%;
}
#carousel-container img {
@@ -145,10 +141,6 @@ hr {
list-style-type: none;
}
a i {
padding-right: 3px;
}
.dashboard-widget {
box-shadow: 1px 1px 1px rgba(0,0,0,0.3);
border: 1px solid black;
@@ -334,3 +326,209 @@ a i {
transform: rotate(360deg);
}
}
.pre-server-error {
background-color:#ffe7ae;
color: black;
font-size: 110%;
font-weight: bold;
}
body {
margin-top: 60px;
}
.sub-header {
padding-bottom: 10px;
border-bottom: 1px solid #eee;
}
/*
* Top navigation
* Hide default border to remove 1px line.
*/
.navbar-fixed-top {
border: 0;
}
/*
* Sidebar
*/
/* Hide for mobile, show later */
#menu-main {
display: none;
background-color: #2c3e50;
border-right: 1px solid #18bc9c;
bottom: 0;
left: 0;
overflow-x: hidden;
overflow-y: auto;
padding-top: 10px;
position: fixed;
top: 51px;
width: 210px;
z-index: 1000;
}
@media (min-width: 768px) {
#menu-main {
display: block;
}
.navbar-brand {
text-align: center;
width: 210px;
}
}
/*
* Main content
*/
.main {
margin-top: 10px;
}
@media (min-width: 768px) {
.main {
padding-right: 0px;
padding-left: 0px;
margin-left: 210px;
}
}
.main .page-header {
margin-top: 0;
}
.navbar-brand {
}
.container-fluid {
margin-right: 0px;
margin-left: 0px;
width: 100%;
}
.navbar-form > .form-control {
padding: 0px;
height: 35px;
margin-top: 3px;
}
#accordion-sidebar a {
padding: 10px 15px;
}
#accordion-sidebar a[aria-expanded="true"] {
background: #1a242f;
}
#accordion-sidebar .panel {
border: 0px;
}
#accordion-sidebar a {
text-decoration: none;
outline: none;
position: relative;
display: block;
}
#accordion-sidebar .panel-heading {
background-color: #2c3e50;
color: white;
padding: 0px;
}
#accordion-sidebar .panel-heading:hover {
background-color: #517394;
}
#accordion-sidebar > .panel > div > .panel-body > ul > li > a:hover {
background-color: #517394;
}
#accordion-sidebar > .panel > div > .panel-body > ul > li.active {
background: #1a242f;
}
#accordion-sidebar .panel-title {
font-size: 15px;
}
#accordion-sidebar .panel-body {
font-size: 13px;
border: 0px;
background-color: #2c3e50;
padding-top: 5px;
padding-left: 20px;
padding-right: 0px;
padding-bottom: 0px;
}
#accordion-sidebar .panel-body li {
padding: 0px;
}
#accordion-sidebar .panel-body a {
color: white;
text-decoration: none;
padding: 9px;
}
.navbar-brand {
outline: none;
}
.panel-highlighted {
border: 3px solid #18bc9c;
}
.panel-item:hover {
box-shadow: 0px 0px 10px #000000;
}
.td-container-thumbnail {
height: 100px;
}
/* Side bar */
#menu-actions {
position: fixed;
right: 5px;
top: 65px;
z-index: 1020;
}
#viewport {
width: 100%;
}
.has-sidebar {
padding-right: 0px;
}
#sidebar {
display: none;
}
@media (min-width: 768px) {
#sidebar {
bottom: 0;
display: block;
overflow-x: visible;
overflow-y: auto;
padding-top: 10px;
position: fixed;
right: 0;
top: 100px;
width: 150px;
z-index: 1000;
}
.has-sidebar {
padding-right: 150px;
}
}

View File

@@ -6,7 +6,8 @@ var MayanAppClass = MayanApp;
var partialNavigation = new PartialNavigation({
initialURL: initialURL,
disabledAnchorClasses: ['disabled'],
disabledAnchorClasses: [
'btn-multi-item-action', 'disabled', 'pagination-disabled'
],
excludeAnchorClasses: ['fancybox', 'new_window', 'non-ajax'],
formBeforeSerializeCallbacks: [MayanApp.MultiObjectFormProcess],
});

View File

@@ -1,27 +1,34 @@
'use strict';
class MayanApp {
constructor (parameters) {
constructor (options) {
var self = this;
parameters = parameters || {}
options = options || {
ajaxMenusOptions: []
}
this.ajaxSpinnerSeletor = '#ajax-spinner';
this.ajaxExecuting = false;
this.ajaxMenusOptions = [
{
app: this,
interval: 5000,
menuSelector: '#main-menu',
url: apiTemplateMainMenuURL,
}
];
this.ajaxMenusOptions = options.ajaxMenusOptions;
this.ajaxMenuHashes = {};
this.window = $(window);
}
// Class methods and variables
static countChecked() {
var checkCount = $('.check-all-slave:checked').length;
if (checkCount) {
$('#multi-item-title').hide();
$('#multi-item-actions').show();
} else {
$('#multi-item-title').show();
$('#multi-item-actions').hide();
}
}
static mayanNotificationBadge (options, data) {
// Callback to add the notifications count inside a badge markup
var notifications = data[options.attributeName];
@@ -45,28 +52,33 @@ class MayanApp {
}
}
static MultiObjectFormProcess ($form, options) {
/*
* ajaxForm callback to add the external item checkboxes to the
* submitted form
*/
if ($form.hasClass('form-multi-object-action')) {
// Turn form data into an object
var formArray = $form.serializeArray().reduce(function (obj, item) {
obj[item.name] = item.value;
return obj;
}, {});
// Add all checked checkboxes to the form data
$('.form-multi-object-action-checkbox:checked').each(function() {
var $this = $(this);
formArray[$this.attr('name')] = $this.attr('value');
static setupMultiItemActions () {
$('body').on('change', '.check-all-slave', function () {
MayanApp.countChecked();
});
// Set the form data as the data to send
options.data = formArray;
$('body').on('click', '.btn-multi-item-action', function (event) {
var id_list = [];
$('.check-all-slave:checked').each(function (index, value) {
//Split the name (ie:"pk_200") and extract only the ID
id_list.push(value.name.split('_')[1]);
});
event.preventDefault();
partialNavigation.setLocation(
$(this).attr('href') + '?id_list=' + id_list.join(',')
);
});
}
static setupNavBarState () {
$('body').on('click', '.a-main-menu-accordion-link', function (event) {
console.log('ad');
$('.a-main-menu-accordion-link').each(function (index, value) {
$(this).parent().removeClass('active');
});
$(this).parent().addClass('active');
});
}
static tagSelectionTemplate (tag, container) {
@@ -85,6 +97,17 @@ class MayanApp {
return $tag;
}
static updateNavbarState () {
var uri = new URI(window.location.hash);
var uriFragment = uri.fragment();
$('.a-main-menu-accordion-link').each(function (index, value) {
if (value.pathname === uriFragment) {
$(this).closest('.collapse').addClass('in').parent().find('.collapsed').removeClass('collapsed').attr('aria-expanded', 'true');
$(this).parent().addClass('active');
}
});
}
// Instance methods
AJAXperiodicWorker (options) {
@@ -100,7 +123,7 @@ class MayanApp {
},
success: function(data) {
if (options.callback) {
// Conver the callback string to an actual function
// Convert the callback string to an actual function
var callbackFunction = window;
$.each(options.callback.split('.'), function (index, value) {
@@ -132,10 +155,10 @@ class MayanApp {
if ((menuHash === undefined) || (menuHash !== data.hex_hash)) {
$(options.menuSelector).html(data.html);
options.app.ajaxMenuHashes[data.name] = data.hex_hash;
if (options.callback !== undefined) {
options.callback();
}
options.app.ajaxMenuHashes[data.name] = data.hex_hash;
}
},
url: options.url,
@@ -214,16 +237,22 @@ class MayanApp {
}
initialize () {
var self = this;
this.setupAJAXPeriodicWorkers();
this.setupAJAXSpinner();
this.setupAutoSubmit();
this.setupFormHotkeys();
this.setupFullHeightResizing();
this.setupItemsSelector();
MayanApp.setupMultiItemActions();
this.setupNavbarCollapse();
MayanApp.setupNavBarState();
this.setupNewWindowAnchor();
$.each(this.ajaxMenusOptions, function(index, value) {
value.app = self;
app.doRefreshAJAXMenu(value);
});
this.setupPanelSelection();
partialNavigation.initialize();
}
@@ -263,12 +292,19 @@ class MayanApp {
});
}
setupAutoSubmit () {
$('body').on('change', '.select-auto-submit', function () {
if ($(this).val()) {
$(this.form).trigger('submit');
setupFormHotkeys () {
$('body').on('keypress', '.form-hotkey-enter', function (e) {
if ((e.which && e.which == 13) || (e.keyCode && e.keyCode == 13)) {
$(this).find('.btn-hotkey-default').click();
return false;
} else {
return true;
}
});
$('body').on('dblclick', '.form-hotkey-double-click', function (e) {
$(this).find('.btn-hotkey-default').click();
return false;
});
}
setupFullHeightResizing () {
@@ -286,9 +322,22 @@ class MayanApp {
app.lastChecked = null;
$('body').on('click', '.check-all', function (event) {
var $this = $(this);
var checked = $(event.target).prop('checked');
var $checkBoxes = $('.check-all-slave');
if (checked === undefined) {
checked = $this.data('checked');
checked = !checked;
$this.data('checked', checked);
if (checked) {
$this.find('[data-fa-i2svg]').addClass($this.data('icon-checked')).removeClass($this.data('icon-unchecked'));
} else {
$this.find('[data-fa-i2svg]').addClass($this.data('icon-unchecked')).removeClass($this.data('icon-checked'));
}
}
$checkBoxes.prop('checked', checked);
$checkBoxes.trigger('change');
});
@@ -298,6 +347,7 @@ class MayanApp {
app.lastChecked = this;
return;
}
if(e.shiftKey) {
var $checkBoxes = $('.check-all-slave');
@@ -334,6 +384,58 @@ class MayanApp {
});
}
setupPanelSelection () {
var app = this;
// Setup panel highlighting on check
$('body').on('change', '.check-all-slave', function (event) {
var checked = $(event.target).prop('checked');
if (checked) {
$(this).closest('.panel-item').addClass('panel-highlighted');
} else {
$(this).closest('.panel-item').removeClass('panel-highlighted');
}
});
$('body').on('click', '.panel-item', function (event) {
var $this = $(this);
var targetSrc = $(event.target).prop('src');
var targetHref = $(event.target).prop('href');
var targetIsButton = event.target.tagName === 'BUTTON';
var lastChecked = null;
if ((targetSrc === undefined) && (targetHref === undefined) && (targetIsButton === false)) {
var $checkbox = $this.find('.check-all-slave');
var checked = $checkbox.prop('checked');
if (checked) {
$checkbox.prop('checked', '');
$checkbox.trigger('change');
} else {
$checkbox.prop('checked', 'checked');
$checkbox.trigger('change');
}
if(!app.lastChecked) {
app.lastChecked = $checkbox;
}
if (event.shiftKey) {
var $checkBoxes = $('.check-all-slave');
var start = $checkBoxes.index($checkbox);
var end = $checkBoxes.index(app.lastChecked);
$checkBoxes.slice(
Math.min(start, end), Math.max(start, end) + 1
).prop('checked', app.lastChecked.prop('checked')).trigger('change');
}
app.lastChecked = $checkbox;
window.getSelection().removeAllRanges();
}
});
}
setupScrollView () {
$('.scrollable').scrollview();
}

View File

@@ -6,23 +6,24 @@ class MayanImage {
this.load();
}
static intialize () {
var app = this;
static intialize (options) {
this.options = options || {};
this.options.templateInvalidDocument = this.options.templateInvalidDocument || '<span>Error loading document image</span>';
this.fancybox = $().fancybox({
animationDuration : 300,
buttons : [
'fullScreen',
'close',
],
selector: 'a.fancybox',
$().fancybox({
afterShow: function (instance, current) {
$('a.a-caption').on('click', function(event) {
instance.close(true);
});
},
animationEffect: 'fade',
animationDuration: 100,
buttons : [
'fullScreen',
'close',
],
infobar: true,
selector: 'a.fancybox',
});
$('img.lazy-load').lazyload({
@@ -42,46 +43,53 @@ class MayanImage {
$('.lazy-load').one('load', function() {
$(this).hide();
$(this).fadeIn(300);
$(this).show();
$(this).siblings('.spinner-container').remove();
$(this).removeClass('lazy-load pull-left');
clearTimeout(MayanImage.timer);
MayanImage.timer = setTimeout(MayanImage.timerFunction, 100);
MayanImage.timer = setTimeout(MayanImage.timerFunction, 250);
});
$('.lazy-load-carousel').one('load', function() {
$(this).hide();
$(this).fadeIn(300);
$(this).show();
$(this).siblings('.spinner-container').remove();
$(this).removeClass('lazy-load-carousel pull-left');
});
}
static timerFunction () {
$.fn.matchHeight._maintainScroll = true;
$.fn.matchHeight._update();
}
load () {
var self = this;
var container = this.element.parent().parent().parent();
var dataURL = this.element.attr('data-url');
this.element.attr('src', this.element.attr('data-url'));
this.element.on('error', function() {
// Check the .complete property to see if it is a real error
// or it was a cached image
if (this.complete === false) {
// It is a cached image, set the src attribute to trigger
// it's display.
this.src = this.src;
if (dataURL === '') {
container.html(MayanImage.options.templateInvalidDocument);
} else {
container.html(MayanImage.templateInvalidDocument);
this.element.attr('src', dataURL);
setTimeout(function () {
self.element.on('error', function () {
// Check the .complete property to see if it is a real
// error or it was a cached image
if (this.complete === false) {
// It is a cached image, set the src attribute to
// trigger it's display.
this.src = dataURL;
} else {
container.html(
MayanImage.options.templateInvalidDocument
);
}
});
$.fn.matchHeight._maintainScroll = true;
}, 1);
}
};
}
MayanImage.templateInvalidDocument = $('#template-invalid-document').html();
MayanImage.timer = setTimeout(null);
$.fn.matchHeight._maintainScroll = true;

View File

@@ -160,7 +160,21 @@ class PartialNavigation {
*/
if (djangoDEBUG) {
$('#ajax-content').html('<pre class="text-primary" style="background-color:#ffe7ae"><code>' + jqXHR.statusText + '</code></pre>');
var errorMessage = null;
if (jqXHR.status != 0) {
errorMessage = jqXHR.responseText || jqXHR.statusText;
} else {
errorMessage = 'Server communication error.';
}
$('#ajax-content').html(
' \
<div class="alert alert-danger" role="alert"><i class="fa fa-exclamation-triangle"></i> Server Error, status code: ' + jqXHR.status + '</div> \
<pre class="pre-server-error"><code>' + errorMessage +'</code> \
</pre> \
'
);
} else {
if (jqXHR.status == 0) {
$('#modal-server-error .modal-body').html($('#template-error').html());

View File

@@ -4,6 +4,11 @@
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@fortawesome/fontawesome-free": {
"version": "5.6.3",
"resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-5.6.3.tgz",
"integrity": "sha512-s5PLdI9NYgjBvfrv6rhirPHlAHWx+Sfo/IjsAeiXYfmemC/GSjwsyz1wLnGPazbLPXWfk62ks980o9AmsxYUEQ=="
},
"abbrev": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",

View File

@@ -10,6 +10,7 @@
"license": "Apache-2.0",
"private": true,
"dependencies": {
"@fortawesome/fontawesome-free": "=5.6.3",
"bootstrap": "=3.3.7",
"bootswatch": "=3.3.7",
"jquery": "=3.3.1",

View File

@@ -1,34 +0,0 @@
Font Awesome Free License
-------------------------
Font Awesome Free is free, open source, and GPL friendly. You can use it for
commercial projects, open source projects, or really almost whatever you want.
Full Font Awesome Free license: https://fontawesome.com/license.
# Icons: CC BY 4.0 License (https://creativecommons.org/licenses/by/4.0/)
In the Font Awesome Free download, the CC BY 4.0 license applies to all icons
packaged as SVG and JS file types.
# Fonts: SIL OFL 1.1 License (https://scripts.sil.org/OFL)
In the Font Awesome Free download, the SIL OLF license applies to all icons
packaged as web and desktop font files.
# Code: MIT License (https://opensource.org/licenses/MIT)
In the Font Awesome Free download, the MIT license applies to all non-font and
non-icon files.
# Attribution
Attribution is required by MIT, SIL OLF, and CC BY licenses. Downloaded Font
Awesome Free files already contain embedded comments with sufficient
attribution, so you shouldn't need to do anything additional when using these
files normally.
We've kept attribution comments terse, so we ask that you do not actively work
to remove them from files, especially code. They're a great way for folks to
learn about Font Awesome.
# Brand Icons
All brand icons are trademarks of their respective owners. The use of these
trademarks does not indicate endorsement of the trademark holder by Font
Awesome, nor vice versa. **Please do not use brand logos for any purpose except
to represent the company, product, or service to which they refer.**

View File

@@ -1,7 +0,0 @@
# Font Awesome 5.0.8
Thanks for downloading Font Awesome! We're so excited you're here.
Our documentation is available online. Just head here:
https://fontawesome.com

File diff suppressed because one or more lines are too long

View File

@@ -1,289 +0,0 @@
area-chart:
name: chart-area
arrow-circle-o-down:
name: arrow-alt-circle-down
prefix: far
arrow-circle-o-left:
name: arrow-alt-circle-left
prefix: far
arrow-circle-o-right:
name: arrow-alt-circle-right
prefix: far
arrow-circle-o-up:
name: arrow-alt-circle-up
prefix: far
arrows:
name: arrows-alt
arrows-alt:
name: expand-arrows-alt
arrows-h:
name: arrows-alt-h
arrows-v:
name: arrows-alt-v
bar-chart:
name: chart-bar
prefix: far
bitbucket-square:
name: bitbucket
prefix: fab
calendar:
name: calendar-alt
calendar-o:
name: calendar
prefix: far
caret-square-o-down:
name: caret-square-down
prefix: far
caret-square-o-left:
name: caret-square-left
prefix: far
caret-square-o-right:
name: caret-square-right
prefix: far
caret-square-o-up:
name: caret-square-up
prefix: far
cc:
name: closed-captioning
prefix: far
chain-broken:
name: unlink
circle-o-notch:
name: circle-notch
circle-thin:
name: circle
prefix: far
clipboard:
prefix: far
clone:
prefix: far
cloud-download:
name: cloud-download-alt
cloud-upload:
name: cloud-upload-alt
code-fork:
name: code-branch
commenting:
name: comment-alt
compass:
prefix: far
copyright:
prefix: far
creative-commons:
prefix: fab
credit-card:
prefix: far
credit-card-alt:
name: credit-card
cutlery:
name: utensils
diamond:
name: gem
prefix: far
eercast:
name: sellcast
prefix: fab
eur:
name: euro-sign
exchange:
name: exchange-alt
external-link:
name: external-link-alt
external-link-square:
name: external-link-square-alt
eye-dropper:
name: eye-dropper
prefix: far
eye-slash:
prefix: far
eyedropper:
name: eye-dropper
facebook:
name: facebook-f
prefix: fab
facebook-official:
name: facebook
prefix: fab
file-text:
name: file-alt
files-o:
name: copy
prefix: far
floppy-o:
name: save
prefix: far
gbp:
name: pound-sign
glass:
name: glass-martini
google-plus:
name: google-plus-g
prefix: fab
google-plus-circle:
name: google-plus
prefix: fab
google-plus-official:
name: google-plus
prefix: fab
hand-o-down:
name: hand-point-down
prefix: far
hand-o-left:
name: hand-point-left
prefix: far
hand-o-right:
name: hand-point-right
prefix: far
hand-o-up:
name: hand-point-up
prefix: far
header:
name: heading
id-badge:
prefix: far
ils:
name: shekel-sign
inr:
name: rupee-sign
intersex:
name: transgender
jpy:
name: yen-sign
krw:
name: won-sign
level-down:
name: level-down-alt
level-up:
name: level-up-alt
life-ring:
prefix: far
line-chart:
name: chart-line
linkedin:
name: linkedin-in
prefix: fab
linkedin-square:
name: linkedin
prefix: fab
list-alt:
prefix: far
long-arrow-down:
name: long-arrow-alt-down
long-arrow-left:
name: long-arrow-alt-left
long-arrow-right:
name: long-arrow-alt-right
long-arrow-up:
name: long-arrow-alt-up
map-marker:
name: map-marker-alt
meanpath:
name: font-awesome
prefix: fab
mobile:
name: mobile-alt
money:
name: money-bill-alt
prefix: far
object-group:
prefix: far
object-ungroup:
prefix: far
paste:
prefix: far
pencil:
name: pencil-alt
pencil-square:
name: pen-square
pencil-square-o:
name: edit
prefix: far
picture:
name: image
pie-chart:
name: chart-pie
refresh:
name: sync
registered:
prefix: far
repeat:
name: redo
rub:
name: ruble-sign
scissors:
name: cut
shield:
name: shield-alt
sign-in:
name: sign-in-alt
sign-out:
name: sign-out-alt
sliders:
name: sliders-h
sort-alpha-asc:
name: sort-alpha-down
sort-alpha-desc:
name: sort-alpha-up
sort-amount-asc:
name: sort-amount-down
sort-amount-desc:
name: sort-amount-up
sort-asc:
name: sort-up
sort-desc:
name: sort-down
sort-numeric-asc:
name: sort-numeric-down
sort-numeric-desc:
name: sort-numeric-up
spoon:
name: utensil-spoon
star-half-empty:
name: star-half
star-half-full:
name: star-half
support:
name: life-ring
prefix: far
tablet:
name: tablet-alt
tachometer:
name: tachometer-alt
television:
name: tv
thumb-tack:
name: thumbtack
thumbs-o-down:
name: thumbs-down
prefix: far
thumbs-o-up:
name: thumbs-up
prefix: far
ticket:
name: ticket-alt
trash:
name: trash-alt
trash-o:
name: trash-alt
prefix: far
try:
name: lira-sign
usd:
name: dollar-sign
video-camera:
name: video
vimeo:
name: vimeo-v
prefix: fab
volume-control-phone:
name: phone-volume
wheelchair-alt:
name: accessible-icon
prefix: fab
window-maximize:
prefix: far
window-restore:
prefix: far
youtube-play:
name: youtube
prefix: fab

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M103.3 344.3c-6.5-14.2-6.9-18.3 7.4-23.1 25.6-8 8 9.2 43.2 49.2h.3v-93.9c1.2-50.2 44-92.2 97.7-92.2 53.9 0 97.7 43.5 97.7 96.8 0 63.4-60.8 113.2-128.5 93.3-10.5-4.2-2.1-31.7 8.5-28.6 53 0 89.4-10.1 89.4-64.4 0-61-77.1-89.6-116.9-44.6-23.5 26.4-17.6 42.1-17.6 157.6 50.7 31 118.3 22 160.4-20.1 24.8-24.8 38.5-58 38.5-93 0-35.2-13.8-68.2-38.8-93.3-24.8-24.8-57.8-38.5-93.3-38.5s-68.8 13.8-93.5 38.5c-.3.3-16 16.5-21.2 23.9l-.5.6c-3.3 4.7-6.3 9.1-20.1 6.1-6.9-1.7-14.3-5.8-14.3-11.8V20c0-5 3.9-10.5 10.5-10.5h241.3c8.3 0 8.3 11.6 8.3 15.1 0 3.9 0 15.1-8.3 15.1H130.3v132.9h.3c104.2-109.8 282.8-36 282.8 108.9 0 178.1-244.8 220.3-310.1 62.8zm63.3-260.8c-.5 4.2 4.6 24.5 14.6 20.6C306 56.6 384 144.5 390.6 144.5c4.8 0 22.8-15.3 14.3-22.8-93.2-89-234.5-57-238.3-38.2zM393 414.7C283 524.6 94 475.5 61 310.5c0-12.2-30.4-7.4-28.9 3.3 24 173.4 246 256.9 381.6 121.3 6.9-7.8-12.6-28.4-20.7-20.4zM213.6 306.6c0 4 4.3 7.3 5.5 8.5 3 3 6.1 4.4 8.5 4.4 3.8 0 2.6.2 22.3-19.5 19.6 19.3 19.1 19.5 22.3 19.5 5.4 0 18.5-10.4 10.7-18.2L265.6 284l18.2-18.2c6.3-6.8-10.1-21.8-16.2-15.7L249.7 268c-18.6-18.8-18.4-19.5-21.5-19.5-5 0-18 11.7-12.4 17.3L234 284c-18.1 17.9-20.4 19.2-20.4 22.6z"/></svg>

Before

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M423.9 255.8L411 413.1c-3.3 40.7-63.9 35.1-60.6-4.9l10-122.5-41.1 2.3c10.1 20.7 15.8 43.9 15.8 68.5 0 41.2-16.1 78.7-42.3 106.5l-39.3-39.3c57.9-63.7 13.1-167.2-74-167.2-25.9 0-49.5 9.9-67.2 26L73 243.2c22-20.7 50.1-35.1 81.4-40.2l75.3-85.7-42.6-24.8-51.6 46c-30 26.8-70.6-18.5-40.5-45.4l68-60.7c9.8-8.8 24.1-10.2 35.5-3.6 0 0 139.3 80.9 139.5 81.1 16.2 10.1 20.7 36 6.1 52.6L285.7 229l106.1-5.9c18.5-1.1 33.6 14.4 32.1 32.7zm-64.9-154c28.1 0 50.9-22.8 50.9-50.9C409.9 22.8 387.1 0 359 0c-28.1 0-50.9 22.8-50.9 50.9 0 28.1 22.8 50.9 50.9 50.9zM179.6 456.5c-80.6 0-127.4-90.6-82.7-156.1l-39.7-39.7C36.4 287 24 320.3 24 356.4c0 130.7 150.7 201.4 251.4 122.5l-39.7-39.7c-16 10.9-35.3 17.3-56.1 17.3z"/></svg>

Before

Width:  |  Height:  |  Size: 775 B

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path d="M482.2 372.1C476.5 365.2 250 75 242.3 65.5c-13.7-17.2 0-16.8 19.2-16.9 9.7-.1 106.3-.6 116.5-.6 24.1-.1 28.7.6 38.4 12.8 2.1 2.7 205.1 245.8 207.2 248.3 5.5 6.7 15.2 19.1 7.2 23.4-2.4 1.3-114.6 47.7-117.8 48.9-10.1 4-17.5 6.8-30.8-9.3m114.7-5.6s-115 50.4-117.5 51.6c-16 7.3-26.9-3.2-36.7-14.6l-57.1-74c-5.4-.9-60.4-9.6-65.3-9.3-3.1.2-9.6.8-14.4 2.9-4.9 2.1-145.2 52.8-150.2 54.7-5.1 2-11.4 3.6-11.1 7.6.2 2.5 2 2.6 4.6 3.5 2.7.8 300.9 67.6 308 69.1 15.6 3.3 38.5 10.5 53.6 1.7 2.1-1.2 123.8-76.4 125.8-77.8 5.4-4 4.3-6.8-1.7-8.2-2.3-.3-24.6-4.7-38-7.2m-326-181.3s-12 1.6-25 15.1c-9 9.3-242.1 239.1-243.4 240.9-7 10 1.6 6.8 15.7 1.7.8 0 114.5-36.6 114.5-36.6.5-.6-.1-.1.6-.6-.4-5.1-.8-26.2-1-27.7-.6-5.2 2.2-6.9 7-8.9l92.6-33.8c.6-.8 88.5-81.7 90.2-83.3v-1l-51.2-65.8" class="st1"/></svg>

Before

Width:  |  Height:  |  Size: 858 B

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><path d="M248 167.5l64.9 98.8H183.1l64.9-98.8zM496 256c0 136.9-111.1 248-248 248S0 392.9 0 256 111.1 8 248 8s248 111.1 248 248zm-99.8 82.7L248 115.5 99.8 338.7h30.4l33.6-51.7h168.6l33.6 51.7h30.2z"/></svg>

Before

Width:  |  Height:  |  Size: 267 B

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M482.1 32H28.7C5.8 32 0 37.9 0 60.9v390.2C0 474.4 5.8 480 28.7 480h453.4c24.4 0 29.9-5.2 29.9-29.7V62.2c0-24.6-5.4-30.2-29.9-30.2zM178.4 220.3c-27.5-20.2-72.1-8.7-84.2 23.4-4.3 11.1-9.3 9.5-17.5 8.3-9.7-1.5-17.2-3.2-22.5-5.5-28.8-11.4 8.6-55.3 24.9-64.3 41.1-21.4 83.4-22.2 125.3-4.8 40.9 16.8 34.5 59.2 34.5 128.5 2.7 25.8-4.3 58.3 9.3 88.8 1.9 4.4.4 7.9-2.7 10.7-8.4 6.7-39.3 2.2-46.6-7.4-1.9-2.2-1.8-3.6-3.9-6.2-3.6-3.9-7.3-2.2-11.9 1-57.4 36.4-140.3 21.4-147-43.3-3.1-29.3 12.4-57.1 39.6-71 38.2-19.5 112.2-11.8 114-30.9 1.1-10.2-1.9-20.1-11.3-27.3zm286.7 222c0 15.1-11.1 9.9-17.8 9.9H52.4c-7.4 0-18.2 4.8-17.8-10.7.4-13.9 10.5-9.1 17.1-9.1 132.3-.4 264.5-.4 396.8 0 6.8 0 16.6-4.4 16.6 9.9zm3.8-340.5v291c0 5.7-.7 13.9-8.1 13.9-12.4-.4-27.5 7.1-36.1-5.6-5.8-8.7-7.8-4-12.4-1.2-53.4 29.7-128.1 7.1-144.4-85.2-6.1-33.4-.7-67.1 15.7-100 11.8-23.9 56.9-76.1 136.1-30.5v-71c0-26.2-.1-26.2 26-26.2 3.1 0 6.6.4 9.7 0 10.1-.8 13.6 4.4 13.6 14.3-.1.2-.1.3-.1.5zm-51.5 232.3c-19.5 47.6-72.9 43.3-90 5.2-15.1-33.3-15.5-68.2.4-101.5 16.3-34.1 59.7-35.7 81.5-4.8 20.6 28.8 14.9 84.6 8.1 101.1zm-294.8 35.3c-7.5-1.3-33-3.3-33.7-27.8-.4-13.9 7.8-23 19.8-25.8 24.4-5.9 49.3-9.9 73.7-14.7 8.9-2 7.4 4.4 7.8 9.5 1.4 33-26.1 59.2-67.6 58.8z"/></svg>

Before

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M159.7 237.4C108.4 308.3 43.1 348.2 14 326.6-15.2 304.9 2.8 230 54.2 159.1c51.3-70.9 116.6-110.8 145.7-89.2 29.1 21.6 11.1 96.6-40.2 167.5zm351.2-57.3C437.1 303.5 319 367.8 246.4 323.7c-25-15.2-41.3-41.2-49-73.8-33.6 64.8-92.8 113.8-164.1 133.2 49.8 59.3 124.1 96.9 207 96.9 150 0 271.6-123.1 271.6-274.9.1-8.5-.3-16.8-1-25z"/></svg>

Before

Width:  |  Height:  |  Size: 404 B

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M229.3 182.6c-49.3 0-89.2 39.9-89.2 89.2 0 49.3 39.9 89.2 89.2 89.2s89.2-39.9 89.2-89.2c0-49.3-40-89.2-89.2-89.2zm62.7 56.6l-58.9 30.6c-1.8.9-3.8-.4-3.8-2.3V201c0-1.5 1.3-2.7 2.7-2.6 26.2 1 48.9 15.7 61.1 37.1.7 1.3.2 3-1.1 3.7zM389.1 32H58.9C26.4 32 0 58.4 0 90.9V421c0 32.6 26.4 59 58.9 59H389c32.6 0 58.9-26.4 58.9-58.9V90.9C448 58.4 421.6 32 389.1 32zm-202.6 84.7c0-10.8 8.7-19.5 19.5-19.5h45.3c10.8 0 19.5 8.7 19.5 19.5v15.4c0 1.8-1.7 3-3.3 2.5-12.3-3.4-25.1-5.1-38.1-5.1-13.5 0-26.7 1.8-39.4 5.5-1.7.5-3.4-.8-3.4-2.5v-15.8zm-84.4 37l9.2-9.2c7.6-7.6 19.9-7.6 27.5 0l7.7 7.7c1.1 1.1 1 3-.3 4-6.2 4.5-12.1 9.4-17.6 14.9-5.4 5.4-10.4 11.3-14.8 17.4-1 1.3-2.9 1.5-4 .3l-7.7-7.7c-7.6-7.5-7.6-19.8 0-27.4zm127.2 244.8c-70 0-126.6-56.7-126.6-126.6s56.7-126.6 126.6-126.6c70 0 126.6 56.6 126.6 126.6 0 69.8-56.7 126.6-126.6 126.6z"/></svg>

Before

Width:  |  Height:  |  Size: 907 B

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 611.2 512"><path d="M0 325.2c2.3-4.2 5.2-4.9 9.7-2.5 10.4 5.6 20.6 11.4 31.2 16.7 40.7 20.4 83.2 35.6 127.4 46.3 20.9 5 41.9 9 63.2 11.8 31.5 4.2 63.2 6 95 5.2 17.4-.4 34.8-1.8 52.1-3.8 56.4-6.7 110.9-20.8 163.3-42.8 2.9-1.2 5.9-2 9.1-1.2 6.7 1.8 9 9 4.1 13.9-2.8 2.8-6.3 5.1-9.6 7.4-30.7 21.1-64.2 36.4-99.6 47.9-24.6 7.9-49.6 13.8-75.1 17.6-17.6 2.6-35.4 4.4-53.2 4.8-.8 0-1.7.2-2.5.3H294c-.8-.1-1.7-.3-2.5-.3-3.6-.2-7.2-.3-10.7-.4-16.9-.7-33.7-2.6-50.4-5.3-27.4-4.5-54.2-11.4-80.4-20.9-54.1-19.6-102.6-48.6-145.6-87-1.8-1.6-3-3.8-4.4-5.7v-2zM158 65c-1.4.2-2.9.4-4.3.6-14 1.7-26.6 6.9-38 15.1-2.4 1.7-4.6 3.5-7.1 5.4-.2-.5-.4-1-.4-1.4-.4-2.7-.8-5.5-1.3-8.2-.7-4.6-3-6.6-7.6-6.6H87.8c-6.9 0-8.2 1.3-8.2 8.2v209.3c0 1 0 2 .1 3 .2 3 2 4.9 4.9 5 7 .1 14.1.1 21.1 0 2.9 0 4.7-2 5-5 .1-1 .1-2 .1-3V215c1.1.9 1.7 1.4 2.2 1.9 17.9 14.9 38.5 19.8 61 15.4 20.4-4 34.6-16.5 43.8-34.9 7-13.9 9.9-28.7 10.3-44.1.5-17.1-1.2-33.9-8.1-49.8-8.5-19.6-22.6-32.5-43.9-36.9-3.2-.7-6.5-1-9.8-1.5-2.8-.1-5.5-.1-8.3-.1zm-47.4 41.9c0-1.5.4-2.4 1.7-3.3 13.7-9.5 28.8-14.5 45.6-13.2 14.9 1.1 27.1 8.4 33.5 25.9 3.9 10.7 4.9 21.8 4.9 33 0 10.4-.8 20.6-4 30.6-6.8 21.3-22.4 29.4-42.6 28.5-14-.6-26.2-6-37.4-13.9-1.2-.9-1.7-1.7-1.7-3.3.1-14.1 0-28.1 0-42.2 0-14 .1-28 0-42.1zM316.3 65c-1 .1-2 .3-2.9.4-9.8.5-19.4 1.7-28.9 4.1-6.1 1.6-12 3.8-17.9 5.8-3.6 1.2-5.4 3.8-5.3 7.7.1 3.3-.1 6.6 0 9.9.1 4.8 2.1 6.1 6.8 4.9 7.8-2 15.6-4.2 23.5-5.7 12.3-2.3 24.7-3.3 37.2-1.4 6.5 1 12.6 2.9 16.8 8.4 3.7 4.8 5.1 10.5 5.3 16.4.3 8.3.2 16.6.3 24.9 0 .4-.1.9-.2 1.4-.5-.1-.9 0-1.3-.1-10.5-2.5-21.1-4.3-32-4.9-11.3-.6-22.5.1-33.3 3.9-12.9 4.5-23.3 12.3-29.4 24.9-4.7 9.8-5.4 20.2-3.9 30.7 2 14 9 24.8 21.4 31.7 11.9 6.6 24.8 7.4 37.9 5.4 15.1-2.3 28.5-8.7 40.3-18.4.4-.4.9-.7 1.6-1.1.6 3.8 1.1 7.4 1.8 11 .6 3.1 2.5 5.1 5.4 5.2 5.4.1 10.9.1 16.3 0 2.7-.1 4.5-1.9 4.8-4.7.1-.9.1-1.9.1-2.8v-106c0-4.3-.2-8.6-.9-12.9-1.9-12.9-7.4-23.5-19-30.4-6.7-4-14.1-6-21.8-7.1-3.6-.5-7.2-.8-10.8-1.3-3.9.1-7.9.1-11.9.1zm35 127.7c0 1.3-.4 2.2-1.5 3-11.2 8.1-23.5 13.5-37.4 14.9-5.7.6-11.4.4-16.8-1.8-6.3-2.5-10.4-6.9-12.4-13.3s-2-13-.1-19.4c2.5-8.3 8.4-13 16.4-15.6 8.1-2.6 16.5-3 24.8-2.2 8.4.7 16.6 2.3 25 3.4 1.6.2 2.1 1 2.1 2.6-.1 4.8 0 9.5 0 14.3-.1 4.7-.2 9.4-.1 14.1zm259.9 129.4c-1-5-4.8-6.9-9.1-8.3-6.8-2.3-13.9-3.3-21-3.9-13.1-1.1-26.2-.5-39.2 1.9-14.3 2.7-27.9 7.3-40 15.6-1.4 1-2.8 2.1-3.7 3.5-.7 1.1-.9 2.8-.5 4 .4 1.5 2.1 1.9 3.6 1.8.7 0 1.5 0 2.2-.1 7.8-.8 15.5-1.7 23.3-2.5 11.4-1.1 22.9-1.8 34.3-.9 4.8.3 9.7 1.4 14.4 2.7 5.1 1.4 7.4 5.2 7.6 10.4.4 8-1.4 15.7-3.5 23.3-4.1 15.4-10 30.3-15.8 45.1-.4 1-.8 2-1 3-.5 2.9 1.2 4.8 4.1 4.1 1.7-.4 3.6-1.3 4.8-2.5 4.4-4.3 8.9-8.6 12.7-13.4 12.8-16.4 20.3-35.3 24.7-55.6.8-3.6 1.4-7.3 2.1-10.9v-17.3zM479.1 198.9c-12.9-35.7-25.8-71.5-38.7-107.2-2-5.7-4.2-11.3-6.3-16.9-1.1-2.9-3.2-4.8-6.4-4.8-7.6-.1-15.2-.2-22.9-.1-2.5 0-3.7 2-3.2 4.5.5 2.1 1.1 4.1 1.9 6.1 19.6 48.5 39.3 97.1 59.1 145.5 1.7 4.1 2.1 7.6.2 11.8-3.3 7.3-5.9 15-9.3 22.3-3 6.5-8 11.4-15.2 13.3-5.1 1.4-10.2 1.6-15.4 1.1-2.5-.2-5-.8-7.5-1-3.4-.2-5.1 1.3-5.2 4.8-.1 3.3-.1 6.6 0 9.9.1 5.5 2 8 7.4 8.9 5.6 1 11.3 1.9 16.9 2 17.1.4 30.7-6.5 39.5-21.4 3.5-5.9 6.7-12.1 9.2-18.4 23.7-59.8 47.1-119.7 70.6-179.6.7-1.8 1.3-3.6 1.6-5.5.4-2.8-.9-4.4-3.7-4.4-6.6-.1-13.3 0-19.9 0-3.7 0-6.3 1.6-7.7 5.2-.5 1.4-1.1 2.7-1.6 4.1-11.6 33.3-23.2 66.6-34.8 100-2.5 7.2-5.1 14.5-7.7 22.2-.4-1.1-.6-1.7-.9-2.4z"/></svg>

Before

Width:  |  Height:  |  Size: 3.3 KiB

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M257.2 162.7c-48.7 1.8-169.5 15.5-169.5 117.5 0 109.5 138.3 114 183.5 43.2 6.5 10.2 35.4 37.5 45.3 46.8l56.8-56S341 288.9 341 261.4V114.3C341 89 316.5 32 228.7 32 140.7 32 94 87 94 136.3l73.5 6.8c16.3-49.5 54.2-49.5 54.2-49.5 40.7-.1 35.5 29.8 35.5 69.1zm0 86.8c0 80-84.2 68-84.2 17.2 0-47.2 50.5-56.7 84.2-57.8v40.6zm136 163.5c-7.7 10-70 67-174.5 67S34.2 408.5 9.7 379c-6.8-7.7 1-11.3 5.5-8.3C88.5 415.2 203 488.5 387.7 401c7.5-3.7 13.3 2 5.5 12zm39.8 2.2c-6.5 15.8-16 26.8-21.2 31-5.5 4.5-9.5 2.7-6.5-3.8s19.3-46.5 12.7-55c-6.5-8.3-37-4.3-48-3.2-10.8 1-13 2-14-.3-2.3-5.7 21.7-15.5 37.5-17.5 15.7-1.8 41-.8 46 5.7 3.7 5.1 0 27.1-6.5 43.1z"/></svg>

Before

Width:  |  Height:  |  Size: 720 B

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M240.1 32c-61.9 0-131.5 16.9-184.2 55.4-5.1 3.1-9.1 9.2-7.2 19.4 1.1 5.1 5.1 27.4 10.2 39.6 4.1 10.2 14.2 10.2 20.3 6.1 32.5-22.3 96.5-47.7 152.3-47.7 57.9 0 58.9 28.4 58.9 73.1v38.5C203 227.7 78.2 251 46.7 264.2 11.2 280.5 16.3 357.7 16.3 376s15.2 104 124.9 104c47.8 0 113.7-20.7 153.3-42.1v25.4c0 3 2.1 8.2 6.1 9.1 3.1 1 50.7 2 59.9 2s62.5.3 66.5-.7c4.1-1 5.1-6.1 5.1-9.1V168c-.1-80.3-57.9-136-192-136zm-87.9 327.7c0-12.2-3-42.7 18.3-52.9 24.3-13.2 75.1-29.4 119.8-33.5V380c-21.4 13.2-48.7 24.4-79.1 24.4-52.8 0-58.9-33.5-59-44.7"/></svg>

Before

Width:  |  Height:  |  Size: 611 B

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M89.6 204.5v115.8c0 15.4-12.1 27.7-27.5 27.7-15.3 0-30.1-12.4-30.1-27.7V204.5c0-15.1 14.8-27.5 30.1-27.5 15.1 0 27.5 12.4 27.5 27.5zm10.8 157c0 16.4 13.2 29.6 29.6 29.6h19.9l.3 61.1c0 36.9 55.2 36.6 55.2 0v-61.1h37.2v61.1c0 36.7 55.5 36.8 55.5 0v-61.1h20.2c16.2 0 29.4-13.2 29.4-29.6V182.1H100.4v179.4zm248-189.1H99.3c0-42.8 25.6-80 63.6-99.4l-19.1-35.3c-2.8-4.9 4.3-8 6.7-3.8l19.4 35.6c34.9-15.5 75-14.7 108.3 0L297.5 34c2.5-4.3 9.5-1.1 6.7 3.8L285.1 73c37.7 19.4 63.3 56.6 63.3 99.4zm-170.7-55.5c0-5.7-4.6-10.5-10.5-10.5-5.7 0-10.2 4.8-10.2 10.5s4.6 10.5 10.2 10.5c5.9 0 10.5-4.8 10.5-10.5zm113.4 0c0-5.7-4.6-10.5-10.2-10.5-5.9 0-10.5 4.8-10.5 10.5s4.6 10.5 10.5 10.5c5.6 0 10.2-4.8 10.2-10.5zm94.8 60.1c-15.1 0-27.5 12.1-27.5 27.5v115.8c0 15.4 12.4 27.7 27.5 27.7 15.4 0 30.1-12.4 30.1-27.7V204.5c0-15.4-14.8-27.5-30.1-27.5z"/></svg>

Before

Width:  |  Height:  |  Size: 907 B

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M347.1 215.4c11.7-32.6 45.4-126.9 45.4-157.1 0-26.6-15.7-48.9-43.7-48.9-44.6 0-84.6 131.7-97.1 163.1C242 144 196.6 0 156.6 0c-31.1 0-45.7 22.9-45.7 51.7 0 35.3 34.2 126.8 46.6 162-6.3-2.3-13.1-4.3-20-4.3-23.4 0-48.3 29.1-48.3 52.6 0 8.9 4.9 21.4 8 29.7-36.9 10-51.1 34.6-51.1 71.7C46 435.6 114.4 512 210.6 512c118 0 191.4-88.6 191.4-202.9 0-43.1-6.9-82-54.9-93.7zM311.7 108c4-12.3 21.1-64.3 37.1-64.3 8.6 0 10.9 8.9 10.9 16 0 19.1-38.6 124.6-47.1 148l-34-6 33.1-93.7zM142.3 48.3c0-11.9 14.5-45.7 46.3 47.1l34.6 100.3c-15.6-1.3-27.7-3-35.4 1.4-10.9-28.8-45.5-119.7-45.5-148.8zM140 244c29.3 0 67.1 94.6 67.1 107.4 0 5.1-4.9 11.4-10.6 11.4-20.9 0-76.9-76.9-76.9-97.7.1-7.7 12.7-21.1 20.4-21.1zm184.3 186.3c-29.1 32-66.3 48.6-109.7 48.6-59.4 0-106.3-32.6-128.9-88.3-17.1-43.4 3.8-68.3 20.6-68.3 11.4 0 54.3 60.3 54.3 73.1 0 4.9-7.7 8.3-11.7 8.3-16.1 0-22.4-15.5-51.1-51.4-29.7 29.7 20.5 86.9 58.3 86.9 26.1 0 43.1-24.2 38-42 3.7 0 8.3.3 11.7-.6 1.1 27.1 9.1 59.4 41.7 61.7 0-.9 2-7.1 2-7.4 0-17.4-10.6-32.6-10.6-50.3 0-28.3 21.7-55.7 43.7-71.7 8-6 17.7-9.7 27.1-13.1 9.7-3.7 20-8 27.4-15.4-1.1-11.2-5.7-21.1-16.9-21.1-27.7 0-120.6 4-120.6-39.7 0-6.7.1-13.1 17.4-13.1 32.3 0 114.3 8 138.3 29.1 18.1 16.1 24.3 113.2-31 174.7zm-98.6-126c9.7 3.1 19.7 4 29.7 6-7.4 5.4-14 12-20.3 19.1-2.8-8.5-6.2-16.8-9.4-25.1z"/></svg>

Before

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path d="M640 238.2l-3.2 28.2-34.5 2.3-2 18.1 34.5-2.3-3.2 28.2-34.4 2.2-2.3 20.1 34.4-2.2-3 26.1-64.7 4.1 12.7-113.2L527 365.2l-31.9 2-23.8-117.8 30.3-2 13.6 79.4 31.7-82.4 93.1-6.2zM426.8 371.5l28.3-1.8L468 249.6l-28.4 1.9-12.8 120zM162 388.1l-19.4-36-3.5 37.4-28.2 1.7 2.7-29.1c-11 18-32 34.3-56.9 35.8C23.9 399.9-3 377 .3 339.7c2.6-29.3 26.7-62.8 67.5-65.4 37.7-2.4 47.6 23.2 51.3 28.8l2.8-30.8 38.9-2.5c20.1-1.3 38.7 3.7 42.5 23.7l2.6-26.6 64.8-4.2-2.7 27.9-36.4 2.4-1.7 17.9 36.4-2.3-2.7 27.9-36.4 2.3-1.9 19.9 36.3-2.3-2.1 20.8 55-117.2 23.8-1.6L370.4 369l8.9-85.6-22.3 1.4 2.9-27.9 75-4.9-3 28-24.3 1.6-9.7 91.9-58 3.7-4.3-15.6-39.4 2.5-8 16.3-126.2 7.7zm-44.3-70.2l-26.4 1.7C84.6 307.2 76.9 303 65 303.8c-19 1.2-33.3 17.5-34.6 33.3-1.4 16 7.3 32.5 28.7 31.2 12.8-.8 21.3-8.6 28.9-18.9l27-1.7 2.7-29.8zm56.1-7.7c1.2-12.9-7.6-13.6-26.1-12.4l-2.7 28.5c14.2-.9 27.5-2.1 28.8-16.1zm21.1 70.8l5.8-60c-5 13.5-14.7 21.1-27.9 26.6l22.1 33.4zm135.4-45l-7.9-37.8-15.8 39.3 23.7-1.5zm-170.1-74.6l-4.3-17.5-39.6 2.6-8.1 18.2-31.9 2.1 57-121.9 23.9-1.6 30.7 102 9.9-104.7 27-1.8 37.8 63.6 6.5-66.6 28.5-1.9-4 41.2c7.4-13.5 22.9-44.7 63.6-47.5 40.5-2.8 52.4 29.3 53.4 30.3l3.3-32 39.3-2.7c12.7-.9 27.8.3 36.3 9.7l-4.4-11.9 32.2-2.2 12.9 43.2 23-45.7 31-2.2-43.6 78.4-4.8 44.3-28.4 1.9 4.8-44.3-15.8-43c1 22.3-9.2 40.1-32 49.6l25.2 38.8-36.4 2.4-19.2-36.8-4 38.3-28.4 1.9 3.3-31.5c-6.7 9.3-19.7 35.4-59.6 38-26.2 1.7-45.6-10.3-55.4-39.2l-4 40.3-25 1.6-37.6-63.3-6.3 66.2-56.8 3.7zm276.6-82.1c10.2-.7 17.5-2.1 21.6-4.3 4.5-2.4 7-6.4 7.6-12.1.6-5.3-.6-8.8-3.4-10.4-3.6-2.1-10.6-2.8-22.9-2l-2.9 28.8zM327.7 214c5.6 5.9 12.7 8.5 21.3 7.9 4.7-.3 9.1-1.8 13.3-4.1 5.5-3 10.6-8 15.1-14.3l-34.2 2.3 2.4-23.9 63.1-4.3 1.2-12-31.2 2.1c-4.1-3.7-7.8-6.6-11.1-8.1-4-1.7-8.1-2.8-12.2-2.5-8 .5-15.3 3.6-22 9.2-7.7 6.4-12 14.5-12.9 24.4-1.1 9.6 1.4 17.3 7.2 23.3zm-201.3 8.2l23.8-1.6-8.3-37.6-15.5 39.2z"/></svg>

Before

Width:  |  Height:  |  Size: 1.9 KiB

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 415.6 512"><path d="M169.7 268.1h76.2l-38.1-91.6-38.1 91.6zM207.8 32L0 106.4l31.8 275.7 176 97.9 176-97.9 31.8-275.7L207.8 32zM338 373.8h-48.6l-26.2-65.4H152.6l-26.2 65.4H77.7L207.8 81.5 338 373.8z"/></svg>

Before

Width:  |  Height:  |  Size: 259 B

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zM127 384.5c-5.5 9.6-17.8 12.8-27.3 7.3-9.6-5.5-12.8-17.8-7.3-27.3l14.3-24.7c16.1-4.9 29.3-1.1 39.6 11.4L127 384.5zm138.9-53.9H84c-11 0-20-9-20-20s9-20 20-20h51l65.4-113.2-20.5-35.4c-5.5-9.6-2.2-21.8 7.3-27.3 9.6-5.5 21.8-2.2 27.3 7.3l8.9 15.4 8.9-15.4c5.5-9.6 17.8-12.8 27.3-7.3 9.6 5.5 12.8 17.8 7.3 27.3l-85.8 148.6h62.1c20.2 0 31.5 23.7 22.7 40zm98.1 0h-29l19.6 33.9c5.5 9.6 2.2 21.8-7.3 27.3-9.6 5.5-21.8 2.2-27.3-7.3-32.9-56.9-57.5-99.7-74-128.1-16.7-29-4.8-58 7.1-67.8 13.1 22.7 32.7 56.7 58.9 102h52c11 0 20 9 20 20 0 11.1-9 20-20 20z"/></svg>

Before

Width:  |  Height:  |  Size: 726 B

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M255.9 120.9l9.1-15.7c5.6-9.8 18.1-13.1 27.9-7.5 9.8 5.6 13.1 18.1 7.5 27.9l-87.5 151.5h63.3c20.5 0 32 24.1 23.1 40.8H113.8c-11.3 0-20.4-9.1-20.4-20.4 0-11.3 9.1-20.4 20.4-20.4h52l66.6-115.4-20.8-36.1c-5.6-9.8-2.3-22.2 7.5-27.9 9.8-5.6 22.2-2.3 27.9 7.5l8.9 15.7zm-78.7 218l-19.6 34c-5.6 9.8-18.1 13.1-27.9 7.5-9.8-5.6-13.1-18.1-7.5-27.9l14.6-25.2c16.4-5.1 29.8-1.2 40.4 11.6zm168.9-61.7h53.1c11.3 0 20.4 9.1 20.4 20.4 0 11.3-9.1 20.4-20.4 20.4h-29.5l19.9 34.5c5.6 9.8 2.3 22.2-7.5 27.9-9.8 5.6-22.2 2.3-27.9-7.5-33.5-58.1-58.7-101.6-75.4-130.6-17.1-29.5-4.9-59.1 7.2-69.1 13.4 23 33.4 57.7 60.1 104zM256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm216 248c0 118.7-96.1 216-216 216-118.7 0-216-96.1-216-216 0-118.7 96.1-216 216-216 118.7 0 216 96.1 216 216z" class="st0"/></svg>

Before

Width:  |  Height:  |  Size: 870 B

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path d="M42.1 239.1c22.2 0 29 2.8 33.5 14.6h.8v-22.9c0-11.3-4.8-15.4-17.9-15.4-11.3 0-14.4 2.5-15.1 12.8H4.8c.3-13.9 1.5-19.1 5.8-24.4C17.9 195 29.5 192 56.7 192c33 0 47.1 5 53.9 18.9 2 4.3 4 15.6 4 23.7v76.3H76.3l1.3-19.1h-1c-5.3 15.6-13.6 20.4-35.5 20.4-30.3 0-41.1-10.1-41.1-37.3 0-25.2 12.3-35.8 42.1-35.8zm17.1 48.1c13.1 0 16.9-3 16.9-13.4 0-9.1-4.3-11.6-19.6-11.6-13.1 0-17.9 3-17.9 12.1-.1 10.4 3.7 12.9 20.6 12.9zm77.8-94.9h38.3l-1.5 20.6h.8c9.1-17.1 15.9-20.9 37.5-20.9 14.4 0 24.7 3 31.5 9.1 9.8 8.6 12.8 20.4 12.8 48.1 0 30-3 43.1-12.1 52.9-6.8 7.3-16.4 10.1-33.2 10.1-20.4 0-29.2-5.5-33.8-21.2h-.8v70.3H137v-169zm80.9 60.7c0-27.5-3.3-32.5-20.7-32.5-16.9 0-20.7 5-20.7 28.7 0 28 3.5 33.5 21.2 33.5 16.4 0 20.2-5.6 20.2-29.7zm57.9-60.7h38.3l-1.5 20.6h.8c9.1-17.1 15.9-20.9 37.5-20.9 14.4 0 24.7 3 31.5 9.1 9.8 8.6 12.8 20.4 12.8 48.1 0 30-3 43.1-12.1 52.9-6.8 7.3-16.4 10.1-33.3 10.1-20.4 0-29.2-5.5-33.8-21.2h-.8v70.3h-39.5v-169zm80.9 60.7c0-27.5-3.3-32.5-20.7-32.5-16.9 0-20.7 5-20.7 28.7 0 28 3.5 33.5 21.2 33.5 16.4 0 20.2-5.6 20.2-29.7zm53.8-3.8c0-25.4 3.3-37.8 12.3-45.8 8.8-8.1 22.2-11.3 45.1-11.3 42.8 0 55.7 12.8 55.7 55.7v11.1h-75.3c-.3 2-.3 4-.3 4.8 0 16.9 4.5 21.9 20.1 21.9 13.9 0 17.9-3 17.9-13.9h37.5v2.3c0 9.8-2.5 18.9-6.8 24.7-7.3 9.8-19.6 13.6-44.3 13.6-27.5 0-41.6-3.3-50.6-12.3-8.5-8.5-11.3-21.3-11.3-50.8zm76.4-11.6c-.3-1.8-.3-3.3-.3-3.8 0-12.3-3.3-14.6-19.6-14.6-14.4 0-17.1 3-18.1 15.1l-.3 3.3h38.3zm55.6-45.3h38.3l-1.8 19.9h.7c6.8-14.9 14.4-20.2 29.7-20.2 10.8 0 19.1 3.3 23.4 9.3 5.3 7.3 6.8 14.4 6.8 34 0 1.5 0 5 .2 9.3h-35c.3-1.8.3-3.3.3-4 0-15.4-2-19.4-10.3-19.4-6.3 0-10.8 3.3-13.1 9.3-1 3-1 4.3-1 12.3v68h-38.3V192.3z"/></svg>

Before

Width:  |  Height:  |  Size: 1.7 KiB

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path d="M116.9 158.5c-7.5 8.9-19.5 15.9-31.5 14.9-1.5-12 4.4-24.8 11.3-32.6 7.5-9.1 20.6-15.6 31.3-16.1 1.2 12.4-3.7 24.7-11.1 33.8m10.9 17.2c-17.4-1-32.3 9.9-40.5 9.9-8.4 0-21-9.4-34.8-9.1-17.9.3-34.5 10.4-43.6 26.5-18.8 32.3-4.9 80 13.3 106.3 8.9 13 19.5 27.3 33.5 26.8 13.3-.5 18.5-8.6 34.5-8.6 16.1 0 20.8 8.6 34.8 8.4 14.5-.3 23.6-13 32.5-26 10.1-14.8 14.3-29.1 14.5-29.9-.3-.3-28-10.9-28.3-42.9-.3-26.8 21.9-39.5 22.9-40.3-12.5-18.6-32-20.6-38.8-21.1m100.4-36.2v194.9h30.3v-66.6h41.9c38.3 0 65.1-26.3 65.1-64.3s-26.4-64-64.1-64h-73.2zm30.3 25.5h34.9c26.3 0 41.3 14 41.3 38.6s-15 38.8-41.4 38.8h-34.8V165zm162.2 170.9c19 0 36.6-9.6 44.6-24.9h.6v23.4h28v-97c0-28.1-22.5-46.3-57.1-46.3-32.1 0-55.9 18.4-56.8 43.6h27.3c2.3-12 13.4-19.9 28.6-19.9 18.5 0 28.9 8.6 28.9 24.5v10.8l-37.8 2.3c-35.1 2.1-54.1 16.5-54.1 41.5.1 25.2 19.7 42 47.8 42zm8.2-23.1c-16.1 0-26.4-7.8-26.4-19.6 0-12.3 9.9-19.4 28.8-20.5l33.6-2.1v11c0 18.2-15.5 31.2-36 31.2zm102.5 74.6c29.5 0 43.4-11.3 55.5-45.4L640 193h-30.8l-35.6 115.1h-.6L537.4 193h-31.6L557 334.9l-2.8 8.6c-4.6 14.6-12.1 20.3-25.5 20.3-2.4 0-7-.3-8.9-.5v23.4c1.8.4 9.3.7 11.6.7z"/></svg>

Before

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 376.5 512"><path d="M314.7 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7C59.3 141.2 0 184.8 0 273.5c0 26.2 4.8 53.3 14.4 81.2 12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9zm-56.6-164.2c27.3-32.4 24.8-61.9 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3z"/></svg>

Before

Width:  |  Height:  |  Size: 526 B

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path d="M517.5 309.2c38.8-40 58.1-80 58.5-116.1.8-65.5-59.4-118.2-169.4-135C277.9 38.4 118.1 73.6 0 140.5 52 114 110.6 92.3 170.7 82.3c74.5-20.5 153-25.4 221.3-14.8C544.5 91.3 588.8 195 490.8 299.2c-10.2 10.8-22 21.1-35 30.6L304.9 103.4 114.7 388.9c-65.6-29.4-76.5-90.2-19.1-151.2 20.8-22.2 48.3-41.9 79.5-58.1 20-12.2 39.7-22.6 62-30.7-65.1 20.3-122.7 52.9-161.6 92.9-27.7 28.6-41.4 57.1-41.7 82.9-.5 35.1 23.4 65.1 68.4 83l-34.5 51.7h101.6l22-34.4c22.2 1 45.3 0 68.6-2.7l-22.8 37.1h135.5L340 406.3c18.6-5.3 36.9-11.5 54.5-18.7l45.9 71.8H542L468.6 349c18.5-12.1 35-25.5 48.9-39.8zm-187.6 80.5l-25-40.6-32.7 53.3c-23.4 3.5-46.7 5.1-69.2 4.4l101.9-159.3 78.7 123c-17.2 7.4-35.3 13.9-53.7 19.2z"/></svg>

Before

Width:  |  Height:  |  Size: 764 B

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path d="M640 199.9v54l-320 200L0 254v-54l320 200 320-200.1zm-194.5 72l47.1-29.4c-37.2-55.8-100.7-92.6-172.7-92.6-72 0-135.5 36.7-172.6 92.4h.3c2.5-2.3 5.1-4.5 7.7-6.7 89.7-74.4 219.4-58.1 290.2 36.3zm-220.1 18.8c16.9-11.9 36.5-18.7 57.4-18.7 34.4 0 65.2 18.4 86.4 47.6l45.4-28.4c-20.9-29.9-55.6-49.5-94.8-49.5-38.9 0-73.4 19.4-94.4 49zM103.6 161.1c131.8-104.3 318.2-76.4 417.5 62.1l.7 1 48.8-30.4C517.1 112.1 424.8 58.1 319.9 58.1c-103.5 0-196.6 53.5-250.5 135.6 9.9-10.5 22.7-23.5 34.2-32.6zm467 32.7z"/></svg>

Before

Width:  |  Height:  |  Size: 574 B

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path d="M318.4 16l-161 480h77.5l25.4-81.4h119.5L405 496h77.5L318.4 16zm-40.3 341.9l41.2-130.4h1.5l40.9 130.4h-83.6zM640 405l-10-31.4L462.1 358l19.4 56.5L640 405zm-462.1-47L10 373.7 0 405l158.5 9.4 19.4-56.4z"/></svg>

Before

Width:  |  Height:  |  Size: 279 B

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M453.1 32h-312c-38.9 0-76.2 31.2-83.3 69.7L1.2 410.3C-5.9 448.8 19.9 480 58.9 480h312c38.9 0 76.2-31.2 83.3-69.7l56.7-308.5c7-38.6-18.8-69.8-57.8-69.8zm-58.2 347.3l-32 13.5-115.4-110c-14.7 10-29.2 19.5-41.7 27.1l22.1 64.2-17.9 12.7-40.6-61-52.4-48.1 15.7-15.4 58 31.1c9.3-10.5 20.8-22.6 32.8-34.9L203 228.9l-68.8-99.8 18.8-28.9 8.9-4.8L265 207.8l4.9 4.5c19.4-18.8 33.8-32.4 33.8-32.4 7.7-6.5 21.5-2.9 30.7 7.9 9 10.5 10.6 24.7 2.7 31.3-1.8 1.3-15.5 11.4-35.3 25.6l4.5 7.3 94.9 119.4-6.3 7.9z"/></svg>

Before

Width:  |  Height:  |  Size: 571 B

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path d="M107.2 283.5l-19-41.8H36.1l-19 41.8H0l62.2-131.4 62.2 131.4h-17.2zm-45-98.1l-19.6 42.5h39.2l-19.6-42.5zm112.7 102.4l-62.2-131.4h17.1l45.1 96 45.1-96h17l-62.1 131.4zm80.6-4.3V156.4H271v127.1h-15.5zm209.1-115.6v115.6h-17.3V167.9h-41.2v-11.5h99.6v11.5h-41.1zM640 218.8c0 9.2-1.7 17.8-5.1 25.8-3.4 8-8.2 15.1-14.2 21.1-6 6-13.1 10.8-21.1 14.2-8 3.4-16.6 5.1-25.8 5.1s-17.8-1.7-25.8-5.1c-8-3.4-15.1-8.2-21.1-14.2-6-6-10.8-13-14.2-21.1-3.4-8-5.1-16.6-5.1-25.8s1.7-17.8 5.1-25.8c3.4-8 8.2-15.1 14.2-21.1 6-6 13-8.4 21.1-11.9 8-3.4 16.6-5.1 25.8-5.1s17.8 1.7 25.8 5.1c8 3.4 15.1 5.8 21.1 11.9 6 6 10.7 13.1 14.2 21.1 3.4 8 5.1 16.6 5.1 25.8zm-15.5 0c0-7.3-1.3-14-3.9-20.3-2.6-6.3-6.2-11.7-10.8-16.3-4.6-4.6-10-8.2-16.2-10.9-6.2-2.7-12.8-4-19.8-4s-13.6 1.3-19.8 4c-6.2 2.7-11.6 6.3-16.2 10.9-4.6 4.6-8.2 10-10.8 16.3-2.6 6.3-3.9 13.1-3.9 20.3 0 7.3 1.3 14 3.9 20.3 2.6 6.3 6.2 11.7 10.8 16.3 4.6 4.6 10 8.2 16.2 10.9 6.2 2.7 12.8 4 19.8 4s13.6-1.3 19.8-4c6.2-2.7 11.6-6.3 16.2-10.9 4.6-4.6 8.2-10 10.8-16.3 2.6-6.3 3.9-13.1 3.9-20.3zm-94.8 96.7v-6.3l88.9-10-242.9 13.4c.6-2.2 1.1-4.6 1.4-7.2.3-2 .5-4.2.6-6.5l64.8-8.1-64.9 1.9c0-.4-.1-.7-.1-1.1-2.8-17.2-25.5-23.7-25.5-23.7l-1.1-26.3h23.8l19 41.8h17.1L348.6 152l-62.2 131.4h17.1l19-41.8h23.6L345 268s-22.7 6.5-25.5 23.7c-.1.3-.1.7-.1 1.1l-64.9-1.9 64.8 8.1c.1 2.3.3 4.4.6 6.5.3 2.6.8 5 1.4 7.2L78.4 299.2l88.9 10v6.3c-5.9.9-10.5 6-10.5 12.2 0 6.8 5.6 12.4 12.4 12.4 6.8 0 12.4-5.6 12.4-12.4 0-6.2-4.6-11.3-10.5-12.2v-5.8l80.3 9v5.4c-5.7 1.1-9.9 6.2-9.9 12.1 0 6.8 5.6 10.2 12.4 10.2 6.8 0 12.4-3.4 12.4-10.2 0-6-4.3-11-9.9-12.1v-4.9l28.4 3.2v23.7h-5.9V360h5.9v-6.6h5v6.6h5.9v-13.8h-5.9V323l38.3 4.3c8.1 11.4 19 13.6 19 13.6l-.1 6.7-5.1.2-.1 12.1h4.1l.1-5h5.2l.1 5h4.1l-.1-12.1-5.1-.2-.1-6.7s10.9-2.1 19-13.6l38.3-4.3v23.2h-5.9V360h5.9v-6.6h5v6.6h5.9v-13.8h-5.9v-23.7l28.4-3.2v4.9c-5.7 1.1-9.9 6.2-9.9 12.1 0 6.8 5.6 10.2 12.4 10.2 6.8 0 12.4-3.4 12.4-10.2 0-6-4.3-11-9.9-12.1v-5.4l80.3-9v5.8c-5.9.9-10.5 6-10.5 12.2 0 6.8 5.6 12.4 12.4 12.4 6.8 0 12.4-5.6 12.4-12.4-.2-6.3-4.7-11.4-10.7-12.3zm-200.8-87.6l19.6-42.5 19.6 42.5h-17.9l-1.7-40.3-1.7 40.3h-17.9z" class="st1"/></svg>

Before

Width:  |  Height:  |  Size: 2.1 KiB

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M261.2 136.1c-14 57.5-13.1 54.4-25.8 107-1.6 6.5-4.1 8.4-10.7 8.5h-14.4c-5.8-.1-8.2-1.6-9.9-7.3-12.3-39.4-28.8-94.1-39.9-130.7-4.1-13.5-1.4-13.2 9.3-12.9 3.7.1 7.3 0 11 0 5.1.1 7.7 2 9.1 7.1 3.6 12.9 6 22.8 26.6 104.1.4 1.6.9 3.1 1.4 4.6h1.1c.5-2 1.1-3.9 1.6-5.9 7.8-32.9 15.5-65.9 23.3-98.8 2.4-10.2 6.7-11.2 17-11.2h7.6c6.9.1 9 1.5 10.7 8.3 6 23.4 23.5 101.8 26.7 110.4 5.1-18.3-1.8 7.9 28.5-109 2.1-8.1 4.1-9.7 12.3-9.7h12.7c5.4.1 7 1.8 5.7 7.1-2.4 9.5-2.9 9.9-41.3 132.9-3.1 9.9-4.2 10.8-14.6 10.8h-10.6c-7.3 0-9.2-1.3-11-8.4-4.3-16.2-23.3-95.7-26.4-106.9zM125.4 247.3c4.2 5.8 8.1 6.3 14.1 2.4l6.3-4.2c6.8-4.5 7.3-6.3 3.6-13.5-4.3-8.4-6.4-17.3-6.3-26.9 0-3.1.6-55.7-.9-66.8-2.7-19.3-12.5-32.8-31.7-38.7-10.7-3.4-21.7-3.3-32.7-3-15.1.4-29.4 4.6-42.8 11.4-1.8.9-3.7 3.1-4.1 4.9-.8 3.9-1.1 8.1-.7 12.1.6 5.9 2.6 7 8.2 5.1 5.1-1.7 10-3.9 15.1-5.4 14.5-4.4 29.2-6.4 44.1-1.7 7.1 2.2 11.7 6.9 14.3 13.8 3 7.9 2.4 16.1 2.4 24.2 0 5.5-.1 5.5-5.5 4.5-13.9-2.6-27.7-5-41.9-3.1-15.2 2.1-28.6 7.3-38.2 20-9.1 12-10 25.6-7.4 39.5 2.8 15 11.8 25.7 26.4 30.4 20.6 6.7 40.1 3.3 57.7-9.5 3.8-2.8 7.2-6.2 11.1-9.5 3.1 5 5.8 9.7 8.9 14zm-15.3-61.6c3 .4 4.5 1.9 4.3 5.1-.2 3.8.1 7.6-.3 11.4-1.2 11.7-7.7 19.7-17.9 24.9-8.2 4.2-16.9 5.8-26.1 5-15.2-1.3-21-13.1-19.6-26.3C51.8 193.2 59 186.2 72 184c13.8-2.4 16-1.1 38.1 1.7zm348.8 65.1c21.3-8.6 32.9-26.2 29.2-50-2.2-14.6-11.8-24.2-25.2-29.5-14.7-5.9-33.8-10.3-48.1-18.2-4.4-2.4-7.4-6.3-7.6-11.9-.4-11.1 4.2-17.2 15.4-19.8 9.3-2.1 18.8-2.2 28.1-.4 7.3 1.4 14.3 4.2 21.4 6.3 2.8.9 5.9 2.1 7.8-1.6 3.8-7.3.4-18.7-7.3-21.8-22.5-9-45.5-11.6-68.2-1.6-14.6 6.4-24.6 17.4-26 34.2-1.6 19.3 6.9 33.4 24.1 41.7 7.7 3.7 16.1 5.9 24.2 8.9 8.1 3 16.2 5.8 24.1 9.1 12.3 5.3 11.6 24.2 1.2 30-27.7 15.3-64.9-2.4-69.2-3.8-3.3-1.1-5.3.2-6.3 3.7-3 11.3.7 18.8 11.6 22.7 21.7 7.9 49.6 10.5 70.8 2zM296 413.5c50.8-5.8 98.7-20.8 142.7-47 8-4.7 15.5-10.3 23.1-15.7 7.3-5.2 3.2-18.4-11.3-12.2-54.4 23.2-111.2 36.1-170.2 38.9-30.5 1.5-60.8-.3-91.1-4.7-63.1-9.2-122.4-29.2-177.6-61.2-2.1-1.2-4.2-2.5-6.5-3-4.9-1.1-7.7 4.7-2.4 9.7 24 22.1 50.3 40.8 79.1 55.7 53.7 27.7 110.5 42.7 171.2 42 14.4-.8 28.8-.9 43-2.5zm174.7-92.2c14.8.8 19.4 5.9 15.7 20.2-3.8 14.8-9.3 29.2-13.9 43.8-.9 2.9-4.2 6.3-.8 8.8 3.7 2.6 6.5-1 9-3.3 10.2-9.5 17.4-21 22.5-33.8 5.4-13.4 9.3-27.2 8.7-41.9-.2-6.2-1.8-8.8-7.8-10.5-5.4-1.5-11-2.8-16.5-3.2-21.6-1.8-42.5.5-62 10.6-3.1 1.6-6 3.7-8.7 5.9-1.1.9-3.2 5.3 2.4 6.1 1.9.3 3.9-.1 5.9-.3 16.9-1.6 28.6-3.3 45.5-2.4z"/></svg>

Before

Width:  |  Height:  |  Size: 2.5 KiB

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><path d="M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm48.2 326.1h-181L199.9 178h181l-84.7 156.1z"/></svg>

Before

Width:  |  Height:  |  Size: 192 B

Some files were not shown because too many files have changed in this diff Show More