mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-11 01:44:34 +08:00
fix archived repositories show button not showing [SCI-7162] (#4408)
* fix archived repositories show button not showing [SCI-7162] * fix archived repositories show button not showing [SCI-7162] Co-authored-by: Giga Chubinidze <gchubinidze@unisens.ge>
This commit is contained in:
parent
c5f0fa3e7f
commit
e179182d21
3 changed files with 26 additions and 21 deletions
21
app/views/repositories/_view_archived_btn.html.erb
Normal file
21
app/views/repositories/_view_archived_btn.html.erb
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
<div class="content-pane flexible <%= params[:archived] ? :archived : :active %> repositories-index"
|
||||||
|
data-readonly="<%= !current_user.is_admin_of_team?(current_team) %>">
|
||||||
|
<div class="content-header">
|
||||||
|
<div class="title-row">
|
||||||
|
<h1 data-view-mode="active"><%= t('libraries.index.head_title') %></h1>
|
||||||
|
<h1 data-view-mode="archived"><i class="fas fa-archive"></i> <%= t('libraries.index.head_title_archived') %></h1>
|
||||||
|
<%= render layout: "shared/view_switch", locals: { disabled: false } do %>
|
||||||
|
<li class="view-switch-archived" data-view-mode="active">
|
||||||
|
<i class="fas fa-archive button-icon"></i>
|
||||||
|
<%= t('libraries.index.switch_view.archived') %>
|
||||||
|
</li>
|
||||||
|
<li class="view-switch-active" data-view-mode="archived">
|
||||||
|
<i class="fas fa-rocket button-icon"></i>
|
||||||
|
<%= t('libraries.index.switch_view.active') %>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="content-body">
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -16,6 +16,8 @@
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
<%= render "view_archived_btn" %>
|
||||||
|
|
||||||
<div class="content-pane flexible empty-repositories" data-readonly="<%= !current_user.is_admin_of_team?(current_team) %>">
|
<div class="content-pane flexible empty-repositories" data-readonly="<%= !current_user.is_admin_of_team?(current_team) %>">
|
||||||
<div class="content-header">
|
<div class="content-header">
|
||||||
<h1 data-view-mode="active"><%= t('libraries.index.head_title') %></h1>
|
<h1 data-view-mode="active"><%= t('libraries.index.head_title') %></h1>
|
||||||
|
@ -38,3 +40,4 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<%= javascript_include_tag 'repositories/index' %>
|
<%= javascript_include_tag 'repositories/index' %>
|
||||||
|
|
||||||
|
|
|
@ -7,27 +7,8 @@
|
||||||
<%= content_for :sidebar do %>
|
<%= content_for :sidebar do %>
|
||||||
<%= render partial: "sidebar", locals: { repositories: @repositories, archived: params[:archived] } %>
|
<%= render partial: "sidebar", locals: { repositories: @repositories, archived: params[:archived] } %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<div class="content-pane flexible <%= params[:archived] ? :archived : :active %> repositories-index"
|
|
||||||
data-readonly="<%= !current_user.is_admin_of_team?(current_team) %>">
|
<%= render "view_archived_btn"%>
|
||||||
<div class="content-header">
|
|
||||||
<div class="title-row">
|
|
||||||
<h1 data-view-mode="active"><%= t('libraries.index.head_title') %></h1>
|
|
||||||
<h1 data-view-mode="archived"><i class="fas fa-archive"></i> <%= t('libraries.index.head_title_archived') %></h1>
|
|
||||||
<%= render layout: "shared/view_switch", locals: { disabled: false } do %>
|
|
||||||
<li class="view-switch-archived" data-view-mode="active">
|
|
||||||
<i class="fas fa-archive button-icon"></i>
|
|
||||||
<%= t('libraries.index.switch_view.archived') %>
|
|
||||||
</li>
|
|
||||||
<li class="view-switch-active" data-view-mode="archived">
|
|
||||||
<i class="fas fa-rocket button-icon"></i>
|
|
||||||
<%= t('libraries.index.switch_view.active') %>
|
|
||||||
</li>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="content-body">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<!-- table template -->
|
<!-- table template -->
|
||||||
|
|
Loading…
Reference in a new issue