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>
This commit is contained in:
@@ -103,6 +103,8 @@
|
||||
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.
|
||||
|
||||
|
||||
3.1.9 (2018-11-01)
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
</div>
|
||||
|
||||
{% get_menus_links names='object menu,sidebar menu,secondary menu' sort_results=True as links %}
|
||||
{% get_menu_links 'object facet' sort_results=True as form_navigation_links %}
|
||||
{% get_menus_links names='object facet,object list facet' sort_results=True as form_navigation_links %}
|
||||
|
||||
<div class="row">
|
||||
{% if links or form_navigation_links %}
|
||||
|
||||
@@ -96,6 +96,14 @@
|
||||
{% endfor %}
|
||||
{% if not hide_links %}
|
||||
<td class="last">
|
||||
{% get_menu_links 'object list facet' sort_results=True source=object as resolved_links %}
|
||||
{% for object_navigation_links in resolved_links %}
|
||||
{% with 'true' as horizontal %}
|
||||
{% with 'true' as hide_icon %}
|
||||
{% include 'navigation/generic_navigation.html' %}
|
||||
{% endwith %}
|
||||
{% endwith %}
|
||||
{% endfor %}
|
||||
{% get_menu_links 'object menu' source=object as resolved_links %}
|
||||
{% for object_navigation_links in resolved_links %}
|
||||
{% with 'true' as horizontal %}
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
<li class="text-center link-text-span" >{{ link.text }}</li>
|
||||
{% else %}
|
||||
{% if link.disabled %}
|
||||
<a class="{{ link.html_extra_classes }} {% if link_classes %}{{ link_classes }} {% else %}btn {% if 'dangerous' in link.tags %}btn-danger{% else %}btn-primary{% endif %} btn-xs{% endif %} {% if link.active %}{{ link_class_active }}{% endif %} {% if 'new_window' in link.tags %}new_window{% endif %} disabled" disabled='disabled' style="cursor: default;" href="#">{% if link.icon %}<i class="hidden-xs hidden-sm hidden-md {{ link.icon }}"></i>{% endif %}{% if link.icon_class %}{{ link.icon_class.render }}{% endif %} {{ link.text }}{% if link.error %} - {{ link.error }}{% endif %}</a>{% if horizontal %}{% if not forloop.last %} {% endif %}{% endif %}
|
||||
<a class="{{ link.html_extra_classes|default:'' }} {% if link_classes %}{{ link_classes }} {% else %}btn {% if 'dangerous' in link.tags %}btn-danger{% else %}btn-primary{% endif %} btn-xs{% endif %} {% if link.active %}{{ link_class_active }}{% endif %} {% if 'new_window' in link.tags %}new_window{% endif %} disabled" disabled='disabled' style="cursor: default;" href="#">{% if link.icon %}<i class="hidden-xs hidden-sm hidden-md {{ link.icon }}"></i>{% endif %}{% if link.icon_class %}{{ link.icon_class.render }}{% endif %} {{ link.text }}{% if link.error %} - {{ link.error }}{% endif %}</a>{% if horizontal %}{% if not forloop.last %} {% endif %}{% endif %}
|
||||
{% else %}
|
||||
<a
|
||||
class="{{ link.html_extra_classes }} {% if link_classes %}{{ link_classes }} {% else %}btn {% if 'dangerous' in link.tags %}btn-danger{% else %}btn-primary{% endif %} btn-xs{% endif %} {% if link.active %}{{ link_class_active }}{% endif %} {% if 'new_window' in link.tags %}new_window{% endif %}"
|
||||
class="{{ link.html_extra_classes|default:'' }} {% if link_classes %}{{ link_classes }} {% else %}btn {% if 'dangerous' in link.tags %}btn-danger{% else %}btn-primary{% endif %} btn-xs{% endif %} {% if link.active %}{{ link_class_active }}{% endif %} {% if 'new_window' in link.tags %}new_window{% endif %}"
|
||||
{% for key,value in link.html_data.items %}
|
||||
data-{{ key }}={{ value }}
|
||||
{% endfor %}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{% load i18n %}
|
||||
|
||||
{% spaceless %}
|
||||
{% if as_dropdown %}
|
||||
<div class="dropdown text-center">
|
||||
<button class="btn btn-default dropdown-toggle btn-danger btn-sm" type="button" id="dropdownMenu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
@@ -23,3 +24,4 @@
|
||||
{% include 'navigation/generic_subnavigation.html' %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endspaceless %}
|
||||
|
||||
@@ -7,17 +7,19 @@ from navigation import Menu
|
||||
from .icons import icon_menu_about, icon_menu_user
|
||||
|
||||
__all__ = (
|
||||
'menu_about', 'menu_facet', 'menu_object', 'menu_main', 'menu_multi_item',
|
||||
'menu_secondary', 'menu_setup', 'menu_sidebar', 'menu_tools', 'menu_user'
|
||||
'menu_about', 'menu_facet', 'menu_list_facet', 'menu_main', 'menu_object',
|
||||
'menu_multi_item', 'menu_secondary', 'menu_setup', 'menu_sidebar',
|
||||
'menu_tools', 'menu_user'
|
||||
)
|
||||
|
||||
menu_about = Menu(
|
||||
icon_class=icon_menu_about, label=_('System'), name='about menu'
|
||||
)
|
||||
menu_facet = Menu(name='object facet')
|
||||
menu_object = Menu(name='object menu')
|
||||
menu_list_facet = Menu(name='object list facet')
|
||||
menu_main = Menu(name='main menu')
|
||||
menu_multi_item = Menu(name='multi item menu')
|
||||
menu_object = Menu(name='object menu')
|
||||
menu_secondary = Menu(name='secondary menu')
|
||||
menu_setup = Menu(name='setup menu')
|
||||
menu_sidebar = Menu(name='sidebar menu')
|
||||
|
||||
@@ -11,8 +11,8 @@ from acls.links import link_acl_list
|
||||
from acls.permissions import permission_acl_edit, permission_acl_view
|
||||
|
||||
from common import (
|
||||
MayanAppConfig, menu_facet, menu_main, menu_object, menu_secondary,
|
||||
menu_setup, menu_tools
|
||||
MayanAppConfig, menu_facet, menu_list_facet, menu_main, menu_object,
|
||||
menu_secondary, menu_setup, menu_tools
|
||||
)
|
||||
from common.widgets import TwoStateWidget
|
||||
from documents.signals import post_document_created, post_initial_document_type
|
||||
@@ -182,11 +182,15 @@ class DocumentIndexingApp(MayanAppConfig):
|
||||
menu_facet.bind_links(
|
||||
links=(link_document_index_list,), sources=(Document,)
|
||||
)
|
||||
menu_list_facet.bind_links(
|
||||
links=(
|
||||
link_acl_list, link_index_setup_document_types,
|
||||
link_index_setup_view,
|
||||
), sources=(Index,)
|
||||
)
|
||||
menu_object.bind_links(
|
||||
links=(
|
||||
link_index_setup_edit, link_index_setup_view,
|
||||
link_index_setup_document_types, link_acl_list,
|
||||
link_index_setup_delete
|
||||
link_index_setup_edit, link_index_setup_delete
|
||||
), sources=(Index,)
|
||||
)
|
||||
menu_object.bind_links(
|
||||
|
||||
@@ -8,6 +8,7 @@ icon_index_level_up = Icon(
|
||||
)
|
||||
icon_index = Icon(driver_name='fontawesome', symbol='list-ul')
|
||||
icon_index_create = Icon(driver_name='fontawesome', symbol='plus')
|
||||
icon_index_setup_view = Icon(driver_name='fontawesome', symbol='folder-open')
|
||||
icon_node_with_documents = Icon(driver_name='fontawesome', symbol='folder')
|
||||
icon_rebuild_index_instances = Icon(
|
||||
driver_name='fontawesome', symbol='list-ul'
|
||||
|
||||
@@ -4,9 +4,11 @@ from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from navigation import Link, get_cascade_condition
|
||||
|
||||
from documents.icons import icon_document_type
|
||||
|
||||
from .icons import (
|
||||
icon_document_index_list, icon_index, icon_index_create,
|
||||
icon_rebuild_index_instances,
|
||||
icon_index_setup_view, icon_rebuild_index_instances,
|
||||
)
|
||||
from .permissions import (
|
||||
permission_document_indexing_create, permission_document_indexing_edit,
|
||||
@@ -58,12 +60,12 @@ link_index_setup_delete = Link(
|
||||
text=_('Delete'), view='indexing:index_setup_delete',
|
||||
)
|
||||
link_index_setup_view = Link(
|
||||
args='resolved_object.pk',
|
||||
args='resolved_object.pk', icon_class=icon_index_setup_view,
|
||||
permissions=(permission_document_indexing_edit,), text=_('Tree template'),
|
||||
view='indexing:index_setup_view',
|
||||
)
|
||||
link_index_setup_document_types = Link(
|
||||
args='resolved_object.pk',
|
||||
args='resolved_object.pk', icon_class=icon_document_type,
|
||||
permissions=(permission_document_indexing_edit,), text=_('Document types'),
|
||||
view='indexing:index_setup_document_types',
|
||||
)
|
||||
|
||||
@@ -9,8 +9,8 @@ from kombu import Exchange, Queue
|
||||
from acls import ModelPermission
|
||||
from acls.links import link_acl_list
|
||||
from common import (
|
||||
MayanAppConfig, menu_facet, menu_main, menu_object, menu_secondary,
|
||||
menu_setup, menu_sidebar, menu_tools
|
||||
MayanAppConfig, menu_facet, menu_list_facet, menu_main, menu_object,
|
||||
menu_secondary, menu_setup, menu_sidebar, menu_tools
|
||||
)
|
||||
from common.classes import ModelAttribute
|
||||
from common.links import link_object_error_list
|
||||
@@ -271,12 +271,17 @@ class DocumentStatesApp(MayanAppConfig):
|
||||
menu_facet.bind_links(
|
||||
links=(link_document_workflow_instance_list,), sources=(Document,)
|
||||
)
|
||||
menu_list_facet.bind_links(
|
||||
links=(
|
||||
link_setup_workflow_document_types,
|
||||
link_setup_workflow_states, link_setup_workflow_transitions,
|
||||
link_workflow_preview, link_acl_list
|
||||
), sources=(Workflow,)
|
||||
)
|
||||
menu_main.bind_links(links=(link_workflow_list,), position=10)
|
||||
menu_object.bind_links(
|
||||
links=(
|
||||
link_setup_workflow_states, link_setup_workflow_transitions,
|
||||
link_setup_workflow_document_types, link_setup_workflow_edit,
|
||||
link_acl_list, link_workflow_preview,
|
||||
link_setup_workflow_edit,
|
||||
link_setup_workflow_delete
|
||||
), sources=(Workflow,)
|
||||
)
|
||||
@@ -338,11 +343,21 @@ class DocumentStatesApp(MayanAppConfig):
|
||||
)
|
||||
)
|
||||
menu_setup.bind_links(links=(link_setup_workflow_list,))
|
||||
menu_sidebar.bind_links(
|
||||
links=(
|
||||
link_setup_workflow_transition_create,
|
||||
), sources=(
|
||||
WorkflowTransition,
|
||||
'document_states:setup_workflow_transition_list',
|
||||
)
|
||||
)
|
||||
menu_sidebar.bind_links(
|
||||
links=(
|
||||
link_setup_workflow_state_create,
|
||||
link_setup_workflow_transition_create
|
||||
), sources=(Workflow,)
|
||||
), sources=(
|
||||
WorkflowState,
|
||||
'document_states:setup_workflow_state_list',
|
||||
)
|
||||
)
|
||||
menu_tools.bind_links(links=(link_tool_launch_all_workflows,))
|
||||
|
||||
|
||||
@@ -9,18 +9,11 @@ icon_setup_workflow_list = Icon(driver_name='fontawesome', symbol='sitemap')
|
||||
icon_tool_launch_all_workflows = Icon(
|
||||
driver_name='fontawesome', symbol='sitemap'
|
||||
)
|
||||
icon_workflow_create = Icon(
|
||||
driver_name='fontawesome', symbol='plus'
|
||||
)
|
||||
icon_workflow_list = Icon(
|
||||
driver_name='fontawesome', symbol='sitemap'
|
||||
)
|
||||
icon_workflow_state = Icon(
|
||||
driver_name='fontawesome', symbol='circle'
|
||||
)
|
||||
icon_workflow_state_action = Icon(
|
||||
driver_name='fontawesome', symbol='code'
|
||||
)
|
||||
icon_workflow_create = Icon(driver_name='fontawesome', symbol='plus')
|
||||
icon_workflow_list = Icon(driver_name='fontawesome', symbol='sitemap')
|
||||
icon_workflow_preview = Icon(driver_name='fontawesome', symbol='eye')
|
||||
icon_workflow_state = Icon(driver_name='fontawesome', symbol='circle')
|
||||
icon_workflow_state_action = Icon(driver_name='fontawesome', symbol='code')
|
||||
icon_workflow_transition = Icon(
|
||||
driver_name='fontawesome', symbol='arrows-alt-h'
|
||||
)
|
||||
|
||||
@@ -2,12 +2,14 @@ from __future__ import unicode_literals
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from documents.icons import icon_document_type
|
||||
from navigation import Link
|
||||
|
||||
from .icons import (
|
||||
icon_document_workflow_instance_list, icon_setup_workflow_list,
|
||||
icon_tool_launch_all_workflows, icon_workflow_create, icon_workflow_list,
|
||||
icon_workflow_state, icon_workflow_state_action, icon_workflow_transition
|
||||
icon_workflow_preview, icon_workflow_state, icon_workflow_state_action,
|
||||
icon_workflow_transition
|
||||
)
|
||||
from .permissions import (
|
||||
permission_workflow_create, permission_workflow_delete,
|
||||
@@ -30,7 +32,7 @@ link_setup_workflow_delete = Link(
|
||||
view='document_states:setup_workflow_delete',
|
||||
)
|
||||
link_setup_workflow_document_types = Link(
|
||||
args='resolved_object.pk',
|
||||
args='resolved_object.pk', icon_class=icon_document_type,
|
||||
permissions=(permission_workflow_edit,), text=_('Document types'),
|
||||
view='document_states:setup_workflow_document_types',
|
||||
)
|
||||
@@ -138,6 +140,7 @@ link_workflow_instance_transition_events = Link(
|
||||
view='document_states:setup_workflow_transition_events'
|
||||
)
|
||||
link_workflow_preview = Link(
|
||||
args='resolved_object.pk', permissions=(permission_workflow_view,),
|
||||
text=_('Preview'), view='document_states:workflow_preview'
|
||||
args='resolved_object.pk', icon_class=icon_workflow_preview,
|
||||
permissions=(permission_workflow_view,), text=_('Preview'),
|
||||
view='document_states:workflow_preview'
|
||||
)
|
||||
|
||||
@@ -11,8 +11,9 @@ from acls import ModelPermission
|
||||
from acls.links import link_acl_list
|
||||
from acls.permissions import permission_acl_edit, permission_acl_view
|
||||
from common import (
|
||||
MayanAppConfig, MissingItem, menu_facet, menu_main, menu_object,
|
||||
menu_secondary, menu_setup, menu_sidebar, menu_multi_item, menu_tools
|
||||
MayanAppConfig, MissingItem, menu_facet, menu_list_facet, menu_main,
|
||||
menu_object, menu_secondary, menu_setup, menu_sidebar, menu_multi_item,
|
||||
menu_tools
|
||||
)
|
||||
from common.classes import ModelField, Template
|
||||
from common.dashboards import dashboard_main
|
||||
@@ -446,12 +447,16 @@ class DocumentsApp(MayanAppConfig):
|
||||
)
|
||||
|
||||
# Document type links
|
||||
menu_list_facet.bind_links(
|
||||
links=(
|
||||
link_document_type_filename_list,
|
||||
link_acl_list, link_object_event_types_user_subcriptions_list,
|
||||
link_events_for_object,
|
||||
), sources=(DocumentType,)
|
||||
)
|
||||
menu_object.bind_links(
|
||||
links=(
|
||||
link_document_type_edit, link_document_type_filename_list,
|
||||
link_acl_list, link_object_event_types_user_subcriptions_list,
|
||||
link_document_type_delete,
|
||||
link_events_for_object,
|
||||
link_document_type_edit, link_document_type_delete,
|
||||
), sources=(DocumentType,)
|
||||
)
|
||||
menu_object.bind_links(
|
||||
|
||||
@@ -67,6 +67,7 @@ icon_document_page_zoom_out = Icon(
|
||||
icon_document_pages = Icon(driver_name='fontawesome', symbol='copy')
|
||||
icon_document_preview = Icon(driver_name='fontawesome', symbol='eye')
|
||||
icon_document_properties = Icon(driver_name='fontawesome', symbol='info')
|
||||
icon_document_type = Icon(driver_name='fontawesome', symbol='file')
|
||||
icon_document_type_create = Icon(driver_name='fontawesome', symbol='plus')
|
||||
icon_document_type_delete = Icon(driver_name='fontawesome', symbol='times')
|
||||
icon_document_type_edit = Icon(driver_name='fontawesome', symbol='pencil-alt')
|
||||
|
||||
@@ -19,10 +19,10 @@ from .icons import (
|
||||
icon_document_page_zoom_out, icon_document_pages, icon_document_preview,
|
||||
icon_document_properties, icon_document_type_create,
|
||||
icon_document_type_delete, icon_document_type_edit,
|
||||
icon_document_type_filename_create, icon_document_type_setup,
|
||||
icon_document_version_list, icon_document_version_return_document,
|
||||
icon_document_version_return_list, icon_duplicated_document_list,
|
||||
icon_duplicated_document_scan
|
||||
icon_document_type_filename, icon_document_type_filename_create,
|
||||
icon_document_type_setup, icon_document_version_list,
|
||||
icon_document_version_return_document, icon_document_version_return_list,
|
||||
icon_duplicated_document_list, icon_duplicated_document_scan
|
||||
)
|
||||
from .permissions import (
|
||||
permission_document_delete, permission_document_download,
|
||||
@@ -348,8 +348,9 @@ link_document_type_filename_edit = Link(
|
||||
text=_('Edit'), view='documents:document_type_filename_edit',
|
||||
)
|
||||
link_document_type_filename_list = Link(
|
||||
args='resolved_object.id', permissions=(permission_document_type_view,),
|
||||
text=_('Quick labels'), view='documents:document_type_filename_list',
|
||||
args='resolved_object.id', icon_class=icon_document_type_filename,
|
||||
permissions=(permission_document_type_view,), text=_('Quick labels'),
|
||||
view='documents:document_type_filename_list',
|
||||
)
|
||||
link_document_type_list = Link(
|
||||
permissions=(permission_document_type_view,), text=_('Document types'),
|
||||
|
||||
@@ -5,8 +5,8 @@ from django.contrib.auth import get_user_model
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from common import (
|
||||
MayanAppConfig, menu_main, menu_object, menu_secondary, menu_tools,
|
||||
menu_user
|
||||
MayanAppConfig, menu_list_facet, menu_main, menu_object, menu_secondary,
|
||||
menu_tools, menu_user
|
||||
)
|
||||
from common.widgets import TwoStateWidget
|
||||
from navigation import SourceColumn
|
||||
@@ -80,15 +80,15 @@ class EventsApp(MayanAppConfig):
|
||||
).render()
|
||||
)
|
||||
|
||||
menu_list_facet.bind_links(
|
||||
links=(link_user_events,), sources=(User,)
|
||||
)
|
||||
menu_main.bind_links(
|
||||
links=(link_user_notifications_list,), position=99
|
||||
)
|
||||
menu_object.bind_links(
|
||||
links=(link_notification_mark_read,), sources=(Notification,)
|
||||
)
|
||||
menu_object.bind_links(
|
||||
links=(link_user_events,), sources=(User,)
|
||||
)
|
||||
menu_secondary.bind_links(
|
||||
links=(link_notification_mark_read_all,),
|
||||
sources=('events:user_notifications_list',)
|
||||
|
||||
@@ -7,7 +7,7 @@ icon_event_types_subscriptions_list = Icon(
|
||||
)
|
||||
icon_events_list = Icon(driver_name='fontawesome', symbol='list-ol')
|
||||
icon_events_for_object = Icon(driver_name='fontawesome', symbol='list-ol')
|
||||
icon_events_user_list = Icon(driver_name='fontawesome', symbol='rss')
|
||||
icon_events_user_list = Icon(driver_name='fontawesome', symbol='list-ol')
|
||||
icon_object_event_types_user_subcriptions_list = Icon(
|
||||
driver_name='fontawesome', symbol='rss'
|
||||
)
|
||||
|
||||
@@ -8,7 +8,7 @@ from navigation import Link
|
||||
from .icons import (
|
||||
icon_events_list, icon_events_for_object,
|
||||
icon_event_types_subscriptions_list,
|
||||
icon_object_event_types_user_subcriptions_list,
|
||||
icon_events_user_list, icon_object_event_types_user_subcriptions_list,
|
||||
icon_user_notifications_list
|
||||
)
|
||||
from .permissions import permission_events_view
|
||||
@@ -68,8 +68,8 @@ link_object_event_types_user_subcriptions_list = Link(
|
||||
view='events:object_event_types_user_subcriptions_list',
|
||||
)
|
||||
link_user_events = Link(
|
||||
args='resolved_object.pk', text=_('User events'),
|
||||
view='events:user_events'
|
||||
args='resolved_object.pk', icon_class=icon_events_user_list,
|
||||
text=_('User events'), view='events:user_events'
|
||||
)
|
||||
link_user_notifications_list = Link(
|
||||
html_data={
|
||||
|
||||
@@ -7,8 +7,8 @@ from acls import ModelPermission
|
||||
from acls.links import link_acl_list
|
||||
from acls.permissions import permission_acl_edit, permission_acl_view
|
||||
from common import (
|
||||
MayanAppConfig, menu_facet, menu_object, menu_secondary, menu_setup,
|
||||
menu_sidebar
|
||||
MayanAppConfig, menu_facet, menu_list_facet, menu_object, menu_secondary,
|
||||
menu_setup, menu_sidebar
|
||||
)
|
||||
from common.widgets import TwoStateWidget
|
||||
from navigation import SourceColumn
|
||||
@@ -81,6 +81,12 @@ class LinkingApp(MayanAppConfig):
|
||||
links=(link_smart_link_instances_for_document,),
|
||||
sources=(Document,)
|
||||
)
|
||||
menu_list_facet.bind_links(
|
||||
links=(
|
||||
link_acl_list, link_smart_link_document_types,
|
||||
link_smart_link_condition_list,
|
||||
), sources=(SmartLink,)
|
||||
)
|
||||
menu_object.bind_links(
|
||||
links=(
|
||||
link_smart_link_condition_edit,
|
||||
@@ -89,9 +95,7 @@ class LinkingApp(MayanAppConfig):
|
||||
)
|
||||
menu_object.bind_links(
|
||||
links=(
|
||||
link_smart_link_edit, link_smart_link_document_types,
|
||||
link_smart_link_condition_list, link_acl_list,
|
||||
link_smart_link_delete
|
||||
link_smart_link_edit, link_smart_link_delete
|
||||
), sources=(SmartLink,)
|
||||
)
|
||||
menu_object.bind_links(
|
||||
|
||||
@@ -2,12 +2,14 @@ from __future__ import unicode_literals
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from documents.icons import icon_document_type
|
||||
from documents.permissions import permission_document_view
|
||||
from navigation import Link
|
||||
|
||||
from .icons import (
|
||||
icon_smart_link_condition_create, icon_smart_link_create,
|
||||
icon_smart_link_instances_for_document, icon_smart_link_setup
|
||||
icon_smart_link_condition, icon_smart_link_condition_create,
|
||||
icon_smart_link_create, icon_smart_link_instances_for_document,
|
||||
icon_smart_link_setup
|
||||
)
|
||||
from .permissions import (
|
||||
permission_smart_link_create, permission_smart_link_delete,
|
||||
@@ -29,8 +31,9 @@ link_smart_link_condition_edit = Link(
|
||||
text=_('Edit'), view='linking:smart_link_condition_edit',
|
||||
)
|
||||
link_smart_link_condition_list = Link(
|
||||
args='object.pk', permissions=(permission_smart_link_edit,),
|
||||
text=_('Conditions'), view='linking:smart_link_condition_list',
|
||||
args='object.pk', icon_class=icon_smart_link_condition,
|
||||
permissions=(permission_smart_link_edit,), text=_('Conditions'),
|
||||
view='linking:smart_link_condition_list',
|
||||
)
|
||||
link_smart_link_create = Link(
|
||||
icon_class=icon_smart_link_create,
|
||||
@@ -42,8 +45,9 @@ link_smart_link_delete = Link(
|
||||
tags='dangerous', text=_('Delete'), view='linking:smart_link_delete',
|
||||
)
|
||||
link_smart_link_document_types = Link(
|
||||
args='object.pk', permissions=(permission_smart_link_edit,),
|
||||
text=_('Document types'), view='linking:smart_link_document_types',
|
||||
args='object.pk', icon_class=icon_document_type,
|
||||
permissions=(permission_smart_link_edit,), text=_('Document types'),
|
||||
view='linking:smart_link_document_types',
|
||||
)
|
||||
link_smart_link_edit = Link(
|
||||
args='object.pk', permissions=(permission_smart_link_edit,),
|
||||
|
||||
@@ -9,8 +9,8 @@ from acls import ModelPermission
|
||||
from acls.links import link_acl_list
|
||||
from acls.permissions import permission_acl_edit, permission_acl_view
|
||||
from common import (
|
||||
MayanAppConfig, menu_object, menu_multi_item, menu_secondary, menu_setup,
|
||||
menu_tools
|
||||
MayanAppConfig, menu_list_facet, menu_object, menu_multi_item,
|
||||
menu_secondary, menu_setup, menu_tools
|
||||
)
|
||||
from common.widgets import TwoStateWidget
|
||||
from mayan.celery import app
|
||||
@@ -100,6 +100,12 @@ class MailerApp(MayanAppConfig):
|
||||
}
|
||||
)
|
||||
|
||||
menu_list_facet.bind_links(
|
||||
links=(
|
||||
link_acl_list, link_user_mailer_log_list,
|
||||
), sources=(UserMailer,)
|
||||
)
|
||||
|
||||
menu_multi_item.bind_links(
|
||||
links=(
|
||||
link_send_multiple_document, link_send_multiple_document_link
|
||||
@@ -114,17 +120,18 @@ class MailerApp(MayanAppConfig):
|
||||
|
||||
menu_object.bind_links(
|
||||
links=(
|
||||
link_user_mailer_edit, link_user_mailer_log_list,
|
||||
link_user_mailer_test, link_acl_list, link_user_mailer_delete,
|
||||
link_user_mailer_edit, link_user_mailer_test,
|
||||
link_user_mailer_delete,
|
||||
), sources=(UserMailer,)
|
||||
)
|
||||
|
||||
menu_secondary.bind_links(
|
||||
links=(
|
||||
link_user_mailer_list, link_user_mailer_create,
|
||||
link_user_mailer_create, link_user_mailer_list,
|
||||
), sources=(
|
||||
UserMailer, 'mailer:user_mailer_list',
|
||||
'mailer:user_mailer_create'
|
||||
'mailer:user_mailer_backend_selection',
|
||||
'mailer:user_mailer_create',
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -205,7 +205,7 @@ class UserMailerLogEntryListView(SingleObjectListView):
|
||||
return {
|
||||
'hide_object': True,
|
||||
'object': self.get_user_mailer(),
|
||||
'title': _('%s error log') % self.get_user_mailer(),
|
||||
'title': _('Error log for mailing profile: %s') % self.get_user_mailer(),
|
||||
}
|
||||
|
||||
def get_object_list(self):
|
||||
|
||||
@@ -12,8 +12,8 @@ from acls import ModelPermission
|
||||
from acls.links import link_acl_list
|
||||
from acls.permissions import permission_acl_edit, permission_acl_view
|
||||
from common import (
|
||||
MayanAppConfig, menu_facet, menu_multi_item, menu_object, menu_secondary,
|
||||
menu_setup, menu_sidebar
|
||||
MayanAppConfig, menu_facet, menu_list_facet, menu_multi_item, menu_object,
|
||||
menu_secondary, menu_setup, menu_sidebar
|
||||
)
|
||||
from common.classes import ModelAttribute, ModelField
|
||||
from common.widgets import TwoStateWidget
|
||||
@@ -201,23 +201,28 @@ class MetadataApp(MayanAppConfig):
|
||||
)
|
||||
|
||||
menu_facet.bind_links(links=(link_metadata_view,), sources=(Document,))
|
||||
menu_list_facet.bind_links(
|
||||
links=(
|
||||
link_setup_document_type_metadata_types,
|
||||
), sources=(DocumentType,)
|
||||
)
|
||||
menu_list_facet.bind_links(
|
||||
links=(
|
||||
link_acl_list, link_setup_metadata_type_document_types,
|
||||
link_object_event_types_user_subcriptions_list,
|
||||
link_events_for_object,
|
||||
), sources=(MetadataType,)
|
||||
)
|
||||
menu_multi_item.bind_links(
|
||||
links=(
|
||||
link_metadata_multiple_add, link_metadata_multiple_edit,
|
||||
link_metadata_multiple_remove
|
||||
), sources=(Document,)
|
||||
)
|
||||
menu_object.bind_links(
|
||||
links=(
|
||||
link_setup_document_type_metadata_types,
|
||||
), sources=(DocumentType,)
|
||||
)
|
||||
menu_object.bind_links(
|
||||
links=(
|
||||
link_setup_metadata_type_edit,
|
||||
link_setup_metadata_type_document_types, link_acl_list,
|
||||
link_object_event_types_user_subcriptions_list,
|
||||
link_events_for_object, link_setup_metadata_type_delete,
|
||||
link_setup_metadata_type_delete,
|
||||
), sources=(MetadataType,)
|
||||
)
|
||||
menu_secondary.bind_links(
|
||||
|
||||
@@ -13,4 +13,5 @@ icon_document_metadata_remove = Icon(
|
||||
)
|
||||
icon_metadata = Icon(driver_name='fontawesome', symbol='pencil-alt')
|
||||
icon_metadata_type_create = Icon(driver_name='fontawesome', symbol='plus')
|
||||
icon_metadata_type = Icon(driver_name='fontawesome', symbol='pencil-alt')
|
||||
icon_metadata_view = Icon(driver_name='fontawesome', symbol='pencil-alt')
|
||||
|
||||
@@ -2,11 +2,13 @@ from __future__ import unicode_literals
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from documents.icons import icon_document_type
|
||||
from documents.permissions import permission_document_type_edit
|
||||
from navigation import Link
|
||||
|
||||
from .icons import (
|
||||
icon_document_metadata_add, icon_metadata_view, icon_metadata_type_create
|
||||
icon_document_metadata_add, icon_metadata_type, icon_metadata_view,
|
||||
icon_metadata_type_create
|
||||
)
|
||||
from .permissions import (
|
||||
permission_metadata_document_add, permission_metadata_document_edit,
|
||||
@@ -43,12 +45,14 @@ link_metadata_view = Link(
|
||||
view='metadata:metadata_view',
|
||||
)
|
||||
link_setup_document_type_metadata_types = Link(
|
||||
args='resolved_object.pk', permissions=(permission_document_type_edit,),
|
||||
text=_('Metadata types'), view='metadata:setup_document_type_metadata_types',
|
||||
args='resolved_object.pk', icon_class=icon_metadata_type,
|
||||
permissions=(permission_document_type_edit,), text=_('Metadata types'),
|
||||
view='metadata:setup_document_type_metadata_types',
|
||||
)
|
||||
link_setup_metadata_type_document_types = Link(
|
||||
args='resolved_object.pk', permissions=(permission_document_type_edit,),
|
||||
text=_('Document types'), view='metadata:setup_metadata_type_document_types',
|
||||
args='resolved_object.pk', icon_class=icon_document_type,
|
||||
permissions=(permission_document_type_edit,), text=_('Document types'),
|
||||
view='metadata:setup_metadata_type_document_types',
|
||||
)
|
||||
link_setup_metadata_type_create = Link(
|
||||
icon_class=icon_metadata_type_create,
|
||||
|
||||
@@ -7,7 +7,9 @@ from django.utils.translation import ugettext_lazy as _
|
||||
from acls import ModelPermission
|
||||
from acls.links import link_acl_list
|
||||
from acls.permissions import permission_acl_edit, permission_acl_view
|
||||
from common import MayanAppConfig, menu_object, menu_secondary, menu_setup
|
||||
from common import (
|
||||
MayanAppConfig, menu_list_facet, menu_object, menu_secondary, menu_setup
|
||||
)
|
||||
from navigation import SourceColumn
|
||||
|
||||
from .links import (
|
||||
@@ -51,13 +53,18 @@ class MOTDApp(MayanAppConfig):
|
||||
func=lambda context: context['object'].end_datetime or _('None')
|
||||
)
|
||||
|
||||
menu_list_facet.bind_links(
|
||||
links=(
|
||||
link_acl_list,
|
||||
), sources=(Message,)
|
||||
)
|
||||
menu_object.bind_links(
|
||||
links=(
|
||||
link_message_edit, link_acl_list, link_message_delete
|
||||
link_message_edit, link_message_delete
|
||||
), sources=(Message,)
|
||||
)
|
||||
menu_secondary.bind_links(
|
||||
links=(link_message_create,),
|
||||
links=(link_message_create, link_message_list),
|
||||
sources=(Message, 'motd:message_list', 'motd:message_create')
|
||||
)
|
||||
menu_setup.bind_links(
|
||||
|
||||
@@ -8,7 +8,8 @@ from acls.links import link_acl_list
|
||||
from acls.permissions import permission_acl_edit, permission_acl_view
|
||||
|
||||
from common import (
|
||||
MayanAppConfig, menu_multi_item, menu_object, menu_secondary, menu_setup
|
||||
MayanAppConfig, menu_list_facet, menu_multi_item, menu_object,
|
||||
menu_secondary, menu_setup
|
||||
)
|
||||
from common.signals import perform_upgrade
|
||||
|
||||
@@ -46,13 +47,17 @@ class PermissionsApp(MayanAppConfig):
|
||||
)
|
||||
)
|
||||
|
||||
menu_object.bind_links(
|
||||
links=(link_group_roles,), position=98, sources=(Group,)
|
||||
menu_list_facet.bind_links(
|
||||
links=(
|
||||
link_acl_list, link_role_groups, link_role_permissions,
|
||||
), sources=(Role,)
|
||||
)
|
||||
menu_list_facet.bind_links(
|
||||
links=(link_group_roles,), sources=(Group,)
|
||||
)
|
||||
menu_object.bind_links(
|
||||
links=(
|
||||
link_role_edit, link_role_groups, link_role_permissions,
|
||||
link_acl_list, link_role_delete
|
||||
link_role_edit, link_role_delete
|
||||
), sources=(Role,)
|
||||
)
|
||||
menu_multi_item.bind_links(
|
||||
|
||||
@@ -2,5 +2,6 @@ from __future__ import absolute_import, unicode_literals
|
||||
|
||||
from appearance.classes import Icon
|
||||
|
||||
icon_permission = Icon(driver_name='fontawesome', symbol='thumbs-up')
|
||||
icon_role_create = Icon(driver_name='fontawesome', symbol='plus')
|
||||
icon_role_list = Icon(driver_name='fontawesome', symbol='user-secret')
|
||||
|
||||
@@ -3,9 +3,10 @@ from __future__ import unicode_literals
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from navigation import Link
|
||||
from user_management.icons import icon_group
|
||||
from user_management.permissions import permission_group_edit
|
||||
|
||||
from .icons import icon_role_create, icon_role_list
|
||||
from .icons import icon_permission, icon_role_create, icon_role_list
|
||||
from .permissions import (
|
||||
permission_permission_grant, permission_permission_revoke,
|
||||
permission_role_create, permission_role_delete, permission_role_edit,
|
||||
@@ -13,7 +14,8 @@ from .permissions import (
|
||||
)
|
||||
|
||||
link_group_roles = Link(
|
||||
args='object.id', permissions=(permission_group_edit,), text=_('Roles'),
|
||||
args='object.id', icon_class=icon_role_list,
|
||||
permissions=(permission_group_edit,), text=_('Roles'),
|
||||
view='permissions:group_roles',
|
||||
)
|
||||
link_permission_grant = Link(
|
||||
@@ -41,11 +43,12 @@ link_role_list = Link(
|
||||
text=_('Roles'), view='permissions:role_list'
|
||||
)
|
||||
link_role_groups = Link(
|
||||
args='object.id', permissions=(permission_role_edit,), text=_('Groups'),
|
||||
args='object.id', icon_class=icon_group,
|
||||
permissions=(permission_role_edit,), text=_('Groups'),
|
||||
view='permissions:role_groups',
|
||||
)
|
||||
link_role_permissions = Link(
|
||||
args='object.id',
|
||||
args='object.id', icon_class=icon_permission,
|
||||
permissions=(permission_permission_grant, permission_permission_revoke),
|
||||
text=_('Role permissions'), view='permissions:role_permissions',
|
||||
)
|
||||
|
||||
@@ -2,7 +2,10 @@ from __future__ import unicode_literals
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from common import MayanAppConfig, menu_facet, menu_setup, menu_object
|
||||
from common import (
|
||||
MayanAppConfig, menu_facet, menu_list_facet, menu_setup,
|
||||
menu_object, menu_secondary
|
||||
)
|
||||
from navigation import SourceColumn
|
||||
|
||||
from .classes import Namespace, Setting
|
||||
@@ -41,7 +44,7 @@ class SmartSettingsApp(MayanAppConfig):
|
||||
func=lambda context: _('Yes') if context['object'].environment_variable else _('No')
|
||||
)
|
||||
|
||||
menu_facet.bind_links(
|
||||
menu_secondary.bind_links(
|
||||
links=(link_namespace_root_list,), sources=(
|
||||
Namespace, Setting, 'settings:namespace_list',
|
||||
)
|
||||
|
||||
@@ -5,8 +5,8 @@ from django.utils.translation import ugettext_lazy as _
|
||||
from kombu import Exchange, Queue
|
||||
|
||||
from common import (
|
||||
MayanAppConfig, MissingItem, menu_object, menu_secondary, menu_sidebar,
|
||||
menu_setup
|
||||
MayanAppConfig, MissingItem, menu_list_facet, menu_object, menu_secondary,
|
||||
menu_sidebar, menu_setup
|
||||
)
|
||||
from common.signals import post_initial_setup, post_upgrade
|
||||
from converter.links import link_transformation_list
|
||||
@@ -122,10 +122,18 @@ class SourcesApp(MayanAppConfig):
|
||||
)
|
||||
menu_documents.bind_links(links=(link_document_create_multiple,))
|
||||
|
||||
menu_list_facet.bind_links(
|
||||
links=(
|
||||
link_setup_source_logs, link_transformation_list,
|
||||
), sources=(
|
||||
POP3Email, IMAPEmail, SaneScanner, StagingFolderSource,
|
||||
WatchFolderSource, WebFormSource
|
||||
)
|
||||
)
|
||||
|
||||
menu_object.bind_links(
|
||||
links=(
|
||||
link_setup_source_edit, link_setup_source_delete,
|
||||
link_transformation_list, link_setup_source_logs
|
||||
), sources=(
|
||||
POP3Email, IMAPEmail, SaneScanner, StagingFolderSource,
|
||||
WatchFolderSource, WebFormSource
|
||||
|
||||
@@ -9,7 +9,8 @@ from documents.permissions import (
|
||||
from navigation import Link
|
||||
|
||||
from .icons import (
|
||||
icon_document_create_multiple, icon_setup_sources, icon_source_create
|
||||
icon_document_create_multiple, icon_log, icon_setup_sources,
|
||||
icon_source_create
|
||||
)
|
||||
from .literals import (
|
||||
SOURCE_CHOICE_WEB_FORM, SOURCE_CHOICE_EMAIL_IMAP, SOURCE_CHOICE_EMAIL_POP3,
|
||||
@@ -111,7 +112,7 @@ link_upload_version = Link(
|
||||
text=_('Upload new version'), view='sources:upload_version',
|
||||
)
|
||||
link_setup_source_logs = Link(
|
||||
args=('resolved_object.pk',),
|
||||
args=('resolved_object.pk',), icon_class=icon_log,
|
||||
permissions=(permission_sources_setup_view,), text=_('Logs'),
|
||||
view='sources:setup_source_logs',
|
||||
)
|
||||
|
||||
@@ -8,8 +8,8 @@ from acls import ModelPermission
|
||||
from acls.links import link_acl_list
|
||||
from acls.permissions import permission_acl_edit, permission_acl_view
|
||||
from common import (
|
||||
MayanAppConfig, menu_facet, menu_object, menu_main, menu_multi_item,
|
||||
menu_sidebar
|
||||
MayanAppConfig, menu_facet, menu_list_facet, menu_object, menu_main,
|
||||
menu_multi_item, menu_sidebar
|
||||
)
|
||||
from common.classes import ModelField
|
||||
from documents.search import document_page_search, document_search
|
||||
@@ -25,9 +25,10 @@ from .events import (
|
||||
)
|
||||
from .handlers import handler_index_document, handler_tag_pre_delete
|
||||
from .links import (
|
||||
link_multiple_documents_attach_tag, link_multiple_documents_tag_remove,
|
||||
link_single_document_multiple_tag_remove, link_tag_attach, link_tag_create,
|
||||
link_tag_delete, link_tag_document_list, link_tag_edit, link_tag_list,
|
||||
link_document_tag_list, link_multiple_documents_attach_tag,
|
||||
link_multiple_documents_tag_remove,
|
||||
link_single_document_multiple_tag_remove, link_tag_attach,
|
||||
link_tag_create, link_tag_delete, link_tag_edit, link_tag_list,
|
||||
link_tag_multiple_delete, link_tag_tagged_item_list
|
||||
)
|
||||
from .menus import menu_tags
|
||||
@@ -138,13 +139,16 @@ class TagsApp(MayanAppConfig):
|
||||
document_search.add_model_field(field='tags__label', label=_('Tags'))
|
||||
|
||||
menu_facet.bind_links(
|
||||
links=(link_tag_document_list,), sources=(Document,)
|
||||
links=(link_document_tag_list,), sources=(Document,)
|
||||
)
|
||||
|
||||
menu_tags.bind_links(
|
||||
menu_list_facet.bind_links(
|
||||
links=(
|
||||
link_tag_list, link_tag_create
|
||||
)
|
||||
link_acl_list, link_events_for_object,
|
||||
link_object_event_types_user_subcriptions_list,
|
||||
link_tag_tagged_item_list,
|
||||
),
|
||||
sources=(Tag,)
|
||||
)
|
||||
|
||||
menu_main.bind_links(links=(menu_tags,), position=98)
|
||||
@@ -161,10 +165,7 @@ class TagsApp(MayanAppConfig):
|
||||
)
|
||||
menu_object.bind_links(
|
||||
links=(
|
||||
link_tag_tagged_item_list, link_tag_edit, link_acl_list,
|
||||
link_events_for_object,
|
||||
link_object_event_types_user_subcriptions_list,
|
||||
link_tag_delete
|
||||
link_tag_edit, link_tag_delete
|
||||
),
|
||||
sources=(Tag,)
|
||||
)
|
||||
@@ -175,6 +176,12 @@ class TagsApp(MayanAppConfig):
|
||||
'tags:single_document_multiple_tag_remove'
|
||||
)
|
||||
)
|
||||
menu_tags.bind_links(
|
||||
links=(
|
||||
link_tag_list, link_tag_create
|
||||
)
|
||||
)
|
||||
|
||||
registry.register(Tag)
|
||||
|
||||
# Index update
|
||||
|
||||
@@ -2,6 +2,7 @@ from __future__ import unicode_literals
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from documents.icons import icon_document_list
|
||||
from navigation import Link, get_cascade_condition
|
||||
|
||||
from .icons import (
|
||||
@@ -13,6 +14,11 @@ from .permissions import (
|
||||
)
|
||||
|
||||
|
||||
link_document_tag_list = Link(
|
||||
args='resolved_object.pk', icon_class=icon_tag_document_list,
|
||||
permissions=(permission_tag_view,), text=_('Tags'),
|
||||
view='tags:document_tags',
|
||||
)
|
||||
link_multiple_documents_tag_remove = Link(
|
||||
text=_('Remove tag'), view='tags:multiple_documents_selection_tag_remove'
|
||||
)
|
||||
@@ -40,11 +46,6 @@ link_tag_edit = Link(
|
||||
args='object.id', permissions=(permission_tag_edit,), text=_('Edit'),
|
||||
view='tags:tag_edit',
|
||||
)
|
||||
link_tag_document_list = Link(
|
||||
args='resolved_object.pk', icon_class=icon_tag_document_list,
|
||||
permissions=(permission_tag_view,), text=_('Tags'),
|
||||
view='tags:document_tags',
|
||||
)
|
||||
link_tag_list = Link(
|
||||
condition=get_cascade_condition(
|
||||
app_label='tags', model_name='Tag',
|
||||
@@ -56,5 +57,6 @@ link_tag_multiple_delete = Link(
|
||||
view='tags:tag_multiple_delete'
|
||||
)
|
||||
link_tag_tagged_item_list = Link(
|
||||
args='object.id', text=('Documents'), view='tags:tag_tagged_item_list',
|
||||
args='object.id', icon_class=icon_document_list, text=('Documents'),
|
||||
view='tags:tag_tagged_item_list',
|
||||
)
|
||||
|
||||
@@ -8,7 +8,9 @@ from django.utils.translation import ugettext_lazy as _
|
||||
from acls import ModelPermission
|
||||
from acls.links import link_acl_list
|
||||
from acls.permissions import permission_acl_edit, permission_acl_view
|
||||
from common import menu_multi_item, menu_object, menu_secondary, menu_setup
|
||||
from common import (
|
||||
menu_list_facet, menu_multi_item, menu_object, menu_secondary, menu_setup
|
||||
)
|
||||
from common.apps import MayanAppConfig
|
||||
from common.widgets import TwoStateWidget
|
||||
from metadata import MetadataLookup
|
||||
@@ -109,22 +111,32 @@ class UserManagementApp(MayanAppConfig):
|
||||
).render()
|
||||
)
|
||||
|
||||
menu_list_facet.bind_links(
|
||||
links=(
|
||||
link_acl_list, link_group_members,
|
||||
), sources=(Group,)
|
||||
)
|
||||
menu_list_facet.bind_links(
|
||||
links=(
|
||||
link_acl_list, link_user_groups
|
||||
), sources=(User,)
|
||||
)
|
||||
menu_multi_item.bind_links(
|
||||
links=(link_user_multiple_set_password, link_user_multiple_delete),
|
||||
sources=('user_management:user_list',)
|
||||
)
|
||||
menu_object.bind_links(
|
||||
links=(link_group_edit, link_group_members,),
|
||||
links=(link_group_edit,),
|
||||
sources=(Group,)
|
||||
)
|
||||
menu_object.bind_links(
|
||||
links=(link_acl_list, link_group_delete,), position=99,
|
||||
links=(link_group_delete,), position=99,
|
||||
sources=(Group,)
|
||||
)
|
||||
menu_object.bind_links(
|
||||
links=(
|
||||
link_user_edit, link_user_set_password, link_user_groups,
|
||||
link_user_set_options, link_acl_list, link_user_delete
|
||||
link_user_edit, link_user_set_password, link_user_set_options,
|
||||
link_user_delete
|
||||
), sources=(User,)
|
||||
)
|
||||
menu_secondary.bind_links(
|
||||
|
||||
@@ -2,7 +2,9 @@ from __future__ import absolute_import, unicode_literals
|
||||
|
||||
from appearance.classes import Icon
|
||||
|
||||
icon_group = Icon(driver_name='fontawesome', symbol='users')
|
||||
icon_group_create = Icon(driver_name='fontawesome', symbol='plus')
|
||||
icon_group_members = Icon(driver_name='fontawesome', symbol='user')
|
||||
icon_group_setup = Icon(driver_name='fontawesome', symbol='users')
|
||||
icon_user_create = Icon(driver_name='fontawesome', symbol='plus')
|
||||
icon_user_setup = Icon(driver_name='fontawesome', symbol='user')
|
||||
|
||||
@@ -5,7 +5,8 @@ from django.utils.translation import ugettext_lazy as _
|
||||
from navigation import Link
|
||||
|
||||
from .icons import (
|
||||
icon_group_create, icon_group_setup, icon_user_create, icon_user_setup
|
||||
icon_group, icon_group_create, icon_group_members, icon_group_setup,
|
||||
icon_user_create, icon_user_setup
|
||||
)
|
||||
from .permissions import (
|
||||
permission_group_create, permission_group_delete, permission_group_edit,
|
||||
@@ -30,7 +31,8 @@ link_group_list = Link(
|
||||
view='user_management:group_list'
|
||||
)
|
||||
link_group_members = Link(
|
||||
args='object.id', permissions=(permission_group_edit,), text=_('Users'),
|
||||
args='object.id', icon_class=icon_group_members,
|
||||
permissions=(permission_group_edit,), text=_('Users'),
|
||||
view='user_management:group_members',
|
||||
)
|
||||
link_group_setup = Link(
|
||||
@@ -50,7 +52,8 @@ link_user_edit = Link(
|
||||
view='user_management:user_edit',
|
||||
)
|
||||
link_user_groups = Link(
|
||||
args='object.id', permissions=(permission_user_edit,), text=_('Groups'),
|
||||
args='object.id', icon_class=icon_group,
|
||||
permissions=(permission_user_edit,), text=_('Groups'),
|
||||
view='user_management:user_groups',
|
||||
)
|
||||
link_user_list = Link(
|
||||
|
||||
@@ -286,6 +286,7 @@ class UserOptionsEditView(SingleObjectEditView):
|
||||
|
||||
def get_extra_context(self):
|
||||
return {
|
||||
'object': self.get_user(),
|
||||
'title': _(
|
||||
'Edit options for user: %s'
|
||||
) % self.get_user()
|
||||
|
||||
Reference in New Issue
Block a user