Commit 4cc927fe authored by Matija Obreza's avatar Matija Obreza
Browse files

Different dropdowns for auth/anon users

parent d6c20b24
...@@ -15,8 +15,9 @@ ...@@ -15,8 +15,9 @@
</form> </form>
<ul class="nav navbar-nav navbar-right"> <ul class="nav navbar-nav navbar-right">
<security:authorize access="isAnonymous()">
<li class="dropdown"> <li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Login</a> <a href="#" class="dropdown-toggle" data-toggle="dropdown"><spring:message code="page.login" /></a>
<ul class="dropdown-menu pull-left"> <ul class="dropdown-menu pull-left">
<li> <li>
<form role="form" method="post" action="/login-attempt"> <form role="form" method="post" action="/login-attempt">
...@@ -35,12 +36,28 @@ ...@@ -35,12 +36,28 @@
</label> </label>
</div> </div>
<button type="submit" class="btn btn-green"><spring:message code="login.login-button" /></button> <button type="submit" class="btn btn-green"><spring:message code="login.login-button" /></button>
<span class="or">or</span> <span class="or"></span>
<a href="<c:url value="/registration" />" class="btn btn-default"><spring:message code="login.register-now"/></a> <a href="<c:url value="/registration" />" class="btn btn-default"><spring:message code="login.register-now"/></a>
</form> </form>
</li> </li>
</ul> </ul>
</li> </li>
</security:authorize>
<security:authorize access="isAuthenticated()">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><spring:message code="user.pulldown.heading" arguments="${user.user.name}" /></a>
<ul class="dropdown-menu pull-left">
<security:authorize access="hasRole('ADMINISTRATOR')">
<li><a href="<c:url value="/admin/" />"><spring:message code="user.pulldown.administration" /></a></li>
<li><a href="<c:url value="/profile/list" />"><spring:message code="user.pulldown.users" /></a></li>
<li><a href="<c:url value="/team" />"><spring:message code="user.pulldown.teams" /></a></li>
</security:authorize>
<li><a href="<c:url value="/profile/${user.username}" />"><spring:message code="user.pulldown.profile" /></a></li>
<li><a href="<c:url value="/logout" />"><spring:message code="user.pulldown.logout" /></a></li>
</ul>
</li>
</security:authorize>
<li class="dropdown" id="lang"> <li class="dropdown" id="lang">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><c:out value="${pageContext.response.locale.displayLanguage}" /> <b class="caret"></b></a> <a href="#" class="dropdown-toggle" data-toggle="dropdown"><c:out value="${pageContext.response.locale.displayLanguage}" /> <b class="caret"></b></a>
<ul class="dropdown-menu" role="menu"> <ul class="dropdown-menu" role="menu">
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment