scinote-web/app/views/my_modules/results.html.erb

75 lines
3.1 KiB
Text
Raw Normal View History

<% provide(:head_title, t("my_modules.results.head_title", project: h(@project.name), module: h(@my_module.name)).html_safe) %>
2016-02-12 23:52:43 +08:00
<%= render partial: "shared/sidebar" %>
<%= render partial: "shared/secondary_navigation" %>
<%= render partial: 'shared/drag_n_drop_overlay' %>
2016-02-12 23:52:43 +08:00
<div class="content-pane">
<div id="results-toolbar">
<div class="pull-right">
<button class="btn btn-default" id="results-collapse-btn">
<span class="fas fa-caret-square-up"></span>
<span class="hidden-xs-custom"><%= t'my_modules.results.collapse_label' %></button></span>
<button class="btn btn-default" id="results-expand-btn">
<span class="fas fa-caret-square-down"></span>
<span class="hidden-xs-custom"><%= t'my_modules.results.expand_label' %></button></span>
</div>
2016-02-12 23:52:43 +08:00
<% if can_manage_module?(@my_module) %>
<div class="popover_v2" style="width:25%"
data-popoverlink="<%= I18n.t('popover_test.link.task.results') %>"
data-popovercontent="<%= I18n.t('popover_test.text.task.results') %>">
<span class="hidden-xs"><%= t'my_modules.results.add_label' %></span>
<a class="btn btn-primary"
id="new-result-text"
data-href="<%= new_my_module_result_text_path(my_module_id: @my_module.id) %>"
href="#">
<span class="fas fa-font"></span>
<span class="hidden-xs"><%= t("my_modules.results.new_text_result") %></span>
</a>
<a class="btn btn-primary"
id="new-result-table"
data-href="<%= new_my_module_result_table_path(my_module_id: @my_module.id) %>"
href="#">
<span class="fas fa-table"></span>
<span class="hidden-xs"><%= t("my_modules.results.new_table_result") %></span>
</a>
<a class="btn btn-primary"
id="new-result-asset"
data-href="<%= new_my_module_result_asset_path(my_module_id: @my_module.id) %>"
href="#">
<span class="fas fa-image"></span>
<span class="hidden-xs"><%= t("my_modules.results.new_asset_result") %></span>
</a>
</div>
<% end %>
</div>
2016-02-12 23:52:43 +08:00
<div style="height: 15px;"></div>
2016-02-12 23:52:43 +08:00
<div id="results" data-module-id="<%= @my_module.id %>">
<% ordered_result_of(@my_module).each do |result| %>
<%= render partial: "result", locals: { result: result } %>
<% end %>
</div>
2016-02-12 23:52:43 +08:00
</div>
<%= javascript_include_tag "handsontable.full.min" %>
<%= javascript_include_tag("canvas-to-blob.min") %>
<%= javascript_include_tag "my_modules/results" %>
<%= javascript_include_tag "results/result_texts" %>
<%= javascript_include_tag "results/result_tables" %>
<%= javascript_include_tag "results/result_assets" %>
2016-09-05 19:54:20 +08:00
<!-- Libraries for formulas -->
<%= javascript_include_tag "lodash" %>
<%= javascript_include_tag "numeral" %>
<%= javascript_include_tag "numeric" %>
<%= javascript_include_tag "md5" %>
<%= javascript_include_tag "jstat" %>
<%= javascript_include_tag "formula" %>
<%= javascript_include_tag "parser" %>
<%= javascript_include_tag "ruleJS" %>
<%= javascript_include_tag "handsontable.formula" %>
<%= javascript_include_tag "big.min" %>
2016-09-05 19:54:20 +08:00
<%= stylesheet_link_tag "handsontable.formula" %>