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