Merge pull request #4913 from sboursen-scinote/sb_SCI-7814

FIX: Tag modal opens in experiment table view [SCI-7814]
This commit is contained in:
artoscinote 2023-02-06 11:14:13 +01:00 committed by GitHub
commit 4405fa2cd9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 41 additions and 49 deletions

View file

@ -13,15 +13,9 @@
data-module-tags-url="<%= my_module_tags_experiment_path(my_module.experiment, format: :json) %>">
<div data-view-mode="active">
<% if can_manage_my_module?(my_module) %>
<a class="edit-tags-link pull-right" data-remote="true" href="<%= my_module_tags_edit_url(my_module, format: :json) %>">
<%= render partial: "canvas/tags.html.erb", locals: { my_module: my_module } %>
</a>
<% else %>
<span class="edit-tags-link pull-right">
<%= render partial: "canvas/tags.html.erb", locals: { my_module: my_module } %>
</span>
<% end %>
</div>
<div data-view-mode="archived">

View file

@ -10,15 +10,9 @@
data-module-y="<%= my_module.y %>"
data-module-conns="<%= construct_module_connections(my_module) %>">
<% if can_manage_my_module?(my_module) %>
<a class="edit-tags-link pull-right" data-remote="true" href="<%= my_module_tags_edit_url(my_module, format: :json) %>">
<%= render partial: "canvas/tags.html.erb", locals: { my_module: my_module } %>
</a>
<% else %>
<span class="edit-tags-link pull-right">
<%= render partial: "canvas/tags.html.erb", locals: { my_module: my_module } %>
</span>
<% end %>
<div class="panel-heading">
<h3 class="panel-title">

View file

@ -12,6 +12,7 @@
<h4><%= tag.name %></h4>
</div>
<div class="pull-right" data-view-mode="active">
<% if can_manage_my_module?(@my_module) %>
<%= link_to "", remote: true, class: 'btn btn-link edit-tag-link', title: t("experiments.canvas.modal_manage_tags.edit_tag") do %>
<span class="fas fa-pencil-alt"></span>
<% end %>
@ -24,6 +25,7 @@
<span class="fas fa-trash-alt"></span>
<% end %>
<% end %>
<% end %>
</div>
</div>
@ -50,6 +52,7 @@
</ul>
<% end %>
<% if can_manage_my_module?(@my_module) %>
<hr data-view-mode="active">
<div class="row" data-view-mode="active">
<%= bootstrap_form_for [@my_module, @new_mmt], remote: true, format: :json, html: { class: 'add-tag-form' } do |f| %>
@ -81,3 +84,4 @@
<% end %>
</div>
</div>
<% end %>