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">
|
2021-01-28 04:53:39 +08:00
|
|
|
<div class="actions actions-cell table-cell pull-right">
|
|
|
|
<%= render partial: 'projects/show/experiment_actions_dropdown.html.erb', locals: { experiment: experiment, view: 'cards' } %>
|
|
|
|
</div>
|
2021-01-08 00:18:52 +08:00
|
|
|
<div class="panel-title">
|
|
|
|
<% if experiment.archived_branch? %>
|
|
|
|
<%= link_to experiment.name, module_archive_experiment_path(experiment) %>
|
|
|
|
<% else %>
|
|
|
|
<%= link_to experiment.name, canvas_experiment_path(experiment) %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
2019-01-18 22:57:44 +08:00
|
|
|
|
2021-01-12 22:15:57 +08:00
|
|
|
<% if experiment.archived_branch? %>
|
2020-12-17 20:07:30 +08:00
|
|
|
<div class="panel-date">
|
|
|
|
<span class="fas fa-archive" aria-hidden="true"></span>
|
2021-01-12 22:15:57 +08:00
|
|
|
<%= l(experiment_archived_on(experiment), format: :full_date) %>
|
2020-12-17 20:07:30 +08:00
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<div class="panel-date">
|
2018-07-09 19:13:44 +08:00
|
|
|
<span class="fas fa-calendar-alt" aria-hidden="true"></span>
|
2018-11-14 20:17:38 +08:00
|
|
|
<%= l(experiment.created_at, format: :full_date) %> - <%= l(experiment.updated_at, format: :full_date) %>
|
2020-12-17 20:07:30 +08:00
|
|
|
</div>
|
2019-01-18 22:57:44 +08:00
|
|
|
|
2019-01-28 23:59:40 +08:00
|
|
|
<div data-hook="experiment-card-description">
|
2018-06-06 23:28:04 +08:00
|
|
|
<% if experiment.description? %>
|
|
|
|
<div class='experiment-description'>
|
2018-11-19 15:02:25 +08:00
|
|
|
<%= custom_auto_link(experiment.description, team: current_team) %>
|
2018-06-06 23:28:04 +08:00
|
|
|
</div>
|
|
|
|
<% else %>
|
2019-01-28 23:59:40 +08:00
|
|
|
<% if can_manage_experiment?(experiment) %>
|
|
|
|
<%= link_to t('experiments.edit.add-description'),
|
2020-11-20 21:53:50 +08:00
|
|
|
edit_experiment_url(experiment),
|
2019-01-28 23:59:40 +08:00
|
|
|
remote: true,
|
|
|
|
data: { id: experiment.id },
|
|
|
|
class: 'experiment-no-description' %>
|
|
|
|
<% else %>
|
|
|
|
<p class='experiment-no-description'><%= t('experiments.edit.no-description') %></p>
|
|
|
|
<% end %>
|
2018-06-06 23:28:04 +08:00
|
|
|
<% end %>
|
|
|
|
</div>
|
2016-08-04 18:57:33 +08:00
|
|
|
</div>
|
2019-01-18 22:57:44 +08:00
|
|
|
|
|
|
|
<div class="panel-body">
|
2020-12-13 05:46:30 +08:00
|
|
|
<% if experiment.my_modules.active.exists? %>
|
2020-10-16 20:21:25 +08:00
|
|
|
<%= link_to canvas_experiment_path(experiment), class: 'no-workflowimg' do %>
|
|
|
|
<% if experiment.workflowimg.attached? %>
|
|
|
|
<div class="workflowimg-container" data-workflowimg-present="true">
|
|
|
|
<%= render partial: 'projects/show/workflow_img.html.erb', locals: { experiment: experiment } %>
|
|
|
|
</div>
|
|
|
|
<% else %>
|
|
|
|
<div class="workflowimg-container"
|
|
|
|
data-workflowimg-present="false"
|
|
|
|
data-workflowimg-url="<%= fetch_workflow_img_experiment_url(experiment) %>" >
|
|
|
|
<i class="fas fa-spinner fa-spin fa-3x workflowimg-spinner hidden" aria-hidden="true"></i>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
2019-01-28 23:59:40 +08:00
|
|
|
<% end %>
|
2019-01-18 22:57:44 +08:00
|
|
|
<% else %>
|
2019-01-28 23:59:40 +08:00
|
|
|
<% if can_manage_experiment?(experiment) %>
|
|
|
|
<%= link_to( t('experiments.edit.add_task'),
|
|
|
|
canvas_experiment_path(experiment, editMode: true),
|
2020-10-16 20:21:25 +08:00
|
|
|
class: 'no-tasks') %>
|
2019-01-28 23:59:40 +08:00
|
|
|
<% else %>
|
|
|
|
<div class="no-workflowimg">
|
2019-01-18 22:57:44 +08:00
|
|
|
<p><%= t('experiments.edit.no_workflowimg') %></p>
|
2019-01-28 23:59:40 +08:00
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
|
2019-01-18 22:57:44 +08:00
|
|
|
<% end %>
|
2021-01-28 04:53:39 +08:00
|
|
|
<div>
|
|
|
|
<%= link_to t('experiments.index.more_link'),
|
|
|
|
experiment_path(experiment),
|
|
|
|
class: 'experiment-action-link pull-right',
|
|
|
|
remote: true %>
|
|
|
|
</div>
|
2019-01-18 22:57:44 +08:00
|
|
|
</div>
|
2016-08-04 18:57:33 +08:00
|
|
|
</div>
|
|
|
|
</div>
|