2017-01-12 23:54:15 +08:00
|
|
|
<% provide(:head_title, t("experiments.canvas.head_title", project: h(@project.name)).html_safe) %>
|
2016-07-28 15:01:44 +08:00
|
|
|
<%= render partial: "shared/sidebar" %>
|
|
|
|
<%= render partial: "shared/secondary_navigation" %>
|
|
|
|
|
2018-05-12 00:02:17 +08:00
|
|
|
<div class="content-pane" id="experiment-canvas">
|
2018-05-08 22:33:42 +08:00
|
|
|
<div class="row">
|
|
|
|
<div class="container-fluid">
|
|
|
|
<div id="diagram-buttons">
|
|
|
|
<% if can_manage_experiment?(@experiment) %>
|
|
|
|
<%=link_to canvas_edit_experiment_url(@experiment),
|
|
|
|
remote: true,
|
|
|
|
type: 'button',
|
|
|
|
id: 'edit-canvas-button',
|
|
|
|
data: { action: 'edit' },
|
2018-06-06 23:41:07 +08:00
|
|
|
class: 'ajax btn btn-primary' do %>
|
2018-05-22 22:55:58 +08:00
|
|
|
<span class="fas fa-pencil-alt"></span>
|
2018-05-08 22:33:42 +08:00
|
|
|
<span class="hidden-xs"><%=t 'experiments.canvas.canvas_edit' %></span>
|
|
|
|
<% end %>
|
|
|
|
<!-- experiment actions -->
|
|
|
|
<span class="dropdown">
|
|
|
|
<button class="btn btn-default dropdown-toggle" type="button" id="exActionsMenu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
|
|
|
|
<span class="hidden-xs"><%= t'experiments.canvas.actions' %></span>
|
2018-07-09 19:13:44 +08:00
|
|
|
<span class="visible-xs-inline"><i class="fas fa-sort"></i></span>
|
2018-05-08 22:33:42 +08:00
|
|
|
<span class="caret"></span>
|
|
|
|
</button>
|
|
|
|
<%= render partial: 'experiments/dropdown_actions.html.erb',
|
|
|
|
locals: { project: @project, experiment: @experiment } %>
|
|
|
|
</span>
|
|
|
|
<% end %>
|
|
|
|
<div class="toolbarButtons">
|
|
|
|
<span class="hidden-xs"><%=t 'experiments.canvas.zoom' %></span>
|
|
|
|
<div id="zoom-level-buttons" class="btn-group" data-toggle="buttons">
|
|
|
|
<%=link_to canvas_full_zoom_experiment_path(@experiment), remote: true, type: "button", class: "ajax btn btn-default active", "data-action" => "full_zoom", "data-toggle" => "button", "aria-pressed" => true do %>
|
2018-07-09 19:13:44 +08:00
|
|
|
<span class="fas fa-th-large" aria-hidden="true" ></span>
|
2018-05-08 22:33:42 +08:00
|
|
|
<% end %>
|
|
|
|
<%=link_to canvas_medium_zoom_experiment_path(@experiment), remote: true, type: "button", class: "ajax btn btn-default", "data-action" => "medium_zoom" do %>
|
2018-07-09 19:13:44 +08:00
|
|
|
<span class="fas fa-th-list" aria-hidden="true"></span>
|
2018-05-08 22:33:42 +08:00
|
|
|
<% end %>
|
|
|
|
<%=link_to canvas_small_zoom_experiment_path(@experiment), remote: true, type: "button", class: "ajax btn btn-default", "data-action" => "small_zoom" do %>
|
2018-07-09 19:13:44 +08:00
|
|
|
<span class="fas fa-th" aria-hidden="true"></span>
|
2018-05-08 22:33:42 +08:00
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
</div>
|
2016-09-08 18:37:06 +08:00
|
|
|
</div>
|
2016-08-24 23:00:27 +08:00
|
|
|
</div>
|
2016-08-03 15:34:10 +08:00
|
|
|
</div>
|
|
|
|
|
2018-05-08 22:33:42 +08:00
|
|
|
<div id="canvas-container" data-project-id="<%= @project.id %>">
|
|
|
|
<%= render partial: 'canvas/full_zoom', locals: { experiment: @experiment, my_modules: @active_modules } %>
|
|
|
|
</div>
|
2016-07-28 15:01:44 +08:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Manage tags modal -->
|
|
|
|
<%= render partial: "my_modules/modals/manage_module_tags_modal", locals: { my_module: nil } %>
|
|
|
|
|
2018-07-05 20:36:54 +08:00
|
|
|
<!-- Initialize dropdown actions -->
|
|
|
|
<%= javascript_include_tag("experiments/dropdown_actions") %>
|
|
|
|
|
2016-07-28 15:01:44 +08:00
|
|
|
<!-- Include all the neccesary JS libraries -->
|
|
|
|
<%= javascript_include_tag("eventPause-min") %>
|
|
|
|
|
|
|
|
<%= javascript_include_tag("projects/canvas") %>
|