mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-08 14:15:35 +08:00
adds datahook to experiment card [fixes SCI-2373]
This commit is contained in:
parent
9b9143f145
commit
43a60b632a
3 changed files with 20 additions and 16 deletions
|
@ -10,6 +10,7 @@
|
|||
data: { id: experiment.id },
|
||||
class: 'edit-experiment' %></li>
|
||||
<% end %>
|
||||
<li data-hook="experiment-actions-second-child"></li>
|
||||
<% if can_clone_experiment?(experiment) %>
|
||||
<li><%= link_to t('experiments.clone.label_title'),
|
||||
clone_modal_experiment_url(experiment),
|
||||
|
|
|
@ -55,3 +55,4 @@
|
|||
|
||||
<%= javascript_include_tag("experiments/dropdown_actions") %>
|
||||
<%= javascript_include_tag("projects/show") %>
|
||||
<i data-hook="project-show-js"></i>
|
||||
|
|
|
@ -43,22 +43,24 @@
|
|||
<span class="glyphicon glyphicon-calendar" aria-hidden="true"></span>
|
||||
<%= localize(experiment.created_at, format: t('time.formats.full_date')) %> - <%= localize(experiment.updated_at, format: t('time.formats.full_date')) %>
|
||||
</span>
|
||||
<% 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 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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Reference in a new issue