frontend update

This commit is contained in:
2015-03-06 10:01:50 +01:00
parent e9b6cd627a
commit bbd3b0c6eb
7 changed files with 29 additions and 25 deletions
+11
View File
@@ -22,6 +22,7 @@ private
headers['Access-Control-Allow-Methods'] = '*'
end
#START CMTOOL
def authorize_cmtool
redirect_to new_administrator_session_path, alert: t('general.unauthorized') unless current_administrator.present?
end
@@ -34,6 +35,16 @@ private
:en
end
def page_path(record, locale: I18n.locale)
str = case record
when Page then record.name
else record
end
go_to_path(str, locale: locale)
end
helper_method :page_path
#END CMTOOL
def broadcast_user(uid, event, data = {})
Qwaiter.broadcast_user uid, event, data
end