Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- = render 'header',
- button: link_to(t('actions.print'), @pdf_path(params.slice(:search_menu_position).permit!.merge(format: :pdf)), class: 'btn-print margin-top-20 pull-right', target: '_blank')
- .row
- .col-lg-12
- .ibox.float-e-margins
- .ibox-content
- = simple_form_for @search, url: @search_path, method: :get, wrapper: :vertical_form, html: { class: nil } do |f|
- .row
- .col-xs-12.col-sm-6
- = f.input :companies_institution_id,
- as: :select,
- required: false,
- collection: current_user.companies_institutions,
- label: t('.filter.companies_institution'),
- include_blank: false
- .col-xs-12.col-sm-6
- = f.input :menu_id,
- as: :select,
- required: false,
- collection: current_user.menus,
- label: t('.filter.menu'),
- include_blank: false
- .row#weeks_switch
- = f.input :date, as: :hidden, input_html: { value: l(f.object.date, format: :with_dots) }
- .col-sm-12.col-md-3
- button.btn.btn-block.btn-success#prev_week
- span.fa.fa-angle-double-left
- = t('.prev_week')
- .col-sm-12.col-md-6.date-container
- span
- .col-sm-12.col-md-3
- button.btn.btn-block.btn-success#next_week
- = t('.next_week')
- span.fa.fa-angle-double-right
- - if @menu_positions.size.zero?
- .row
- .col-lg-12
- .ibox.float-e-margins
- .ibox-content
- h4.text-center= t('.no_menu_positions')
- - else
- .row
- .col-lg-12
- .ibox.float-e-margins
- .ibox-content.inspinia-timeline
- .row
- .col-xs-12.text-center
- h1= t('.menu')
- - @menu_positions.each do |menu_position|
- .timeline-item
- .row
- .col-xs-2.date
- = l(menu_position.date, format: '%A')
- .text-navy
- = l(menu_position.date, format: '%d %B')
- .col-xs-10.content
- - menu_position.menu_position_recipes.each do |menu_position_recipe|
- div
- strong= menu_position_recipe.meal_type.name + ':'
- =< menu_position_recipe.recipes.map(&:name).join(', ')
- - allergens = menu_position_recipe.allergens
- =< "(#{allergens.join(', ')})" if allergens.present?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement