diff options
| author | Michel Etienne | 2012-03-20 11:59:27 +0100 |
|---|---|---|
| committer | Michel Etienne | 2012-03-20 11:59:27 +0100 |
| commit | 2011ee0247deede4a58dbdcc6f5c50146dedf584 (patch) | |
| tree | 01bf481ed549e7025b5de5416ed64eca513c25bf /app/views | |
| parent | 153c6f7022a608c6780b265d3b91c95829b192e4 (diff) | |
| download | chouette-core-2011ee0247deede4a58dbdcc6f5c50146dedf584.tar.bz2 | |
set conformance for line network and company screens with fields specifications
Diffstat (limited to 'app/views')
| -rw-r--r-- | app/views/companies/_company.erb | 5 | ||||
| -rw-r--r-- | app/views/companies/_form.erb | 10 | ||||
| -rw-r--r-- | app/views/companies/index.html.erb | 15 | ||||
| -rw-r--r-- | app/views/companies/show.html.erb | 16 | ||||
| -rw-r--r-- | app/views/networks/_form.erb | 8 | ||||
| -rw-r--r-- | app/views/networks/_network.erb | 5 | ||||
| -rw-r--r-- | app/views/networks/index.html.erb | 15 | ||||
| -rw-r--r-- | app/views/networks/show.html.erb | 4 |
8 files changed, 70 insertions, 8 deletions
diff --git a/app/views/companies/_company.erb b/app/views/companies/_company.erb index 9d4683414..34c65b798 100644 --- a/app/views/companies/_company.erb +++ b/app/views/companies/_company.erb @@ -1,6 +1,11 @@ <%= div_for(company) do %> <%= link_to company.name, [@referential, company] %> <div class="info"> + <%= company.human_attribute_name('code') %> <%= company.code %> + <div class="actions"> + <%= link_to t("actions.edit"), edit_referential_company_path(@referential, company), :class => "edit" %> | + <%= link_to t("actions.destroy"), referential_company_path(@referential, company), :method => :delete, :confirm => t('companies.actions.destroy_confirm'), :class => "remove" %> + </div> </div> <% end %> diff --git a/app/views/companies/_form.erb b/app/views/companies/_form.erb index 5e902bcec..bea95b0b4 100644 --- a/app/views/companies/_form.erb +++ b/app/views/companies/_form.erb @@ -1,7 +1,6 @@ <%= semantic_form_for [@referential, @company] do |form| %> <%= form.inputs do %> <%= form.input :name %> - <%= form.input :registration_number %> <%= form.input :short_name %> <%= form.input :organizational_unit %> <%= form.input :operating_department_name %> @@ -9,6 +8,15 @@ <%= form.input :phone, :as => :phone %> <%= form.input :fax, :as => :phone %> <%= form.input :email, :as => :email %> + <%= form.input :registration_number %> + <% if @company.new_record? %> + <%= form.input :objectid %> + <% else %> + <li> + <label><%= @company.human_attribute_name("objectid") %>: </label> + <%= @company.objectid %> + </li> + <% end %> <% end %> <%= form.buttons do %> diff --git a/app/views/companies/index.html.erb b/app/views/companies/index.html.erb index 09501d5bf..6b047b0ce 100644 --- a/app/views/companies/index.html.erb +++ b/app/views/companies/index.html.erb @@ -1,6 +1,19 @@ <%= title_tag t('companies.index.title') %> -<%= render :partial => "company", :collection => @companies %> +<%= search_form_for @q, :url => referential_companies_path(@referential), :html => {:method => :get} do |f| %> + <%= f.label :name_cont, "#{t('.name')} :" %> + <%= f.text_field :name_cont %> + + <%= f.submit t('actions.search') %> <%= t("or") %> + <%= link_to t("cancel"), referential_companies_path(@referential) %> +<% end %> + +<%#= will_paginate @companies %> +<div class="companies paginated_content"> + <%= render :partial => "company", :collection => @companies %> +</div> +<%= will_paginate @companies %> + <% content_for :sidebar do %> <ul class="actions"> diff --git a/app/views/companies/show.html.erb b/app/views/companies/show.html.erb index 4dd9e0a21..09a54e98b 100644 --- a/app/views/companies/show.html.erb +++ b/app/views/companies/show.html.erb @@ -4,10 +4,6 @@ <div class="summary"> <p> - <label><%= Chouette::Company.human_attribute_name("registration_number") %>: </label> - <%= @company.registration_number %> - </p> - <p> <label><%= Chouette::Company.human_attribute_name("name") %>: </label> <%= @company.name %> </p> @@ -24,6 +20,10 @@ <%= @company.operating_department_name %> </p> <p> + <label><%= Chouette::Company.human_attribute_name("code") %>: </label> + <%= @company.code %> + </p> + <p> <label><%= Chouette::Company.human_attribute_name("phone") %>: </label> <%= @company.phone %> </p> @@ -35,6 +35,14 @@ <label><%= Chouette::Company.human_attribute_name("email") %>: </label> <%= @company.email %> </p> + <p> + <label><%= Chouette::Company.human_attribute_name("registration_number") %>: </label> + <%= @company.registration_number %> + </p> + <p> + <label><%= Chouette::Company.human_attribute_name("objectid") %>: </label> + <%= @company.objectid %> + </p> </div> </div> diff --git a/app/views/networks/_form.erb b/app/views/networks/_form.erb index e81bc7ce8..3476e5031 100644 --- a/app/views/networks/_form.erb +++ b/app/views/networks/_form.erb @@ -7,6 +7,14 @@ <%= form.input :description %> <%= form.input :source_name %> <%= form.input :source_identifier %> + <% if @network.new_record? %> + <%= form.input :objectid %> + <% else %> + <li> + <label><%= @network.human_attribute_name("objectid") %>: </label> + <%= @network.objectid %> + </li> + <% end %> <% end %> <%= form.buttons do %> diff --git a/app/views/networks/_network.erb b/app/views/networks/_network.erb index 4adf6896b..f3a0b597e 100644 --- a/app/views/networks/_network.erb +++ b/app/views/networks/_network.erb @@ -1,6 +1,9 @@ <%= div_for(network) do %> <%= link_to network.name, [@referential, network] %> <div class="info"> - + <div class="actions"> + <%= link_to t("actions.edit"), edit_referential_network_path(@referential, network), :class => "edit" %> | + <%= link_to t("actions.destroy"), referential_network_path(@referential, network), :method => :delete, :confirm => t('networks.actions.destroy_confirm'), :class => "remove" %> + </div> </div> <% end %> diff --git a/app/views/networks/index.html.erb b/app/views/networks/index.html.erb index 3743a1865..96e4f8b0b 100644 --- a/app/views/networks/index.html.erb +++ b/app/views/networks/index.html.erb @@ -1,6 +1,19 @@ <%= title_tag t('networks.index.title') %> -<%= render :partial => "network", :collection => @networks %> +<%= search_form_for @q, :url => referential_networks_path(@referential), :html => {:method => :get} do |f| %> + <%= f.label :name_cont, "#{t('.name')} :" %> + <%= f.text_field :name_cont %> + + <%= f.submit t('actions.search') %> <%= t("or") %> + <%= link_to t("cancel"), referential_networks_path(@referential) %> +<% end %> + +<%#= will_paginate @networks %> +<div class="networks paginated_content"> + <%= render :partial => "network", :collection => @networks %> +</div> +<%= will_paginate @networks %> + <% content_for :sidebar do %> <ul class="actions"> diff --git a/app/views/networks/show.html.erb b/app/views/networks/show.html.erb index 489978f49..bd96938c5 100644 --- a/app/views/networks/show.html.erb +++ b/app/views/networks/show.html.erb @@ -31,6 +31,10 @@ <label><%= Chouette::Network.human_attribute_name("source_identifier") %>: </label> <%= @network.source_identifier %> </p> + <p> + <label><%= Chouette::Network.human_attribute_name("objectid") %>: </label> + <%= @network.objectid %> + </p> </div> </div> |
