2016-08-04 18:57:33 +08:00
|
|
|
<div class="col-md-6">
|
|
|
|
<div class="panel panel-default experiment-panel"
|
2016-08-25 01:03:58 +08:00
|
|
|
data-id="<%= experiment.id %>"
|
|
|
|
data-canvas-link="<%= canvas_experiment_url(experiment) %>"
|
|
|
|
>
|
2016-08-04 18:57:33 +08:00
|
|
|
<div class="panel-heading">
|
2018-01-29 18:36:36 +08:00
|
|
|
<% if can_manage_experiment?(experiment) %>
|
2016-08-23 15:26:52 +08:00
|
|
|
<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>
|
|
|
|
<% end %>
|
2016-08-09 20:26:08 +08:00
|
|
|
<h3 class="panel-title"><%= link_to experiment.name, canvas_experiment_path(experiment) %></h3>
|
|
|
|
|
2016-08-04 18:57:33 +08:00
|
|
|
</div>
|
|
|
|
<div class="panel-body">
|
2017-12-22 20:12:52 +08:00
|
|
|
<% if experiment.active_modules.length > 0 %>
|
2016-08-19 21:36:12 +08:00
|
|
|
<div class="workflowimg-container"
|
2016-08-22 17:29:19 +08:00
|
|
|
data-check-img="<%= updated_img_experiment_url(experiment) %>"
|
|
|
|
data-updated-img="<%= fetch_workflow_img_experiment_url(experiment) %>"
|
2016-09-21 21:54:12 +08:00
|
|
|
data-timestamp="<%= experiment.updated_at %>" >
|
2016-08-09 20:26:08 +08:00
|
|
|
</div>
|
2016-08-23 14:52:53 +08:00
|
|
|
<% else %>
|
2016-08-24 20:10:50 +08:00
|
|
|
<div class="no-workflowimg">
|
2018-01-29 18:36:36 +08:00
|
|
|
<% if can_manage_experiment?(experiment) %>
|
2016-08-24 20:10:50 +08:00
|
|
|
<p><%= link_to( t('experiments.edit.add_task'),
|
|
|
|
canvas_experiment_path(experiment,
|
|
|
|
editMode: true)) %></p>
|
|
|
|
<% else %>
|
|
|
|
<p><%= t('experiments.edit.no_workflowimg') %></p>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
2016-08-08 22:02:17 +08:00
|
|
|
<% end %>
|
2016-08-04 18:57:33 +08:00
|
|
|
<span>
|
2018-07-09 19:13:44 +08:00
|
|
|
<span class="fas fa-calendar-alt" aria-hidden="true"></span>
|
2016-08-09 20:26:08 +08:00
|
|
|
<%= localize(experiment.created_at, format: t('time.formats.full_date')) %> - <%= localize(experiment.updated_at, format: t('time.formats.full_date')) %>
|
2016-08-04 18:57:33 +08:00
|
|
|
</span>
|
2018-06-06 23:28:04 +08:00
|
|
|
<div data-hook="experiment-card-body">
|
|
|
|
<% if experiment.description? %>
|
|
|
|
<div class='experiment-description'>
|
|
|
|
<%= custom_auto_link(experiment.description) %>
|
|
|
|
</div>
|
|
|
|
<% else %>
|
|
|
|
<span class='experiment-no-description'>
|
|
|
|
<% if can_manage_experiment?(experiment) %>
|
|
|
|
<%= link_to t('experiments.edit.add-description'),
|
|
|
|
edit_project_experiment_url(@project, experiment),
|
|
|
|
remote: true,
|
|
|
|
data: { id: experiment.id } %>
|
|
|
|
<% else %>
|
|
|
|
<p><%= t('experiments.edit.no-description') %></p>
|
|
|
|
<% end %>
|
|
|
|
</span>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
2016-08-04 18:57:33 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|