aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/lines/show.html.erb
blob: 668eaebdc754e8c84d2864d5420d05c0ed7fa1e3 (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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<%= title_tag t('lines.show.title', :line => @line.name ) %>

<div class="line_show">
  <%= @map.to_html %>

  <div class="summary">
    <p>
      <label><%= @line.human_attribute_name(:network) %>: </label>
  	<% if @line.network.nil? %>
  	   <%= t('lines.index.unset') %> 
  	<% else %>
      <%= link_to @line.network.name, [@referential, @line.network] %>
    <% end %>
    </p>
    <p>
      <label><%= @line.human_attribute_name(:company) %>: </label>
  	<% if @line.company.nil? %>
  	   <%= t('lines.index.unset') %>
  	<% else %>
      <%= link_to @line.company.name, [@referential, @line.company] %>
    <% end %>
    </p>
    <p>
      <label><%= @line.human_attribute_name("name") %>: </label>
      <%= @line.name %>
    </p>
    <p>
      <label><%= @line.human_attribute_name("published_name") %>: </label>
      <%= @line.published_name %>
    </p>
    <p>
      <label><%= @line.human_attribute_name("registration_number") %>: </label>
      <%= @line.registration_number %>
    </p>
    <p>
      <label><%= @line.human_attribute_name("number") %>: </label>
      <%= @line.number %>
    </p>
    <p>
      <label><%= @line.human_attribute_name("transport_mode_name") %>: </label>
      <%= t("transport_modes.label.#{@line.transport_mode}") %>
    </p>
    <p>
      <label><%= @line.human_attribute_name("comment") %>: </label>
      <%= @line.comment %>
    </p>
    <p>
      <label><%= @line.human_attribute_name("objectid") %>: </label>
      <%= @line.objectid %>
    </p>
  </div>
</div>

<p class="after_map" />
<h3 class="routes"><%= t('.itineraries') %></h3>

<div class="routes paginated_content">
  <%= render :partial => "routes/route", :collection => @routes %>
</div>

<% if @line.group_of_lines.any? %>
  <h3 class="line_group_of_lines"><%= t('.group_of_lines') %>
  </h3>
  <div class="group_of_lines_detail">
     <%= render :partial => "group_of_lines/group_of_line", :collection => @group_of_lines %>
  </div>
<% end %>

<% content_for :sidebar do %>
<ul class="actions">
  <li><%= link_to t('lines.actions.edit'), edit_referential_line_path(@referential, @line), :class => "edit" %></li>
  <li><%= link_to  t('lines.actions.destroy'), referential_line_path(@referential, @line), :method => :delete, :data => {:confirm =>  t('lines.actions.destroy_confirm')}, :class => "remove" %></li>
  <li><%= link_to t('routes.actions.new'), new_referential_line_route_path(@referential, @line), :class => "add" %></li> 
  <br>
</ul>
  <%= creation_tag(@line) %>
<% end %>