Hi,
To customize the navigation create a bare-bones app. In the ready() method
unbind the links of the other apps.
from common import menu_main, menu_front_page
from folders.links import link_folder_list
# Remove "Folders" link from main menu
menu_main.unbind_links(
links=(link_folder_list,),
)
# Remove Trash link from home page
from documents.links import link_document_list_deleted
menu_front_page.unbind_links(
links=(
link_document_list_deleted,
)
)
# Add "New document" to main menu
from sources.links import link_document_create_multiple
menu_main.bind_links(
links=(link_document_create_multiple,),
)
The logic to bind a link to a menu is
menu_instance.bind_link(
links=<link instances list>,
source=<which classes of object or which views>
)
Values of Source:
- If source is omitted the link will always be enabled (such as in the
main menu).
- Specifying a class will only enable the link is an instance of that
class is present in the rendered view context.
- Specifying a string as the source will enable the link for a specific
view.
The logic to unbind a link is the same, only using the 'unbind' method.
On Fri, Jan 15, 2016 at 8:18 PM, Rachael Sewell <[email protected]> wrote:
> Hello,
>
> I'm looking for the best way to customize/remove some views in Mayan.
> Currently, we won't need:
>
> Trash (deleting documents)
> Indexes
> Folders
> Checkouts
> Signatures
>
> I'm able to comment out adding menu items to the menu_main and menu_facet,
> and menu_object in apps.py to customize what I see, but I'm not sure that
> this is the right place to remove the view.
>
> What I'd like to do is customize the navigation bar to include:
> * A logout button drop-down from the User button on the right
> * A create document link
> * Recent Documents
>
> Then I would remove those duplicate items from the home page area.
>
> Ideally, I'd like to add a button to display My Workflow and My Documents
> to the navigation bar.
>
> Any pointers to the right place to do this to allow compatibility with
> Mayan would be great.
>
> Rachael
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Mayan EDMS" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>
--
---
You received this message because you are subscribed to the Google Groups
"Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.