Add default delete modal usage:
- <%= render 'layouts/delete_modal', delete_options: {title: '', warning: '', cancel: '', submit: '' } %>
- in default index, just set title, warning, cancel and submit in quick_edit if needed
This commit is contained in:
1 parent
b3cdffb59e
commit
d434b878a7
8 files changed
+33
-32
No files matched your search
@@ -289,7 +289,8 @@ module OrbitBackendHelper
|
||||
end
|
||||
when 'delete'
|
||||
if show_delete_link(object)
|
||||
content_tag :li, link_to(t(quick[:translation] || :delete_), '#', rel: eval("#{quick[:link]}('#{object.id}')"), class: "delete_link #{quick[:class] || 'text-error'}")
|
||||
@delete_options = {title: quick[:title], warning: quick[:warning], cancel: quick[:cancel], submit: quick[:submit]}
|
||||
content_tag :li, link_to(t(quick[:translation] || :delete_), '#', rel: eval("#{quick[:link]}('#{object.id}')"), class: "delete #{quick[:class] || 'text-error'}")
|
||||
end
|
||||
when 'detail'
|
||||
content_tag :li, link_to(t(quick[:translation] || :detail), '#', class: (quick[:class] || "detail-row"))
|
||||
|
||||
Reference in new issue
Block a user