frontend update
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user