added author for announcement widget and index
This commit is contained in:
parent
1cbe055361
commit
16df9ac38a
|
@ -10,12 +10,14 @@ class AnnouncementsController < ApplicationController
|
|||
"status-class" => "status-#{status['classname']}"
|
||||
}
|
||||
end
|
||||
author = User.find(a.create_user_id).member_profile.name rescue ""
|
||||
{
|
||||
"title" => a.title,
|
||||
"subtitle" => a.subtitle,
|
||||
"statuses" => statuses,
|
||||
"category" => a.category.title,
|
||||
"postdate" => a.postdate,
|
||||
"author" => author,
|
||||
"link_to_show" => OrbitHelper.url_to_show(a.to_param),
|
||||
"img_src" => a.image.thumb.url || "http://placehold.it/100x100",
|
||||
"img_description" => a.image_description,
|
||||
|
@ -30,6 +32,7 @@ class AnnouncementsController < ApplicationController
|
|||
"title-head" => t('announcement.table.title'),
|
||||
"date-head" => t('announcement.table.date'),
|
||||
"status-head" => t('announcement.table.status'),
|
||||
"author-head" => t('announcement.table.author'),
|
||||
"subtitle-head" => t('announcement.table.sub_title'),
|
||||
"category-head" => t('announcement.table.category')
|
||||
},
|
||||
|
@ -47,6 +50,7 @@ class AnnouncementsController < ApplicationController
|
|||
"status" => status["name"],
|
||||
"status-class" => "status-#{status['classname']}"
|
||||
}
|
||||
author = User.find(a.create_user_id).member_profile.name rescue ""
|
||||
end
|
||||
{
|
||||
"title" => a.title,
|
||||
|
@ -54,6 +58,7 @@ class AnnouncementsController < ApplicationController
|
|||
"statuses" => statuses,
|
||||
"category" => a.category.title,
|
||||
"postdate" => a.postdate,
|
||||
"author" => author,
|
||||
"link_to_show" => OrbitHelper.widget_item_url(a.to_param),
|
||||
"img_src" => a.image.thumb.url || "http://placehold.it/100x100",
|
||||
"img_description" => a.image_description
|
||||
|
@ -65,6 +70,7 @@ class AnnouncementsController < ApplicationController
|
|||
"more_url"=>OrbitHelper.widget_more_url,
|
||||
"title-head" => t('announcement.table.title'),
|
||||
"date-head" => t('announcement.table.date'),
|
||||
"author-head" => t('announcement.table.author'),
|
||||
"status-head" => t('announcement.table.status'),
|
||||
"subtitle-head" => t('announcement.table.sub_title'),
|
||||
"category-head" => t('announcement.table.category')
|
||||
|
|
|
@ -7,6 +7,7 @@ en:
|
|||
status : Status
|
||||
sub_title: Sub Title
|
||||
category: Category
|
||||
author: Author
|
||||
add_new: Add New
|
||||
approve: Approve
|
||||
all_articles: All Articles
|
||||
|
|
|
@ -7,6 +7,7 @@ zh_tw:
|
|||
status : 標籤
|
||||
sub_title: 副標題
|
||||
category: 類別
|
||||
author: 張貼人
|
||||
add_new: 新建
|
||||
approve: 通過
|
||||
all_articles: 文章列表
|
||||
|
|
Loading…
Reference in New Issue