mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-31 03:59:51 +08:00
Make changes to inventory list in navigation based on new mockup
This commit is contained in:
parent
cac7dab440
commit
15432ac851
6 changed files with 25 additions and 34 deletions
|
@ -107,3 +107,14 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
#repo-tree {
|
||||
li .fas {
|
||||
float: right;
|
||||
font-size: 11pt;
|
||||
}
|
||||
|
||||
li:not(.active) {
|
||||
color: $color-silver-chalice;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,12 +1,5 @@
|
|||
@import "constants";
|
||||
|
||||
#shared-repos {
|
||||
background-color: $color-concrete;
|
||||
font-size: 14px;
|
||||
font-weight: bolder;
|
||||
padding: 5px 10px;
|
||||
}
|
||||
|
||||
.repositories-dropdown-menu {
|
||||
height: auto;
|
||||
max-height: 400px;
|
||||
|
|
|
@ -303,7 +303,7 @@ class RepositoriesController < ApplicationController
|
|||
def load_parent_vars
|
||||
@team = current_team
|
||||
render_404 unless @team
|
||||
@repositories = @team.repositories.order(created_at: :asc)
|
||||
@repositories = (@team.repositories + @team.shared_repositories).uniq.sort_by(&:created_at)
|
||||
end
|
||||
|
||||
def check_team
|
||||
|
|
|
@ -1,23 +1,23 @@
|
|||
<%= content_for :sidebar do %>
|
||||
<div id="slide-panel" class="visible">
|
||||
<div class="tree">
|
||||
<div id="repo-tree" class="tree">
|
||||
<ul>
|
||||
<% repositories.each do |repository| %>
|
||||
<%= render partial: "repositories/sidebar_list.html.erb",
|
||||
locals: { repository: repository } %>
|
||||
<% end %>
|
||||
<li class="<%= 'active parent_li' if current_page?(repository_path(repository)) %>" >
|
||||
<span class="tree-link line-wrap no-indent">
|
||||
<% if current_page?(repository_path(repository)) %>
|
||||
<span title="<%= repository.name %>"><%= repository.name %></span>
|
||||
<% else %>
|
||||
<%= link_to repository.name,
|
||||
repository_path(repository),
|
||||
data: { 'no-turbolink' => 'true' } %>
|
||||
<% end %>
|
||||
|
||||
<% if @team.team_repositories.any? %>
|
||||
<li >
|
||||
<span id="shared-repos" class="tree-link line-wrap no-indent">
|
||||
<%= t('left_menu_bar.repositories_extra.shared_repos') %>
|
||||
<% if repository.team_repositories.where(team: current_team).any? %>
|
||||
<i class="fas fa-user-friends"></i>
|
||||
<% end %>
|
||||
</span>
|
||||
</li>
|
||||
|
||||
<% @team.shared_repositories.each do |repository| %>
|
||||
<%= render partial: "repositories/sidebar_list.html.erb",
|
||||
locals: { repository: repository } %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
<li class="<%= 'active parent_li' if current_page?(repository_path(repository)) %>" >
|
||||
<span class="tree-link line-wrap no-indent">
|
||||
<% if current_page?(repository_path(repository)) %>
|
||||
<span title="<%= repository.name %>"><%= repository.name %></span>
|
||||
<% else %>
|
||||
<%= link_to repository.name,
|
||||
repository_path(repository),
|
||||
data: { 'no-turbolink' => 'true' } %>
|
||||
<% end %>
|
||||
</span>
|
||||
</li>
|
|
@ -127,8 +127,6 @@ en:
|
|||
left_menu_bar:
|
||||
projects: "Projects"
|
||||
repositories: "Inventories"
|
||||
repositories_extra:
|
||||
shared_repos: "Shared Inventories"
|
||||
templates: "Protocols"
|
||||
reports: "Reports"
|
||||
settings: "Settings"
|
||||
|
|
Loading…
Reference in a new issue