mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-11 10:06:53 +08:00
44 lines
1.6 KiB
Text
44 lines
1.6 KiB
Text
<%= content_for :sidebar do %>
|
|
<div id="slide-panel" class="visible">
|
|
<div id="repo-tree" class="tree">
|
|
<ul>
|
|
<% if can_create_repositories?(current_team) %>
|
|
<li>
|
|
<span class="tree-link link-wrap no-indent">
|
|
<a class="sidebar-button" id="create-new-repository" data-remote="true"
|
|
href="<%= create_modal_team_repositories_path(@repository.team) %>">
|
|
<span class="fas fa-plus"></span>
|
|
<%= t('libraries.index.no_libraries.create_new_button') %>
|
|
</a>
|
|
</span>
|
|
</li>
|
|
<% end %>
|
|
<% repositories.each do |repository| %>
|
|
<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 repository.shared_with?(current_team) %>
|
|
<% if repository.team_repositories.where(team: current_team).take.write? %>
|
|
<%= draw_custom_icon('shared-edit') %>
|
|
<% else %>
|
|
<%= draw_custom_icon('shared-read') %>
|
|
<% end %>
|
|
<% end %>
|
|
</span>
|
|
</li>
|
|
<% end %>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<% end %>
|
|
|
|
<script>
|
|
$('#wrapper').show();
|
|
</script>
|