]> git.openstreetmap.org Git - rails.git/commitdiff
Make oauth register app link into button
authorHarry Wood <github@harrywood.co.uk>
Tue, 8 Mar 2022 12:34:27 +0000 (12:34 +0000)
committerHarry Wood <github@harrywood.co.uk>
Tue, 8 Mar 2022 15:18:53 +0000 (15:18 +0000)
Cosmetic tweak. On the OAuth 1 setting tab, make "Register your app" into a button not a link

Also put the applications in a <ul>

app/views/oauth_clients/index.html.erb
test/controllers/oauth_clients_controller_test.rb
test/integration/client_applications_test.rb

index 7c956d53166c70fa6230d45ac1e2ae8650d24ef0..a08b3c0ffb4e3a5749cdb6e16218ec21a183ac16 100644 (file)
 <p><%= t(".no_apps_html", :oauth => link_to(t(".oauth"), "https://oauth.net")) %></p>
 <% else %>
 <p><%= t ".registered_apps" %></p>
-<% @client_applications.each do |client| %>
-  <div class="client_application">
-    <%= link_to client.name, :action => :show, :id => client.id %>
-  </div>
-<% end %>
+<ul>
+  <% @client_applications.each do |client| %>
+    <li class="client_application">
+      <%= link_to client.name, :action => :show, :id => client.id %>
+    </li>
+  <% end %>
+</ul>
 <% end %>
-<h3><%= link_to t(".register_new"), :action => :new %></h3>
+<%= link_to t(".register_new"), { :action => :new }, :class => "btn btn-outline-primary" %>
index b610cb0b782fba5163b1c845e0d6827b5d08b696..fb651ff3c8f5b6ffd68c3ef86dfbc74658ee2085 100644 (file)
@@ -48,7 +48,7 @@ class OauthClientsControllerTest < ActionDispatch::IntegrationTest
     get oauth_clients_path(:display_name => user.display_name)
     assert_response :success
     assert_template "index"
-    assert_select "div.client_application", 2
+    assert_select "li.client_application", 2
   end
 
   def test_new
index 0ac15759e0c0ec890849f1a19d2776ababedae84..ee6d277bb66681b393d83984570e66f91f666362 100644 (file)
@@ -65,7 +65,7 @@ class ClientApplicationsTest < ActionDispatch::IntegrationTest
     get "/user/#{ERB::Util.u(user.display_name)}/oauth_clients"
     assert_response :success
     assert_template "oauth_clients/index"
-    assert_in_body { assert_select "div>a", "My New App" }
+    assert_in_body { assert_select "li>a", "My New App" }
   end
 
   ##