Browse Source

Rearranging New menu for better flexibility

Alan Hardman 3 years ago
parent
commit
59681a0ad7
1 changed files with 11 additions and 10 deletions
  1. 11 10
      app/view/blocks/navbar.html

+ 11 - 10
app/view/blocks/navbar.html

@@ -26,19 +26,9 @@
 						{{ @dict.new }} <b class="caret"></b>
 					</a>
 					<ul class="dropdown-menu" role="menu">
-						<check if="{{ @user.role == 'admin' }}">
-							<li><a href="{{ @BASE }}/admin/sprints/new">{{ @dict.sprint }}</a></li>
-							<li role="presentation" class="divider"></li>
-						</check>
 						<repeat group="{{ @issue_types }}" value="{{ @type }}">
 							<li><a href="{{ @BASE }}/issues/new/{{ @type.id }}">{{ isset(@dict[@type.name]) ? @dict[@type.name] : str_replace('_', ' ', @type.name) }}</a></li>
 						</repeat>
-						<check if="{{ @nav.new }}">
-							<li role="presentation" class="divider"></li>
-							<repeat group="{{ @nav.new }}" value="{{ @navitem }}">
-								<li class="{{ @navitem.active ? 'active' : '' }}"><a href="{{ @BASE }}/{{ @navitem.href }}">{{ @navitem.title }}</a></li>
-							</repeat>
-						</check>
 						<check if="{{ !empty(@issue) }}">
 							<li role="presentation" class="divider"></li>
 							<check if="{{ @issue.type_id == @issue_type.project }}">
@@ -56,6 +46,17 @@
 								</false>
 							</check>
 						</check>
+						<check if="{{ @user.role == 'admin' || @nav.new }}">
+							<li role="presentation" class="divider"></li>
+						</check>
+						<check if="{{ @user.role == 'admin' }}">
+							<li><a href="{{ @BASE }}/admin/sprints/new">{{ @dict.sprint }}</a></li>
+						</check>
+						<check if="{{ @nav.new }}">
+							<repeat group="{{ @nav.new }}" value="{{ @navitem }}">
+								<li class="{{ @navitem.active ? 'active' : '' }}"><a href="{{ @BASE }}/{{ @navitem.href }}">{{ @navitem.title }}</a></li>
+							</repeat>
+						</check>
 					</ul>
 				</li>
 				<li class="dropdown {{ @menuitem == 'browse' ? 'active':'' }}">