views/_tree_nav.erb in ginatra-4.0.2 vs views/_tree_nav.erb in ginatra-4.1.0

- old
+ new

@@ -1,53 +1,57 @@ <% if @repo.branch_exists?(params[:tree]) %> - <div class="row-fluid"> - <ul class="nav nav-pills pull-left"> - <li> - <a href="<%= prefix_url(@repo.param) %>/<%= params[:tree] %>">Commits</a> - </li> - <li class="active"> - <a href="<%= prefix_url(@repo.param) %>/tree/<%= params[:tree] %>">Source</a> - </li> - <li> - <a href="<%= prefix_url(@repo.param) %>/stats/<%= params[:tree] %>">Stats</a> - </li> - </ul> + <div class="row"> + <div class="col-md-12"> + <ul class="nav nav-pills pull-left"> + <li> + <a href="<%= prefix_url(@repo.param) %>/<%= params[:tree] %>">Commits</a> + </li> + <li class="active"> + <a href="<%= prefix_url(@repo.param) %>/tree/<%= params[:tree] %>">Source</a> + </li> + <li> + <a href="<%= prefix_url(@repo.param) %>/stats/<%= params[:tree] %>">Stats</a> + </li> + </ul> - <div class="btn-group pull-right"> - <button class="btn btn-small dropdown-toggle" data-toggle="dropdown"> - <%= params[:tree] %> <span class="caret"></span> - </button> - <ul class="dropdown-menu"> - <li class="dropdown-hint">Branches</li> - <li class="divider"></li> - <% @repo.branches.each do |branch| %> - <% if @blob %> - <li><a href="<%= prefix_url(@repo.param) %>/blob/<%= branch.name %>/<%= params[:splat].first %>"><%= branch.name %></a></li> - <% else %> - <li><a href="<%= prefix_url(@repo.param) %>/tree/<%= branch.name %><%= "/#{params[:splat].first}" unless params[:splat].nil? || params[:splat].empty? %>"><%= branch.name %></a></li> + <div class="btn-group pull-right"> + <button class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown"> + <%= params[:tree] %> <span class="caret"></span> + </button> + <ul class="dropdown-menu"> + <li class="dropdown-hint">Branches</li> + <li class="divider"></li> + <% @repo.branches.each do |branch| %> + <% if @blob %> + <li><a href="<%= prefix_url(@repo.param) %>/blob/<%= branch.name %>/<%= params[:splat].first %>"><%= branch.name %></a></li> + <% else %> + <li><a href="<%= prefix_url(@repo.param) %>/tree/<%= branch.name %><%= "/#{params[:splat].first}" unless params[:splat].nil? || params[:splat].empty? %>"><%= branch.name %></a></li> + <% end %> <% end %> - <% end %> - </ul> + </ul> + </div> </div> </div> <% end %> <% unless params[:splat].nil? or params[:splat].empty? %> <% tree_nav = params[:splat].first.split('/') %> - <ul class="breadcrumb" id="js-tree-nav"> - <li> - <a href="<%= prefix_url(@repo.param) %>/tree/<%= params[:tree] %>"><%= @repo.name %></a> - <span class="divider">/</span> - </li> - - <% tree_nav.each_with_index do |path, index| %> - <% if index == tree_nav.size - 1 %> - <li class="active"><%= tree_nav.last %></li> - <% else %> + <div class="row"> + <div class="col-md-12"> + <ol class="breadcrumb" id="js-tree-nav"> <li> - <a href="<%= prefix_url(@repo.param) %>/tree/<%= params[:tree] %>/<%= tree_nav[0..index].join('/') %>"><%= path %></a> - <span class="divider">/</span> + <a href="<%= prefix_url(@repo.param) %>/tree/<%= params[:tree] %>"><%= @repo.name %></a> </li> - <% end %> - <% end %> - </ul> + + <% tree_nav.each_with_index do |path, index| %> + <% if index == tree_nav.size - 1 %> + <li class="active"><%= tree_nav.last %></li> + <% else %> + <li> + <a href="<%= prefix_url(@repo.param) %>/tree/<%= params[:tree] %>/<%= tree_nav[0..index].join('/') %>"><%= path %></a> + </li> + <% end %> + <% end %> + </ol> + </div> + </div> <% end %>