- breadcrumb :purchase_windows, @referential .page_content .container-fluid - if params[:q].present? or @purchase_windows.any? .row .col-lg-12 = render 'filters' - if @purchase_windows.any? .row .col-lg-12 = table_builder_2 @purchase_windows, [ \ TableBuilderHelper::Column.new( \ key: :name, \ attribute: 'name', \ link_to: lambda do |purchase_window| \ referential_purchase_window_path(purchase_window.referential, purchase_window) \ end \ ), \ TableBuilderHelper::Column.new( \ key: :color, \ attribute: Proc.new { |tt| tt.color ? content_tag(:span, '', class: 'fa fa-circle', style: "color:#{tt.color}") : '-' }\ ), \ TableBuilderHelper::Column.new( \ key: :bounding_dates, \ attribute: Proc.new {|w| w.bounding_dates.nil? ? '-' : t('validity_range', debut: l(w.bounding_dates.begin, format: :short), end: l(w.bounding_dates.end, format: :short))}, \ sortable: false \ ) \ ], cls: 'table has-filter' = new_pagination @purchase_windows, 'pull-right' - unless @purchase_windows.any? .row.mt-xs .col-lg-12 = replacement_msg t('purchase_windows.search_no_results') = javascript_pack_tag 'date_filters'