aboutsummaryrefslogtreecommitdiff
path: root/gn2/wqflask/templates/oauth2/profile_nav.html
diff options
context:
space:
mode:
Diffstat (limited to 'gn2/wqflask/templates/oauth2/profile_nav.html')
-rw-r--r--gn2/wqflask/templates/oauth2/profile_nav.html64
1 files changed, 64 insertions, 0 deletions
diff --git a/gn2/wqflask/templates/oauth2/profile_nav.html b/gn2/wqflask/templates/oauth2/profile_nav.html
new file mode 100644
index 00000000..aa752905
--- /dev/null
+++ b/gn2/wqflask/templates/oauth2/profile_nav.html
@@ -0,0 +1,64 @@
+{%macro profile_nav(calling_page, user_sys_privileges)%}
+
+<ul class="nav nav-pills">
+
+ <li role="presentation"
+ {%if calling_page == "dashboard"%}
+ class="active"
+ {%endif%}>
+ <a href="{{url_for('oauth2.user.user_profile')}}">Dashboard</a>
+ </li>
+
+ <li role="presentation"
+ {%if calling_page == "group"%}
+ class="active"
+ {%endif%}>
+ <a href="{{url_for('oauth2.group.user_group')}}">Group</a>
+ </li>
+
+ <li role="presentation"
+ {%if calling_page == "roles"%}
+ class="active"
+ {%endif%}>
+ <a href="{{url_for('oauth2.role.user_roles')}}">Roles</a>
+ </li>
+
+ <li role="presentation"
+ {%if calling_page == "resources"%}
+ class="active"
+ {%endif%}>
+ <a href="{{url_for('oauth2.resource.user_resources')}}">Resources</a>
+ </li>
+
+ {%if "system:data:link-to-group" in user_sys_privileges %}
+ <li role="presentation"
+ {%if calling_page == "data"%}
+ class="active"
+ {%endif%}>
+ <a href="{{url_for('oauth2.data.list_data')}}">Link Data</a>
+ </li>
+ {%endif%}
+
+ {%if "system:user:masquerade" in user_sys_privileges %}
+ <li role="presentation"
+ {%if calling_page == "masquerade"%}
+ class="active"
+ {%endif%}>
+ <a href="{{url_for('oauth2.user.masquerade')}}"
+ title="Masquerade as another user">
+ Masquerade As
+ </a>
+ </li>
+ {%endif%}
+
+ <li role="presentation">
+ {%if logged_in():%}
+ <a href="{{url_for('oauth2.user.logout')}}">Logout</a>
+ {%else%}
+ <a href="{{url_for('oauth2.user.login')}}">Login</a>
+ {%endif%}
+ </li>
+
+</ul>
+
+{%endmacro%}