diff --git a/app/controllers/page_contents_controller.rb b/app/controllers/page_contents_controller.rb index 434a9f7..afc8a05 100644 --- a/app/controllers/page_contents_controller.rb +++ b/app/controllers/page_contents_controller.rb @@ -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 ""), + "view_count" => (page.page_contexts.last.view_count rescue ""), + "view-count-head" =>t('page_content.view_count'), "url_to_edit" => url_to_edit } end diff --git a/app/views/page_contents/index.html.erb b/app/views/page_contents/index.html.erb index 1fdd26a..764ca7b 100644 --- a/app/views/page_contents/index.html.erb +++ b/app/views/page_contents/index.html.erb @@ -1,4 +1,10 @@ <% data = action_data %> + +