]> git.openstreetmap.org Git - rails.git/commitdiff
Merge remote-tracking branch 'upstream/pull/5188'
authorTom Hughes <tom@compton.nu>
Wed, 11 Sep 2024 16:09:00 +0000 (17:09 +0100)
committerTom Hughes <tom@compton.nu>
Wed, 11 Sep 2024 16:09:00 +0000 (17:09 +0100)
app/abilities/ability.rb
app/controllers/user_blocks_controller.rb
app/views/changesets/index.html.erb
app/views/user_blocks/_page.html.erb [moved from app/views/user_blocks/_blocks.html.erb with 100% similarity]
app/views/user_blocks/blocks_by.html.erb
app/views/user_blocks/blocks_on.html.erb
app/views/user_blocks/index.html.erb
config/locales/en.yml

index d6584f364bd8e24f859486960e6fc69e9c7d14ce..9a8f193a1b5164ce1eea0e09cd583338729f6bd7 100644 (file)
@@ -7,7 +7,7 @@ class Ability
     can :query, :browse
     can :show, [Node, Way, Relation]
     can [:index, :show], [OldNode, OldWay, OldRelation]
-    can [:show, :new], Note
+    can [:show, :create], Note
     can :search, :direction
     can [:index, :permalink, :edit, :help, :fixthemap, :offline, :export, :about, :communities, :preview, :copyright, :key, :id], :site
     can [:finish, :embed], :export
@@ -20,11 +20,11 @@ class Ability
       can [:index, :rss, :show], DiaryEntry
       can :index, DiaryComment
       can [:index], Note
-      can [:new, :create, :update], :password
+      can [:create, :update], :password
       can [:index, :show], Redaction
-      can [:new, :create, :destroy], :session
+      can [:create, :destroy], :session
       can [:index, :show, :data, :georss], Trace
-      can [:terms, :new, :create, :save, :suspended, :show, :auth_success, :auth_failure], User
+      can [:terms, :create, :save, :suspended, :show, :auth_success, :auth_failure], User
       can [:index, :show, :blocks_on, :blocks_by], UserBlock
     end
 
@@ -34,21 +34,21 @@ class Ability
 
       if Settings.status != "database_offline"
         can [:subscribe, :unsubscribe], Changeset
-        can [:index, :new, :create, :show, :update, :destroy], :oauth2_application
+        can [:index, :create, :show, :update, :destroy], :oauth2_application
         can [:index, :destroy], :oauth2_authorized_application
-        can [:new, :show, :create, :destroy], :oauth2_authorization
+        can [:show, :create, :destroy], :oauth2_authorization
         can [:update, :destroy], :account
         can [:show], :dashboard
-        can [:new, :create, :subscribe, :unsubscribe], DiaryEntry
+        can [:create, :subscribe, :unsubscribe], DiaryEntry
         can :update, DiaryEntry, :user => user
         can [:create], DiaryComment
         can [:make_friend, :remove_friend], Friendship
-        can [:new, :create, :reply, :show, :inbox, :outbox, :muted, :mark, :unmute, :destroy], Message
+        can [:create, :reply, :show, :inbox, :outbox, :muted, :mark, :unmute, :destroy], Message
         can [:close, :reopen], Note
         can [:show, :update], :preference
         can :update, :profile
-        can [:new, :create], Report
-        can [:mine, :new, :create, :update, :destroy], Trace
+        can :create, Report
+        can [:mine, :create, :update, :destroy], Trace
         can [:account, :go_public], User
         can [:index, :create, :destroy], UserMute
 
@@ -56,8 +56,8 @@ class Ability
           can [:hide, :unhide], [DiaryEntry, DiaryComment]
           can [:index, :show, :resolve, :ignore, :reopen], Issue
           can :create, IssueComment
-          can [:new, :create, :update, :destroy], Redaction
-          can [:new, :create, :revoke_all], UserBlock
+          can [:create, :update, :destroy], Redaction
+          can [:create, :revoke_all], UserBlock
           can :update, UserBlock, :creator => user
           can :update, UserBlock, :revoker => user
           can :update, UserBlock, :active? => true
