lib/cm_admin/view_helpers.rb in cm-admin-3.0.14 vs lib/cm_admin/view_helpers.rb in cm-admin-3.0.15
- old
+ new
@@ -82,10 +82,10 @@
table_name = count == 1 ? model_name.singularize : model_name.pluralize
"#{count} #{table_name.humanize.downcase} found"
end
def toast_message(message, toast_type)
- tag.div class: 'position-fixed bottom-0 end-0 p-3', style: 'z-index: 11' do
+ tag.div class: 'cm-toast-container' do
tag.div class: "toast #{toast_type == 'alert' ? 'text-white bg-danger' : ''}", role: 'alert', 'aria-live': 'assertive', 'aria-atomic': 'true', data: { behaviour: 'toast' } do
tag.div class: 'd-flex' do
concat tag.div message.html_safe, class: 'toast-body'
concat tag.button '', type: 'button', class: "btn-close me-2 m-auto #{toast_type == 'alert' ? 'btn-close-white' : ''}", data: { 'bs-dismiss': 'toast' }, 'aria-label': 'Close'
end