diff --git a/app/assets/stylesheets/supplier/section_tables.css.sass b/app/assets/stylesheets/supplier/section_tables.css.sass index c7c91bd1..aee6723a 100644 --- a/app/assets/stylesheets/supplier/section_tables.css.sass +++ b/app/assets/stylesheets/supplier/section_tables.css.sass @@ -1,5 +1,7 @@ $table-width: 75px .section-tables-container + .section-title + font-size: 24px .section-table background-color: #ccc height: 44px diff --git a/app/views/supplier/home.html.slim b/app/views/supplier/home.html.slim index e63569d4..df11d3b5 100644 --- a/app/views/supplier/home.html.slim +++ b/app/views/supplier/home.html.slim @@ -1,4 +1,20 @@ .pull-right - = select_tag('current_section_selector', options_for_select([[current_supplier.name, '']] + current_supplier.sections.map{|s| ["- #{s.title}", s.id]}, params[:section_id])) + = select_tag('current_section_selector', options_for_select([[current_supplier.name, '']] + current_supplier.sections.map{|s| ["- #{s.title}", s.id]}, params[:section_id]), id: :section_selector) + a.icon-arrow-right.hide href=tables_view_suppliers_section_path('0000') = render template: 'supplier/active_lists' = render template: 'supplier/active_orders' +- content_for :footer do + javascript: + $(function(){ + $('#section_selector').change(function(){ + var el = $(this); + var linker = $(this).siblings('a'); + if(el.val()){ + linker.show(); + linker.attr('href', linker.attr('href').replace(/\/[^\/]+\/tables_view/, '/'+el.val()+'/tables_view')); + //linker.attr('href', linker.attr('href').replace(/\/[^\/]+(\.html?)$/, '/'+el.val()+'$1')); + }else{ + linker.hide(); + } + }).change(); + }); diff --git a/app/views/suppliers/sections/tables_view.html.slim b/app/views/suppliers/sections/tables_view.html.slim index 145976cb..8fda7ac4 100644 --- a/app/views/suppliers/sections/tables_view.html.slim +++ b/app/views/suppliers/sections/tables_view.html.slim @@ -2,6 +2,7 @@ - content_for :row do .span12 .well.section-tables-container.section-tables-active + .section-title.pull-right= @section.title - for table in @section.tables .section-table.hide{ id="section-table-#{table.id}" data-position-x=table.position_x data-position-y=table.position_y data-table-id=table.id} .table-number = link_to table.number, suppliers_table_path(table)