2017-01-12 23:54:15 +08:00
|
|
|
<% provide(:head_title, t("experiments.module_archive.head_title", experiment: h(@experiment.name)).html_safe) %>
|
2021-01-08 00:18:52 +08:00
|
|
|
<% provide(:sidebar_title, t("sidebar.my_modules.sidebar_title_archived")) %>
|
2020-12-10 22:15:36 +08:00
|
|
|
<% provide(:sidebar_url, experiment_sidebar_path(@experiment)) %>
|
|
|
|
|
|
|
|
<%= content_for :sidebar do %>
|
2020-12-13 05:46:30 +08:00
|
|
|
<%= render partial: 'shared/sidebar/archived_my_modules.html.erb', locals: { experiment: @experiment, my_modules: @my_modules } %>
|
2020-12-10 22:15:36 +08:00
|
|
|
<% end %>
|
2021-03-04 16:00:58 +08:00
|
|
|
<%= render partial: 'shared/secondary_navigation', locals: { render_breadcrumbs: true, project: @experiment.project } %>
|
2016-08-08 21:04:02 +08:00
|
|
|
|
2018-05-12 00:02:17 +08:00
|
|
|
<div class="content-pane" id="module-archive">
|
2020-12-13 05:46:30 +08:00
|
|
|
<% if @my_modules.present? %>
|
2020-12-29 00:44:47 +08:00
|
|
|
<% if can_manage_experiment?(@experiment) %>
|
|
|
|
<div class="restore-button-container collapse">
|
2021-01-04 22:11:24 +08:00
|
|
|
<%= button_to restore_my_modules_experiment_path(@experiment), class: 'btn btn-light', method: :post do %>
|
2020-12-29 00:44:47 +08:00
|
|
|
<span class="fas fa-undo"></span>
|
|
|
|
<%= t('experiments.module_archive.restore_option') %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
2020-12-11 18:52:24 +08:00
|
|
|
|
2018-05-08 22:33:42 +08:00
|
|
|
<div class="row" style="margin-top: 10px;">
|
2020-12-13 05:46:30 +08:00
|
|
|
<% @my_modules.each_with_index do |my_module, i| %>
|
2020-12-10 19:07:18 +08:00
|
|
|
<div class="module-container col-lg-3 col-md-4 col-sm-12">
|
|
|
|
<%= render partial: 'canvas/full_zoom/my_module', locals: {experiment: @experiment, my_module: my_module} %>
|
2018-05-08 22:33:42 +08:00
|
|
|
</div>
|
2016-08-08 21:04:02 +08:00
|
|
|
<% end %>
|
|
|
|
</div>
|
2018-05-08 22:33:42 +08:00
|
|
|
<% else %>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-xs-12">
|
2020-12-13 05:46:30 +08:00
|
|
|
<em><%= t('experiments.module_archive.no_archived_modules') %></em>
|
2018-05-08 22:33:42 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
2020-12-10 22:18:31 +08:00
|
|
|
|
|
|
|
<!-- Manage tags modal -->
|
2020-12-11 18:52:24 +08:00
|
|
|
<%= render partial: 'my_modules/modals/manage_module_tags_modal', locals: { my_module: nil } %>
|
2020-12-10 22:18:31 +08:00
|
|
|
|
2018-05-08 22:33:42 +08:00
|
|
|
</div>
|
2020-12-10 22:18:31 +08:00
|
|
|
|
2020-12-11 18:52:24 +08:00
|
|
|
<%= javascript_include_tag('projects/canvas') %>
|
|
|
|
<%= javascript_include_tag('my_modules/archived') %>
|