Create user comments controller base class
This commit is contained in:
parent
43d60108da
commit
9fbe52dd21
4 changed files with 23 additions and 18 deletions
18
app/controllers/users/comments_controller.rb
Normal file
18
app/controllers/users/comments_controller.rb
Normal 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
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue