summaryrefslogtreecommitdiff
path: root/app/views/addresses
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2012-12-17 12:01:45 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2012-12-17 12:01:45 +0100
commitb80bd744ad873f6fc43018bc4bfb90677de167bd (patch)
tree072c4b0e33d442528555b82c415f5e7a1712b2b0 /app/views/addresses
parent3e706c2025ecc5523e81ad649639ef2ff75e7bac (diff)
Start of GS5.
Diffstat (limited to 'app/views/addresses')
-rw-r--r--app/views/addresses/_form.html.haml7
-rw-r--r--app/views/addresses/_form_core.html.haml9
-rw-r--r--app/views/addresses/_index_core.html.haml23
-rw-r--r--app/views/addresses/edit.html.haml9
-rw-r--r--app/views/addresses/index.html.haml6
-rw-r--r--app/views/addresses/new.html.haml3
-rw-r--r--app/views/addresses/show.html.haml28
7 files changed, 85 insertions, 0 deletions
diff --git a/app/views/addresses/_form.html.haml b/app/views/addresses/_form.html.haml
new file mode 100644
index 0000000..eff9930
--- /dev/null
+++ b/app/views/addresses/_form.html.haml
@@ -0,0 +1,7 @@
+= simple_form_for(@address) do |f|
+ = f.error_notification
+
+ = render "form_core", :f => f
+
+ .actions
+ = f.button :submit, conditional_t('addresses.form.submit') \ No newline at end of file
diff --git a/app/views/addresses/_form_core.html.haml b/app/views/addresses/_form_core.html.haml
new file mode 100644
index 0000000..f01ac1c
--- /dev/null
+++ b/app/views/addresses/_form_core.html.haml
@@ -0,0 +1,9 @@
+.inputs
+ = f.input :phone_book_entry_id, :label => t('addresses.form.phone_book_entry_id.label'), :hint => conditional_hint('addresses.form.phone_book_entry_id.hint')
+ = f.input :line1, :label => t('addresses.form.line1.label'), :hint => conditional_hint('addresses.form.line1.hint')
+ = f.input :line2, :label => t('addresses.form.line2.label'), :hint => conditional_hint('addresses.form.line2.hint')
+ = f.input :street, :label => t('addresses.form.street.label'), :hint => conditional_hint('addresses.form.street.hint')
+ = f.input :zip_code, :label => t('addresses.form.zip_code.label'), :hint => conditional_hint('addresses.form.zip_code.hint')
+ = f.input :city, :label => t('addresses.form.city.label'), :hint => conditional_hint('addresses.form.city.hint')
+ = f.input :country_id, :label => t('addresses.form.country_id.label'), :hint => conditional_hint('addresses.form.country_id.hint')
+ = f.input :position, :label => t('addresses.form.position.label'), :hint => conditional_hint('addresses.form.position.hint')
diff --git a/app/views/addresses/_index_core.html.haml b/app/views/addresses/_index_core.html.haml
new file mode 100644
index 0000000..2050ded
--- /dev/null
+++ b/app/views/addresses/_index_core.html.haml
@@ -0,0 +1,23 @@
+%table
+ %tr
+ %th= t('addresses.index.phone_book_entry_id')
+ %th= t('addresses.index.line1')
+ %th= t('addresses.index.line2')
+ %th= t('addresses.index.street')
+ %th= t('addresses.index.zip_code')
+ %th= t('addresses.index.city')
+ %th= t('addresses.index.country_id')
+ %th= t('addresses.index.position')
+
+ - reset_cycle
+ - for address in addresses
+ %tr{:class => cycle('odd', 'even')}
+ %td= address.phone_book_entry_id
+ %td= address.line1
+ %td= address.line2
+ %td= address.street
+ %td= address.zip_code
+ %td= address.city
+ %td= address.country_id
+ %td= address.position
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => address.phone_book_entry, :child => address} \ No newline at end of file
diff --git a/app/views/addresses/edit.html.haml b/app/views/addresses/edit.html.haml
new file mode 100644
index 0000000..3d85ae6
--- /dev/null
+++ b/app/views/addresses/edit.html.haml
@@ -0,0 +1,9 @@
+- title t("addresses.edit.page_title")
+
+= render "form"
+
+%p
+ - if can? :edit, @address
+ = link_to t('addresses.edit.actions.edit'), @address
+ |
+ = link_to t('addresses.edit.actions.view_all'), addresses_path
diff --git a/app/views/addresses/index.html.haml b/app/views/addresses/index.html.haml
new file mode 100644
index 0000000..ecebc65
--- /dev/null
+++ b/app/views/addresses/index.html.haml
@@ -0,0 +1,6 @@
+- title t("addresses.index.page_title")
+
+- if @addresses.count > 0
+ = render "index_core", :addresses => @addresses
+
+= render :partial => 'shared/create_link', :locals => {:child_class => Address} \ No newline at end of file
diff --git a/app/views/addresses/new.html.haml b/app/views/addresses/new.html.haml
new file mode 100644
index 0000000..280de55
--- /dev/null
+++ b/app/views/addresses/new.html.haml
@@ -0,0 +1,3 @@
+- title t("addresses.new.page_title")
+
+= render "form"
diff --git a/app/views/addresses/show.html.haml b/app/views/addresses/show.html.haml
new file mode 100644
index 0000000..211d020
--- /dev/null
+++ b/app/views/addresses/show.html.haml
@@ -0,0 +1,28 @@
+- title t("addresses.show.page_title")
+
+%p
+ %strong= t('addresses.show.phone_book_entry_id') + ":"
+ = @address.phone_book_entry_id
+%p
+ %strong= t('addresses.show.line1') + ":"
+ = @address.line1
+%p
+ %strong= t('addresses.show.line2') + ":"
+ = @address.line2
+%p
+ %strong= t('addresses.show.street') + ":"
+ = @address.street
+%p
+ %strong= t('addresses.show.zip_code') + ":"
+ = @address.zip_code
+%p
+ %strong= t('addresses.show.city') + ":"
+ = @address.city
+%p
+ %strong= t('addresses.show.country_id') + ":"
+ = @address.country_id
+%p
+ %strong= t('addresses.show.position') + ":"
+ = @address.position
+
+= render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @address } \ No newline at end of file