- require 'calendar_helper' - breadcrumb :time_table, @referential, @time_table - page_header_content_for @time_table - content_for :page_header_title, t('time_tables.show.title', name: @time_table.comment), flush: true - content_for :page_header_actions do - if policy(@time_table).edit? = link_to(t('actions.edit'), edit_referential_time_table_path(@referential, @time_table), class: 'btn btn-default') - content_for :page_header_content do .row.mb-sm .col-lg-12.text-right - @time_table.action_links.each do |link| = link_to link.href, method: link.method, data: link.data, class: 'btn btn-primary' do = link.content .page_content .container-fluid .row .col-lg-6.col-md-6.col-sm-12.col-xs-12 = definition_list t('metadatas'), { "Période d'application" => (@time_table.bounding_dates.empty? ? '-' : t('bounding_dates', debut: l(@time_table.bounding_dates.min), end: l(@time_table.bounding_dates.max))), 'Couleur associée' => (@time_table.color.nil? ? '-' : content_tag(:span, '', class: 'fa fa-circle', style: "color:#{@time_table.try(:color)}")), 'Etiquettes' => @time_table.tag_list, 'Modèle de calendrier' => (@time_table.calendar ? link_to(@time_table.calendar.name, @time_table.calendar) : '-'), "Journées d'application pour les périodes ci-dessous" => %w(monday tuesday wednesday thursday friday saturday sunday).collect{ |d| content_tag(:span, t("calendars.days.#{d}"), class: "label label-default #{@time_table.send(d) ? '' : 'disabled'}") }.join.html_safe } .row .col-lg-12.mb-sm .pagination.pull-right = @year .page_links = link_to '', referential_time_table_path(@referential, @time_table, year: (@year - 1)), class: 'previous_page' = link_to '', referential_time_table_path(@referential, @time_table, year: (@year + 1)), class: 'next_page' = render 'show_time_table'