mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-18 07:01:58 +08:00
84 lines
3.5 KiB
Text
84 lines
3.5 KiB
Text
<div class="col-md-6">
|
|
<div class="panel panel-default experiment-panel"
|
|
data-id="<%= experiment.id %>"
|
|
data-canvas-link="<%= canvas_experiment_url(experiment) %>"
|
|
>
|
|
<div class="panel-heading">
|
|
<% if can_manage_experiment?(experiment) %>
|
|
<div class="dropdown pull-right">
|
|
<button class="btn btn-link dropdown-toggle"
|
|
type="button"
|
|
id="exActionsMenu-<%= experiment.id %>"
|
|
data-toggle="dropdown"
|
|
aria-haspopup="true"
|
|
aria-expanded="true">
|
|
<span class="caret"></span>
|
|
</button>
|
|
<%= render partial: 'experiments/dropdown_actions.html.erb',
|
|
locals: { project: @project, experiment: experiment } %>
|
|
</div>
|
|
<% if can_clone_experiment?(experiment) %>
|
|
<%= link_to clone_modal_experiment_url(experiment),
|
|
remote: true, type: 'button',
|
|
class: 'clone-experiment help_tooltips pull-right',
|
|
data: {
|
|
tooltiplink: I18n.t('tooltips.link.experiment.copy'),
|
|
tooltipcontent: I18n.t('tooltips.text.experiment.copy')
|
|
} do %>
|
|
<span class="fas fa-copy"></span>
|
|
<%= t('experiments.clone.label_title') %>
|
|
<% end %>
|
|
<% end %>
|
|
<% end %>
|
|
|
|
<div class="panel-title"><%= link_to experiment.name, canvas_experiment_path(experiment) %></div>
|
|
|
|
<span class="help_tooltips panel-date" data-tooltiplink="<%= I18n.t('tooltips.link.experiment.dates') %>" data-tooltipcontent="<%= I18n.t('tooltips.text.experiment.dates') %>">
|
|
<span class="fas fa-calendar-alt" aria-hidden="true"></span>
|
|
<%= l(experiment.created_at, format: :full_date) %> - <%= l(experiment.updated_at, format: :full_date) %>
|
|
</span>
|
|
|
|
<div data-hook="experiment-card-description">
|
|
<% if experiment.description? %>
|
|
<div class='experiment-description'>
|
|
<%= custom_auto_link(experiment.description, team: current_team) %>
|
|
</div>
|
|
<% else %>
|
|
<% if can_manage_experiment?(experiment) %>
|
|
<%= link_to t('experiments.edit.add-description'),
|
|
edit_project_experiment_url(@project, experiment),
|
|
remote: true,
|
|
data: { id: experiment.id },
|
|
class: 'experiment-no-description' %>
|
|
<% else %>
|
|
<p class='experiment-no-description'><%= t('experiments.edit.no-description') %></p>
|
|
<% end %>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="panel-body">
|
|
<% if experiment.active_modules.length > 0 %>
|
|
<%= link_to canvas_experiment_path(experiment) do %>
|
|
<div class="workflowimg-container"
|
|
data-check-img="<%= updated_img_experiment_url(experiment) %>"
|
|
data-updated-img="<%= fetch_workflow_img_experiment_url(experiment) %>"
|
|
data-timestamp="<%= experiment.updated_at %>" >
|
|
</div>
|
|
<% end %>
|
|
<% else %>
|
|
<% if can_manage_experiment?(experiment) %>
|
|
<%= link_to( t('experiments.edit.add_task'),
|
|
canvas_experiment_path(experiment, editMode: true),
|
|
class: 'no-workflowimg') %>
|
|
<% else %>
|
|
<div class="no-workflowimg">
|
|
<p><%= t('experiments.edit.no_workflowimg') %></p>
|
|
</div>
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|