Update ecosystem for new devise
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
//= require jquery
|
||||
//= require jquery_ujs
|
||||
//= require jquery-ui
|
||||
//= require jquery.ui.all
|
||||
//= require jquery.ui.datepicker-en
|
||||
//= require jquery.ui.datepicker-nl
|
||||
// require bootstrap-transition
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
//
|
||||
//= require jquery
|
||||
//= require jquery_ujs
|
||||
//= require jquery-ui
|
||||
//= require jquery.ui.all
|
||||
//= require bootstrap
|
||||
// require twitter/bootstrap
|
||||
//= require_directory .
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
class Administrator
|
||||
include SimplyStored::Couch
|
||||
include Devise::Orm::SimplyStored
|
||||
devise :database_authenticatable, :rememberable #, :recoverable, :rememberable, :trackable, :registerable
|
||||
|
||||
view :by_email, key: :email
|
||||
|
||||
@@ -3,7 +3,7 @@ class Section
|
||||
include Qwaiter::Distribution
|
||||
|
||||
property :title
|
||||
property :path, type: Array, default: []
|
||||
property :path, type: Array, default: [[0.0, 0.0], [20.0, 30.0]] # default width 20m height 30m
|
||||
|
||||
belongs_to :supplier
|
||||
has_many :tables
|
||||
@@ -46,10 +46,11 @@ class Section
|
||||
self.path[0] ||= [0.0, 0.0]
|
||||
self.path[1] ||= [0.0, 0.0]
|
||||
unless path[1][0] == val
|
||||
self.path[1][0] = val
|
||||
self.path[1][0] = val
|
||||
path_will_change!
|
||||
end
|
||||
end
|
||||
|
||||
def height=(val)
|
||||
val = val.to_f
|
||||
self.path[0] ||= [0.0, 0.0]
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
class Supplier
|
||||
include SimplyStored::Couch
|
||||
include Devise::Orm::SimplyStored
|
||||
devise :database_authenticatable, :recoverable, :rememberable, :trackable, :registerable, :confirmable
|
||||
property :unconfirmed_email
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
class User
|
||||
include SimplyStored::Couch
|
||||
include Devise::Orm::SimplyStored
|
||||
|
||||
property :name
|
||||
property :active_list_id
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
-if target.errors.any?
|
||||
#error_explanation
|
||||
.errors-content
|
||||
%h2= t('helpers.forms.errors.title', :count => target.errors.count)
|
||||
%ul
|
||||
h2= t('helpers.forms.errors.title', :count => target.errors.count)
|
||||
ul
|
||||
- for message in target.errors.full_messages
|
||||
%li= message
|
||||
li= message
|
||||
@@ -32,7 +32,7 @@ html lang="en"
|
||||
var $locale = 'en';
|
||||
var $asset_path = '/assets/';
|
||||
var Qstorage = localStorage;
|
||||
#{Rails.env.production? ? '' : "data_host = 'http://qwaiter.dev';"}
|
||||
#{Rails.env.production? ? '' : "data_host = 'http://localhost:3000';".html_safe }
|
||||
var data_host = 'http://localhost:3000';
|
||||
QMobile || (QMobile = {
|
||||
scanQr: function(){window.location = '/select_qrcode'},
|
||||
|
||||
@@ -16,14 +16,7 @@ html lang="en"
|
||||
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="/favicon.ico" rel="shortcut icon"
|
||||
|
||||
javascript:
|
||||
var $locale = '#{I18n.locale}';
|
||||
var supplier_id = '#{current_supplier.id}';
|
||||
var data_host = '';
|
||||
var event_host = '#{event_host}';
|
||||
var datepicker_options = {dateFormat: 'yy-mm-dd', firstDay: #{current_supplier.week_starts_on_monday? ? 1 : 0}};
|
||||
|
||||
= render 'suppliers/application/head'
|
||||
= yield :head
|
||||
|
||||
body
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
= f.label :location, class: 'control-label'
|
||||
.controls
|
||||
= f.text_field :location, class: 'location_picker'
|
||||
= image_tag 'supplier/settings/location-balloon.png'
|
||||
= image_tag 'supplier/settings/location-balloon.png'
|
||||
.control-group
|
||||
= f.label :time_zone, class: 'control-label'
|
||||
.controls
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
<script>
|
||||
var $locale = '<%= I18n.locale %>';
|
||||
var supplier_id = '<%= current_supplier.id %>';
|
||||
var data_host = '';
|
||||
var event_host = '<%= event_host %>';
|
||||
var datepicker_options = {dateFormat: 'yy-mm-dd', firstDay: <%= current_supplier.week_starts_on_monday? ? 1 : 0 %>};
|
||||
</script>
|
||||
@@ -21,7 +21,7 @@ div.page-header= title :index, model_class
|
||||
- @tables.each do |table|
|
||||
tr
|
||||
td.link= link_to table.number, [:suppliers, table]
|
||||
td.link= link_to_if table.section.present?, table.section.try(:title), [:suppliers, table.section]
|
||||
td.link= link_to_if table.section.present?, table.section.try(:title), tables_view_suppliers_section_path(table.section)
|
||||
td.timestamp data-time=table.created_at.utc.iso8601
|
||||
td.actions
|
||||
= link_to t('helpers.links.edit'), [:edit, :suppliers, table], class: 'btn btn-mini', data: {t: 'helpers.links.edit'}
|
||||
|
||||
Reference in New Issue
Block a user