Add cmtool to Qwaiter

This commit is contained in:
2013-03-03 14:21:29 +01:00
parent ba19316e16
commit a640255927
13 changed files with 115 additions and 69 deletions
@@ -6,6 +6,10 @@ class ApplicationController < ActionController::Base
rescue_from SimplyStored::RecordNotFound, with: :show_404
private
def authorize_cmtool
redirect_to '/', alert: t('general.unauthorized') unless current_user.present? && current_user.admin?
end
def broadcast_user(uid, event, data = {})
message = {channel: "/user/#{uid}", data: {event: event, data: data}}
uri = URI.parse(event_host)
-17
View File
@@ -1,17 +1,5 @@
class DashboardController < ApplicationController
layout 'theme1'
def home
render layout: 'theme1-home'
end
def contact
end
def bars_restaurants
end
def clients
end
def demo_both
render layout: 'demo-both'
@@ -47,9 +35,4 @@ class DashboardController < ApplicationController
format.svg { render qrcode: code, level: :h, unit: 10, size: 7}
end
end
def scan
end
end
+3
View File
@@ -0,0 +1,3 @@
class PagesController < ApplicationController
include Cmtool::Includes::PagesController
end