Modernize view tests by using self.<method> instead of
self.client.method. Reduce repetition of reverse method with literal
view name usage.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Add a mixin to ease the amount of code and imports required
for views that extract the content type from URL parameters.
Improve ExternalObjectViewMixin by adding a new class attribute
"external_object_pk_url_kwargs" to mechanize URL parameter
extraction. The external_object_pk_url_kwargs maps model
attributes using during manager get or filter from URL parameters.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Add an extra step before creation of the instance to validate
for duplication. Add the error_message_duplicate class
attribute to allow customization of the error message.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Update the entire with keyword arguments. Update the views
to comply with MERC 6 by returning error 404 on access
failure. API are untouched. Add icon to the ACL delete
button. Add additional view tests. Use the new filtered
choice form to display a select2 enabled role selection
widget. Update the ACL creation view to not redirect to an
existing ACL in case of duplication but to instead stop
and display an error with a suggestion to the user
to instead edit the existing ACL.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Addionally the permission workflow is updated to work in a
reciprocal manner. In order to attach a tag, the user's role
will need the tag attach permissions for both, the document
and the tag.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Add keyword arguments to URL definitions and reverse resolution.
Raise HTTP error 404 instead of 403 to reduce the information
divulged. Add view tests.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
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>
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>
Add new icons for the apps: Document comments, documents, file metadata,
parsing and OCR.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>