]> git.openstreetmap.org Git - rails.git/commitdiff
Fix minor HTML tag mismatches
authorHarry Wood <github@harrywood.co.uk>
Sat, 5 Mar 2022 01:41:02 +0000 (01:41 +0000)
committerHarry Wood <github@harrywood.co.uk>
Sat, 5 Mar 2022 02:44:59 +0000 (02:44 +0000)
Fix some HTML tag mismatches and other glitches. These are minor, and don't appear to cause browsers any problems, but for the sake of correctness:
* A closing td which should be a closing div.
* A closing h3 for a corresponding h6
* Two tables with `<thead>` tag and missing `<tr>` around the `<th>` headings.

test change for thead fix

app/views/oauth2_applications/index.html.erb
app/views/oauth2_applications/show.html.erb
app/views/oauth2_authorized_applications/index.html.erb
app/views/site/help.html.erb
test/controllers/oauth2_applications_controller_test.rb
test/controllers/oauth2_authorized_applications_controller_test.rb

index 119bf587807ea184f873219f24ccfcdb8b4bbc72..4ed849f9816dfa71ed2a11edc458a4e4465913d8 100644 (file)
@@ -7,10 +7,12 @@
 <% if @applications.length > 0 %>
   <table class="table table-borderless table-striped">
     <thead>
-      <th><%= t ".name" %></th>
-      <th><%= t ".permissions" %></th>
-      <th></th>
-      <th></th>
+      <tr>
+        <th><%= t ".name" %></th>
+        <th><%= t ".permissions" %></th>
+        <th></th>
+        <th></th>
+      </tr>
     </thead>
     <tbody>
       <%= render :partial => "application", :collection => @applications %>
index 2967058119e457fbb864b74033dfda01b7538673..8d9c8516dfd297ad5494e946a082d464bd16631b 100644 (file)
@@ -48,4 +48,4 @@
 <div>
   <%= link_to t(".edit"), edit_oauth_application_path(@application), :class => "btn btn-outline-primary" %>
   <%= link_to t(".delete"), oauth_application_path(@application), { :method => :delete, :class => "btn btn-outline-danger", :data => { :confirm => t(".confirm_delete") } } %>
-</td>
+</div>
index b9599a9193b1735171897ac9dd40ec189a01c8c5..2d3ad00bdea337b269b3609298ebb0c7d92065ab 100644 (file)
@@ -7,9 +7,11 @@
 <% if @applications.length > 0 %>
   <table class="table table-borderless table-striped">
     <thead>
-      <th><%= t ".application" %></th>
-      <th><%= t ".permissions" %></th>
-      <th></th>
+      <tr>
+        <th><%= t ".application" %></th>
+        <th><%= t ".permissions" %></th>
+        <th></th>
+      </tr>
     </thead>
     <tbody>
       <%= render :partial => "application", :collection => @applications %>
index e6c65a99239526629cf72bdfa06e1d6cc9569201..c82893e9d2e6246f19e61a52ea2733741539fc48 100644 (file)
@@ -16,7 +16,7 @@
             <a href='<%= t ".#{site}.url" %>'>
               <%= t ".#{site}.title" %>
             </a>
-          </h3>
+          </h6>
           <p class='card-text'><%= t ".#{site}.description" %></p>
         </div>
         <div class="card-footer">
index 149b6ee35ec458c3a59305dc474311254cd9412a..1b6eaabfe74785da17127b6ed574fdee07e960a4 100644 (file)
@@ -51,7 +51,7 @@ class Oauth2ApplicationsControllerTest < ActionDispatch::IntegrationTest
     get oauth_applications_path
     assert_response :success
     assert_template "oauth2_applications/index"
-    assert_select "tr", 2
+    assert_select "tbody tr", 2
   end
 
   def test_new
index 45a60efcbeefdfd1058823f776ebb69f5d880ac6..347d3e40e4a27049c00ed9e2f49a1e212f1a4bda 100644 (file)
@@ -33,7 +33,7 @@ class Oauth2AuthorizedApplicationsControllerTest < ActionDispatch::IntegrationTe
     get oauth_authorized_applications_path
     assert_response :success
     assert_template "oauth2_authorized_applications/index"
-    assert_select "tr", 2
+    assert_select "tbody tr", 2
   end
 
   def test_destroy
@@ -58,6 +58,6 @@ class Oauth2AuthorizedApplicationsControllerTest < ActionDispatch::IntegrationTe
     get oauth_authorized_applications_path
     assert_response :success
     assert_template "oauth2_authorized_applications/index"
-    assert_select "tr", 1
+    assert_select "tbody tr", 1
   end
 end