remove breadcrumbs throughout application

This commit is contained in:
mlorb 2018-04-17 17:00:04 +02:00
parent b13e997350
commit c08d72be36
8 changed files with 30 additions and 158 deletions

View file

@ -10,7 +10,7 @@
); );
$('#wrapper').css('paddingLeft', '280px'); $('#wrapper').css('paddingLeft', '280px');
$('.navbar-secondary').css( $('.navbar-secondary').css(
{ 'margin-left': '-280px', 'padding-left': '280px' } { 'margin-left': '-280px', 'padding-left': '295px' }
); );
} }
@ -23,7 +23,7 @@
$('#wrapper').css('paddingLeft', '0'); $('#wrapper').css('paddingLeft', '0');
$('.navbar-secondary').css({ $('.navbar-secondary').css({
'margin-left': '0', 'margin-left': '0',
'padding-left': '0' 'padding-left': '15px'
}); });
} }

View file

@ -222,7 +222,7 @@ a[data-toggle="tooltip"] {
#secondary-navigation { #secondary-navigation {
white-space: nowrap; white-space: nowrap;
overflow: hidden overflow: hidden;
} }
.panel-body { .panel-body {
@ -253,6 +253,19 @@ a[data-toggle="tooltip"] {
border-right: 0; border-right: 0;
border-bottom: 4px solid $color-silver; border-bottom: 4px solid $color-silver;
padding-right: 0; padding-right: 0;
padding-left: 0;
}
.navbar-toggle {
margin-right: 100px;
}
#secondary-menu {
padding-left: 0;
}
.nav-name {
padding: 15px 0;
} }
ul.nav { ul.nav {
@ -409,13 +422,6 @@ a[data-toggle="tooltip"] {
} }
/** Protocols management */ /** Protocols management */
.breadcrumb-protocols-manager {
overflow: visible;
margin-top: 15px;
margin-bottom: 15px;
background-color: $color-white;
}
.tab-pane-protocols { .tab-pane-protocols {
& > div.protocols-description { & > div.protocols-description {
margin-bottom: 15px; margin-bottom: 15px;

View file

@ -1,14 +0,0 @@
<ol class="breadcrumb breadcrumb-protocols-manager">
<% if action_name == "index" %>
<li><%= link_to current_team.name, projects_path(team: current_team) %></li>
<li class="active"><%= t("protocols.nav.breadcrumbs.manager") %></li>
<% else %>
<li><%= link_to current_team.name, projects_path(team: current_team) %></li>
<li><%= link_to t("protocols.nav.breadcrumbs.manager"), protocols_path(team: current_team, type: type) %></li>
<% end %>
<% if action_name == "edit" %>
<li class="active">
<%= t("protocols.nav.breadcrumbs.edit") %>
</li>
<% end %>
</ol>

View file

@ -1,10 +1,6 @@
<% provide(:head_title, t("protocols.edit.head_title")) %> <% provide(:head_title, t("protocols.edit.head_title")) %>
<%= render partial: 'shared/drag_n_drop_overlay' %> <%= render partial: 'shared/drag_n_drop_overlay' %>
<%= render partial: "protocols/breadcrumbs.html.erb",
locals: { teams: @teams,
current_team: @protocol.team,
type: @type } %>
<%= render partial: "protocols/header.html.erb" %> <%= render partial: "protocols/header.html.erb" %>

View file

@ -2,7 +2,6 @@
<% provide(:head_title, t("protocols.index.head_title")) %> <% provide(:head_title, t("protocols.index.head_title")) %>
<% if current_team %> <% if current_team %>
<%= render partial: "protocols/breadcrumbs.html.erb", locals: { teams: @teams, current_team: @current_team, type: @type } %>
<ul class="nav nav-tabs nav-settings"> <ul class="nav nav-tabs nav-settings">
<li role="presentation" class="<%= "active" if @type == :public %>"> <li role="presentation" class="<%= "active" if @type == :public %>">
<%= link_to t("protocols.index.navigation.public"), protocols_path(team: @current_team, type: :public) %> <%= link_to t("protocols.index.navigation.public"), protocols_path(team: @current_team, type: :public) %>

View file

@ -1,4 +0,0 @@
<ol class="breadcrumb breadcrumb-protocols-manager">
<li><%= link_to current_team.name, projects_path(team: current_team) %></li>
<li class="active"><%= t("repositories.nav.breadcrumbs.repositories") %></li>
</ol>

View file

@ -10,58 +10,6 @@
<span class="icon-bar"></span> <span class="icon-bar"></span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
</button> </button>
<!-- Breadcrumbs, displayed on small screens -->
<ul class="breadcrumb hidden-sm hidden-md hidden-lg">
<li>
<% if can_read_team?(@project.team) %>
<a href="<%= projects_path :team => @project.team.id %>">
<span class="glyphicon glyphicon-folder-open"></span>
</a>
<% else %>
<span class="glyphicon glyphicon-folder-open"></span>
<% end %>
</li>
<% if project_page? ||
sample_types_page_project? ||
sample_groups_page_project? %>
<li class="active">
<span class="glyphicon glyphicon-blackboard"></span>
</li>
<% else %>
<li>
<% if can_read_project?(@project) %>
<a href="<%= project_url(@project) %>">
<span class="glyphicon glyphicon-blackboard"></span>
</a>
<% else %>
<span class="glyphicon glyphicon-blackboard"></span>
<% end %>
</li>
<% end %>
<% if experiment_page? %>
<li class="active">
<i class="fas fa-flask"></i>
</li>
<% elsif module_page? %>
<li>
<% if can_read_experiment?(@experiment) %>
<%= link_to canvas_experiment_path(@experiment) do %>
<i class="fas fa-flask"></i>
<% end %>
<% else %>
<i class="fas fa-flask"></i>
<% end %>
</li>
<li class="active">
<span class="glyphicon glyphicon-credit-card"></span>
</li>
<% elsif experiment_page? %>
<li class="active">
<i class="fas fa-flask"></i>
</li>
<% end %>
</ul>
</div> </div>
<!-- buttons --> <!-- buttons -->
@ -212,72 +160,20 @@
<% end %> <% end %>
</ul> </ul>
<!-- Breadcrumbs, displayed on large screens --> <!-- Secondary navigation title -->
<ul class="breadcrumb hidden-xs"> <% if project_page? %>
<li> <% title_element = @project %>
<% if can_read_team?(@project.team) %> <% elsif experiment_page? %>
<a href="<%= projects_path :team => @project.team.id %>"> <% title_element = @experiment %>
<%= truncate(@project.team.name, <% elsif module_page? %>
length: Constants::NAME_TRUNCATION_LENGTH) %> <% title_element = @my_module %>
</a> <% end %>
<% else %>
<%= truncate(@project.team.name, <div class="nav-name">
length: Constants::NAME_TRUNCATION_LENGTH) %> <%= truncate(title_element.name,
<% end %> length: Constants::NAME_TRUNCATION_LENGTH) %>
</li> </div>
<% if project_page? %>
<li class="active">
<%= truncate(@project.name,
length: Constants::NAME_TRUNCATION_LENGTH) %>
</li>
<% else %>
<li>
<% if can_read_project?(@project) %>
<a href="<%= project_url(@project) %>">
<%= truncate(@project.name,
length: Constants::NAME_TRUNCATION_LENGTH) %>
</a>
<% else %>
<%= truncate(@project.name,
length: Constants::NAME_TRUNCATION_LENGTH) %>
<% end %>
</li>
<% end %>
<% if experiment_page? ||
module_page? ||
sample_types_page_my_module? ||
sample_groups_page_my_module? ||
sample_groups_page_experiment? ||
sample_types_page_expermient? %>
<% if !module_page? &&
!sample_types_page_my_module? &&
!sample_groups_page_my_module? %>
<li class="active">
<%= truncate(@experiment.name,
length: Constants::NAME_TRUNCATION_LENGTH) %>
</li>
<% else %>
<li>
<% if can_read_experiment?(@experiment) %>
<%= link_to truncate(@experiment.name,
length: Constants::NAME_TRUNCATION_LENGTH),
canvas_experiment_path(@experiment) %>
<% else %>
<%= truncate(@experiment.name,
length: Constants::NAME_TRUNCATION_LENGTH) %>
<% end %>
</li>
<% end %>
<% end %>
<% if module_page? ||
sample_types_page_my_module? ||
sample_groups_page_my_module? %>
<li class="active">
<%= truncate(@my_module.name,
length: Constants::NAME_TRUNCATION_LENGTH) %>
</li>
<% end %>
</ul>
</div> </div>
</div> </div>
</nav> </nav>

View file

@ -917,9 +917,6 @@ en:
name_placeholder: "My inventory" name_placeholder: "My inventory"
submit: "Create inventory" submit: "Create inventory"
success_flash: "Inventory <strong>%{name}</strong> successfully created." success_flash: "Inventory <strong>%{name}</strong> successfully created."
nav:
breadcrumbs:
repositories: "Inventories"
table: table:
id: 'ID' id: 'ID'
assigned: "Assigned" assigned: "Assigned"
@ -1449,10 +1446,6 @@ en:
leave_flash: "Successfuly left team %{team}." leave_flash: "Successfuly left team %{team}."
protocols: protocols:
nav:
breadcrumbs:
manager: "Protocol management"
edit: "Edit protocol"
protocols_io_import: protocols_io_import:
title_too_long: "... Text is too long so we had to cut it off." title_too_long: "... Text is too long so we had to cut it off."
too_long: "... <span class='label label-warning'>Text is too long so we had to cut it off.</span>" too_long: "... <span class='label label-warning'>Text is too long so we had to cut it off.</span>"