You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2018/10/31 19:12:50 UTC
[airavata-django-portal] 01/02: AIRAVATA-2888 Default Create
Account nav link block
This is an automated email from the ASF dual-hosted git repository.
machristie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git
commit 0e7737bc158d375b410f3a65ee69376f456d5081
Author: Marcus Christie <ma...@iu.edu>
AuthorDate: Wed Oct 31 13:56:53 2018 -0400
AIRAVATA-2888 Default Create Account nav link block
---
django_airavata/wagtailapps/base/blocks.py | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/django_airavata/wagtailapps/base/blocks.py b/django_airavata/wagtailapps/base/blocks.py
index f4c4544..e2542fe 100644
--- a/django_airavata/wagtailapps/base/blocks.py
+++ b/django_airavata/wagtailapps/base/blocks.py
@@ -492,6 +492,18 @@ class LogoutNavItem(NavItem):
}
+class CreateAccountNavItem(NavItem):
+
+ class Meta:
+ default = {
+ 'link': '/auth/create-account',
+ 'link_text': 'Create Account',
+ 'icon_class': 'fas fa-user',
+ 'show': 'not-logged-in',
+ 'horizontal_alignment': 'push-right',
+ }
+
+
class Nav(StructBlock):
custom_class = CharBlock(required=False)
nav_items = StreamBlock([
@@ -499,6 +511,7 @@ class Nav(StructBlock):
('login_link', LoginNavItem()),
('dashboard_link', DashboardLinkNavItem()),
('logout_link', LogoutNavItem()),
+ ('create_account_link', CreateAccountNavItem()),
])
class Meta: