Discussion:
[Mayan EDMS: 1979] Removing menus
LeVon Smoker
2017-08-08 15:26:51 UTC
Permalink
Is the procedure for removing menus from the home page the same as it used
to be? I had been removing the Tags menu, but at some point the code
stopped working. The formerly-working code is:

from __future__ import unicode_literals

from django.utils.translation import ugettext_lazy as _

from common import MayanAppConfig

from common import menu_main
from folders.links import link_folder_list
from tags.links import link_tag_list

class HRCSBOverridesApp(MayanAppConfig):
name = 'hrcsb_overrides'
verbose_name = _('HRCSB Overrides')

def ready(self):
super(HRCSBOverridesApp, self).ready()

# Remove "Tags" links from main menu
menu_main.unbind_links(
links=(link_tag_list,),
)
mayan/apps/hrcsb_overrides/apps.py

Thanks,
LeVon Smoker
--
---
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 mayan-edms+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
LeVon Smoker
2017-08-08 19:09:20 UTC
Permalink
Figured it out.
Post by LeVon Smoker
Is the procedure for removing menus from the home page the same as it used
to be? I had been removing the Tags menu, but at some point the code
from __future__ import unicode_literals
from django.utils.translation import ugettext_lazy as _
from common import MayanAppConfig
from common import menu_main
from folders.links import link_folder_list
from tags.links import link_tag_list
name = 'hrcsb_overrides'
verbose_name = _('HRCSB Overrides')
super(HRCSBOverridesApp, self).ready()
# Remove "Tags" links from main menu
menu_main.unbind_links(
links=(link_tag_list,),
)
mayan/apps/hrcsb_overrides/apps.py
Thanks,
LeVon Smoker
--
---
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 mayan-edms+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
LeVon Smoker
2017-08-08 19:50:18 UTC
Permalink
Actually I didn't figure this out...
Post by LeVon Smoker
Is the procedure for removing menus from the home page the same as it used
to be? I had been removing the Tags menu, but at some point the code
from __future__ import unicode_literals
from django.utils.translation import ugettext_lazy as _
from common import MayanAppConfig
from common import menu_main
from folders.links import link_folder_list
from tags.links import link_tag_list
name = 'hrcsb_overrides'
verbose_name = _('HRCSB Overrides')
super(HRCSBOverridesApp, self).ready()
# Remove "Tags" links from main menu
menu_main.unbind_links(
links=(link_tag_list,),
)
mayan/apps/hrcsb_overrides/apps.py
Thanks,
LeVon Smoker
--
---
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 mayan-edms+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Roberto Rosario
2017-08-09 04:59:39 UTC
Permalink
There were updates in the link unbinding code:

https://gitlab.com/mayan-edms/mayan-edms/commit/e5685eee0418f74070a29f217193289537a5a5c1
https://gitlab.com/mayan-edms/mayan-edms/commit/524a0d0c35041ed8f683a6f0411720e550eafa09

Because it was not working 100% of the case. The updates must have broken
the main menu unbinding (when the source is None).

I'm checking the code and adding a test for main menus. Thanks for the
report.
Post by LeVon Smoker
Is the procedure for removing menus from the home page the same as it used
to be? I had been removing the Tags menu, but at some point the code
from __future__ import unicode_literals
from django.utils.translation import ugettext_lazy as _
from common import MayanAppConfig
from common import menu_main
from folders.links import link_folder_list
from tags.links import link_tag_list
name = 'hrcsb_overrides'
verbose_name = _('HRCSB Overrides')
super(HRCSBOverridesApp, self).ready()
# Remove "Tags" links from main menu
menu_main.unbind_links(
links=(link_tag_list,),
)
mayan/apps/hrcsb_overrides/apps.py
Thanks,
LeVon Smoker
--
---
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 mayan-edms+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Roberto Rosario
2017-08-09 05:21:16 UTC
Permalink
The issue has two factors:

Version 2.2 introduced support for sub-menus and the "Tag" entry in the
main menu is now a sub menu and no longer a link. The new code to remove
the entry would be:

from tags.menus import menu_tags
menu_main.unbind_links(
links=(menu_tags,),
)

