mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-11-08 07:21:03 +08:00
Refactor canvas a lot.
Also refactor localization files concerning canvas.
This commit is contained in:
parent
c8ef3b1899
commit
b64e200b91
32 changed files with 205 additions and 250 deletions
|
|
@ -232,7 +232,7 @@ class CanvasController < ApplicationController
|
|||
end
|
||||
|
||||
flash[:success] = t(
|
||||
"projects.canvas.update.success_flash")
|
||||
"experiments.canvas.update.success_flash")
|
||||
redirect_to canvas_experiment_path(@experiment)
|
||||
end
|
||||
|
||||
|
|
@ -254,7 +254,6 @@ class CanvasController < ApplicationController
|
|||
|
||||
def load_vars
|
||||
@experiment = Experiment.find_by_id(params[:id])
|
||||
@project = @experiment.project
|
||||
unless @experiment
|
||||
respond_to do |format|
|
||||
format.html { render_404 and return }
|
||||
|
|
@ -266,7 +265,7 @@ class CanvasController < ApplicationController
|
|||
end
|
||||
|
||||
def check_edit_canvas
|
||||
unless can_edit_canvas(@project)
|
||||
unless can_edit_canvas(@experiment)
|
||||
render_403 and return
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ class MyModuleTagsController < ApplicationController
|
|||
@my_module_tags = @my_module.my_module_tags
|
||||
@unassigned_tags = @my_module.unassigned_tags
|
||||
@new_mmt = MyModuleTag.new(my_module: @my_module)
|
||||
@new_tag = Tag.new(project: @my_module.project)
|
||||
@new_tag = Tag.new(project: @my_module.experiment.project)
|
||||
|
||||
respond_to do |format|
|
||||
format.json {
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ class MyModulesController < ApplicationController
|
|||
# Currently not in use
|
||||
Activity.create(
|
||||
type_of: :archive_module,
|
||||
project: @my_module.project,
|
||||
project: @my_module.experiment.project,
|
||||
my_module: @my_module,
|
||||
user: current_user,
|
||||
message: t(
|
||||
|
|
@ -162,7 +162,7 @@ class MyModulesController < ApplicationController
|
|||
if saved
|
||||
Activity.create(
|
||||
type_of: :restore_module,
|
||||
project: @my_module.project,
|
||||
project: @my_module.experiment.project,
|
||||
my_module: @my_module,
|
||||
user: current_user,
|
||||
message: t(
|
||||
|
|
@ -178,7 +178,7 @@ class MyModulesController < ApplicationController
|
|||
if saved and description_changed then
|
||||
Activity.create(
|
||||
type_of: :change_module_description,
|
||||
project: @my_module.project,
|
||||
project: @my_module.experiment.project,
|
||||
my_module: @my_module,
|
||||
user: current_user,
|
||||
message: t(
|
||||
|
|
@ -240,7 +240,7 @@ class MyModulesController < ApplicationController
|
|||
|
||||
def samples
|
||||
@samples_index_link = samples_index_my_module_path(@my_module, format: :json)
|
||||
@organization = @my_module.project.organization
|
||||
@organization = @my_module.experiment.project.organization
|
||||
end
|
||||
|
||||
def archive
|
||||
|
|
@ -293,7 +293,7 @@ class MyModulesController < ApplicationController
|
|||
|
||||
# AJAX actions
|
||||
def samples_index
|
||||
@organization = @my_module.project.organization
|
||||
@organization = @my_module.experiment.project.organization
|
||||
|
||||
respond_to do |format|
|
||||
format.html
|
||||
|
|
@ -309,7 +309,7 @@ class MyModulesController < ApplicationController
|
|||
@direct_upload = ENV['PAPERCLIP_DIRECT_UPLOAD'] == "true"
|
||||
@my_module = MyModule.find_by_id(params[:id])
|
||||
if @my_module
|
||||
@project = @my_module.project
|
||||
@project = @my_module.experiment.project
|
||||
else
|
||||
render_404
|
||||
end
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ class ProjectsController < ApplicationController
|
|||
before_action :check_view_notifications_permissions, only: [ :notifications ]
|
||||
before_action :check_edit_permissions, only: [ :edit ]
|
||||
before_action :check_module_archive_permissions, only: [:module_archive]
|
||||
before_action :check_canvas_permissions, only: [:workflow]
|
||||
|
||||
filter_by_archived = false
|
||||
|
||||
|
|
@ -311,13 +310,6 @@ class ProjectsController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
def check_canvas_permissions
|
||||
@project = Project.find_by_id(wf_params[:id])
|
||||
unless can_edit_canvas(@project)
|
||||
render_403
|
||||
end
|
||||
end
|
||||
|
||||
def check_module_archive_permissions
|
||||
unless can_restore_archived_modules(@project)
|
||||
render_403
|
||||
|
|
|
|||
|
|
@ -323,8 +323,8 @@ module PermissionHelper
|
|||
|
||||
# ---- WORKFLOW PERMISSIONS ----
|
||||
|
||||
def can_edit_canvas(project)
|
||||
is_user_or_higher_of_project(project)
|
||||
def can_edit_canvas(experiment)
|
||||
is_user_or_higher_of_project(experiment.project)
|
||||
end
|
||||
|
||||
def can_reposition_modules(experiment)
|
||||
|
|
@ -378,11 +378,11 @@ module PermissionHelper
|
|||
end
|
||||
|
||||
def can_add_tag_to_module(my_module)
|
||||
is_user_or_higher_of_project(my_module.project)
|
||||
is_user_or_higher_of_project(my_module.experiment.project)
|
||||
end
|
||||
|
||||
def can_remove_tag_from_module(my_module)
|
||||
is_user_or_higher_of_project(my_module.project)
|
||||
is_user_or_higher_of_project(my_module.experiment.project)
|
||||
end
|
||||
|
||||
def can_view_module_info(my_module)
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ module SidebarHelper
|
|||
when "archive"
|
||||
return module_archive_project_url(project)
|
||||
else
|
||||
return canvas_project_path(project)
|
||||
return project_path(project)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -6,16 +6,16 @@
|
|||
data-can-delete-modules="<%= can_archive_modules(@experiment) ? "yes" : "no" %>"
|
||||
data-can-reposition-modules="<%= can_reposition_modules(@experiment) ? "yes" : "no" %>"
|
||||
data-can-edit-connections="<%= can_edit_connections(@experiment) ? "yes" : "no" %>"
|
||||
data-unsaved-work-text="<%=t "projects.canvas.edit.unsaved_work" %>"
|
||||
data-unsaved-work-text="<%=t "experiments.canvas.edit.unsaved_work" %>"
|
||||
>
|
||||
<%= bootstrap_form_tag url: canvas_experiment_url, method: "post" do |f| %>
|
||||
<div class="btn-group" role="group">
|
||||
<%= f.submit class: "btn btn-primary", id: "canvas-save" do %>
|
||||
<span class="visibile-xs"><%= t("projects.canvas.edit.save_short") %></span>
|
||||
<span class="hidden-xs"><%= t("projects.canvas.edit.save") %></span>
|
||||
<span class="visibile-xs"><%= t("experiments.canvas.edit.save_short") %></span>
|
||||
<span class="hidden-xs"><%= t("experiments.canvas.edit.save") %></span>
|
||||
<% end %>
|
||||
<%= link_to canvas_experiment_path(@experiment), type: "button", class: "btn btn-default cancel-edit-canvas" do %>
|
||||
<span class="hidden-xs"><%= t("projects.canvas.edit.cancel") %></span>
|
||||
<span class="hidden-xs"><%= t("experiments.canvas.edit.cancel") %></span>
|
||||
<span class="glyphicon glyphicon-remove visible-xs" style="height: 16px;margin-top: 4px;"> </span>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
@ -23,12 +23,12 @@
|
|||
<%=link_to "", type: "button", class: "btn btn-default", id: "canvas-new-module" do %>
|
||||
<span class="hbtn-default">
|
||||
<span class="glyphicon glyphicon-credit-card"></span>
|
||||
<%= t("projects.canvas.edit.new_module") %>
|
||||
<%= t("experiments.canvas.edit.new_module") %>
|
||||
</span>
|
||||
<span class="hbtn-hover">
|
||||
<span class="glyphicon glyphicon-credit-card"></span>
|
||||
<em class="hidden-xs"><%= t("projects.canvas.edit.new_module_hover") %></em>
|
||||
<span class="visible-xs-inline"><%= t("projects.canvas.edit.new_module") %></span>
|
||||
<em class="hidden-xs"><%= t("experiments.canvas.edit.new_module_hover") %></em>
|
||||
<span class="visible-xs-inline"><%= t("experiments.canvas.edit.new_module") %></span>
|
||||
</span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
|
@ -42,28 +42,28 @@
|
|||
<%= hidden_field_tag 'module-groups', '{}' %>
|
||||
<% end %>
|
||||
<span style="display: none;" id="dropdown-header-placeholder">
|
||||
<%=t "projects.canvas.edit.options_header" %>
|
||||
<%=t "experiments.canvas.edit.options_header" %>
|
||||
</span>
|
||||
<span style="display: none;" id="edit-link-placeholder">
|
||||
<%=t "projects.canvas.edit.edit_module" %>
|
||||
<%=t "experiments.canvas.edit.edit_module" %>
|
||||
</span>
|
||||
<span style="display: none;" id="edit-group-link-placeholder">
|
||||
<%=t "projects.canvas.edit.edit_module_group" %>
|
||||
<%=t "experiments.canvas.edit.edit_module_group" %>
|
||||
</span>
|
||||
<span style="display: none;" id="clone-link-placeholder">
|
||||
<%=t "projects.canvas.edit.clone_module" %>
|
||||
<%=t "experiments.canvas.edit.clone_module" %>
|
||||
</span>
|
||||
<span style="display: none;" id="clone-group-link-placeholder">
|
||||
<%=t "projects.canvas.edit.clone_module_group" %>
|
||||
<%=t "experiments.canvas.edit.clone_module_group" %>
|
||||
</span>
|
||||
<span style="display: none;" id="delete-link-placeholder">
|
||||
<%=t "projects.canvas.edit.delete_module" %>
|
||||
<%=t "experiments.canvas.edit.delete_module" %>
|
||||
</span>
|
||||
<span style="display: none;" id="delete-group-link-placeholder">
|
||||
<%=t "projects.canvas.edit.delete_module_group" %>
|
||||
<%=t "experiments.canvas.edit.delete_module_group" %>
|
||||
</span>
|
||||
<span style="display: none;" id="drag-connections-placeholder">
|
||||
<%=t "projects.canvas.edit.drag_connections" %>
|
||||
<%=t "experiments.canvas.edit.drag_connections" %>
|
||||
</span>
|
||||
</div>
|
||||
<div id="diagram-container">
|
||||
|
|
|
|||
|
|
@ -23,30 +23,30 @@
|
|||
<li class="dropdown-header"><%= t('projects.index.options_header') %></li>
|
||||
<% if can_edit_module(my_module) %>
|
||||
<li>
|
||||
<a class="edit-module" href="" data-module-id="<%= my_module.id %>"><%=t "projects.canvas.edit.edit_module" %></a>
|
||||
<a class="edit-module" href="" data-module-id="<%= my_module.id %>"><%=t "experiments.canvas.edit.edit_module" %></a>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if can_edit_module_groups(my_module.experiment) %>
|
||||
<li <%= 'style=display:none;' if my_module.my_module_group.blank? %>>
|
||||
<a class="edit-module-group" href="" data-module-id="<%= my_module.id %>"><%=t "projects.canvas.edit.edit_module_group" %></a>
|
||||
<a class="edit-module-group" href="" data-module-id="<%= my_module.id %>"><%=t "experiments.canvas.edit.edit_module_group" %></a>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if can_clone_modules(my_module.experiment) %>
|
||||
<li>
|
||||
<a class ="clone-module" href="" data-module-id="<%= my_module.id %>"><%=t "projects.canvas.edit.clone_module" %></a>
|
||||
<a class ="clone-module" href="" data-module-id="<%= my_module.id %>"><%=t "experiments.canvas.edit.clone_module" %></a>
|
||||
</li>
|
||||
<li <%= 'style=display:none;' if my_module.my_module_group.blank? %>>
|
||||
<a class ="clone-module-group" href="" data-module-id="<%= my_module.id %>"><%=t "projects.canvas.edit.clone_module_group" %></a>
|
||||
<a class ="clone-module-group" href="" data-module-id="<%= my_module.id %>"><%=t "experiments.canvas.edit.clone_module_group" %></a>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if can_archive_module(my_module) %>
|
||||
<li>
|
||||
<a class="delete-module" href="" data-module-id="<%= my_module.id %>"><%=t "projects.canvas.edit.delete_module" %></a>
|
||||
<a class="delete-module" href="" data-module-id="<%= my_module.id %>"><%=t "experiments.canvas.edit.delete_module" %></a>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if can_archive_modules(my_module.experiment) %>
|
||||
<li <%= 'style=display:none;' if my_module.my_module_group.blank? %>>
|
||||
<a class ="delete-module-group" href="" data-module-id="<%= my_module.id %>"><%=t "projects.canvas.edit.delete_module_group" %></a>
|
||||
<a class ="delete-module-group" href="" data-module-id="<%= my_module.id %>"><%=t "experiments.canvas.edit.delete_module_group" %></a>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
|
@ -56,7 +56,7 @@
|
|||
|
||||
<% if can_edit_connections(my_module.experiment) %>
|
||||
<div class="panel-body ep">
|
||||
<%=t "projects.canvas.edit.drag_connections" %>
|
||||
<%=t "experiments.canvas.edit.drag_connections" %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
|
|
|||
|
|
@ -3,15 +3,15 @@
|
|||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title" id="modal-delete-module-label"><%=t "projects.canvas.edit.modal_delete_module.title" %></h4>
|
||||
<h4 class="modal-title" id="modal-delete-module-label"><%=t "experiments.canvas.edit.modal_delete_module.title" %></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<span id="message-template" style="display: none;"><%=t "projects.canvas.edit.modal_delete_module.message" %></span>
|
||||
<span id="message-template" style="display: none;"><%=t "experiments.canvas.edit.modal_delete_module.message" %></span>
|
||||
<span id="delete-message"></span>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><%=t "general.cancel" %></button>
|
||||
<button type="button" class="btn btn-primary" data-dismiss="modal" data-action="confirm"><%=t "projects.canvas.edit.modal_delete_module.confirm" %></button>
|
||||
<button type="button" class="btn btn-primary" data-dismiss="modal" data-action="confirm"><%=t "experiments.canvas.edit.modal_delete_module.confirm" %></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -3,15 +3,15 @@
|
|||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title" id="modal-delete-module-group-label"><%=t "projects.canvas.edit.modal_delete_module_group.title" %></h4>
|
||||
<h4 class="modal-title" id="modal-delete-module-group-label"><%=t "experiments.canvas.edit.modal_delete_module_group.title" %></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<span id="message-template" style="display: none;"><%=t "projects.canvas.edit.modal_delete_module_group.message" %></span>
|
||||
<span id="message-template" style="display: none;"><%=t "experiments.canvas.edit.modal_delete_module_group.message" %></span>
|
||||
<span id="delete-message"></span>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><%=t "general.cancel" %></button>
|
||||
<button type="button" class="btn btn-primary" data-dismiss="modal" data-action="confirm"><%=t "projects.canvas.edit.modal_delete_module_group.confirm" %></button>
|
||||
<button type="button" class="btn btn-primary" data-dismiss="modal" data-action="confirm"><%=t "experiments.canvas.edit.modal_delete_module_group.confirm" %></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -3,25 +3,25 @@
|
|||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title" id="modal-edit-module-label"><%=t "projects.canvas.edit.modal_edit_module.title" %></h4>
|
||||
<h4 class="modal-title" id="modal-edit-module-label"><%=t "experiments.canvas.edit.modal_edit_module.title" %></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<span class="module-name-length-error" style="display: none;">
|
||||
<%=t "projects.canvas.edit.modal_new_module.error_length" %>
|
||||
<%=t "experiments.canvas.edit.modal_new_module.error_length" %>
|
||||
</span>
|
||||
<span class="module-name-invalid-error" style="display: none;">
|
||||
<%=t "projects.canvas.edit.modal_new_module.error_invalid" %>
|
||||
<%=t "experiments.canvas.edit.modal_new_module.error_invalid" %>
|
||||
</span>
|
||||
<span class="module-name-whitespaces-error" style="display: none;">
|
||||
<%=t "projects.canvas.edit.modal_new_module.error_whitespaces" %>
|
||||
<%=t "experiments.canvas.edit.modal_new_module.error_whitespaces" %>
|
||||
</span>
|
||||
<%= bootstrap_form_tag do |f| %>
|
||||
<%= f.text_field t("projects.canvas.edit.modal_edit_module.name"), id: "edit-module-name-input" %>
|
||||
<%= f.text_field t("experiments.canvas.edit.modal_edit_module.name"), id: "edit-module-name-input" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><%=t "general.cancel" %></button>
|
||||
<button type="button" class="btn btn-primary" data-action="confirm"><%=t "projects.canvas.edit.modal_edit_module.confirm" %></button>
|
||||
<button type="button" class="btn btn-primary" data-action="confirm"><%=t "experiments.canvas.edit.modal_edit_module.confirm" %></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -3,25 +3,25 @@
|
|||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title" id="modal-edit-module-group-label"><%=t "projects.canvas.edit.modal_edit_module_group.title" %></h4>
|
||||
<h4 class="modal-title" id="modal-edit-module-group-label"><%=t "experiments.canvas.edit.modal_edit_module_group.title" %></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<span class="module-name-length-error" style="display: none;">
|
||||
<%=t "projects.canvas.edit.modal_new_module.error_length" %>
|
||||
<%=t "experiments.canvas.edit.modal_new_module.error_length" %>
|
||||
</span>
|
||||
<span class="module-name-invalid-error" style="display: none;">
|
||||
<%=t "projects.canvas.edit.modal_new_module.error_invalid" %>
|
||||
<%=t "experiments.canvas.edit.modal_new_module.error_invalid" %>
|
||||
</span>
|
||||
<span class="module-name-whitespaces-error" style="display: none;">
|
||||
<%=t "projects.canvas.edit.modal_new_module.error_whitespaces" %>
|
||||
<%=t "experiments.canvas.edit.modal_new_module.error_whitespaces" %>
|
||||
</span>
|
||||
<%= bootstrap_form_tag do |f| %>
|
||||
<%= f.text_field t("projects.canvas.edit.modal_edit_module_group.name"), id: "edit-module-group-name-input" %>
|
||||
<%= f.text_field t("experiments.canvas.edit.modal_edit_module_group.name"), id: "edit-module-group-name-input" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><%=t "general.cancel" %></button>
|
||||
<button type="button" class="btn btn-primary" data-action="confirm"><%=t "projects.canvas.edit.modal_edit_module_group.confirm" %></button>
|
||||
<button type="button" class="btn btn-primary" data-action="confirm"><%=t "experiments.canvas.edit.modal_edit_module_group.confirm" %></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -3,25 +3,25 @@
|
|||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title" id="modal-new-module-label"><%=t "projects.canvas.edit.modal_new_module.title" %></h4>
|
||||
<h4 class="modal-title" id="modal-new-module-label"><%=t "experiments.canvas.edit.modal_new_module.title" %></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<span class="module-name-length-error" style="display: none;">
|
||||
<%=t "projects.canvas.edit.modal_new_module.error_length" %>
|
||||
<%=t "experiments.canvas.edit.modal_new_module.error_length" %>
|
||||
</span>
|
||||
<span class="module-name-invalid-error" style="display: none;">
|
||||
<%=t "projects.canvas.edit.modal_new_module.error_invalid" %>
|
||||
<%=t "experiments.canvas.edit.modal_new_module.error_invalid" %>
|
||||
</span>
|
||||
<span class="module-name-whitespaces-error" style="display: none;">
|
||||
<%=t "projects.canvas.edit.modal_new_module.error_whitespaces" %>
|
||||
<%=t "experiments.canvas.edit.modal_new_module.error_whitespaces" %>
|
||||
</span>
|
||||
<%= bootstrap_form_tag do |f| %>
|
||||
<%= f.text_field t("projects.canvas.edit.modal_new_module.name"), placeholder: t("projects.canvas.edit.modal_new_module.name_placeholder"), id: "new-module-name-input" %>
|
||||
<%= f.text_field t("experiments.canvas.edit.modal_new_module.name"), placeholder: t("experiments.canvas.edit.modal_new_module.name_placeholder"), id: "new-module-name-input" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><%=t "general.cancel" %></button>
|
||||
<button type="button" class="btn btn-primary" data-dismiss="modal" data-action="confirm"><%=t "projects.canvas.edit.modal_new_module.confirm" %></button>
|
||||
<button type="button" class="btn btn-primary" data-dismiss="modal" data-action="confirm"><%=t "experiments.canvas.edit.modal_new_module.confirm" %></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<%= link_to_if can_edit_module(my_module), t("projects.canvas.full_zoom.due_date"), due_date_my_module_path(my_module, format: :json), remote: true, class: "due-date-link" %>
|
||||
<%= link_to_if can_edit_module(my_module), t("experiments.canvas.full_zoom.due_date"), due_date_my_module_path(my_module, format: :json), remote: true, class: "due-date-link" %>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<% if can_edit_module(my_module) %>
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
<% provide(:head_title, raw(t("projects.canvas.head_title", project: @project.name))) %>
|
||||
<% provide(:head_title, raw(t("experiments.canvas.head_title", project: @project.name))) %>
|
||||
<%= render partial: "shared/sidebar" %>
|
||||
<%= render partial: "shared/secondary_navigation" %>
|
||||
|
||||
<div id="diagram-buttons" data-intro="<%=t ('tutorial.canvas_click_edit_workflow_html') %>" data-step="5" data-position="left">
|
||||
<% if can_edit_canvas(@project) %>
|
||||
<%=link_to t("projects.canvas.canvas_edit"), canvas_edit_experiment_url(@experiment), remote: true, type: "button", id: "edit-canvas-button", class: "ajax btn btn-default", "data-action" => "edit" %>
|
||||
<% if can_edit_canvas(@experiment) %>
|
||||
<%=link_to t("experiments.canvas.canvas_edit"), canvas_edit_experiment_url(@experiment), remote: true, type: "button", id: "edit-canvas-button", class: "ajax btn btn-default", "data-action" => "edit" %>
|
||||
<% end %>
|
||||
<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-primary active", "data-action" => "full_zoom", "data-toggle" => "button", "aria-pressed" => true do %>
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
<h5 class="text-center"><%= t('projects.canvas.popups.comments_tab') %></h5>
|
||||
<h5 class="text-center"><%= t('experiments.canvas.popups.comments_tab') %></h5>
|
||||
<hr>
|
||||
<ul class="no-style double-line content-comments">
|
||||
<% if @comments.size == 0 then %>
|
||||
<li class="no-comments"><em><%= t 'projects.canvas.popups.no_comments' %></em></li>
|
||||
<li class="no-comments"><em><%= t 'experiments.canvas.popups.no_comments' %></em></li>
|
||||
<% else %>
|
||||
<%= render 'my_module_comments/list.html.erb', comments: @comments %>
|
||||
<% end %>
|
||||
<% if @comments.length == @per_page %>
|
||||
<li class="text-center">
|
||||
<a class="btn btn-default btn-more-comments" href="<%= more_comments_url %>" data-remote="true">
|
||||
<%=t "projects.canvas.popups.more_comments" %>
|
||||
<%=t "experiments.canvas.popups.more_comments" %>
|
||||
</a>
|
||||
</li>
|
||||
<% end %>
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
<li>
|
||||
<hr>
|
||||
<%= bootstrap_form_for :comment, url: { format: :json }, method: :post, remote: true do |f| %>
|
||||
<%= f.text_field :message, hide_label: true, placeholder: t("projects.canvas.popups.comment_placeholder"), append: f.submit("+"), help: '.' %>
|
||||
<%= f.text_field :message, hide_label: true, placeholder: t("experiments.canvas.popups.comment_placeholder"), append: f.submit("+"), help: '.' %>
|
||||
<% end %>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<h5><%=t "projects.canvas.modal_manage_tags.subtitle", module: @my_module.name %></h5>
|
||||
<h5><%=t "experiments.canvas.modal_manage_tags.subtitle", module: @my_module.name %></h5>
|
||||
<% if @my_module_tags.size == 0 then %>
|
||||
<div class="row"><div class="col-xs-4"><em><%= t 'projects.canvas.modal_manage_tags.no_tags' %></em></div></div>
|
||||
<div class="row"><div class="col-xs-4"><em><%= t 'experiments.canvas.modal_manage_tags.no_tags' %></em></div></div>
|
||||
<% else %>
|
||||
<ul class="list-group">
|
||||
<% @my_module_tags.each_with_index do |mmt, i| tag = mmt.tag %>
|
||||
|
|
@ -11,20 +11,20 @@
|
|||
<h4><%= tag.name %></h4>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<% if can_edit_tag(@my_module.project) then %>
|
||||
<%= link_to "", remote: true, class: 'btn btn-link edit-tag-link', title: t("projects.canvas.modal_manage_tags.edit_tag") do %>
|
||||
<% if can_edit_tag(@my_module.experiment.project) then %>
|
||||
<%= link_to "", remote: true, class: 'btn btn-link edit-tag-link', title: t("experiments.canvas.modal_manage_tags.edit_tag") do %>
|
||||
<span class="glyphicon glyphicon-adjust"></span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% if can_remove_tag_from_module(@my_module) then %>
|
||||
<%= link_to my_module_my_module_tag_path(@my_module, mmt, format: :json), method: :delete, remote: true, class: 'btn btn-link remove-tag-link', title: t("projects.canvas.modal_manage_tags.remove_tag", module: @my_module.name) do %>
|
||||
<%= link_to my_module_my_module_tag_path(@my_module, mmt, format: :json), method: :delete, remote: true, class: 'btn btn-link remove-tag-link', title: t("experiments.canvas.modal_manage_tags.remove_tag", module: @my_module.name) do %>
|
||||
<span class="glyphicon glyphicon-remove"></span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% if can_delete_tag(@my_module.project) then %>
|
||||
<%= bootstrap_form_for tag, remote: true, url: project_tag_path(@my_module.project, tag, format: :json), method: :delete, html: { class: "delete-tag-form"} do |f| %>
|
||||
<% if can_delete_tag(@my_module.experiment.project) then %>
|
||||
<%= bootstrap_form_for tag, remote: true, url: project_tag_path(@my_module.experiment.project, tag, format: :json), method: :delete, html: { class: "delete-tag-form"} do |f| %>
|
||||
<%= hidden_field_tag :my_module_id, @my_module.id %>
|
||||
<%= f.button class: 'btn btn-link delete-tag-link', title: t("projects.canvas.modal_manage_tags.delete_tag") do %>
|
||||
<%= f.button class: 'btn btn-link delete-tag-link', title: t("experiments.canvas.modal_manage_tags.delete_tag") do %>
|
||||
<span class="glyphicon glyphicon-trash"></span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
|
@ -32,19 +32,19 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<% if can_edit_tag(@my_module.project) %>
|
||||
<% if can_edit_tag(@my_module.experiment.project) %>
|
||||
<div class="row tag-edit" style="display: none;">
|
||||
<%= bootstrap_form_for tag, remote: true, url: project_tag_path(@my_module.project, tag, format: :json), method: :put, html: { class: "edit-tag-form" } do |f| %>
|
||||
<%= bootstrap_form_for tag, remote: true, url: project_tag_path(@my_module.experiment.project, tag, format: :json), method: :put, html: { class: "edit-tag-form" } do |f| %>
|
||||
<%= hidden_field_tag :my_module_id, @my_module.id %>
|
||||
<div class="col-xs-7">
|
||||
<%= f.text_field :name, hide_label: true %>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<%= f.color_picker_select :color, TAG_COLORS, class: "edit-tag-color" %>
|
||||
<%= f.button class: "btn btn-link save-tag-link", title: t("projects.canvas.modal_manage_tags.save_tag") do %>
|
||||
<%= f.button class: "btn btn-link save-tag-link", title: t("experiments.canvas.modal_manage_tags.save_tag") do %>
|
||||
<span class="glyphicon glyphicon-ok"></span>
|
||||
<% end %>
|
||||
<%= link_to "", remote: true, class: 'btn btn-link cancel-tag-link', title: t("projects.canvas.modal_manage_tags.cancel_tag") do %>
|
||||
<%= link_to "", remote: true, class: 'btn btn-link cancel-tag-link', title: t("experiments.canvas.modal_manage_tags.cancel_tag") do %>
|
||||
<span class="glyphicon glyphicon-remove"></span>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
@ -66,22 +66,22 @@
|
|||
<%= collection_select(:my_module_tag, :tag_id, @unassigned_tags, :id, :name, {}, { class: 'selectpicker' }) %>
|
||||
<%= f.button class: 'btn btn-primary' do %>
|
||||
<span class="glyphicon glyphicon-plus"></span>
|
||||
<span class="hidden-xs"><%= t("projects.canvas.modal_manage_tags.create") %></span>
|
||||
<span class="hidden-xs"><%= t("experiments.canvas.modal_manage_tags.create") %></span>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% if can_create_new_tag(@my_module.project) then %>
|
||||
<% if can_create_new_tag(@my_module.experiment.project) then %>
|
||||
<div class="pull-right create-new-tag-btn">
|
||||
<%= bootstrap_form_for [@my_module.project, @new_tag], remote: true, format: :json, html: { class: 'add-tag-form' } do |f| %>
|
||||
<%= bootstrap_form_for [@my_module.experiment.project, @new_tag], remote: true, format: :json, html: { class: 'add-tag-form' } do |f| %>
|
||||
<%= hidden_field_tag :my_module_id, @my_module.id %>
|
||||
<%= f.hidden_field :project_id, :value => @my_module.project.id %>
|
||||
<%= f.hidden_field :project_id, :value => @my_module.experiment.project.id %>
|
||||
<%= f.hidden_field :name, :value => t("tags.create.new_name") %>
|
||||
<%= f.hidden_field :color, :value => TAG_COLORS[0] %>
|
||||
<%= f.button class: "btn btn-primary" do %>
|
||||
<span class="glyphicon glyphicon-tag"></span>
|
||||
<span class="hidden-xs"><%=t "projects.canvas.modal_manage_tags.create_new" %></span>
|
||||
<span class="hidden-xs"><%=t "experiments.canvas.modal_manage_tags.create_new" %></span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
<h5 class="text-center"><%= t("projects.canvas.popups.activities_tab") %></h5>
|
||||
<h5 class="text-center"><%= t("experiments.canvas.popups.activities_tab") %></h5>
|
||||
<hr>
|
||||
<ul class="no-style double-line content-activities">
|
||||
<% if @activities.size == 0 then %>
|
||||
<li><em><%= t 'projects.canvas.popups.no_activities' %></em></li>
|
||||
<li><em><%= t 'experiments.canvas.popups.no_activities' %></em></li>
|
||||
<% else %>
|
||||
<% @activities.each do |activity| %>
|
||||
<li><span class="text-muted"><%=l activity.created_at, format: :full %></span>
|
||||
|
|
@ -11,5 +11,5 @@
|
|||
<% end %>
|
||||
<% end %>
|
||||
<hr>
|
||||
<li><%= link_to t("projects.canvas.popups.more_activities"), activities_my_module_path(@my_module) %></li>
|
||||
<li><%= link_to t("experiments.canvas.popups.more_activities"), activities_my_module_path(@my_module) %></li>
|
||||
</ul>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<% if @my_module.description.blank? %>
|
||||
<em><%=t "projects.canvas.popups.no_description" %></em>
|
||||
<em><%=t "experiments.canvas.popups.no_description" %></em>
|
||||
<% else %>
|
||||
<%= @my_module.description %>
|
||||
<% end %>
|
||||
|
|
@ -4,5 +4,5 @@
|
|||
<span class="glyphicon glyphicon-alert"></span>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<em><%=t "projects.canvas.full_zoom.no_due_date" %></em>
|
||||
<em><%=t "experiments.canvas.full_zoom.no_due_date" %></em>
|
||||
<% end %>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<% if @my_module.due_date.blank? %>
|
||||
<em><%=t "projects.canvas.full_zoom.no_due_date" %></em>
|
||||
<em><%=t "experiments.canvas.full_zoom.no_due_date" %></em>
|
||||
<% else %>
|
||||
<strong><%= l(@my_module.due_date, format: :full) %></strong>
|
||||
<% end %>
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
<h5 class="text-center"><%=t "projects.canvas.popups.info_tab" %></h5>
|
||||
<h5 class="text-center"><%=t "experiments.canvas.popups.info_tab" %></h5>
|
||||
<hr>
|
||||
<ul class="no-style content-module-info">
|
||||
<li>
|
||||
|
|
@ -9,7 +9,7 @@
|
|||
<% if can_edit_module(@my_module) %>
|
||||
<hr>
|
||||
<li>
|
||||
<%= link_to t("projects.canvas.popups.full_info"), description_my_module_path(@my_module, format: :json), class: "description-link", remote: true %>
|
||||
<%= link_to t("experiments.canvas.popups.full_info"), description_my_module_path(@my_module, format: :json), class: "description-link", remote: true %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title" id="manage-module-tags-modal-label"><%= t("projects.canvas.modal_manage_tags.head_title") %> <span id="manage-module-tags-modal-module"></span></h4>
|
||||
<h4 class="modal-title" id="manage-module-tags-modal-label"><%= t("experiments.canvas.modal_manage_tags.head_title") %> <span id="manage-module-tags-modal-module"></span></h4>
|
||||
</div>
|
||||
<div class="modal-body"></div>
|
||||
<div class="modal-footer">
|
||||
|
|
|
|||
|
|
@ -3,16 +3,16 @@
|
|||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title" id="manage-module-users-modal-label"><%= t("projects.canvas.full_zoom.modal_manage_users.modal_title") %> <span id="manage-module-users-modal-module"></span></h4>
|
||||
<h4 class="modal-title" id="manage-module-users-modal-label"><%= t("experiments.canvas.full_zoom.modal_manage_users.modal_title") %> <span id="manage-module-users-modal-module"></span></h4>
|
||||
</div>
|
||||
<div class="modal-body"></div>
|
||||
<div class="modal-footer">
|
||||
<span class="pull-left">
|
||||
<% if is_admin_of_organization(@project.organization) %>
|
||||
<%= link_to t("projects.canvas.full_zoom.modal_manage_users.invite_users_link"), organization_path(organization_id: @project.organization.id) %>
|
||||
<span><%=t "projects.canvas.full_zoom.modal_manage_users.invite_users_details", organization: @project.organization.name %></span>
|
||||
<% if is_admin_of_organization(@experiment.project.organization) %>
|
||||
<%= link_to t("experiments.canvas.full_zoom.modal_manage_users.invite_users_link"), organization_path(organization_id: @experiment.project.organization.id) %>
|
||||
<span><%=t "experiments.canvas.full_zoom.modal_manage_users.invite_users_details", organization: @experiment.project.organization.name %></span>
|
||||
<% else %>
|
||||
<i><%=t "projects.canvas.full_zoom.modal_manage_users.contact_admins", organization: @project.organization.name %></i>
|
||||
<i><%=t "experiments.canvas.full_zoom.modal_manage_users.contact_admins", organization: @experiment.project.organization.name %></i>
|
||||
<% end %>
|
||||
</span>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><%=t "general.close" %></button>
|
||||
|
|
|
|||
|
|
@ -1,39 +0,0 @@
|
|||
<% provide(:head_title, raw(t("projects.canvas.head_title", project: @project.name))) %>
|
||||
<%= render partial: "shared/sidebar" %>
|
||||
<%= render partial: "shared/secondary_navigation" %>
|
||||
|
||||
<div id="diagram-buttons" data-intro="<%=t ('tutorial.canvas_click_edit_workflow_html') %>" data-step="5" data-position="left">
|
||||
<% if can_edit_canvas(@project) %>
|
||||
<%=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" %>
|
||||
<% 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' %>"
|
||||
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' %>">
|
||||
<%= 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") %>
|
||||
|
|
@ -33,7 +33,7 @@ data-project-users-tab-url="<%= url_for project_user_projects_path(project_id: p
|
|||
<span class="glyphicon glyphicon-eye-open" aria-hidden="true" title="<%=t "projects.index.visibility_public" %>"></span>
|
||||
<% end %>
|
||||
<% if can_view_project(project) then %>
|
||||
<%#= link_to project.name, canvas_project_path(project), id: "#{project.id}-project-canvas-link" %>
|
||||
<%= link_to project.name, project_path(project), id: "#{project.id}-project-canvas-link" %>
|
||||
<% else %>
|
||||
<%= project.name %>
|
||||
<% end %>
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
<% provide(:head_title, raw(t("projects.show.head_title", project: @project.name))) %>
|
||||
<%= render partial: "shared/sidebar" %>
|
||||
<%= render partial: "shared/secondary_navigation" %>
|
||||
|
||||
TODO
|
||||
|
|
@ -1,13 +1,13 @@
|
|||
<h5 class="text-center"><%= t('projects.canvas.popups.samples_tab') %></h5>
|
||||
<h5 class="text-center"><%= t('experiments.canvas.popups.samples_tab') %></h5>
|
||||
<hr>
|
||||
<ul class="no-style double-line">
|
||||
<% if @number_of_samples == 0 then %>
|
||||
<li><em><%= t 'projects.canvas.popups.no_samples' %></em></li>
|
||||
<li><em><%= t 'experiments.canvas.popups.no_samples' %></em></li>
|
||||
<% else %>
|
||||
<% @samples.each do |sample| %>
|
||||
<li><span class="text-muted glyphicon glyphicon-triangle-right"></span><span><%= sample.name %></span></li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<hr>
|
||||
<li><%= link_to t("projects.canvas.popups.manage_samples"), samples_my_module_url(id: @my_module.id) %></li>
|
||||
<li><%= link_to t("experiments.canvas.popups.manage_samples"), samples_my_module_url(id: @my_module.id) %></li>
|
||||
</ul>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
<h5 class="text-center"><%=t "projects.canvas.popups.users_tab" %></h5>
|
||||
<h5 class="text-center"><%=t "experiments.canvas.popups.users_tab" %></h5>
|
||||
<hr>
|
||||
<ul class="no-style content-users">
|
||||
<% if @user_my_modules.size == 0 then %>
|
||||
<li><em><%= t "projects.canvas.popups.no_users" %></em></li>
|
||||
<li><em><%= t "experiments.canvas.popups.no_users" %></em></li>
|
||||
<% else %>
|
||||
<% @user_my_modules.each_with_index do |user_my_module, i| %>
|
||||
<% user = user_my_module.user %>
|
||||
|
|
@ -14,9 +14,9 @@
|
|||
</div>
|
||||
<div class="col-xs-10">
|
||||
<span><%= user.full_name %></span><br>
|
||||
<span class="text-muted" title="<%=t "projects.canvas.popups.module_user_join_full", user: user.full_name, date: l(user_my_module.created_at, format: :full_date), time: l(user_my_module.created_at, format: :time) %>">
|
||||
<span class="text-muted" title="<%=t "experiments.canvas.popups.module_user_join_full", user: user.full_name, date: l(user_my_module.created_at, format: :full_date), time: l(user_my_module.created_at, format: :time) %>">
|
||||
<em>
|
||||
<%=t "projects.canvas.popups.module_user_join", date: l(user_my_module.created_at, format: :full_date) %>
|
||||
<%=t "experiments.canvas.popups.module_user_join", date: l(user_my_module.created_at, format: :full_date) %>
|
||||
</em>
|
||||
</span>
|
||||
</div>
|
||||
|
|
@ -28,6 +28,6 @@
|
|||
<% if can_edit_users_on_module(@my_module) then %>
|
||||
<p>
|
||||
<hr>
|
||||
<%= link_to t('projects.canvas.popups.manage_users'), my_module_users_edit_path(@my_module, format: :json), remote: true, class: "manage-users-link" %>
|
||||
<%= link_to t('experiments.canvas.popups.manage_users'), my_module_users_edit_path(@my_module, format: :json), remote: true, class: "manage-users-link" %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
<ul class="no-style">
|
||||
|
||||
<% if @user_my_modules.size == 0 then %>
|
||||
<li><em><%= t 'projects.canvas.full_zoom.modal_manage_users.no_users' %></em></li>
|
||||
<li><em><%= t 'experiments.canvas.full_zoom.modal_manage_users.no_users' %></em></li>
|
||||
<% else %>
|
||||
<% @user_my_modules.each_with_index do |umm, i| user = umm.user %>
|
||||
<li>
|
||||
|
|
@ -14,8 +14,8 @@
|
|||
|
||||
<div class="col-xs-4">
|
||||
<span><%= user.full_name %></span>
|
||||
<br><span class="text-muted" title="<%=t "projects.canvas.full_zoom.modal_manage_users.user_join_full", user: user.full_name, date: l(umm.created_at, format: :full_date), time: l(umm.created_at, format: :time) %>">
|
||||
<em><%=t "projects.canvas.full_zoom.modal_manage_users.user_join", date: l(umm.created_at, format: :full_date) %></em>
|
||||
<br><span class="text-muted" title="<%=t "experiments.canvas.full_zoom.modal_manage_users.user_join_full", user: user.full_name, date: l(umm.created_at, format: :full_date), time: l(umm.created_at, format: :time) %>">
|
||||
<em><%=t "experiments.canvas.full_zoom.modal_manage_users.user_join", date: l(umm.created_at, format: :full_date) %></em>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
|
@ -43,7 +43,7 @@
|
|||
<div class="col-xs-2">
|
||||
<%= f.button class: 'btn btn-primary' do %>
|
||||
<span class="glyphicon glyphicon-plus"></span>
|
||||
<span class="hidden-xs"><%= t("projects.canvas.full_zoom.modal_manage_users.create") %></span>
|
||||
<span class="hidden-xs"><%= t("experiments.canvas.full_zoom.modal_manage_users.create") %></span>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
|
|||
|
|
@ -376,93 +376,6 @@ en:
|
|||
restore_option: "Restore"
|
||||
archived_on: "Archived on"
|
||||
archived_on_title: "Task archived on %{date} at %{time}."
|
||||
canvas:
|
||||
head_title: "%{project} | Overview"
|
||||
canvas_edit: "Edit workflow"
|
||||
modal_manage_tags:
|
||||
head_title: "Manage tags for"
|
||||
subtitle: "Showing tags of task %{module}"
|
||||
no_tags: "No tags!"
|
||||
edit_tag: "Edit tag."
|
||||
remove_tag: "Remove tag from task %{module}."
|
||||
delete_tag: "Permanently delete tag from all tasks."
|
||||
save_tag: "Save tag."
|
||||
cancel_tag: "Cancel changes to the tag."
|
||||
create: "Add tag"
|
||||
create_new: "Create new tag"
|
||||
edit:
|
||||
new_module: "New task"
|
||||
new_module_hover: "Drag me onto canvas"
|
||||
save: "Save workflow"
|
||||
save_short: "Save"
|
||||
cancel: "Cancel"
|
||||
unsaved_work: "Are you sure you want to leave this page? All unsaved data will be lost."
|
||||
drag_connections: "Drag connection/s from here"
|
||||
options_header: "Options"
|
||||
edit_module: "Rename task"
|
||||
edit_module_group: "Rename workflow"
|
||||
clone_module: "Clone task"
|
||||
clone_module_group: "Clone workflow"
|
||||
delete_module: "Archive task"
|
||||
delete_module_group: "Archive workflow"
|
||||
modal_new_module:
|
||||
title: "Add new task"
|
||||
name: "Task name"
|
||||
name_placeholder: "My task"
|
||||
confirm: "Add task"
|
||||
error_length: "Name must contain from 2 to 50 characters."
|
||||
error_invalid: "Name contains invalid characters ('|')."
|
||||
error_whitespaces: "Name cannot be blank."
|
||||
modal_edit_module:
|
||||
title: "Rename task"
|
||||
name: "Task name"
|
||||
confirm: "Rename task"
|
||||
modal_edit_module_group:
|
||||
title: "Rename workflow"
|
||||
name: "Workflow name"
|
||||
confirm: "Rename workflow"
|
||||
modal_delete_module:
|
||||
title: "Archive task"
|
||||
confirm: "Archive task"
|
||||
message: "Are you sure you wish to archive task %{module}? Task's samples and position will be removed."
|
||||
modal_delete_module_group:
|
||||
title: "Archive workflow"
|
||||
confirm: "Archive workflow"
|
||||
message: "Are you sure you wish to archive the workflow task %{module} belongs to? All workflow tasks' samples and positions will be removed."
|
||||
popups:
|
||||
info_tab: "Task info"
|
||||
no_description: "This task has no description."
|
||||
full_info: "Edit description"
|
||||
users_tab: "Assigned users"
|
||||
no_users: "This task has no assigned users."
|
||||
manage_users: "Manage users"
|
||||
module_user_join: "Joined on %{date}."
|
||||
module_user_join_full: "%{user} joined on %{date} at %{time}."
|
||||
activities_tab: "Activity"
|
||||
no_activities: "No activities!"
|
||||
more_activities: "All activities"
|
||||
comments_tab: "Comments"
|
||||
no_comments: "No comments!"
|
||||
more_comments: "More Comments"
|
||||
comment_placeholder: "Your Message"
|
||||
new_comment: "New comment"
|
||||
samples_tab: "Samples"
|
||||
no_samples: "No samples!"
|
||||
manage_samples: "Manage samples"
|
||||
full_zoom:
|
||||
due_date: "Due date"
|
||||
no_due_date: "not set"
|
||||
modal_manage_users:
|
||||
modal_title: "Manage users for"
|
||||
no_users: "No users"
|
||||
user_join: "Joined on %{date}."
|
||||
user_join_full: "%{user} joined on %{date} at %{time}."
|
||||
create: "Add"
|
||||
invite_users_link: "Invite users"
|
||||
invite_users_details: "to team %{organization}."
|
||||
contact_admins: "To invite additional users to team %{organization}, contact its administrator/s."
|
||||
update:
|
||||
success_flash: "Project successfully updated."
|
||||
|
||||
user_organizations:
|
||||
enums:
|
||||
|
|
@ -678,7 +591,95 @@ en:
|
|||
error_flash: 'Could not update the experiment.'
|
||||
archive:
|
||||
success_flash: "Successfully archived experiment %{experiment}"
|
||||
error_flash: 'Could not archive the experiment.'
|
||||
error_flash: 'Could not archive the experiment.'
|
||||
canvas:
|
||||
head_title: "%{project} | Overview"
|
||||
canvas_edit: "Edit workflow"
|
||||
modal_manage_tags:
|
||||
head_title: "Manage tags for"
|
||||
subtitle: "Showing tags of task %{module}"
|
||||
no_tags: "No tags!"
|
||||
edit_tag: "Edit tag."
|
||||
remove_tag: "Remove tag from task %{module}."
|
||||
delete_tag: "Permanently delete tag from all tasks."
|
||||
save_tag: "Save tag."
|
||||
cancel_tag: "Cancel changes to the tag."
|
||||
create: "Add tag"
|
||||
create_new: "Create new tag"
|
||||
edit:
|
||||
new_module: "New task"
|
||||
new_module_hover: "Drag me onto canvas"
|
||||
save: "Save workflow"
|
||||
save_short: "Save"
|
||||
cancel: "Cancel"
|
||||
unsaved_work: "Are you sure you want to leave this page? All unsaved data will be lost."
|
||||
drag_connections: "Drag connection/s from here"
|
||||
options_header: "Options"
|
||||
edit_module: "Rename task"
|
||||
edit_module_group: "Rename workflow"
|
||||
clone_module: "Clone task"
|
||||
clone_module_group: "Clone workflow"
|
||||
delete_module: "Archive task"
|
||||
delete_module_group: "Archive workflow"
|
||||
modal_new_module:
|
||||
title: "Add new task"
|
||||
name: "Task name"
|
||||
name_placeholder: "My task"
|
||||
confirm: "Add task"
|
||||
error_length: "Name must contain from 2 to 50 characters."
|
||||
error_invalid: "Name contains invalid characters ('|')."
|
||||
error_whitespaces: "Name cannot be blank."
|
||||
modal_edit_module:
|
||||
title: "Rename task"
|
||||
name: "Task name"
|
||||
confirm: "Rename task"
|
||||
modal_edit_module_group:
|
||||
title: "Rename workflow"
|
||||
name: "Workflow name"
|
||||
confirm: "Rename workflow"
|
||||
modal_delete_module:
|
||||
title: "Archive task"
|
||||
confirm: "Archive task"
|
||||
message: "Are you sure you wish to archive task %{module}? Task's samples and position will be removed."
|
||||
modal_delete_module_group:
|
||||
title: "Archive workflow"
|
||||
confirm: "Archive workflow"
|
||||
message: "Are you sure you wish to archive the workflow task %{module} belongs to? All workflow tasks' samples and positions will be removed."
|
||||
popups:
|
||||
info_tab: "Task info"
|
||||
no_description: "This task has no description."
|
||||
full_info: "Edit description"
|
||||
users_tab: "Assigned users"
|
||||
no_users: "This task has no assigned users."
|
||||
manage_users: "Manage users"
|
||||
module_user_join: "Joined on %{date}."
|
||||
module_user_join_full: "%{user} joined on %{date} at %{time}."
|
||||
activities_tab: "Activity"
|
||||
no_activities: "No activities!"
|
||||
more_activities: "All activities"
|
||||
comments_tab: "Comments"
|
||||
no_comments: "No comments!"
|
||||
more_comments: "More Comments"
|
||||
comment_placeholder: "Your Message"
|
||||
new_comment: "New comment"
|
||||
samples_tab: "Samples"
|
||||
no_samples: "No samples!"
|
||||
manage_samples: "Manage samples"
|
||||
full_zoom:
|
||||
due_date: "Due date"
|
||||
no_due_date: "not set"
|
||||
modal_manage_users:
|
||||
modal_title: "Manage users for"
|
||||
no_users: "No users"
|
||||
user_join: "Joined on %{date}."
|
||||
user_join_full: "%{user} joined on %{date} at %{time}."
|
||||
create: "Add"
|
||||
invite_users_link: "Invite users"
|
||||
invite_users_details: "to team %{organization}."
|
||||
contact_admins: "To invite additional users to team %{organization}, contact its administrator/s."
|
||||
update:
|
||||
success_flash: "Project successfully updated."
|
||||
|
||||
my_module_tags:
|
||||
new:
|
||||
head_title: "%{project} | %{module} | Add tag"
|
||||
|
|
|
|||
|
|
@ -103,13 +103,13 @@ Rails.application.routes.draw do
|
|||
|
||||
resources :experiments, only: [:show] do
|
||||
member do
|
||||
get 'canvas' # Overview/structure for single project
|
||||
get 'canvas' # Overview/structure for single experiment
|
||||
get 'canvas/edit', to: 'canvas#edit' # AJAX-loaded canvas edit mode (from canvas)
|
||||
get 'canvas/full_zoom', to: 'canvas#full_zoom' # AJAX-loaded canvas zoom
|
||||
get 'canvas/medium_zoom', to: 'canvas#medium_zoom' # AJAX-loaded canvas zoom
|
||||
get 'canvas/small_zoom', to: 'canvas#small_zoom' # AJAX-loaded canvas zoom
|
||||
post 'canvas', to: 'canvas#update' # Save updated canvas action
|
||||
get 'module_archive' # Module archive for single project
|
||||
get 'module_archive' # Module archive for single experiment
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue