scinote-web/app/views/repositories/_sidebar.html.erb
2020-02-28 14:03:08 +01:00

34 lines
1.4 KiB
Text

<%= content_for :sidebar do %>
<div id="slide-panel" class="visible">
<div id="repo-tree" class="tree">
<ul class="sidebar-root">
<% if can_create_repositories?(current_team) %>
<li class="branch">
<span class="tree-link no-indent">
<a class="sidebar-button create-new-repository" data-remote="true"
href="<%= create_modal_team_repositories_path(current_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="branch <%= 'active parent_li' if current_page?(repository_path(repository)) %>" >
<span class="tree-link no-indent" title="<%= repository.name %>">
<%= link_to repository.name,
repository_path(repository),
class: current_page?(repository_path(repository)) ? 'disabled line-wrap' : 'line-wrap',
data: { 'no-turbolink' => 'true', type: 'repository', id: repository.id } %>
<%= inventory_shared_status_icon(repository, current_team) %>
</span>
</li>
<% end %>
</ul>
</div>
</div>
<% end %>
<script>
$('#wrapper').show();
</script>