scinote-web/app/views/projects/canvas.html.erb

40 lines
2.3 KiB
Plaintext
Raw Normal View History

2016-07-21 19:11:15 +08:00
<% provide(:head_title, raw(t("projects.canvas.head_title", project: @project.name))) %>
2016-02-12 23:52:43 +08:00
<%= render partial: "shared/sidebar" %>
<%= render partial: "shared/secondary_navigation" %>
2016-07-21 19:11:15 +08:00
<div id="diagram-buttons" data-intro="<%=t ('tutorial.canvas_click_edit_workflow_html') %>" data-step="5" data-position="left">
2016-02-12 23:52:43 +08:00
<% if can_edit_canvas(@project) %>
2016-07-21 19:11:15 +08:00
<%=link_to t("projects.canvas.canvas_edit"), canvas_edit_project_url(@project), remote: true, type: "button", id: "edit-canvas-button", class: "ajax btn btn-default", "data-action" => "edit" %>
2016-02-12 23:52:43 +08:00
<% end %>
<div id="zoom-level-buttons" class="btn-group" data-toggle="buttons">
<%=link_to canvas_full_zoom_project_path(@project), remote: true, type: "button", class: "ajax btn btn-primary active", "data-action" => "full_zoom", "data-toggle" => "button", "aria-pressed" => true do %>
<span class="glyphicon glyphicon-th-large" aria-hidden="true" ></span>
<% end %>
<%=link_to canvas_medium_zoom_project_path(@project), remote: true, type: "button", class: "ajax btn btn-primary", "data-action" => "medium_zoom" do %>
<span class="glyphicon glyphicon-th-list" aria-hidden="true"></span>
<% end %>
<%=link_to canvas_small_zoom_project_path(@project), remote: true, type: "button", class: "ajax btn btn-primary", "data-action" => "small_zoom" do %>
<span class="glyphicon glyphicon-th" aria-hidden="true"></span>
<% end %>
</div>
</div>
<div id="canvas-container" data-project-id="<%= @project.id %>"
data-step="4" data-position='left'
data-intro="<%=t 'tutorial.canvas_overview_html' %>"
data-sidebar-step-text="<%=t 'tutorial.sidebar_html' %>"
2016-07-21 19:11:15 +08:00
data-sidebar-click-module-step-text="<%=t 'tutorial.sidebar_click_module_html' %>"
data-edit-workflow-step-text="<%=t 'tutorial.edit_workflow_html' %>"
data-edit-workflow-click-save-step-text="<%=t 'tutorial.edit_workflow_click_save_html' %>">
2016-02-12 23:52:43 +08:00
<%= render partial: 'canvas/full_zoom', locals: { project: @project, my_modules: @project.active_modules } %>
</div>
<!-- Manage tags modal -->
<%= render partial: "my_modules/modals/manage_module_tags_modal", locals: { my_module: nil } %>
<!-- Include all the neccesary JS libraries -->
<%= javascript_include_tag("jsPlumb-2.0.4-min") %>
<%= javascript_include_tag("jsnetworkx") %>
<%= javascript_include_tag("eventPause-min") %>
<%= javascript_include_tag("projects/canvas") %>