Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/cms41 compat #164

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
change main nav link style to cms41.
FreemanPancake committed Nov 4, 2024
commit 709b31684eaa4f2e3a053ee204e109be5390b5d2
9 changes: 9 additions & 0 deletions djangocms_navigation/admin.py
Original file line number Diff line number Diff line change
@@ -200,6 +200,15 @@ def _get_main_navigation_link(self, obj, request, disabled=False):
if obj.menu.main_navigation:
disabled = True

if CMS_41:
return self.admin_action_button(
url=main_navigation_url,
icon="home",
title=_("Make Main Navigation"),
name="make-main-navigation",
disabled=disabled,
)

return render_to_string(
"admin/djangocms_navigation/icons/main_navigation.html",
{"url": main_navigation_url, "disabled": disabled}