diff options
| author | Zakaria BOUZIANE | 2014-12-16 10:27:18 +0100 |
|---|---|---|
| committer | Zakaria BOUZIANE | 2014-12-16 10:27:18 +0100 |
| commit | ec4d6f38a6009b1b23d9a6fe7e9aa9294d098cbd (patch) | |
| tree | 3049ef8919c702c71c3faca7d090201d1e4ff03a | |
| parent | 070c2fae3b7a3fc32e87bdfc2404c1657d2ecd2b (diff) | |
| download | chouette-core-ec4d6f38a6009b1b23d9a6fe7e9aa9294d098cbd.tar.bz2 | |
Adding registration_number to GroupOfLine
| -rw-r--r-- | app/views/group_of_lines/_form.erb | 1 | ||||
| -rw-r--r-- | app/views/group_of_lines/show.html.erb | 4 | ||||
| -rw-r--r-- | config/locales/group_of_lines.yml | 2 | ||||
| -rw-r--r-- | db/migrate/20141216085004_add_registration_number_to_group_of_lines.ninoxe_engine.rb | 6 | ||||
| -rw-r--r-- | db/schema.rb | 5 |
5 files changed, 16 insertions, 2 deletions
diff --git a/app/views/group_of_lines/_form.erb b/app/views/group_of_lines/_form.erb index a0ef4a4c4..9482248b6 100644 --- a/app/views/group_of_lines/_form.erb +++ b/app/views/group_of_lines/_form.erb @@ -1,6 +1,7 @@ <%= semantic_form_for [@referential, @group_of_line] do |form| %> <%= form.inputs do %> <%= form.input :name %> + <%= form.input :registration_number %> <%= form.input :comment %> <%= form.input :objectid, :required => !@group_of_line.new_record?, :input_html => { :title => t("formtastic.titles.group_of_line.objectid")} %> <% end %> diff --git a/app/views/group_of_lines/show.html.erb b/app/views/group_of_lines/show.html.erb index 07527f209..3369f284d 100644 --- a/app/views/group_of_lines/show.html.erb +++ b/app/views/group_of_lines/show.html.erb @@ -4,6 +4,10 @@ <%= @map.to_html %> <div class="summary"> <p> + <label><%= @group_of_line.human_attribute_name("registration_number") %>: </label> + <%= @group_of_line.registration_number %> + </p> + <p> <label><%= @group_of_line.human_attribute_name("comment") %>: </label> <%= @group_of_line.comment %> </p> diff --git a/config/locales/group_of_lines.yml b/config/locales/group_of_lines.yml index 1f970d4f9..a573b2247 100644 --- a/config/locales/group_of_lines.yml +++ b/config/locales/group_of_lines.yml @@ -26,6 +26,7 @@ en: attributes: group_of_line: name: "Name" + registration_number: "Registration number" comment: "Comments" line_count: "Number of lines" objectid: "Neptune identifier" @@ -65,6 +66,7 @@ fr: attributes: group_of_line: name: "Nom" + registration_number: "Numéro d'enregistrement" comment: "Commentaire" line_count: "Nombre de lignes" objectid: "Identifiant Neptune" diff --git a/db/migrate/20141216085004_add_registration_number_to_group_of_lines.ninoxe_engine.rb b/db/migrate/20141216085004_add_registration_number_to_group_of_lines.ninoxe_engine.rb new file mode 100644 index 000000000..b2d05c6d6 --- /dev/null +++ b/db/migrate/20141216085004_add_registration_number_to_group_of_lines.ninoxe_engine.rb @@ -0,0 +1,6 @@ +# This migration comes from ninoxe_engine (originally 20141216084607) +class AddRegistrationNumberToGroupOfLines < ActiveRecord::Migration + def change + add_column :group_of_lines, :registration_number, :string + end +end diff --git a/db/schema.rb b/db/schema.rb index ba4a8fd52..ab6b71378 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20141210134214) do +ActiveRecord::Schema.define(:version => 20141216085004) do create_table "access_links", :force => true do |t| t.integer "access_point_id", :limit => 8 @@ -218,12 +218,13 @@ ActiveRecord::Schema.define(:version => 20141210134214) do end create_table "group_of_lines", :force => true do |t| - t.string "objectid", :null => false + t.string "objectid", :null => false t.integer "object_version" t.datetime "creation_time" t.string "creator_id" t.string "name" t.string "comment" + t.string "registration_number" end add_index "group_of_lines", ["objectid"], :name => "group_of_lines_objectid_key", :unique => true |
