add page content title

This commit is contained in:
JiangRu 2015-04-13 14:35:21 +08:00
parent c5ce915435
commit 690dba7860
2 changed files with 3 additions and 0 deletions

View File

@ -5,6 +5,8 @@ class PageContentsController < OrbitAdminController
url_to_edit = OrbitHelper.user_can_edit?(page) ? "/admin/page_contents/new?page_id=#{page.id.to_s}" : ""
{
"html" => (page.page_contexts.last.content rescue ""),
"title" => (page.name rescue ""),
"view_count" => (page.view_count rescue ""),
"view_count" => (page.view_count rescue ""),
"view-count-head" =>t('page_content.view_count'),
"url_to_edit" => url_to_edit

View File

@ -4,6 +4,7 @@
<i class="fa fa-eye"><%= data["view-count-head"] %>:</i>
<span class="view-count"><%= data["view_count"] %></span>
</div>
<h1 class="page-module-title"><%= data["title"] %></h1>
<%= data["html"].html_safe %>