Rewrite of navigation controller to reduce re-render counter.
This commit is contained in:
parent
7ff8fe7b48
commit
561570834f
1 changed files with 2 additions and 50 deletions
|
@ -1,31 +1,9 @@
|
||||||
<div class="navbar navbar-fixed-top navbar-inverse">
|
<div class="navbar navbar-fixed-top navbar-inverse">
|
||||||
<a class="navbar-brand" href="#/"><%- @C( 'product_name' ) %></a>
|
<a class="navbar-brand" href="#/"><%- @C( 'product_name' ) %></a>
|
||||||
<ul class="nav navbar-nav">
|
<ul class="nav navbar-nav navbar-items-left"></ul>
|
||||||
<% for item in @navbar_left: %>
|
|
||||||
<% if item.child: %>
|
|
||||||
<li class="dropdown <% if @open_tab[item.target] : %>open<% end %>">
|
|
||||||
<a href="<%= item.target %>" class="dropdown-toggle" data-toggle="dropdown"><%- @T( item.name ) %> <b class="caret"></b></a>
|
|
||||||
<ul class="dropdown-menu">
|
|
||||||
<% for item in item.child: %>
|
|
||||||
<% if item.divider: %>
|
|
||||||
<li class="divider"></li>
|
|
||||||
<% end %>
|
|
||||||
<% if item.navheader: %>
|
|
||||||
<li class="dropdown-header"><%- @T( item.navheader ) %></li>
|
|
||||||
<% end %>
|
|
||||||
<li class="<% if @active_tab[item.target] : %>active<% end %>"><a href="<%= item.target %>"><%- @T( item.name ) %><% if item['count'] isnt undefined: %><span class="badge count"><%= item['count'] %></span><% end %></a></li>
|
|
||||||
<% end %>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<% else: %>
|
|
||||||
<li class="<% if @active_tab[item.target] : %>active<% end %>"><a href="<%= item.target %>"><%- @T( item.name ) %></a></li>
|
|
||||||
<% end %>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
</ul>
|
|
||||||
<div class="spinner"/>
|
<div class="spinner"/>
|
||||||
<% if !_.isEmpty(@user): %>
|
<% if !_.isEmpty(@user): %>
|
||||||
<ul class="nav navbar-nav navbar-right">
|
<ul class="nav navbar-nav navbar-right navbar-items-right">
|
||||||
|
|
||||||
<li class="dropdown">
|
<li class="dropdown">
|
||||||
<form class="navbar-form">
|
<form class="navbar-form">
|
||||||
|
@ -36,32 +14,6 @@
|
||||||
|
|
||||||
<li class="bell"><a href="#bell" class="glyphicon glyphicon-bell"></a></li>
|
<li class="bell"><a href="#bell" class="glyphicon glyphicon-bell"></a></li>
|
||||||
|
|
||||||
<% for item in @navbar_right: %>
|
|
||||||
<% if item.child: %>
|
|
||||||
<li class="dropdown <% if @open_tab[item.target] : %>open<% end %>">
|
|
||||||
<a href="<%= item.target %>" class="dropdown-toggle" data-toggle="dropdown"><%- @T( item.name ) %> <b class="caret"></b></a>
|
|
||||||
<ul class="dropdown-menu">
|
|
||||||
<% for item in item.child: %>
|
|
||||||
<% if item.divider: %>
|
|
||||||
<li class="divider"></li>
|
|
||||||
<% end %>
|
|
||||||
<% if item.navheader: %>
|
|
||||||
<li class="dropdown-header"><%- @T( item.navheader ) %></li>
|
|
||||||
<% end %>
|
|
||||||
<li class="<% if @active_tab[item.target] : %>active<% end %>"><a href="<%= item.target %>"><%- @T( item.name ) %><% if item['count'] isnt undefined: %><span class="badge count"><%= item['count'] %>)</span><% end %></a></li>
|
|
||||||
<% end %>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<% else: %>
|
|
||||||
<li class="<% if @active_tab[item.target] : %>active<% end %>"><a href="<%= item.target %>"><%- @T( item.name ) %></a></li>
|
|
||||||
<% end %>
|
|
||||||
<% end %>
|
|
||||||
</ul>
|
</ul>
|
||||||
<% else: %>
|
|
||||||
<!--
|
|
||||||
<ul class="nav navbar-nav navbar-right">
|
|
||||||
<li><a href="#login"><%- @T( 'Sign in' ) %></a></li>
|
|
||||||
</ul>
|
|
||||||
-->
|
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue