From 694f839217a964f93c4c9126dad2edd464b51534 Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Tue, 12 May 2015 17:30:45 +0800 Subject: [PATCH] added edit mode button in frontend --- app/controllers/pages_controller.rb | 2 ++ app/views/orbit_bar/index.html.erb | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/app/controllers/pages_controller.rb b/app/controllers/pages_controller.rb index a23a988..639d46d 100644 --- a/app/controllers/pages_controller.rb +++ b/app/controllers/pages_controller.rb @@ -31,6 +31,7 @@ class PagesController < ApplicationController impressionist(page) page.inc(view_count: 1) end + params[:is_frontend_view] = "true" OrbitHelper.set_params params,current_user OrbitHelper.set_site_locale locale render :html => render_final_page("home",page,true).html_safe @@ -39,6 +40,7 @@ class PagesController < ApplicationController def show display_type = "" path = request.path.split('/') + params[:is_frontend_view] = "true" if path.size <= 2 redirect_to root_path else diff --git a/app/views/orbit_bar/index.html.erb b/app/views/orbit_bar/index.html.erb index 1cd84b8..96bb0db 100644 --- a/app/views/orbit_bar/index.html.erb +++ b/app/views/orbit_bar/index.html.erb @@ -138,6 +138,15 @@