The second issue is that there is no support for unbinding sub-menus.
Working on adding this now.
Post by Roberto Rosario
https://gitlab.com/mayan-edms/mayan-edms/commit/e5685eee0418f74070a29f217193289537a5a5c1
https://gitlab.com/mayan-edms/mayan-edms/commit/524a0d0c35041ed8f683a6f0411720e550eafa09
Because it was not working 100% of the case. The updates must have broken
the main menu unbinding (when the source is None).
I'm checking the code and adding a test for main menus. Thanks for the
report.
Post by LeVon Smoker
Is the procedure for removing menus from the home page the same as it
used to be? I had been removing the Tags menu, but at some point the code
from __future__ import unicode_literals
from django.utils.translation import ugettext_lazy as _
from common import MayanAppConfig
from common import menu_main
from folders.links import link_folder_list
from tags.links import link_tag_list
name = 'hrcsb_overrides'
verbose_name = _('HRCSB Overrides')
super(HRCSBOverridesApp, self).ready()
# Remove "Tags" links from main menu
menu_main.unbind_links(
links=(link_tag_list,),
)
mayan/apps/hrcsb_overrides/apps.py
Thanks,
LeVon Smoker
--
---
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 mayan-edms+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Roberto Rosario
2017-08-09 05:39:10 UTC
Permalink
Support added
(https://gitlab.com/mayan-edms/mayan-edms/commit/0efbf79fa18bb35407b0c71013810489c2f44b04).
Thanks for the report.
Post by Roberto Rosario
Version 2.2 introduced support for sub-menus and the "Tag" entry in the
main menu is now a sub menu and no longer a link. The new code to remove
from tags.menus import menu_tags
menu_main.unbind_links(
links=(menu_tags,),
)
The second issue is that there is no support for unbinding sub-menus.
Working on adding this now.
Post by Roberto Rosario
https://gitlab.com/mayan-edms/mayan-edms/commit/e5685eee0418f74070a29f217193289537a5a5c1
https://gitlab.com/mayan-edms/mayan-edms/commit/524a0d0c35041ed8f683a6f0411720e550eafa09
Because it was not working 100% of the case. The updates must have broken
the main menu unbinding (when the source is None).
I'm checking the code and adding a test for main menus. Thanks for the
report.
Post by LeVon Smoker
Is the procedure for removing menus from the home page the same as it
used to be? I had been removing the Tags menu, but at some point the code
from __future__ import unicode_literals
from django.utils.translation import ugettext_lazy as _
from common import MayanAppConfig
from common import menu_main
from folders.links import link_folder_list
from tags.links import link_tag_list
name = 'hrcsb_overrides'
verbose_name = _('HRCSB Overrides')
super(HRCSBOverridesApp, self).ready()
# Remove "Tags" links from main menu
menu_main.unbind_links(
links=(link_tag_list,),
)
mayan/apps/hrcsb_overrides/apps.py
Thanks,
LeVon Smoker
--
---
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 mayan-edms+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
LeVon Smoker
2017-08-09 12:36:41 UTC
Permalink
Thank you very much. Your support of Mayan is awesome.
Support added (
https://gitlab.com/mayan-edms/mayan-edms/commit/0efbf79fa18bb35407b0c71013810489c2f44b04).
Thanks for the report.
Post by Roberto Rosario
Version 2.2 introduced support for sub-menus and the "Tag" entry in the
main menu is now a sub menu and no longer a link. The new code to remove
from tags.menus import menu_tags
menu_main.unbind_links(
links=(menu_tags,),
)
The second issue is that there is no support for unbinding sub-menus.
Working on adding this now.
Post by Roberto Rosario
https://gitlab.com/mayan-edms/mayan-edms/commit/e5685eee0418f74070a29f217193289537a5a5c1
https://gitlab.com/mayan-edms/mayan-edms/commit/524a0d0c35041ed8f683a6f0411720e550eafa09
Because it was not working 100% of the case. The updates must have
broken the main menu unbinding (when the source is None).
I'm checking the code and adding a test for main menus. Thanks for the
report.
Post by LeVon Smoker
Is the procedure for removing menus from the home page the same as it
used to be? I had been removing the Tags menu, but at some point the code
from __future__ import unicode_literals
from django.utils.translation import ugettext_lazy as _
from common import MayanAppConfig
from common import menu_main
from folders.links import link_folder_list
from tags.links import link_tag_list
name = 'hrcsb_overrides'
verbose_name = _('HRCSB Overrides')
super(HRCSBOverridesApp, self).ready()
# Remove "Tags" links from main menu
menu_main.unbind_links(
links=(link_tag_list,),
)
mayan/apps/hrcsb_overrides/apps.py
Thanks,
LeVon Smoker
--
---
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 mayan-edms+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Roberto Rosario
2017-08-10 05:25:52 UTC
Permalink
Thank you for the reports!
Post by LeVon Smoker
Thank you very much. Your support of Mayan is awesome.
Support added (
https://gitlab.com/mayan-edms/mayan-edms/commit/0efbf79fa18bb35407b0c71013810489c2f44b04).
Thanks for the report.
Post by Roberto Rosario
Version 2.2 introduced support for sub-menus and the "Tag" entry in the
main menu is now a sub menu and no longer a link. The new code to remove
from tags.menus import menu_tags
menu_main.unbind_links(
links=(menu_tags,),
)
The second issue is that there is no support for unbinding sub-menus.
Working on adding this now.
Post by Roberto Rosario
https://gitlab.com/mayan-edms/mayan-edms/commit/e5685eee0418f74070a29f217193289537a5a5c1
https://gitlab.com/mayan-edms/mayan-edms/commit/524a0d0c35041ed8f683a6f0411720e550eafa09
Because it was not working 100% of the case. The updates must have
broken the main menu unbinding (when the source is None).
I'm checking the code and adding a test for main menus. Thanks for the
report.
Post by LeVon Smoker
Is the procedure for removing menus from the home page the same as it
used to be? I had been removing the Tags menu, but at some point the code
from __future__ import unicode_literals
from django.utils.translation import ugettext_lazy as _
from common import MayanAppConfig
from common import menu_main
from folders.links import link_folder_list
from tags.links import link_tag_list
name = 'hrcsb_overrides'
verbose_name = _('HRCSB Overrides')
super(HRCSBOverridesApp, self).ready()
# Remove "Tags" links from main menu
menu_main.unbind_links(
links=(link_tag_list,),
)
mayan/apps/hrcsb_overrides/apps.py
Thanks,
LeVon Smoker
--
---
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 mayan-edms+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Diego R.
2017-09-29 16:01:15 UTC
Permalink
Hi Guys,
Sorry to steal your post but i'm looking for the method to Remove menus and
i can't find i "guide" anywhere. Can you guys point me to something?
Thanks!!


Em quinta-feira, 10 de agosto de 2017 02:25:52 UTC-3, Roberto Rosario
Post by Roberto Rosario
Thank you for the reports!
Post by LeVon Smoker
Thank you very much. Your support of Mayan is awesome.
Support added (
https://gitlab.com/mayan-edms/mayan-edms/commit/0efbf79fa18bb35407b0c71013810489c2f44b04).
Thanks for the report.
Post by Roberto Rosario
Version 2.2 introduced support for sub-menus and the "Tag" entry in the
main menu is now a sub menu and no longer a link. The new code to remove
from tags.menus import menu_tags
menu_main.unbind_links(
links=(menu_tags,),
)
The second issue is that there is no support for unbinding sub-menus.
Working on adding this now.
Post by Roberto Rosario
https://gitlab.com/mayan-edms/mayan-edms/commit/e5685eee0418f74070a29f217193289537a5a5c1
https://gitlab.com/mayan-edms/mayan-edms/commit/524a0d0c35041ed8f683a6f0411720e550eafa09
Because it was not working 100% of the case. The updates must have
broken the main menu unbinding (when the source is None).
I'm checking the code and adding a test for main menus. Thanks for the
report.
Post by LeVon Smoker
Is the procedure for removing menus from the home page the same as it
used to be? I had been removing the Tags menu, but at some point the code
from __future__ import unicode_literals
from django.utils.translation import ugettext_lazy as _
from common import MayanAppConfig
from common import menu_main
from folders.links import link_folder_list
from tags.links import link_tag_list
name = 'hrcsb_overrides'
verbose_name = _('HRCSB Overrides')
super(HRCSBOverridesApp, self).ready()
# Remove "Tags" links from main menu
menu_main.unbind_links(
links=(link_tag_list,),
)
mayan/apps/hrcsb_overrides/apps.py
Thanks,
LeVon Smoker
--
---
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 mayan-edms+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...