Maybe you tried to change something you didn't have access to.
24 |You may have mistyped the address or the page may have moved.
24 |We've been notified about this issue and we'll take a look at it shortly.
24 |
9 | <%= @exception.class.to_s =~ /^[aeiou]/i ? 'An' : 'A' %> <%= @exception.class %> occurred in background at <%= raw Time.current %> :
10 |
11 | <%= @exception.message %>
12 | <%= @backtrace.first %>
13 | <%
14 | sections = @sections.map do |section|
15 | summary = render(section).strip
16 | unless summary.blank?
17 | title = render("title", :title => section).strip
18 | "#{title}\n\n#{summary.gsub(/^/, " ")}\n\n"
19 | end
20 | end.join
21 | sections = sections.force_encoding('UTF-8').encode('UTF-16', :invalid => :replace).encode('UTF-8') if sections.respond_to?(:force_encoding)
22 | %>
23 | <%= raw sections %>
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/salor-hospitality/app/views/articles/_ingredient.html.haml:
--------------------------------------------------------------------------------
1 | -# The generated HTML code of this partial is inserted into the JS code of the add_ingredient_link helper
2 | -# Note that the statement 'ingredient' represents the name of this partial
3 |
4 | - frm.fields_for :ingredients, ingredient do |f|
5 | %td
6 | = f.label :amount, 'Menge:'
7 | %td
8 | = f.text_field :amount, :size => '3'
9 |
10 | -# Here we need to extract the name of the nested attribute ('new_') in order to make the drop down list set its value in the correct place in the params hash.
11 | - nested_attribute_id = /article\[ingredients_attributes\]\[(.*)\]/.match(f.object_name)[1]
12 | %td
13 | %select{ :id => "article_ingredients_attributes_#{ nested_attribute_id }_stock_id", :name => "article[ingredients_attributes][#{ nested_attribute_id }][stock_id]" }
14 | %option{ :value => '' }
15 | = option_groups_from_collection_for_select @groups, :stocks, :name, :id, :custom_name
16 |
--------------------------------------------------------------------------------
/salor-hospitality/app/views/options/index.html.haml:
--------------------------------------------------------------------------------
1 | %h2= t('activerecord.models.option.other')
2 |
3 | - if @current_vendor.categories.existing.any?
4 | = link_to (t :new), new_option_path, :class => 'links'
5 | - else
6 | = t('.no_categories_defined')
7 |
8 | - @categories.each do |c|
9 | - if c.options.existing.any?
10 | %h3= c.name
11 | %ul.sort_options{ :id => "category_#{ c.id }" }
12 | - c.options.existing.active.positioned.each do |o|
13 | %li{ :id => "option_#{ o.id }" }
14 | %span.handle
15 | = link_to o.name, edit_option_path(o), :class => "list_item"
16 |
17 | - @categories.each do |c|
18 | :javascript
19 | $("#category_#{ c.id }").sortable({
20 | dropOnEmpty: false, handle: '.handle', cursor: 'crosshair', items: 'li', opacity: 0.4, scroll: true, update: function(){
21 | $.ajax({ type: 'post', data: $('#category_#{ c.id }').sortable('serialize'), dataType: 'script', url: '/options/sort'})
22 | }
23 | });
24 |
--------------------------------------------------------------------------------
/salor-hospitality/app/views/articles/sort_index.html.haml:
--------------------------------------------------------------------------------
1 | %h2= t '.sort'
2 |
3 | %a.iconbutton.back_button{ :href => '/articles', :title => t(:go_back) }
4 |
5 | - @categories.each do |c|
6 | %h3= c.name
7 | %ul.sort_articles{ :id => "category_#{ c.id }" }
8 | - c.articles.existing.active.positioned.each do |a|
9 | %li{ :id => "article_#{ a.id }" }
10 | %span.handle
11 | = link_to a.name, edit_article_path(a), :class => "list_item"
12 |
13 | - @categories.each do |c|
14 | :javascript
15 | $("#category_#{ c.id }").sortable({
16 | dropOnEmpty: false,
17 | handle: '.handle',
18 | cursor: 'crosshair',
19 | items: 'li',
20 | opacity: 0.4,
21 | scroll: true,
22 | update: function() {
23 | $.ajax({
24 | type: 'POST',
25 | data: $('#category_#{ c.id }').sortable('serialize'),
26 | dataType: 'script',
27 | url: '/articles/sort'
28 | })
29 | }
30 | });
31 |
--------------------------------------------------------------------------------
/salor-hospitality/app/views/payment_methods/new.html.haml:
--------------------------------------------------------------------------------
1 | %h2= @payment_method.new_record? ? (t '.new_payment_method') : (t '.edit_payment_method')
2 |
3 | - if @payment_method.errors.any?
4 | .errors
5 | %h3= t 'activerecord.errors.template.header', :count => @payment_method.errors.size, :model => PaymentMethod.model_name.human
6 | %ul
7 | - @payment_method.errors.full_messages.each do |msg|
8 | %li= msg
9 |
10 | .form_fields
11 | = form_for @payment_method do |payment_method_form|
12 | = submit_tag( controller.action_name == 'new' ? (t :create) : (t :edit) )
13 | .floatright= link_to(t('various.cancel'), payment_methods_path, :class => 'links')
14 | .clear
15 | = payment_method_form.label :name
16 | = payment_method_form.text_field :name, :size => '10'
17 | %br
18 | = payment_method_form.label :cash
19 | = payment_method_form.check_box :cash
20 | %br
21 | = payment_method_form.label :change
22 | = payment_method_form.check_box :change
--------------------------------------------------------------------------------
/salor-hospitality/app/views/surcharges/index.html.haml:
--------------------------------------------------------------------------------
1 | %h2= t('activerecord.models.surcharge.other')
2 |
3 | %p= link_to((t :new), new_surcharge_path, :class => 'links')
4 |
5 | - @seasons.each do |s|
6 | %table.settlements.hotel
7 | %tr
8 | %th
9 | %b= s.name.upcase
10 | - @guest_types.each do |gt|
11 | %th
12 | = gt ? gt.name : t('surcharges.new.common_surcharge')
13 | - @surcharge_names.each do |n|
14 | - next unless n
15 | %tr
16 | %td= n
17 | - @guest_types.each do |gt|
18 | - gt_id = gt ? gt.id : nil
19 | - surcharge_object = @current_vendor.surcharges.existing.where(:season_id => s.id, :guest_type_id => gt_id, :name => n).first
20 | - if surcharge_object
21 | - amount = surcharge_object.amount
22 | %td{:class => "#{'highlighted' if amount.zero?}" }= link_to number_to_currency(amount), edit_surcharge_path(surcharge_object)
23 | - else
24 | %td -
25 |
--------------------------------------------------------------------------------
/salor-hospitality/app/assets/images/icons/cost_center.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
12 |
--------------------------------------------------------------------------------
/salor-hospitality/app/views/stocks/new.html.haml:
--------------------------------------------------------------------------------
1 | %h2= @stock.new_record? ? (t '.new_stock') : (t '.edit_stock')
2 |
3 | = error_messages_for 'stock'
4 |
5 | - form_for @stock do |stock_form|
6 | %table
7 | %tr
8 | %td= stock_form.label('name', Stock.human_attribute_name(:name))
9 | %td= stock_form.text_field :name, :size => '20'
10 | %tr
11 | %td= stock_form.label('balance', Stock.human_attribute_name(:balance))
12 | %td= stock_form.text_field :balance, :size => '10'
13 | %tr
14 | %td= stock_form.label('unit', Stock.human_attribute_name(:unit))
15 | %td
16 | %select{ :id => 'stock_unit', :name => 'stock[unit]' }
17 | = options_for_select MyGlobals::stock_units, @stock.unit
18 | %tr
19 | %td= stock_form.label('group', Group.model_name.human)
20 | %td= stock_form.collection_select :group_id, Group.find(:all), :id, :name, { :include_blank => true }
21 |
22 | %p= submit_tag( controller.action_name == 'new' ? (t :create) : (t :edit) )
23 |
--------------------------------------------------------------------------------
/salor-hospitality/vendor/assets/javascripts/jquery.ui.datepicker-en.js:
--------------------------------------------------------------------------------
1 | /* English/UK initialisation for the jQuery UI date picker plugin. */
2 | /* Written by Stuart. */
3 | jQuery(function($){
4 | $.datepicker.regional['en'] = {
5 | closeText: 'Done',
6 | prevText: 'Prev',
7 | nextText: 'Next',
8 | currentText: 'Today',
9 | monthNames: ['January','February','March','April','May','June',
10 | 'July','August','September','October','November','December'],
11 | monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
12 | 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
13 | dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
14 | dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
15 | dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'],
16 | weekHeader: 'Wk',
17 | dateFormat: 'yy-mm-dd',
18 | firstDay: 1,
19 | isRTL: false,
20 | showMonthAfterYear: false,
21 | yearSuffix: ''};
22 | $.datepicker.setDefaults($.datepicker.regional['en']);
23 | });
24 |
--------------------------------------------------------------------------------
/salor-hospitality/vendor/assets/javascripts/jquery.ui.datepicker-tr.js:
--------------------------------------------------------------------------------
1 | /* Turkish initialisation for the jQuery UI date picker plugin. */
2 | /* Written by Izzet Emre Erkan (kara@karalamalar.net). */
3 | jQuery(function($){
4 | $.datepicker.regional['tr'] = {
5 | closeText: 'kapat',
6 | prevText: '<geri',
7 | nextText: 'ileri>',
8 | currentText: 'bugün',
9 | monthNames: ['Ocak','Şubat','Mart','Nisan','Mayıs','Haziran',
10 | 'Temmuz','Ağustos','Eylül','Ekim','Kasım','Aralık'],
11 | monthNamesShort: ['Oca','Şub','Mar','Nis','May','Haz',
12 | 'Tem','Ağu','Eyl','Eki','Kas','Ara'],
13 | dayNames: ['Pazar','Pazartesi','Salı','Çarşamba','Perşembe','Cuma','Cumartesi'],
14 | dayNamesShort: ['Pz','Pt','Sa','Ça','Pe','Cu','Ct'],
15 | dayNamesMin: ['Pz','Pt','Sa','Ça','Pe','Cu','Ct'],
16 | weekHeader: 'Hf',
17 | dateFormat: 'yy-mm-dd',
18 | firstDay: 1,
19 | isRTL: false,
20 | showMonthAfterYear: false,
21 | yearSuffix: ''};
22 | $.datepicker.setDefaults($.datepicker.regional['tr']);
23 | });
24 |
--------------------------------------------------------------------------------
/salor-hospitality/app/views/stocks/index.html.haml:
--------------------------------------------------------------------------------
1 | %h2= t('activerecord.models.stock.other')
2 |
3 | %p= link_to((t :new), new_stock_path, :class => 'links') if @current_user.role >= 2
4 |
5 | %table
6 | %tr
7 | %th{ :style => 'width:200px' }= Stock.human_attribute_name(:name)
8 | %th{ :style => 'width:80px' }= Stock.human_attribute_name(:balance)
9 | %th{ :style => 'width:100px' }= Stock.human_attribute_name(:unit)
10 | %th{ :style => 'width:150px' }= Stock.human_attribute_name(:group)
11 | %th{ :style => 'width:120px' }
12 | %th{ :style => 'width:120px' }
13 | - @stocks.each do |st|
14 | %tr
15 | %td= st.name
16 | %td{ :style => 'text-align:right;padding-right:20px' }= number_with_precision st.balance
17 | %td= st.unit
18 | %td= Group.find(st.group_id).name if st.group_id?
19 | %td= link_to((t :edit), edit_stock_path(st)) if @current_user.role >= 2
20 | %td= link_to((t :delete), st, :confirm => (t :are_you_sure), :method => :delete) if @current_user.role >= 3
21 |
--------------------------------------------------------------------------------
/salor-hospitality/vendor/assets/javascripts/jquery.ui.datepicker-gn.js:
--------------------------------------------------------------------------------
1 | /* German initialisation for the jQuery UI date picker plugin. */
2 | /* Written by Milian Wolff (mail@milianw.de). */
3 | jQuery(function($){
4 | $.datepicker.regional['de'] = {
5 | closeText: 'schließen',
6 | prevText: '<zurück',
7 | nextText: 'Vor>',
8 | currentText: 'heute',
9 | monthNames: ['Januar','Februar','März','April','Mai','Juni',
10 | 'Juli','August','September','Oktober','November','Dezember'],
11 | monthNamesShort: ['Jan','Feb','Mär','Apr','Mai','Jun',
12 | 'Jul','Aug','Sep','Okt','Nov','Dez'],
13 | dayNames: ['Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag'],
14 | dayNamesShort: ['So','Mo','Di','Mi','Do','Fr','Sa'],
15 | dayNamesMin: ['So','Mo','Di','Mi','Do','Fr','Sa'],
16 | weekHeader: 'Wo',
17 | dateFormat: 'yy-mm-dd',
18 | firstDay: 1,
19 | isRTL: false,
20 | showMonthAfterYear: false,
21 | yearSuffix: ''};
22 | $.datepicker.setDefaults($.datepicker.regional['de']);
23 | });
24 |
--------------------------------------------------------------------------------
/salor-hospitality/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Salor Hospitality",
3 | "icons": [
4 | {
5 | "src": "\/android-chrome-36x36.png?v=XBqOjd9jM8",
6 | "sizes": "36x36",
7 | "type": "image\/png",
8 | "density": "0.75"
9 | },
10 | {
11 | "src": "\/android-chrome-48x48.png?v=XBqOjd9jM8",
12 | "sizes": "48x48",
13 | "type": "image\/png",
14 | "density": "1.0"
15 | },
16 | {
17 | "src": "\/android-chrome-72x72.png?v=XBqOjd9jM8",
18 | "sizes": "72x72",
19 | "type": "image\/png",
20 | "density": "1.5"
21 | },
22 | {
23 | "src": "\/android-chrome-96x96.png?v=XBqOjd9jM8",
24 | "sizes": "96x96",
25 | "type": "image\/png",
26 | "density": "2.0"
27 | },
28 | {
29 | "src": "\/android-chrome-144x144.png?v=XBqOjd9jM8",
30 | "sizes": "144x144",
31 | "type": "image\/png",
32 | "density": "3.0"
33 | },
34 | {
35 | "src": "\/android-chrome-192x192.png?v=XBqOjd9jM8",
36 | "sizes": "192x192",
37 | "type": "image\/png",
38 | "density": "4.0"
39 | }
40 | ]
41 | }
42 |
--------------------------------------------------------------------------------
/salor-hospitality/vendor/assets/javascripts/jquery.ui.datepicker-ru.js:
--------------------------------------------------------------------------------
1 | /* Russian (UTF-8) initialisation for the jQuery UI date picker plugin. */
2 | /* Written by Andrew Stromnov (stromnov@gmail.com). */
3 | jQuery(function($){
4 | $.datepicker.regional['ru'] = {
5 | closeText: 'Закрыть',
6 | prevText: '<Пред',
7 | nextText: 'След>',
8 | currentText: 'Сегодня',
9 | monthNames: ['Январь','Февраль','Март','Апрель','Май','Июнь',
10 | 'Июль','Август','Сентябрь','Октябрь','Ноябрь','Декабрь'],
11 | monthNamesShort: ['Янв','Фев','Мар','Апр','Май','Июн',
12 | 'Июл','Авг','Сен','Окт','Ноя','Дек'],
13 | dayNames: ['воскресенье','понедельник','вторник','среда','четверг','пятница','суббота'],
14 | dayNamesShort: ['вск','пнд','втр','срд','чтв','птн','сбт'],
15 | dayNamesMin: ['Вс','Пн','Вт','Ср','Чт','Пт','Сб'],
16 | weekHeader: 'Не',
17 | dateFormat: 'yy-mm-dd',
18 | firstDay: 1,
19 | isRTL: false,
20 | showMonthAfterYear: false,
21 | yearSuffix: ''};
22 | $.datepicker.setDefaults($.datepicker.regional['ru']);
23 | });
24 |
--------------------------------------------------------------------------------
/salor-hospitality/vendor/assets/javascripts/jquery.ui.datepicker-pl.js:
--------------------------------------------------------------------------------
1 | /* Polish initialisation for the jQuery UI date picker plugin. */
2 | /* Written by Jacek Wysocki (jacek.wysocki@gmail.com). */
3 | jQuery(function($){
4 | $.datepicker.regional['pl'] = {
5 | closeText: 'Zamknij',
6 | prevText: '<Poprzedni',
7 | nextText: 'Następny>',
8 | currentText: 'Dziś',
9 | monthNames: ['Styczeń','Luty','Marzec','Kwiecień','Maj','Czerwiec',
10 | 'Lipiec','Sierpień','Wrzesień','Październik','Listopad','Grudzień'],
11 | monthNamesShort: ['Sty','Lu','Mar','Kw','Maj','Cze',
12 | 'Lip','Sie','Wrz','Pa','Lis','Gru'],
13 | dayNames: ['Niedziela','Poniedzialek','Wtorek','Środa','Czwartek','Piątek','Sobota'],
14 | dayNamesShort: ['Nie','Pn','Wt','Śr','Czw','Pt','So'],
15 | dayNamesMin: ['N','Pn','Wt','Śr','Cz','Pt','So'],
16 | weekHeader: 'Tydz',
17 | dateFormat: 'yy-mm-dd',
18 | firstDay: 1,
19 | isRTL: false,
20 | showMonthAfterYear: false,
21 | yearSuffix: ''};
22 | $.datepicker.setDefaults($.datepicker.regional['pl']);
23 | });
24 |
--------------------------------------------------------------------------------
/salor-hospitality/app/views/roles/index.html.haml:
--------------------------------------------------------------------------------
1 | %h2= t('activerecord.models.role.other')
2 |
3 | %p= link_to((t :new), new_role_path, :class => 'links')
4 |
5 | %table
6 | %tr
7 | %th{:style => "width: 120px"}= Role.human_attribute_name :name
8 | %th{:style => "width: 100px; text-align: center"}= Role.human_attribute_name :weight
9 | %th= t "activerecord.models.user.other"
10 | %th
11 | %tr
12 | - @roles.each do |r|
13 | %tr
14 | %td= link_to r.name, edit_role_path(r), :class => "list_item"
15 | %td{:style => "text-align: center" }= r.weight
16 | %td= r.users.existing.collect { |u| u.login }.join(", ")
17 | %td
18 | - if @current_company.users.existing.where(:role_id => r.id).any?
19 | = image_tag 'button_small_delete.png'
20 | - else
21 | = link_to(image_tag('button_small_delete.png', :title => Role.human_attribute_name(:hidden), :alt => Role.human_attribute_name(:hidden), :style => "vertical-align:bottom;padding-top:5px;"), role_path(r), :method => :delete, :confirm => t(:are_you_sure))
22 |
--------------------------------------------------------------------------------
/salor-hospitality/vendor/assets/javascripts/jquery.ui.datepicker-fr.js:
--------------------------------------------------------------------------------
1 | /* French initialisation for the jQuery UI date picker plugin. */
2 | /* Written by Keith Wood (kbwood{at}iinet.com.au) and Stéphane Nahmani (sholby@sholby.net). */
3 | jQuery(function($){
4 | $.datepicker.regional['fr'] = {
5 | closeText: 'Fermer',
6 | prevText: '<Préc',
7 | nextText: 'Suiv>',
8 | currentText: 'Courant',
9 | monthNames: ['Janvier','Février','Mars','Avril','Mai','Juin',
10 | 'Juillet','Août','Septembre','Octobre','Novembre','Décembre'],
11 | monthNamesShort: ['Jan','Fév','Mar','Avr','Mai','Jun',
12 | 'Jul','Aoû','Sep','Oct','Nov','Déc'],
13 | dayNames: ['Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi'],
14 | dayNamesShort: ['Dim','Lun','Mar','Mer','Jeu','Ven','Sam'],
15 | dayNamesMin: ['Di','Lu','Ma','Me','Je','Ve','Sa'],
16 | weekHeader: 'Sm',
17 | dateFormat: 'yy-mm-dd',
18 | firstDay: 1,
19 | isRTL: false,
20 | showMonthAfterYear: false,
21 | yearSuffix: ''};
22 | $.datepicker.setDefaults($.datepicker.regional['fr']);
23 | });
24 |
--------------------------------------------------------------------------------
/salor-hospitality/app/views/users/_logins_table.html.haml:
--------------------------------------------------------------------------------
1 | #user_logins
2 | %table
3 | %tr
4 | %th
5 | %th
6 | %th= UserLogin.human_attribute_name(:duration)
7 | - duration_sum = 0
8 | - user_logins.each do |ul|
9 | - duration_sum += ul.duration if ul.logout
10 | %tr{ :class => "#{ 'total' if ul.logout }" }
11 | %td.left= ul.login ? "#{ UserLogin.human_attribute_name(:login) } ▶" : "◁ #{ UserLogin.human_attribute_name(:logout) }"
12 | %td= l((ul.login ? ul.login: ul.logout), :format => :long)
13 | %td= UserLogin.duration_formatted(ul.duration.to_i) if ul.logout
14 | - if ul == last_login and ul.logout.nil?
15 | %tr.total{ :style => 'color:green' }
16 | %td
17 | %td== #{ t '.on_duty' }...
18 | - on_duty_mins = (Time.now - ul.login).to_i / 60
19 | - duration_sum += on_duty_mins
20 | %td= UserLogin.duration_formatted(on_duty_mins)
21 | %tr
22 | %td
23 | %td
24 | %td{ :style => "font-size: 150%" }= UserLogin.duration_formatted(duration_sum)
--------------------------------------------------------------------------------
/salor-hospitality/vendor/assets/javascripts/jquery.ui.datepicker-es.js:
--------------------------------------------------------------------------------
1 | /* Inicialización en español para la extensión 'UI date picker' para jQuery. */
2 | /* Traducido por Vester (xvester@gmail.com). */
3 | jQuery(function($){
4 | $.datepicker.regional['es'] = {
5 | closeText: 'Cerrar',
6 | prevText: '<Ant',
7 | nextText: 'Sig>',
8 | currentText: 'Hoy',
9 | monthNames: ['Enero','Febrero','Marzo','Abril','Mayo','Junio',
10 | 'Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre'],
11 | monthNamesShort: ['Ene','Feb','Mar','Abr','May','Jun',
12 | 'Jul','Ago','Sep','Oct','Nov','Dic'],
13 | dayNames: ['Domingo','Lunes','Martes','Miércoles','Jueves','Viernes','Sábado'],
14 | dayNamesShort: ['Dom','Lun','Mar','Mié','Juv','Vie','Sáb'],
15 | dayNamesMin: ['Do','Lu','Ma','Mi','Ju','Vi','Sá'],
16 | weekHeader: 'Sm',
17 | dateFormat: 'yy-mm-dd',
18 | firstDay: 1,
19 | isRTL: false,
20 | showMonthAfterYear: false,
21 | yearSuffix: ''};
22 | $.datepicker.setDefaults($.datepicker.regional['es']);
23 | });
24 |
--------------------------------------------------------------------------------
/salor-hospitality/vendor/assets/javascripts/jquery.ui.datepicker-it.js:
--------------------------------------------------------------------------------
1 | /* Italian initialisation for the jQuery UI date picker plugin. */
2 | /* Written by Antonello Pasella (antonello.pasella@gmail.com). */
3 | jQuery(function($){
4 | $.datepicker.regional['it'] = {
5 | closeText: 'Chiudi',
6 | prevText: '<Prec',
7 | nextText: 'Succ>',
8 | currentText: 'Oggi',
9 | monthNames: ['Gennaio','Febbraio','Marzo','Aprile','Maggio','Giugno',
10 | 'Luglio','Agosto','Settembre','Ottobre','Novembre','Dicembre'],
11 | monthNamesShort: ['Gen','Feb','Mar','Apr','Mag','Giu',
12 | 'Lug','Ago','Set','Ott','Nov','Dic'],
13 | dayNames: ['Domenica','Lunedì','Martedì','Mercoledì','Giovedì','Venerdì','Sabato'],
14 | dayNamesShort: ['Dom','Lun','Mar','Mer','Gio','Ven','Sab'],
15 | dayNamesMin: ['Do','Lu','Ma','Me','Gi','Ve','Sa'],
16 | weekHeader: 'Sm',
17 | dateFormat: 'yy-mm-dd',
18 | firstDay: 1,
19 | isRTL: false,
20 | showMonthAfterYear: false,
21 | yearSuffix: ''};
22 | $.datepicker.setDefaults($.datepicker.regional['it']);
23 | });
24 |
--------------------------------------------------------------------------------
/salor-hospitality/app/views/cost_centers/new.html.haml:
--------------------------------------------------------------------------------
1 | %h2= @cost_center.new_record? ? (t '.new_cost_center') : (t '.edit_cost_center')
2 |
3 | - if @cost_center.errors.any?
4 | .errors
5 | %h3= t 'activerecord.errors.template.header', :count => @cost_center.errors.size, :model => CostCenter.model_name.human
6 | %ul
7 | - @cost_center.errors.full_messages.each do |msg|
8 | %li= msg
9 |
10 | .form_fields
11 | = form_for @cost_center do |cost_center_form|
12 | = submit_tag( controller.action_name == 'new' ? (t :create) : (t :edit) )
13 | .floatright= link_to(t('various.cancel'), cost_centers_path, :class => 'links')
14 | .clear
15 | %table
16 | %tr
17 | %td= cost_center_form.label 'name'
18 | %td= cost_center_form.text_field :name, :size => '10'
19 | %tr
20 | %td= cost_center_form.label 'description'
21 | %td= cost_center_form.text_field :description, :size => '20'
22 | %tr
23 | %td= cost_center_form.label 'no_payment_methods'
24 | %td= cost_center_form.check_box :no_payment_methods
25 |
--------------------------------------------------------------------------------
/salor-hospitality/vendor/assets/javascripts/jquery.ui.datepicker-el.js:
--------------------------------------------------------------------------------
1 | /* Greek (el) initialisation for the jQuery UI date picker plugin. */
2 | /* Written by Alex Cicovic (http://www.alexcicovic.com) */
3 | jQuery(function($){
4 | $.datepicker.regional['el'] = {
5 | closeText: 'Κλείσιμο',
6 | prevText: 'Προηγούμενος',
7 | nextText: 'Επόμενος',
8 | currentText: 'Τρέχων Μήνας',
9 | monthNames: ['Ιανουάριος','Φεβρουάριος','Μάρτιος','Απρίλιος','Μάιος','Ιούνιος',
10 | 'Ιούλιος','Αύγουστος','Σεπτέμβριος','Οκτώβριος','Νοέμβριος','Δεκέμβριος'],
11 | monthNamesShort: ['Ιαν','Φεβ','Μαρ','Απρ','Μαι','Ιουν',
12 | 'Ιουλ','Αυγ','Σεπ','Οκτ','Νοε','Δεκ'],
13 | dayNames: ['Κυριακή','Δευτέρα','Τρίτη','Τετάρτη','Πέμπτη','Παρασκευή','Σάββατο'],
14 | dayNamesShort: ['Κυρ','Δευ','Τρι','Τετ','Πεμ','Παρ','Σαβ'],
15 | dayNamesMin: ['Κυ','Δε','Τρ','Τε','Πε','Πα','Σα'],
16 | weekHeader: 'Εβδ',
17 | dateFormat: 'yy-mm-dd',
18 | firstDay: 1,
19 | isRTL: false,
20 | showMonthAfterYear: false,
21 | yearSuffix: ''};
22 | $.datepicker.setDefaults($.datepicker.regional['el']);
23 | });
24 |
--------------------------------------------------------------------------------
/salor-hospitality/vendor/assets/javascripts/jquery.ui.datepicker-hu.js:
--------------------------------------------------------------------------------
1 | /* Hungarian initialisation for the jQuery UI date picker plugin. */
2 | /* Written by Istvan Karaszi (jquery@spam.raszi.hu). */
3 | jQuery(function($){
4 | $.datepicker.regional['hu'] = {
5 | closeText: 'bezárás',
6 | prevText: '« vissza',
7 | nextText: 'előre »',
8 | currentText: 'ma',
9 | monthNames: ['Január', 'Február', 'Március', 'Április', 'Május', 'Június',
10 | 'Július', 'Augusztus', 'Szeptember', 'Október', 'November', 'December'],
11 | monthNamesShort: ['Jan', 'Feb', 'Már', 'Ápr', 'Máj', 'Jún',
12 | 'Júl', 'Aug', 'Szep', 'Okt', 'Nov', 'Dec'],
13 | dayNames: ['Vasárnap', 'Hétfö', 'Kedd', 'Szerda', 'Csütörtök', 'Péntek', 'Szombat'],
14 | dayNamesShort: ['Vas', 'Hét', 'Ked', 'Sze', 'Csü', 'Pén', 'Szo'],
15 | dayNamesMin: ['V', 'H', 'K', 'Sze', 'Cs', 'P', 'Szo'],
16 | weekHeader: 'Hé',
17 | dateFormat: 'yy-mm-dd',
18 | firstDay: 1,
19 | isRTL: false,
20 | showMonthAfterYear: false,
21 | yearSuffix: ''};
22 | $.datepicker.setDefaults($.datepicker.regional['hu']);
23 | });
24 |
--------------------------------------------------------------------------------
/salor-hospitality/app/assets/javascripts/menucard_slideshow.js:
--------------------------------------------------------------------------------
1 | var ran_documentready_menucard_slideshow = false;
2 |
3 | $(function() {
4 | if (ran_documentready_menucard_slideshow) return;
5 |
6 | if (page_count == 1) {
7 | $('#page_' + page_ids[0]).fadeIn(1000);
8 | } else {
9 | // kick-off self-calling slide function
10 | show_page(0, page_count - 1);
11 | }
12 | ran_documentready_menucard_slideshow = true;
13 | })
14 |
15 | function show_page(idx, last_idx) {
16 | var time_fadein = 1000;
17 | var time_display = 6000;
18 |
19 | var page = $('#page_' + page_ids[idx]);
20 | page.css('z-index', 100);
21 | page.fadeIn(time_fadein, function() {
22 | var last_page = $('#page_' + page_ids[last_idx]);
23 | last_page.fadeOut(time_fadein, function() {
24 | page.css('z-index', 99);
25 | last_page.hide();
26 | });
27 |
28 | });
29 |
30 | if (idx == (page_count - 1)) {
31 | //wrap to first page
32 | next_idx = 0
33 | } else {
34 | next_idx = idx + 1;
35 | }
36 |
37 | setTimeout(function(){
38 | show_page(next_idx, idx);
39 | }, time_display);
40 | }
--------------------------------------------------------------------------------
/salor-hospitality/app/views/exception_notifier/exception_notification.text.erb:
--------------------------------------------------------------------------------
1 | <%= @exception.class.to_s =~ /^[aeiou]/i ? 'An' : 'A' %> <%= @exception.class %> occurred in <%= @kontroller.controller_name %>#<%= @kontroller.action_name %>:
2 |
3 | <%= raw @exception.message %>
4 | <%= raw @backtrace.first %>
5 |
6 | <%
7 | sections = @sections.map do |section|
8 | begin
9 | summary = render(section).strip
10 | unless summary.blank?
11 | title = render("title", :title => section).strip
12 | "#{title}\n\n#{summary.gsub(/^/, " ")}\n\n"
13 | end
14 |
15 | rescue Exception => e
16 | title = render("title", :title => section).strip
17 | summary = ["ERROR: Failed to generate exception summary:", [e.class.to_s, e.message].join(": "), e.backtrace && e.backtrace.join("\n")].compact.join("\n\n")
18 |
19 | [title, summary.gsub(/^/, " "), nil].join("\n\n")
20 | end
21 | end.join
22 | sections = sections.force_encoding('UTF-8').encode('UTF-16', :invalid => :replace).encode('UTF-8') if sections.respond_to?(:force_encoding)
23 | %>
24 |
25 | <%= raw sections %>
26 |
--------------------------------------------------------------------------------
/salor-hospitality/lib/escper/escper.rb:
--------------------------------------------------------------------------------
1 | require 'rmagick'
2 | require 'yaml'
3 | require 'timeout'
4 |
5 | dir = File.dirname(__FILE__)
6 | Dir[File.expand_path("#{dir}/escper/*.rb")].uniq.each do |file|
7 | require file
8 | end
9 |
10 | module Escper
11 | #mattr_accessor :codepage_file, :use_safe_device_path, :safe_device_path
12 |
13 | def self.codepage_file
14 | @@codepage_file
15 | end
16 |
17 | def self.codepage_file=(codepage_file)
18 | @@codepage_file = codepage_file
19 | end
20 |
21 | def self.use_safe_device_path
22 | @@use_safe_device_path
23 | end
24 |
25 | def self.use_safe_device_path=(use_safe_device_path)
26 | @@use_safe_device_path = use_safe_device_path
27 | end
28 |
29 | def self.safe_device_path
30 | @@safe_device_path
31 | end
32 |
33 | def self.safe_device_path=(safe_device_path)
34 | @@safe_device_path = safe_device_path
35 | end
36 |
37 | @@codepage_file = File.join(File.dirname(__FILE__), 'escper', 'codepages.yml')
38 | @@use_safe_device_path = false
39 | @@safe_device_path = File.join('/','tmp')
40 |
41 | def self.setup
42 | yield self
43 | end
44 | end
45 |
--------------------------------------------------------------------------------
/salor-hospitality/app/models/camera.rb:
--------------------------------------------------------------------------------
1 | class Camera < ActiveRecord::Base
2 | include Scope
3 | include Base
4 |
5 | belongs_to :vendor
6 | belongs_to :company
7 |
8 | validates_presence_of :name
9 | validates_presence_of :url_stream
10 | validates_presence_of :url_snapshot
11 | validates_presence_of :host_internal
12 | validates_presence_of :port
13 |
14 | def resource(ip, mode='stream')
15 | match = /^(.*?)\.(.*?)\..*/.match(ip)
16 | if match.length == 3
17 | space = match[0] + '.' + match[1]
18 | else
19 | return "blank.gif"
20 | end
21 | if match[1] == "192" or match[1] == "10" or match[1] == "127" or (match[1] == "172" and match[2].to_i >= 16)
22 | user_location = :internal
23 | else
24 | user_location = :external
25 | end
26 |
27 | url_method = "url_" + mode
28 | if user_location == :internal
29 | return "#{ self.host_internal }:#{ self.port }#{ self.send(url_method) }"
30 | elsif user_location == :external
31 | return "#{ self.host_external }:#{ self.port }#{ self.send(url_method) }"
32 | else
33 | return "blank.gif"
34 | end
35 | end
36 | end
37 |
--------------------------------------------------------------------------------
/salor-hospitality/app/assets/images/icons/surcharge.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
13 |
--------------------------------------------------------------------------------
/salor-hospitality/app/assets/stylesheets/iframe.sass:
--------------------------------------------------------------------------------
1 | body
2 | :font-size 85%
3 | :padding 0px
4 | :margin 0px
5 |
6 | div.partial
7 | :position absolute
8 |
9 | div.page
10 | :width 100%
11 | :height 100%
12 | :background-repeat no-repeat
13 | :position absolute
14 | :display none
15 | :float left
16 | img
17 | :-moz-box-shadow 0px 0px 8px black
18 | :-moz-border-radius 10px
19 | :-webkit-box-shadow 0px 0px 8px black
20 | :-webkit-border-radius 10px
21 | span
22 | :display inline-block
23 | :background-repeat no-repeat
24 | span.dmc_button
25 | :display none
26 |
27 | div.previous_page_button,
28 | div.next_page_button
29 | :float left
30 | :height 400px
31 | :width 50px
32 | :margin 0 10px
33 |
34 | div.previous_page_button a,
35 | div.next_page_button a
36 | :color black
37 | :display block
38 | :height 400px
39 | :width 50px
40 | :background-repeat no-repeat
41 | :background-position center center
42 |
43 | div.next_page_button a
44 | :background-image url('/images/arrow_page_right.png')
45 |
46 | div.previous_page_button a
47 | :background-image url('/images/arrow_page_left.png')
48 |
--------------------------------------------------------------------------------
/salor-hospitality/app/views/orders/render_order_form.js.erb:
--------------------------------------------------------------------------------
1 | //views/render_order_form.js.erb
2 | <% if @order %>
3 | items_json = <%= raw @order.items_to_json %>;
4 | submit_json.id = <%= @order.id %>;
5 |
6 | $('#order_info').html('<%= escape_javascript Order.model_name.human %> ID <%= @order.id %> <%= escape_javascript @order.table.name %> (<%= escape_javascript @order.user_login %>) <%= escape_javascript @order.customer.full_name if @order.customer %>');
7 |
8 | $('#order_info_bottom').html('<%= escape_javascript Order.model_name.human %> ID <%= @order.id %> <%= escape_javascript @order.table.name %> (<%= escape_javascript @order.user_login %>) <%= escape_javascript @order.customer.full_name if @order.customer %>');
9 |
10 | $('#order_note').val('<%= escape_javascript @order.note %>');
11 |
12 | $('#order_sum').val('<%= number_with_precision(@order.sum, :precision => 2) %>');
13 |
14 | <% else %>
15 | $('#order_info').html('<%= escape_javascript t('orders.order.new') %> <%= escape_javascript @table.name %>');
16 |
17 | $('#order_info_bottom').html('<%= escape_javascript t('orders.order.new') %> <%= escape_javascript @table.name %>');
18 | <% end %>
--------------------------------------------------------------------------------
/salor-hospitality/lib/escper/escper/vendor_printer.rb:
--------------------------------------------------------------------------------
1 | module Escper
2 | class VendorPrinter
3 |
4 | def initialize(attrs)
5 | @name = attrs[:name]
6 | @path = attrs[:path]
7 | @copies = attrs[:copies]
8 | @codepage = attrs[:codepage]
9 | @baudrate = attrs[:baudrate]
10 | @baudrate ||= 9600
11 | @id = attrs[:id]
12 | end
13 |
14 | def name
15 | @name
16 | end
17 |
18 | def name=(name)
19 | @name = name
20 | end
21 |
22 | def path
23 | @path
24 | end
25 |
26 | def path=(path)
27 | @path = path
28 | end
29 |
30 | def copies
31 | @copies
32 | end
33 |
34 | def copies=(copies)
35 | @copies = copies
36 | end
37 |
38 | def codepage
39 | @codepage
40 | end
41 |
42 | def codepage=(codepage)
43 | @codepage = codepage
44 | end
45 |
46 | def baudrate
47 | @baudrate
48 | end
49 |
50 | def baudrate=(baudrate)
51 | @baudrate = baudrate
52 | end
53 |
54 | def id
55 | @id
56 | end
57 |
58 | def id=(id)
59 | @id = id
60 | end
61 | end
62 | end
--------------------------------------------------------------------------------
/debian/salor-hospitality.templates:
--------------------------------------------------------------------------------
1 | Template: salor-hospitality/old-instances
2 | Type: string
3 | Description: Salor Hospitality instances to be deconfigured:
4 | Configuration files for these instances will be removed.
5 | .
6 | Database (de)configuration will be asked accordingly.
7 |
8 | Template: salor-hospitality/current-instances
9 | Type: string
10 | Default: default
11 | Description: Salor Hospitality instances to be configured or upgraded:
12 | Space-separated list of instances identifiers.
13 | .
14 | Each instance has its configuration files in /etc/salor-hospitality/
9 | <%= @exception.class.to_s =~ /^[aeiou]/i ? 'An' : 'A' %> <%= @exception.class %> occurred in <%= @kontroller.controller_name %>#<%= @kontroller.action_name %>:
10 |
11 | <%= raw @exception.message %>
12 | <%= raw @backtrace.first %>
13 |
14 | <%
15 | sections = @sections.map do |section|
16 | begin
17 | summary = render(section).strip
18 | unless summary.blank?
19 | title = render("title", :title => section).strip
20 | "#{title}\n\n#{summary.gsub(/^/, " ")}\n\n"
21 | end
22 |
23 | rescue Exception => e
24 | title = render("title", :title => section).strip
25 | summary = ["ERROR: Failed to generate exception summary:", [e.class.to_s, e.message].join(": "), e.backtrace && e.backtrace.join("\n")].compact.join("\n\n")
26 |
27 | [title, summary.gsub(/^/, " "), nil].join("\n\n")
28 | end
29 | end.join
30 | sections = sections.force_encoding('UTF-8').encode('UTF-16', :invalid => :replace).encode('UTF-8') if sections.respond_to?(:force_encoding)
31 | %>
32 |
33 | <%= raw sections %>
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/salor-hospitality/app/assets/javascripts/translations.js:
--------------------------------------------------------------------------------
1 | function render_translation_inputs(depth, ancestor_keys, tree, el) {
2 | $.each(tree, function(k,v) {
3 | if (typeof v == 'object') {
4 | var li = $(document.createElement('li'));
5 | li.html(k);
6 | el.append(li);
7 | var ul = $(document.createElement('ul'));
8 | el.append(ul);
9 | ancestor_keys.push(k);
10 | render_translation_inputs(depth+1, ancestor_keys, v, ul);
11 | ancestor_keys.pop();
12 | } else {
13 | var li = $(document.createElement('li'));
14 | var keyspan = $(document.createElement('span'));
15 | keyspan.html(k);
16 |
17 | var valinput = $(document.createElement('input'));
18 | valinput.attr('ancestor_keys', ancestor_keys + ',' + k);
19 | valinput.val(v);
20 | valinput.on('change', function(){
21 | submit_translation($(this));
22 | })
23 | valinput.on('click', function(){
24 | $(this).css('background-color', 'white');
25 | })
26 |
27 | li.append(keyspan);
28 | li.append(valinput);
29 | el.append(li);
30 | }
31 | })
32 | }
33 |
34 | function submit_translation(el) {
35 | el.css('background-color', '#99FF99');
36 | $.ajax({
37 | type: 'put',
38 | url: '/translations/set',
39 | data: {k:el.attr('ancestor_keys'), v:el.val(), f:translation_file}
40 | })
41 | }
--------------------------------------------------------------------------------
/salor-hospitality/app/assets/images/icons/statistic.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
16 |
--------------------------------------------------------------------------------
/salor-hospitality/app/helpers/vendors_helper.rb:
--------------------------------------------------------------------------------
1 | # coding: UTF-8
2 |
3 | # Copyright (c) 2012 Red (E) Tools Ltd.
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6 | #
7 | # The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8 | #
9 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
10 |
11 | module VendorsHelper
12 |
13 | def get_print_button_filename_array
14 | [
15 | [t('.chef'), 'chef'],
16 | [t('.foods'), 'foods'],
17 | [t('.bar'), 'bar'],
18 | [t('.tables'), 'tables']
19 | ]
20 | end
21 | end
22 |
--------------------------------------------------------------------------------
/salor-hospitality/app/assets/javascripts/application.js:
--------------------------------------------------------------------------------
1 | // This is a manifest file that'll be compiled into including all the files listed below.
2 | // Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
3 | // be included in the compiled file accessible from http://example.com/assets/application.js
4 | // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
5 | // the compiled file.
6 | //
7 | //= require jquery
8 | //= require jquery.ui.all
9 | //= require jquery_ujs
10 | //= require colpick
11 | //= require ajax
12 | //= require articles
13 | //= require audio
14 | //= require autocompletable
15 | //= require categories
16 | //= require customers
17 | //= require dates
18 | //= require debug
19 | //= require dom-switching
20 | //= require draw
21 | //= require globals
22 | //= require hooks
23 | //= require intervals
24 | //= require item-notifications
25 | //= require items
26 | //= require jquery-data
27 | //= require json
28 | //= require keyboard
29 | //= require math
30 | //= require numbers
31 | //= require options
32 | //= require page
33 | //= require payment-methods
34 | //= require quantities
35 | //= require queue
36 | //= require resources
37 | //= require route
38 | //= require scrolling
39 | //= require split-item
40 | //= require tables
41 | //= require ui-helpers
42 | //= require ui-widgets
43 | //= require various
44 |
--------------------------------------------------------------------------------
/salor-hospitality/app/views/orders/_order_form.html.haml:
--------------------------------------------------------------------------------
1 | %h3
2 | - if permit('order_notes')
3 | %span#order_info{ :onclick => '$("#note_for_order").slideDown()'}= t :just_order
4 | - else
5 | %span#order_info= t :just_order
6 |
7 | #note_for_order= render 'note'
8 |
9 | - unless @current_customer
10 | #tablesselect
11 | %h3= t :move_order_to_table
12 | %span.done{ :onclick => "close_table_div();" }
13 | #tablesselect_container
14 |
15 | - if workstation? and not @current_customer
16 | #usersselect
17 | %h3= t('roles.new.assign_order_to_user')
18 | %span.done{ :onclick => "$('#usersselect').slideUp();" }
19 | - @users.each do |u|
20 | %span.option{ :onclick => "submit_json.model.user_id = #{ u.id}; $('#usersselect').slideUp();" }== #{ u.login }
21 |
22 | #categories
23 | - @categories.existing.active.positioned.each do |category|
24 | .category{ :id => "category_#{ category.id }", :class => category.name.delete(' '), :style => "background-color: #{category.color}; background-image: url('#{category.icon_path}')", :onclick => "category_onmousedown(#{ category.id }, this)" }
25 | %div{ :class => "category_label" }
26 | %span= category.name
27 |
28 | #articles
29 |
30 | #items
31 | .ordersum_container
32 | - if workstation?
33 | %input#sku_input
34 | %span#order_sum
35 |
36 | %table#itemstable
37 |
38 | %h3
39 | %span#order_info_bottom
--------------------------------------------------------------------------------
/debian/salor-hospitality.install:
--------------------------------------------------------------------------------
1 | salor-hospitality/app /usr/share/salor-hospitality/source
2 | salor-hospitality/config /usr/share/salor-hospitality/source
3 | salor-hospitality/lib /usr/share/salor-hospitality/source
4 | salor-hospitality/script /usr/share/salor-hospitality/source
5 |
6 | salor-hospitality/public/*.* /usr/share/salor-hospitality/source/public
7 | salor-hospitality/public/fonts /usr/share/salor-hospitality/source/public
8 | salor-hospitality/public/images /usr/share/salor-hospitality/source/public
9 |
10 | salor-hospitality/vendor/assets /usr/share/salor-hospitality/source/vendor
11 | salor-hospitality/vendor/cache /usr/share/salor-hospitality/source/vendor
12 |
13 | salor-hospitality/Gemfile /usr/share/salor-hospitality/source
14 | salor-hospitality/Gemfile.lock /usr/share/salor-hospitality/source
15 | salor-hospitality/Rakefile /usr/share/salor-hospitality/source
16 | salor-hospitality/config.ru /usr/share/salor-hospitality/source
17 |
18 | salor-hospitality/db/migrate /usr/share/salor-hospitality/source/db
19 | salor-hospitality/db/seeds.rb /usr/share/salor-hospitality/source/db
20 |
21 | debian/bin/salor-hospitality.desktop /usr/share/applications
22 | debian/bin/salor-hospitality /usr/bin
23 | salor-hospitality/app/assets/images/salor-hospitality-icon.svg /usr/share/icons/hicolor/scalable/apps
--------------------------------------------------------------------------------