mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-11 18:21:04 +08:00
100 lines
5.8 KiB
Text
100 lines
5.8 KiB
Text
<% provide(:head_title, t("my_modules.results.head_title", project: h(@project.name), module: h(@my_module.name)).html_safe) %>
|
|
<% provide(:sidebar_title, t("sidebar.my_module.sidebar_title")) %>
|
|
|
|
<%= content_for :sidebar do %>
|
|
<%= render partial: "shared/sidebar/#{@my_module.archived_branch? ? 'archived_my_module' : 'my_module'}.html.erb",
|
|
locals: {
|
|
my_modules: @experiment_my_modules,
|
|
experiment: @my_module.experiment,
|
|
current_my_module: @my_module
|
|
}
|
|
%>
|
|
<% end %>
|
|
<%= render partial: 'shared/drag_n_drop_overlay' %>
|
|
<%= render partial: 'assets/wopi/create_wopi_file_modal' %>
|
|
<% provide(:container_class, 'no-second-nav-container') %>
|
|
|
|
<div class="content-pane flexible">
|
|
<%= render partial: 'my_modules/header' %>
|
|
<div class="mt-5" id="results-toolbar">
|
|
<% if can_manage_my_module?(@my_module) %>
|
|
<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="sn-icon sn-icon-new-task"></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="sn-icon sn-icon-tables"></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="sn-icon sn-icon-files"></i><%= t("my_modules.results.new_asset_result") %>
|
|
</li>
|
|
<%= render partial: '/assets/marvinjs/create_marvin_sketch_li',
|
|
locals: { element_id: @my_module.id, element_type: 'Result', sketch_container: "#results[data-module-id=#{@my_module.id}]" } %>
|
|
<%= render partial: '/assets/bio_eddie/create_bio_eddie_li.html.erb',
|
|
locals: { element_id: @my_module.id, element_type: 'Result', assets_container:"#results[data-module-id=#{@my_module.id}]" } %>
|
|
<%= render partial: "assets/wopi/create_wopi_file_li",
|
|
locals: { element_id: @my_module.id, element_type: 'Result' } %>
|
|
</ul>
|
|
</div>
|
|
<% end %>
|
|
<div class="sci-btn-group collapse-expand-result">
|
|
<button class="btn btn-light" id="results-collapse-btn">
|
|
<span class="sn-icon sn-icon-open-show"></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="sn-icon sn-icon-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="sn-icon sn-icon-sort-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>
|
|
<li><%= link_to t('general.sort_new.old_updated'), results_my_module_path(@my_module, page: params[:page], order: 'old_updated'), class: (@results_order == 'old_updated' ? 'selected' : '') %></li>
|
|
<li><%= link_to t('general.sort_new.new_updated'), results_my_module_path(@my_module, page: params[:page], order: 'new_updated'), class: (@results_order == 'new_updated' ? 'selected' : '') %></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
<div style="height: 15px;"></div>
|
|
|
|
<div id="results" data-module-id="<%= @my_module.id %>" data-task-id="<%= @my_module.id %>">
|
|
<% @results.each do |result| %>
|
|
<%= render partial: "result", locals: { result: result } %>
|
|
<% end %>
|
|
</div>
|
|
<div class="kaminari-pagination">
|
|
<%= paginate @results, outer_window: 1, window: 1 %>
|
|
</div>
|
|
</div>
|
|
|
|
<%= render partial: "shared/bio_eddie_modal.html.erb" %>
|
|
|
|
|
|
<%= javascript_include_tag "handsontable.full" %>
|
|
|
|
<!-- Libraries for formulas -->
|
|
<%= render partial: "shared/formulas_libraries.html.erb" %>
|
|
|
|
<%= javascript_include_tag "assets/wopi/create_wopi_file", nonce: true %>
|
|
<%= javascript_include_tag "my_modules/results", nonce: true %>
|
|
<%= javascript_include_tag "results/result_texts", nonce: true %>
|
|
<%= javascript_include_tag "results/result_tables", nonce: true %>
|
|
<%= javascript_include_tag "results/result_assets", nonce: true %>
|
|
<%= javascript_include_tag 'pdf_js', nonce: true %>
|
|
<%= stylesheet_link_tag 'pdf_js_styles' %>
|
|
|
|
<%= render 'shared/tiny_mce_packs' %>
|
|
<%= render partial: 'label_printers/label_printer_modal' %>
|