Create user comments controller base class

This commit is contained in:
Anton Khorev 2025-01-19 03:30:18 +03:00
parent 43d60108da
commit 9fbe52dd21
4 changed files with 23 additions and 18 deletions

View file

@ -0,0 +1,18 @@
module Users
class CommentsController < ApplicationController
include UserMethods
include PaginationMethods
layout "site"
before_action :authorize_web
before_action :set_locale
before_action :check_database_readable
authorize_resource
before_action :lookup_user
allow_thirdparty_images
end
end

View file

@ -1,20 +1,5 @@
module Users
class DiaryCommentsController < ApplicationController
include UserMethods
include PaginationMethods
layout "site"
before_action :authorize_web
before_action :set_locale
before_action :check_database_readable
authorize_resource
before_action :lookup_user
allow_thirdparty_images
class DiaryCommentsController < CommentsController
def index
@title = t ".title", :user => @user.display_name

View file

@ -2872,12 +2872,14 @@ en:
user:
summary_html: "%{name} created from %{ip_address} on %{date}"
summary_no_ip_html: "%{name} created on %{date}"
diary_comments:
comments:
index:
title: "Diary Comments added by %{user}"
heading_html: "%{user}'s Comments"
diary_entries: "Diary entries"
no_comments: "No comments"
diary_comments:
index:
title: "Diary Comments added by %{user}"
page:
post: Post
when: When