42 lines
2.1 KiB
Plaintext
42 lines
2.1 KiB
Plaintext
- model_class = Section
|
|
.page-header= title :show, @section
|
|
|
|
.form-actions
|
|
= link_to t("helpers.links.back"), suppliers_sections_path, class: 'btn'
|
|
'
|
|
= link_to t('helpers.links.edit'), [:edit, :suppliers, @section], class: 'btn'
|
|
'
|
|
= link_to t("helpers.links.destroy"), [:suppliers, @section], method: :delete, data: {confirm: are_you_sure? }, class: 'btn btn-danger'
|
|
- content_for :row do
|
|
ul.nav.nav-pills
|
|
- for section in @section.supplier.sections
|
|
li class=(section == @section ? 'active' : nil) = link_to section.title, [:suppliers, section]
|
|
.span9
|
|
.well.section-tables-container.section-tables-active
|
|
- 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}
|
|
.pull-right.action-button-container
|
|
= link_to table.number, [:suppliers, table], class: 'btn btn-mini table-number'
|
|
.span3
|
|
h3= t('table.has_no_section')
|
|
.well.section-tables-container.section-tables-inactive
|
|
- for table in @section.supplier.non_placed_tables
|
|
.section-table{ id="section-table-#{table.id}" data-position-x=table.position_x data-position-y=table.position_y data-table-id=table.id}
|
|
.pull-right.action-button-container
|
|
button.btn.btn-primary.btn-mini onClick="Qsupplier.move_table_to_active_section('#{table.id}')" +
|
|
= link_to table.number, [:suppliers, table], class: 'btn btn-mini table-number'
|
|
.clearfix
|
|
- content_for :footer do
|
|
javascript:
|
|
var current_section_id = '#{@section.id}';
|
|
var current_section_width = #{@section.width};
|
|
var current_section_height = #{@section.height};
|
|
$(function(){
|
|
var active_section_container = $('.section-tables-active')
|
|
active_section_container.css('width', active_section_container.width()); // break fluid layout
|
|
active_section_container.css('height', #{@section.height/@section.width}*active_section_container.width());
|
|
active_section_container.find('.section-table').each(function(){
|
|
Qsupplier.position_table_in_active_section(active_section_container, $(this));
|
|
});
|
|
});
|