aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/networks
diff options
context:
space:
mode:
authorLuc Donnet2012-02-20 22:44:44 +0100
committerLuc Donnet2012-02-20 22:44:44 +0100
commitda3e849d4d89ffa3de2d370a30d3d5531b50ea5b (patch)
tree26d0e12a135753d0acf4a59a7007006aac5e759a /app/views/networks
parenta0823f387ddea69b0f207ba35165fcfd13b169d3 (diff)
downloadchouette-core-da3e849d4d89ffa3de2d370a30d3d5531b50ea5b.tar.bz2
Add requests spec, Fix view
Diffstat (limited to 'app/views/networks')
-rw-r--r--app/views/networks/edit.html.erb2
-rw-r--r--app/views/networks/show.html.erb40
2 files changed, 19 insertions, 23 deletions
diff --git a/app/views/networks/edit.html.erb b/app/views/networks/edit.html.erb
index 90ffef291..b551690d6 100644
--- a/app/views/networks/edit.html.erb
+++ b/app/views/networks/edit.html.erb
@@ -1,3 +1,3 @@
-<%= title_tag t('networks.index.title'), {@line.name} %>
+<%= title_tag t('networks.edit.title', :network => @network.name) %>
<%= render "form" %>
diff --git a/app/views/networks/show.html.erb b/app/views/networks/show.html.erb
index 478d2f8aa..4fb8c3201 100644
--- a/app/views/networks/show.html.erb
+++ b/app/views/networks/show.html.erb
@@ -1,47 +1,43 @@
-<%= title_tag t('networks.show.title'), @line.name %>
+<%= title_tag t('networks.show.title', :network => @network.name )%>
-<div class="line_show">
+<div class="network_show">
<div class="summary">
<p>
- <label><%= Chouette::Line.human_attribute_name(:network) %>: </label>
- <%= @line.network.name if @line.network.present? %>
+ <label><%= Chouette::Network.human_attribute_name("registrationnumber") %>: </label>
+ <%= @network.registrationnumber %>
</p>
<p>
- <label><%= Chouette::Line.human_attribute_name("company") %>: </label>
- <%= @line.company.name if @line.company.present? %>
+ <label><%= Chouette::Network.human_attribute_name("name") %>: </label>
+ <%= @network.name %>
</p>
<p>
- <label><%= Chouette::Line.human_attribute_name("registrationnumber") %>: </label>
- <%= @line.registrationnumber %>
+ <label><%= Chouette::Network.human_attribute_name("comment") %>: </label>
+ <%= @network.comment %>
</p>
<p>
- <label><%= Chouette::Line.human_attribute_name("name") %>: </label>
- <%= @line.name %>
+ <label><%= Chouette::Network.human_attribute_name("version_date") %>: </label>
+ <%= @network.version_date %>
</p>
<p>
- <label><%= Chouette::Line.human_attribute_name("publishedname") %>: </label>
- <%= @line.publishedname %>
+ <label><%= Chouette::Network.human_attribute_name("description") %>: </label>
+ <%= @network.description %>
</p>
<p>
- <label><%= Chouette::Line.human_attribute_name("number") %>: </label>
- <%= @line.number %>
+ <label><%= Chouette::Network.human_attribute_name("source_name") %>: </label>
+ <%= @network.source_name %>
</p>
<p>
- <label><%= Chouette::Line.human_attribute_name("transportmodename") %>: </label>
- <%= @line.transportmodename %>
- </p>
- <p>
- <label><%= Chouette::Line.human_attribute_name("comment") %>: </label>
- <%= @line.comment %>
+ <label><%= Chouette::Network.human_attribute_name("source_identifier") %>: </label>
+ <%= @network.source_identifier %>
</p>
</div>
</div>
<% 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, :confirm => t('lines.actions.destroy_confirm'), :class => "remove" %></li>
+ <li><%= link_to t('networks.actions.edit'), edit_referential_network_path(@referential, @network), :class => "edit" %></li>
+ <li><%= link_to t('networks.actions.destroy'), referential_network_path(@referential, @network), :method => :delete, :confirm => t('networks.actions.destroy_confirm'), :class => "remove" %></li>
<br>
</ul>
<% end %>