Better cmtool integration
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
//= require_self
|
||||
//= require_directory .
|
||||
@import 'foundation_and_overrides'
|
||||
@import ./components/*
|
||||
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
table
|
||||
&.table
|
||||
width: 100%
|
||||
@@ -18,3 +18,15 @@
|
||||
.content-container
|
||||
position: relative
|
||||
max-width: $content-max-width
|
||||
=theme-button
|
||||
border: none
|
||||
background: image-url('theme1/button-wood-right.png') 100% 0 no-repeat, image-url('theme1/button-wood-left.png') 0 0 no-repeat, image-url('theme1/button-wood-middle.png') 9px 0 repeat-x
|
||||
color: white
|
||||
height: 31px
|
||||
display: inline-block
|
||||
padding-left: 8px
|
||||
padding-right: 8px
|
||||
line-height: 30px
|
||||
&:hover
|
||||
color: white
|
||||
text-decoration: underline
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
.theme-button
|
||||
+theme-button
|
||||
@@ -25,6 +25,10 @@ private
|
||||
redirect_to '/', alert: t('general.unauthorized') unless current_user.present? && current_user.admin?
|
||||
end
|
||||
|
||||
def cmtool_locale
|
||||
:en
|
||||
end
|
||||
|
||||
def broadcast_user(uid, event, data = {})
|
||||
Qwaiter.broadcast_user uid, event, data
|
||||
end
|
||||
@@ -34,7 +38,8 @@ private
|
||||
end
|
||||
|
||||
def set_locale
|
||||
I18n.locale = (params[:locale].presence || I18n.default_locale).to_sym
|
||||
#session[:locale] = (params[:locale].presence || session[:locale] || Rails.configuration.i18n.default_locale).to_sym
|
||||
I18n.locale = params[:locale].presence.try(:to_sym) || Rails.configuration.i18n.default_locale
|
||||
end
|
||||
|
||||
def _render_with_renderer_json(resource, options)
|
||||
|
||||
@@ -1,18 +1,16 @@
|
||||
- model_class = Supplier
|
||||
.page-header= title :index, model_class
|
||||
- if @suppliers.any?
|
||||
table.table.table-striped.table-hover
|
||||
table.table
|
||||
thead
|
||||
tr
|
||||
th= model_class.human_attribute_name(:email)
|
||||
th= model_class.human_attribute_name(:name)
|
||||
th= model_class.human_attribute_name(:created_at)
|
||||
th=t 'helpers.actions.title'
|
||||
tbody
|
||||
- @suppliers.each do |supplier|
|
||||
tr
|
||||
td= link_to supplier.email, [:admin, supplier]
|
||||
td= supplier.name
|
||||
td= link_to supplier.name, [:admin, supplier]
|
||||
td=l supplier.created_at, format: :short
|
||||
td
|
||||
= link_to t('helpers.links.edit'), [:edit, :admin, supplier], class: 'btn btn-mini'
|
||||
|
||||
@@ -12,42 +12,39 @@ html lang="en"
|
||||
/[if lt IE 9]
|
||||
= javascript_include_tag "http://html5shim.googlecode.com/svn/trunk/html5.js"
|
||||
= stylesheet_link_tag "admin/application", :media => "all"
|
||||
link href="images/apple-touch-icon-144x144.png" rel="apple-touch-icon-precomposed" sizes="144x144"
|
||||
link href="images/apple-touch-icon-114x114.png" rel="apple-touch-icon-precomposed" sizes="114x114"
|
||||
link href="images/apple-touch-icon-72x72.png" rel="apple-touch-icon-precomposed" sizes="72x72"
|
||||
link href="images/apple-touch-icon.png" rel="apple-touch-icon-precomposed"
|
||||
link href="images/favicon.ico" rel="shortcut icon"
|
||||
|
||||
body
|
||||
nav.top-bar
|
||||
ul.title-area
|
||||
li.name: h4= link_to application_title, admin_root_path
|
||||
section.top-bar-section
|
||||
ul.left
|
||||
li= link_to User.model_name.human_plural, admin_users_path
|
||||
li= link_to "User Feedback", admin_user_feedbacks_path
|
||||
li.divider
|
||||
ul.left
|
||||
li.has-dropdown.not-click
|
||||
a href="#" = Supplier.model_name.human_plural
|
||||
ul.dropdown
|
||||
li= link_to Supplier.model_name.human_plural, admin_suppliers_path
|
||||
li= link_to Section.model_name.human_plural, admin_sections_path
|
||||
li= link_to Table.model_name.human_plural, admin_tables_path
|
||||
li= link_to Product.model_name.human_plural, admin_products_path
|
||||
li= link_to List.model_name.human_plural, admin_lists_path
|
||||
li= link_to Order.model_name.human_plural, admin_orders_path
|
||||
li= link_to ProductCategory.model_name.human_plural, admin_product_categories_path
|
||||
li.divider
|
||||
- if administrator_signed_in?
|
||||
ul.right
|
||||
li.divider
|
||||
li.has-dropdown.not-click
|
||||
a href="#" = current_administrator.email
|
||||
ul.dropdown
|
||||
li.log-out= link_to t('helpers.links.logout'), destroy_administrator_session_path
|
||||
.container
|
||||
|
||||
- if defined?(Cmtool)
|
||||
= render 'cmtool/application/menu'
|
||||
- else
|
||||
nav.top-bar
|
||||
ul.title-area
|
||||
li.name: h4= link_to application_title, admin_root_path
|
||||
section.top-bar-section
|
||||
ul.left
|
||||
li= link_to User.model_name.human_plural, admin_users_path
|
||||
li= link_to "User Feedback", admin_user_feedbacks_path
|
||||
li.divider
|
||||
ul.left
|
||||
li.has-dropdown.not-click
|
||||
a href="#" = Supplier.model_name.human_plural
|
||||
ul.dropdown
|
||||
li= link_to Supplier.model_name.human_plural, admin_suppliers_path
|
||||
li= link_to Section.model_name.human_plural, admin_sections_path
|
||||
li= link_to Table.model_name.human_plural, admin_tables_path
|
||||
li= link_to Product.model_name.human_plural, admin_products_path
|
||||
li= link_to List.model_name.human_plural, admin_lists_path
|
||||
li= link_to Order.model_name.human_plural, admin_orders_path
|
||||
li= link_to ProductCategory.model_name.human_plural, admin_product_categories_path
|
||||
li.divider
|
||||
- if administrator_signed_in?
|
||||
ul.right
|
||||
li.divider
|
||||
li.has-dropdown.not-click
|
||||
a href="#" = current_administrator.email
|
||||
ul.dropdown
|
||||
li.log-out= link_to t('helpers.links.logout'), destroy_administrator_session_path
|
||||
.container
|
||||
.content
|
||||
- if flash[:alert].present?
|
||||
.alert-box.alert
|
||||
@@ -58,10 +55,10 @@ html lang="en"
|
||||
a.close data-dismiss="alert" ×
|
||||
div= flash[:notice]
|
||||
.row
|
||||
.large-9.columns
|
||||
.small-12.large-9.columns
|
||||
= yield
|
||||
.large-3.columns
|
||||
.well.sidebar-nav
|
||||
.show-for-large-up.large-3.columns
|
||||
.panel
|
||||
h3= application_title
|
||||
hr
|
||||
ul.side-nav
|
||||
|
||||
@@ -27,15 +27,7 @@ html lang="en"
|
||||
.container
|
||||
.content-top
|
||||
.main-inner
|
||||
.general-alerts
|
||||
- if flash[:alert].present?
|
||||
.flash-box.alert
|
||||
div= flash[:alert]
|
||||
a.close data-dismiss="alert" ×
|
||||
- if flash[:notice].present?
|
||||
.flash-box.notice
|
||||
div= flash[:notice]
|
||||
a.close data-dismiss="alert" ×
|
||||
= render 'theme1/alerts'
|
||||
= yield :page_title
|
||||
= yield
|
||||
= render 'theme1/footer'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
doctype html
|
||||
html lang="en"
|
||||
html lang=I18n.locale
|
||||
head
|
||||
title= site_page_title
|
||||
= render 'meta'
|
||||
@@ -22,14 +22,7 @@ html lang="en"
|
||||
#main-wrap
|
||||
.container
|
||||
.main-inner
|
||||
- if flash[:alert].present?
|
||||
.flash-box.alert
|
||||
div= flash[:alert]
|
||||
a.close data-dismiss="alert" ×
|
||||
- if flash[:notice].present?
|
||||
.flash-box.notice
|
||||
div= flash[:notice]
|
||||
a.close data-dismiss="alert" ×
|
||||
= render 'theme1/alerts'
|
||||
- if @page && @page.title.present?
|
||||
h1.page-title= @page.title
|
||||
= yield
|
||||
|
||||
@@ -1,3 +1,14 @@
|
||||
.row
|
||||
.small-12.columns
|
||||
ul
|
||||
li Its free!
|
||||
li
|
||||
span To try do the following
|
||||
ul
|
||||
li Create and setup a restaurant account
|
||||
li Open the qr codes page displaying the qr-codes of your created tables
|
||||
li Download the app on your phone to test as a user
|
||||
li Scan a qr-code from you restaurant screen with your phone, and you can test ordering products!!!
|
||||
.row
|
||||
.large-7.large-offset-1.columns
|
||||
= form_for @new_supplier do |f|
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
- if flash[:alert].present?
|
||||
.alert-box.warning
|
||||
= flash[:alert]
|
||||
a.close data-dismiss="alert" ×
|
||||
- if flash[:notice].present?
|
||||
.alert-box.info
|
||||
= flash[:notice]
|
||||
a.close data-dismiss="alert" ×
|
||||
@@ -1,3 +1,4 @@
|
||||
a.theme-button Test
|
||||
.social
|
||||
a.wsite-social-facebook href="https://www.facebook.com/mozo.bar" target=:_blank
|
||||
span.wsite-social-inner
|
||||
|
||||
Reference in New Issue
Block a user