-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adjust option value handling to work like product properties handling
also remove last link_to_remove_fields usage and deprecate link_to_remove_fields helper
- Loading branch information
Showing
5 changed files
with
14 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
backend/app/views/spree/admin/option_types/_option_value_fields.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
<tr class="option_value fields" id="spree_<%= dom_id(f.object) %>" data-hook="option_value"> | ||
<td> | ||
<% if f.object.persisted? %> | ||
<% if f.object.persisted? && can?(:update_positions, f.object) %> | ||
<span class="handle"></span> | ||
<%= f.hidden_field :id %> | ||
<% end %> | ||
</td> | ||
<td class="name"><%= f.text_field :name %></td> | ||
<td class="presentation"><%= f.text_field :presentation %></td> | ||
<td class="actions"><%= link_to_remove_fields t('spree.actions.remove'), f, no_text: true %></td> | ||
<td class="actions"><%= link_to_delete(f.object, no_text: true) if f.object.persisted? && can?(:destroy, f.object) %></td> | ||
</tr> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters