Advertisement
Guest User

Untitled

a guest
Apr 13th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Rails 2.65 KB | None | 0 0
  1. = render 'header',
  2.   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')
  3.  
  4. .row
  5.   .col-lg-12
  6.     .ibox.float-e-margins
  7.       .ibox-content
  8.         = simple_form_for @search, url: @search_path, method: :get, wrapper: :vertical_form, html: { class: nil } do |f|
  9.           .row
  10.             .col-xs-12.col-sm-6
  11.               = f.input :companies_institution_id,
  12.                         as: :select,
  13.                         required: false,
  14.                         collection: current_user.companies_institutions,
  15.                         label: t('.filter.companies_institution'),
  16.                         include_blank: false
  17.             .col-xs-12.col-sm-6
  18.               = f.input :menu_id,
  19.                         as: :select,
  20.                         required: false,
  21.                         collection: current_user.menus,
  22.                         label: t('.filter.menu'),
  23.                         include_blank: false
  24.           .row#weeks_switch
  25.             = f.input :date, as: :hidden, input_html: { value: l(f.object.date, format: :with_dots) }
  26.             .col-sm-12.col-md-3
  27.               button.btn.btn-block.btn-success#prev_week
  28.                 span.fa.fa-angle-double-left
  29.                 = t('.prev_week')
  30.            
  31.             .col-sm-12.col-md-6.date-container
  32.               span
  33.            
  34.             .col-sm-12.col-md-3
  35.               button.btn.btn-block.btn-success#next_week
  36.                 = t('.next_week')
  37.                 span.fa.fa-angle-double-right
  38.  
  39. - if @menu_positions.size.zero?
  40.   .row  
  41.     .col-lg-12
  42.       .ibox.float-e-margins
  43.         .ibox-content
  44.           h4.text-center= t('.no_menu_positions')
  45. - else
  46.   .row
  47.     .col-lg-12
  48.       .ibox.float-e-margins
  49.         .ibox-content.inspinia-timeline
  50.           .row
  51.             .col-xs-12.text-center
  52.               h1= t('.menu')
  53.           - @menu_positions.each do |menu_position|
  54.             .timeline-item
  55.               .row
  56.                 .col-xs-2.date
  57.                   = l(menu_position.date, format: '%A')
  58.                   .text-navy
  59.                     = l(menu_position.date, format: '%d %B')
  60.                 .col-xs-10.content
  61.                   - menu_position.menu_position_recipes.each do |menu_position_recipe|
  62.                     div
  63.                       strong= menu_position_recipe.meal_type.name + ':'
  64.                       =< menu_position_recipe.recipes.map(&:name).join(', ')
  65.                       - allergens = menu_position_recipe.allergens
  66.                       =< "(#{allergens.join(', ')})" if allergens.present?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement