2017-01-12 23:54:15 +08:00
|
|
|
<% provide(:head_title, t("my_modules.results.head_title", project: h(@project.name), module: h(@my_module.name)).html_safe) %>
|
2018-11-29 18:28:36 +08:00
|
|
|
<%= render partial: "shared/sidebar", locals: { current_task: @my_module, page: 'task' } %>
|
2016-02-12 23:52:43 +08:00
|
|
|
<%= render partial: "shared/secondary_navigation" %>
|
2017-06-07 19:29:39 +08:00
|
|
|
<%= render partial: 'shared/drag_n_drop_overlay' %>
|
2019-03-18 02:23:17 +08:00
|
|
|
<%= render partial: 'assets/wopi/create_wopi_file_modal' %>
|
2016-02-12 23:52:43 +08:00
|
|
|
|
2018-05-08 22:33:42 +08:00
|
|
|
<div class="content-pane">
|
|
|
|
<div id="results-toolbar">
|
|
|
|
<% if can_manage_module?(@my_module) %>
|
2020-07-28 21:39:29 +08:00
|
|
|
<div class="add-result-dropdown dropdown sci-dropdown">
|
|
|
|
<a href="#" id="add-result-button" class="btn btn-secondary" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
|
|
|
|
<span class="fas fa-plus"></span>
|
|
|
|
<span><%= t("my_modules.results.add_label") %></span>
|
|
|
|
<span class="caret pull-right"></span>
|
|
|
|
</a>
|
|
|
|
<ul class="dropdown-menu add-result-dropdown" aria-labelledby="add-result-button">
|
|
|
|
<li id="new-result-text" data-href="<%= new_my_module_result_text_path(my_module_id: @my_module.id, page: params[:page], order: params[:order]) %>">
|
|
|
|
<i class="fas fa-font"></i><%= t("my_modules.results.new_text_result") %>
|
|
|
|
</li>
|
|
|
|
<li id="new-result-table" data-href="<%= new_my_module_result_table_path(my_module_id: @my_module.id, page: params[:page], order: params[:order]) %>">
|
|
|
|
<i class="fas fa-table"></i><%= t("my_modules.results.new_table_result") %>
|
|
|
|
</li>
|
|
|
|
<li id="new-result-asset" data-href="<%= new_my_module_result_asset_path(my_module_id: @my_module.id, page: params[:page], order: params[:order]) %>">
|
|
|
|
<i class="fas fa-paperclip"></i><%= t("my_modules.results.new_asset_result") %>
|
|
|
|
</li>
|
|
|
|
<%= render partial: '/assets/marvinjs/create_marvin_sketch_li',
|
2020-03-23 00:47:13 +08:00
|
|
|
locals: { element_id: @my_module.id, element_type: 'Result', sketch_container: "#results[data-module-id=#{@my_module.id}]" } %>
|
2020-07-28 21:39:29 +08:00
|
|
|
<%= render partial: "assets/wopi/create_wopi_file_li",
|
2020-03-23 00:47:13 +08:00
|
|
|
locals: { element_id: @my_module.id, element_type: 'Result' } %>
|
2020-07-28 21:39:29 +08:00
|
|
|
</ul>
|
2019-12-04 18:27:22 +08:00
|
|
|
</div>
|
2018-05-08 22:33:42 +08:00
|
|
|
<% end %>
|
2020-08-13 19:18:50 +08:00
|
|
|
<div class="sci-btn-group collapse-expand-result">
|
2020-07-28 21:39:29 +08:00
|
|
|
<button class="btn btn-light" id="results-collapse-btn">
|
|
|
|
<span class="fas fa-caret-up"></span>
|
|
|
|
<span class="hidden-xs-custom"><%= t'my_modules.results.collapse_label' %></span>
|
|
|
|
</button>
|
|
|
|
<button class="btn btn-light" id="results-expand-btn">
|
|
|
|
<span class="fas fa-caret-down"></span>
|
|
|
|
<span class="hidden-xs-custom"><%= t'my_modules.results.expand_label' %></span>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
<div class="sort-result-dropdown dropdown">
|
|
|
|
<button id="sort-result-button" class="btn btn-light icon-btn" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
|
|
|
|
<i class="fas fa-sort-amount-up"></i>
|
|
|
|
</button>
|
|
|
|
<ul class="dropdown-menu dropdown-menu-right" aria-labelledby="sort-result-button">
|
|
|
|
<li><%= link_to t('general.sort_new.atoz'), results_my_module_path(@my_module, page: params[:page], order: 'atoz'), class: (@results_order == 'atoz' ? 'selected' : '') %></li>
|
|
|
|
<li><%= link_to t('general.sort_new.ztoa'), results_my_module_path(@my_module, page: params[:page], order: 'ztoa'), class: (@results_order == 'ztoa' ? 'selected' : '') %></li>
|
|
|
|
<li><%= link_to t('general.sort_new.old'), results_my_module_path(@my_module, page: params[:page], order: 'old'), class: (@results_order == 'old' ? 'selected' : '') %></li>
|
|
|
|
<li><%= link_to t('general.sort_new.new'), results_my_module_path(@my_module, page: params[:page], order: 'new'), class: (@results_order == 'new' ? 'selected' : '') %></li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
2018-05-08 22:33:42 +08:00
|
|
|
</div>
|
2016-02-12 23:52:43 +08:00
|
|
|
|
2018-05-08 22:33:42 +08:00
|
|
|
<div style="height: 15px;"></div>
|
2016-02-12 23:52:43 +08:00
|
|
|
|
2018-05-08 22:33:42 +08:00
|
|
|
<div id="results" data-module-id="<%= @my_module.id %>">
|
2020-07-16 21:42:52 +08:00
|
|
|
<% @results.each do |result| %>
|
2018-11-23 22:07:08 +08:00
|
|
|
<%= render partial: "result", locals: { result: result } %>
|
2018-05-08 22:33:42 +08:00
|
|
|
<% end %>
|
|
|
|
</div>
|
2020-07-16 21:42:52 +08:00
|
|
|
<div class="kaminari-pagination">
|
|
|
|
<%= paginate @results, outer_window: 1, window: 1 %>
|
|
|
|
</div>
|
2016-02-12 23:52:43 +08:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<%= javascript_include_tag "handsontable.full.min" %>
|
2016-09-05 19:54:20 +08:00
|
|
|
|
|
|
|
<!-- Libraries for formulas -->
|
2019-05-13 16:45:12 +08:00
|
|
|
<%= render partial: "shared/formulas_libraries.html.erb" %>
|
2018-11-26 21:05:02 +08:00
|
|
|
|
|
|
|
<%= javascript_include_tag("canvas-to-blob.min") %>
|
2019-03-18 02:23:17 +08:00
|
|
|
<%= javascript_include_tag "assets/wopi/create_wopi_file" %>
|
2018-11-26 21:05:02 +08:00
|
|
|
<%= javascript_include_tag "my_modules/results" %>
|
|
|
|
<%= javascript_include_tag "results/result_texts" %>
|
|
|
|
<%= javascript_include_tag "results/result_tables" %>
|
|
|
|
<%= javascript_include_tag "results/result_assets" %>
|