aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/lines/show.html.slim
blob: b16b6472a47bf301253e63defb1c9d28bf97e987 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/ PageHeader
= pageheader 'ligne',
             @line.name,
             'Lorem ipsum dolor sit amet',
             t('last_update', time: l(@line.updated_at, format: :short)) do

  / Below is secundary actions & optional contents
  .row
    .col-lg-12.text-right.mb-sm
      - @line.action_links.each do |link|
        = link_to link.href,
            method: link.method,
            data: link.data,
            class: 'btn btn-primary' do
              = link.content

/ PageContent
.page_content
  .container-fluid
    .row
      .col-lg-6.col-md-6.col-sm-12.col-xs-12
        = definition_list t('metadatas'),
          {  'ID Codif' => @line.objectid.local_id,
             'Activé' => (@line.deactivated? ? t('false') : t('true')),
             @line.human_attribute_name(:network) => (@line.network.nil? ? t('lines.index.unset') : @line.network.name),
             @line.human_attribute_name(:company) => (@line.company.nil? ? t('lines.index.unset') : @line.company.name),
             'Transporteur(s) secondaire(s)' => (@line.secondary_companies.nil? ? t('lines.index.unset') : @line.secondary_companies.collect(&:name).join(', ')),
             'Nom court' => @line.number,
             'Code public' => (@line.registration_number ? @line.registration_number : '-'),
             @line.human_attribute_name(:transport_mode) => (@line.transport_mode.present? ? t("enumerize.transport_mode.#{@line.transport_mode}") : '-'),
             @line.human_attribute_name(:transport_submode) => (@line.transport_submode.present? ? t("enumerize.transport_submode.#{@line.transport_submode}") : '-'),
             @line.human_attribute_name(:url) => (@line.url ? @line.url : '-'),
             @line.human_attribute_name(:seasonal) => (@line.seasonal? ? t('true') : t('false')),}