diff options
Diffstat (limited to 'main/app/sprinkles/account/templates/navigation')
-rwxr-xr-x | main/app/sprinkles/account/templates/navigation/main-nav.html.twig | 13 | ||||
-rwxr-xr-x | main/app/sprinkles/account/templates/navigation/user-card.html.twig | 33 |
2 files changed, 46 insertions, 0 deletions
diff --git a/main/app/sprinkles/account/templates/navigation/main-nav.html.twig b/main/app/sprinkles/account/templates/navigation/main-nav.html.twig new file mode 100755 index 0000000..e44c9c8 --- /dev/null +++ b/main/app/sprinkles/account/templates/navigation/main-nav.html.twig @@ -0,0 +1,13 @@ +{# This extend the same file from core to add a sign-up/sign-in or "my account" link to the "home page" nav menu. #} +{% extends "@core/navigation/main-nav.html.twig" %} + +{% block secondary_nav %} + {{parent()}} + {% if not checkAuthenticated() %} + <li> + <a href="{{site.uri.public}}/account/sign-in" class="nav-highlight">{{translate("SIGNIN")}}</a> + </li> + {% else %} + {% include "navigation/user-card.html.twig" %} + {% endif %} +{% endblock %} diff --git a/main/app/sprinkles/account/templates/navigation/user-card.html.twig b/main/app/sprinkles/account/templates/navigation/user-card.html.twig new file mode 100755 index 0000000..47e18f1 --- /dev/null +++ b/main/app/sprinkles/account/templates/navigation/user-card.html.twig @@ -0,0 +1,33 @@ +{% block userCard %} +<li class="dropdown user user-menu"> + {% block userCard_nav %} + <a href="#" class="dropdown-toggle" data-toggle="dropdown"> + <img src="{{ current_user.avatar }}" class="user-image" alt="User Image"> + <span class="hidden-xs">{{current_user.first_name}} {{current_user.last_name}}</span> + <i class="fa fa-chevron-down"></i> + </a> + {% endblock %} + <ul class="dropdown-menu"> + {% block userCard_userInfo %} + <!-- User image --> + <li class="user-header"> + <img src="{{ current_user.avatar }}" class="img-circle" alt="User Image"> + <p> + {{current_user.first_name}} {{current_user.last_name}} + <small>({{current_user.user_name}})</small> + </p> + </li> + {% endblock %} + + <!-- Menu Footer--> + <li class="user-footer"> + {% block userCard_menu %} + {% if checkAccess('uri_account_settings') %} + <a href="{{site.uri.public}}/account/settings" class="btn btn-default btn-flat btn-block">{{translate("ACCOUNT.MY")}}</a> + {% endif %} + <a href="{{site.uri.public}}/account/logout" class="btn btn-default btn-flat btn-block">{{translate("LOGOUT")}}</a> + {% endblock %} + </li> + </ul> +</li> +{% endblock %} |