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")) %>
|
2021-09-16 15:55:59 +08:00
|
|
|
<% provide(:sidebar_url, sidebar_experiment_path(@experiment)) %>
|
2022-11-25 22:29:15 +08:00
|
|
|
<% provide(:container_class, 'no-second-nav-container') %>
|
2020-12-10 22:15:36 +08:00
|
|
|
|
|
|
|
<%= content_for :sidebar do %>
|
2023-06-21 20:13:20 +08:00
|
|
|
<%= render partial: 'shared/sidebar/archived_my_modules', locals: { experiment: @experiment, my_modules: @my_modules } %>
|
2020-12-10 22:15:36 +08:00
|
|
|
<% end %>
|
2022-11-25 22:29:15 +08:00
|
|
|
<div class="content-pane flexible" id="module-archive">
|
|
|
|
<%= render partial: 'experiments/show_header' %>
|
|
|
|
<div class="toolbar">
|
|
|
|
<% if @my_modules.present? %>
|
|
|
|
<% if can_manage_experiment?(@experiment) %>
|
2023-05-15 15:12:07 +08:00
|
|
|
<span class="left">
|
2023-06-02 16:04:25 +08:00
|
|
|
<div class="move-button-container collapse">
|
|
|
|
<button class="btn btn-light">
|
2023-06-08 14:33:37 +08:00
|
|
|
<span class="sn-icon sn-icon-move"></span>
|
2023-06-02 16:04:25 +08:00
|
|
|
<%= t('experiments.module_archive.move_option') %>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
<div class="restore-button-container collapse">
|
|
|
|
<%= button_to restore_my_modules_experiment_path(@experiment), class: 'btn btn-light', method: :post do %>
|
2023-06-08 14:33:37 +08:00
|
|
|
<span class="sn-icon sn-icon-restore"></span>
|
2023-06-02 16:04:25 +08:00
|
|
|
<%= t('experiments.module_archive.restore_option') %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
2023-05-15 15:12:07 +08:00
|
|
|
</span>
|
2022-11-25 22:29:15 +08:00
|
|
|
<% end %>
|
2023-06-21 20:13:20 +08:00
|
|
|
<%= render partial: 'task_view_dropdowns' %>
|
2022-11-25 22:29:15 +08:00
|
|
|
</div>
|
2020-12-11 18:52:24 +08:00
|
|
|
|
2023-05-18 20:00:05 +08:00
|
|
|
<div class="row mt-4"
|
2023-05-03 17:15:17 +08:00
|
|
|
id="cards-container"
|
|
|
|
data-move-modules-modal-url="<%= move_modules_modal_experiment_path(@experiment) %>"
|
|
|
|
data-move-modules-url="<%= move_modules_experiment_path(@experiment) %>"
|
|
|
|
>
|
2020-12-13 05:46:30 +08:00
|
|
|
<% @my_modules.each_with_index do |my_module, i| %>
|
2022-12-12 18:45:59 +08:00
|
|
|
<div class="module-container col-lg-4 col-md-5 col-sm-12">
|
2020-12-10 19:07:18 +08:00
|
|
|
<%= 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
|
|
|
<% 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
|
|
|
|
2023-05-23 21:29:14 +08:00
|
|
|
<% unless @my_modules.present? %>
|
2023-06-21 20:13:20 +08:00
|
|
|
<%= render partial: 'task_view_dropdowns' %>
|
2023-05-23 21:29:14 +08:00
|
|
|
<% end %>
|
|
|
|
|
2018-05-08 22:33:42 +08:00
|
|
|
</div>
|
2023-05-15 15:12:07 +08:00
|
|
|
<% unless @my_modules.present? %>
|
2023-05-18 19:15:35 +08:00
|
|
|
<div class="pt-10">
|
|
|
|
<em><%= t('experiments.empty_state.no_archived_modules') %></em>
|
2023-05-15 15:12:07 +08:00
|
|
|
</div>
|
|
|
|
<% end %>
|
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') %>
|