Add more icons to links.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2018-09-17 03:09:04 -04:00
parent 4d53c9aec7
commit ac07d4a63f
10 changed files with 31 additions and 27 deletions

View File

@@ -8,7 +8,7 @@ from django.db.models.signals import post_delete
from django.utils.translation import ugettext_lazy as _
from acls import ModelPermission
from acls.links import link_acl_list, link_acl_list_with_icon
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,
@@ -27,7 +27,6 @@ from converter.permissions import (
from events import ModelEventType
from events.links import (
link_events_for_object, link_object_event_types_user_subcriptions_list,
link_object_event_types_user_subcriptions_list_with_icon
)
from events.permissions import permission_events_view
from mayan.celery import app
@@ -496,7 +495,7 @@ class DocumentsApp(MayanAppConfig):
# Document facet links
menu_facet.bind_links(
links=(link_document_duplicates_list, link_acl_list_with_icon,),
links=(link_document_duplicates_list, link_acl_list,),
sources=(Document,)
)
menu_facet.bind_links(
@@ -508,7 +507,7 @@ class DocumentsApp(MayanAppConfig):
menu_facet.bind_links(
links=(
link_events_for_object,
link_object_event_types_user_subcriptions_list_with_icon,
link_object_event_types_user_subcriptions_list,
link_document_version_list,
), sources=(Document,), position=2
)

View File

@@ -60,6 +60,8 @@ 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_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')
icon_document_type_setup = Icon(driver_name='fontawesome', symbol='file')
icon_document_type_filename = Icon(
driver_name='fontawesome', symbol='keyboard'

View File

@@ -17,6 +17,7 @@ from .icons import (
icon_document_page_rotate_right, icon_document_page_zoom_in,
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,
@@ -319,12 +320,14 @@ link_document_type_create = Link(
text=_('Create document type'), view='documents:document_type_create'
)
link_document_type_delete = Link(
args='resolved_object.id', permissions=(permission_document_type_delete,),
tags='dangerous', text=_('Delete'), view='documents:document_type_delete',
args='resolved_object.id', icon_class=icon_document_type_delete,
permissions=(permission_document_type_delete,), tags='dangerous',
text=_('Delete'), view='documents:document_type_delete',
)
link_document_type_edit = Link(
args='resolved_object.id', permissions=(permission_document_type_edit,),
text=_('Edit'), view='documents:document_type_edit',
args='resolved_object.id', icon_class=icon_document_type_edit,
permissions=(permission_document_type_edit,), text=_('Edit'),
view='documents:document_type_edit',
)
link_document_type_filename_create = Link(
args='document_type.id', icon_class=icon_document_type_filename_create,