forked from saurabh/personal-journal
Added rss2id and fix profile
This commit is contained in:
parent
f811cfc34f
commit
32ffdce5d2
|
@ -22,6 +22,7 @@ class JournalPaper
|
||||||
field :publication_date, type: DateTime
|
field :publication_date, type: DateTime
|
||||||
field :url, type: String
|
field :url, type: String
|
||||||
field :note, type: String
|
field :note, type: String
|
||||||
|
field :rss2_id
|
||||||
|
|
||||||
paginates_per 10
|
paginates_per 10
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,8 @@
|
||||||
@filter = {new_filter[:type] => [new_filter[:id].to_s]}
|
@filter = {new_filter[:type] => [new_filter[:id].to_s]}
|
||||||
end
|
end
|
||||||
|
|
||||||
if @member && @member.user.is_admin?
|
is_autorized_user = (current_user==@member.user || current_user.is_admin?)
|
||||||
|
if is_autorized_user
|
||||||
@writing_journals = JournalPaper.where(member_profile_id: @member.id).desc(:year).page(params[:page]).per(10)
|
@writing_journals = JournalPaper.where(member_profile_id: @member.id).desc(:year).page(params[:page]).per(10)
|
||||||
else
|
else
|
||||||
@writing_journals = JournalPaper.where(is_hidden: false, member_profile_id: @member.id).desc(:year).page(params[:page]).per(10)
|
@writing_journals = JournalPaper.where(is_hidden: false, member_profile_id: @member.id).desc(:year).page(params[:page]).per(10)
|
||||||
|
|
Loading…
Reference in New Issue