Skip to content

Commit

Permalink
Remove usage of deprecated toolbar helper
Browse files Browse the repository at this point in the history
  • Loading branch information
tvdeyen committed Jul 26, 2020
1 parent 67ff72d commit f147dd5
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 44 deletions.
29 changes: 13 additions & 16 deletions app/views/alchemy/admin/dashboard/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
<%= toolbar(
buttons: [
{
icon: 'info-circle',
label: Alchemy.t(:info),
url: alchemy.dashboard_info_path,
<%= content_for :toolbar do %>
<%= toolbar_button(
icon: 'info-circle',
label: Alchemy.t(:info),
url: alchemy.dashboard_info_path,
title: Alchemy.t(:info),
dialog_options: {
title: Alchemy.t(:info),
dialog_options: {
title: Alchemy.t(:info),
size: "420x435"
},
if_permitted_to: [:info, :alchemy_admin_dashboard],
hotkey: 'alt+i'
}
],
search: false
) %>
size: "420x435"
},
if_permitted_to: [:info, :alchemy_admin_dashboard],
hotkey: 'alt+i'
) %>
<% end %>

<div id="dashboard">
<h1>
Expand Down
29 changes: 14 additions & 15 deletions app/views/alchemy/admin/tags/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
<%= toolbar(
buttons: [
{
icon: :plus,
label: Alchemy.t('New Tag'),
url: alchemy.new_admin_tag_path,
<% content_for :toolbar do %>
<%= toolbar_button(
icon: :plus,
label: Alchemy.t('New Tag'),
url: alchemy.new_admin_tag_path,
title: Alchemy.t('New Tag'),
hotkey: 'alt+n',
dialog_options: {
title: Alchemy.t('New Tag'),
hotkey: 'alt+n',
dialog_options: {
title: Alchemy.t('New Tag'),
size: '310x180'
},
if_permitted_to: [:create, Alchemy::Tag]
}
]
) %>
size: '310x180'
},
if_permitted_to: [:create, Alchemy::Tag]
) %>
<%= render 'alchemy/admin/partials/search_form' %>
<% end %>

<div id="archive_all" class="resources-table-wrapper">
<%= render 'alchemy/admin/resources/table_header' %>
Expand Down
24 changes: 11 additions & 13 deletions app/views/alchemy/base/500.html.erb
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
<%= toolbar(
buttons: [
{
icon: 'angle-double-left',
url: request.referer || alchemy.admin_dashboard_path,
label: Alchemy.t(:back),
title: Alchemy.t(:back),
hotkey: 'alt+z',
dialog: false,
skip_permission_check: true
}
], search: false
) %>
<%= content_for :toolbar do %>
<%= toolbar_button(
icon: 'angle-double-left',
url: request.referer || alchemy.admin_dashboard_path,
label: Alchemy.t(:back),
title: Alchemy.t(:back),
hotkey: 'alt+z',
dialog: false,
skip_permission_check: true
) %>
<% end %>

<% content_for(:alchemy_body_class) { 'error' } %>

Expand Down

0 comments on commit f147dd5

Please sign in to comment.