index 7d61366be9e071f0cd0360d48bf00ba22b968635..c42c2659db0b09aae46b17430b3cac0e25283790 100644 (file)
@@ -25,7 +25,7 @@ class UserBlocksController < ApplicationController
     @show_user_name = true
     @show_creator_name = true
 
-    render :partial => "blocks" if turbo_frame_request_id == "pagination"
+    render :partial => "page" if turbo_frame_request_id == "pagination"
   end
 
   def show
@@ -127,7 +127,7 @@ class UserBlocksController < ApplicationController
     @show_user_name = false
     @show_creator_name = true
 
-    render :partial => "blocks" if turbo_frame_request_id == "pagination"
+    render :partial => "page" if turbo_frame_request_id == "pagination"
   end
 
   ##
@@ -142,7 +142,7 @@ class UserBlocksController < ApplicationController
     @show_user_name = true
     @show_creator_name = false
 
-    render :partial => "blocks" if turbo_frame_request_id == "pagination"
+    render :partial => "page" if turbo_frame_request_id == "pagination"
   end
 
   private
index 97e6351a0a108561ac495534a8e30c75ab13cb11..fc5f7cbbc85bfaeb57c78d71a383aea88d73125d 100644 (file)
@@ -13,9 +13,9 @@
   </div>
 <% end -%>
 <% elsif params[:bbox] %>
-  <p class="mx-3"><%= t(params[:max_id] ? ".no_more_area" : ".empty_area") %></p>
+  <p class="mx-3"><%= params[:max_id] ? t(".no_more_area") : t(".empty_area") %></p>
 <% elsif params[:display_name] %>
-  <p class="mx-3"><%= t(params[:max_id] ? ".no_more_user" : ".empty_user") %></p>
+  <p class="mx-3"><%= params[:max_id] ? t(".no_more_user") : t(".empty_user") %></p>
 <% else %>
-  <p class="mx-3"><%= t(params[:max_id] ? ".no_more" : ".empty") %></p>
+  <p class="mx-3"><%= params[:max_id] ? t(".no_more") : t(".empty") %></p>
 <% end %>
index 38254a5a3d166781f1e3e80bfadb5c932c0c2b9f..73748e5570757fffcdf16294fbf781bbcfb2f6d1 100644 (file)
@@ -7,7 +7,7 @@
 <% end %>
 
 <% unless @user_blocks.empty? %>
-<%= render :partial => "blocks" %>
+<%= render :partial => "page" %>
 <% else %>
 <p><%= t ".empty", :name => @user.display_name %></p>
 <% end %>
index 38254a5a3d166781f1e3e80bfadb5c932c0c2b9f..73748e5570757fffcdf16294fbf781bbcfb2f6d1 100644 (file)
@@ -7,7 +7,7 @@
 <% end %>
 
 <% unless @user_blocks.empty? %>
-<%= render :partial => "blocks" %>
+<%= render :partial => "page" %>
 <% else %>
 <p><%= t ".empty", :name => @user.display_name %></p>
 <% end %>
index 854d62037f4ace3e7e7a9f76398235a20867fb6a..5b040e2b5630cbef31f9c051c68015a3e4c019e2 100644 (file)
@@ -7,7 +7,7 @@
 <% end %>
 
 <% unless @user_blocks.empty? %>
-<%= render :partial => "blocks" %>
+<%= render :partial => "page" %>
 <% else %>
 <p><%= t ".empty" %></p>
 <% end %>
index 8d66ef6e5ae1851969bad94ed00be2d910537d4f..9da502c7c7b6b719b3c438b09eecb706b1a22d5c 100644 (file)
@@ -2921,7 +2921,7 @@ en:
       not_revoked: "(not revoked)"
       show: "Show"
       edit: "Edit"
-    blocks:
+    page:
       display_name: "Blocked User"
       creator_name: "Creator"
       reason: "Reason for block"