Commit df232c27 authored by Gabriel Mazetto's avatar Gabriel Mazetto

Small improvements and 💄

parent 901f8c5f
...@@ -26,12 +26,14 @@ class Admin::GeoNodesController < Admin::ApplicationController ...@@ -26,12 +26,14 @@ class Admin::GeoNodesController < Admin::ApplicationController
@node = GeoNode.find(params[:id]) @node = GeoNode.find(params[:id])
if @node.primary? || !@node.missing_oauth_application? if @node.primary? || !@node.missing_oauth_application?
redirect_to admin_geo_nodes_path, notice: "This node doesn't need to be repaired." flash[:notice] = "This node doesn't need to be repaired."
elsif @node.save elsif @node.save
redirect_to admin_geo_nodes_path, notice: 'Node Authentication was successfully repaired.' flash[:notice] = 'Node Authentication was successfully repaired.'
else else
redirect_to admin_geo_nodes_path, alert: 'There was a problem repairing Node Authentication.' flash[:alert] = 'There was a problem repairing Node Authentication.'
end end
redirect_to admin_geo_nodes_path
end end
private private
......
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
.pull-right .pull-right
- if node.missing_oauth_application? - if node.missing_oauth_application?
= link_to repair_admin_geo_node_path(node), method: :post, class: 'btn btn-default, btn-sm' do = link_to repair_admin_geo_node_path(node), method: :post, title: 'OAuth application is missing', class: 'btn btn-default, btn-sm' do
= icon('exclamation-triangle fw') = icon('exclamation-triangle fw')
Repair authentication Repair authentication
= link_to 'Remove', admin_geo_node_path(node), data: { confirm: 'Are you sure?' }, method: :delete, class: 'btn btn-remove btn-sm' = link_to 'Remove', admin_geo_node_path(node), data: { confirm: 'Are you sure?' }, method: :delete, class: 'btn btn-remove btn-sm'
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment