summaryrefslogtreecommitdiff
path: root/app/views/phone_models
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2012-12-17 12:05:14 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2012-12-17 12:05:14 +0100
commiteaad37485fe59d0306c37cc038dda6d210052910 (patch)
tree072c4b0e33d442528555b82c415f5e7a1712b2b0 /app/views/phone_models
parent3e706c2025ecc5523e81ad649639ef2ff75e7bac (diff)
parentb80bd744ad873f6fc43018bc4bfb90677de167bd (diff)
Merge branch 'develop'
Diffstat (limited to 'app/views/phone_models')
-rw-r--r--app/views/phone_models/_form.html.haml7
-rw-r--r--app/views/phone_models/_form_core.html.haml4
-rw-r--r--app/views/phone_models/_index_core.html.haml19
-rw-r--r--app/views/phone_models/edit.html.haml3
-rw-r--r--app/views/phone_models/index.html.haml6
-rw-r--r--app/views/phone_models/new.html.haml3
-rw-r--r--app/views/phone_models/show.html.haml18
7 files changed, 60 insertions, 0 deletions
diff --git a/app/views/phone_models/_form.html.haml b/app/views/phone_models/_form.html.haml
new file mode 100644
index 0000000..45c176f
--- /dev/null
+++ b/app/views/phone_models/_form.html.haml
@@ -0,0 +1,7 @@
+= simple_form_for([ @manufacturer, @phone_model ]) do |f|
+ = f.error_notification
+
+ = render "form_core", :f => f
+
+ .actions
+ = f.button :submit, conditional_t('phone_models.form.submit') \ No newline at end of file
diff --git a/app/views/phone_models/_form_core.html.haml b/app/views/phone_models/_form_core.html.haml
new file mode 100644
index 0000000..b406d6e
--- /dev/null
+++ b/app/views/phone_models/_form_core.html.haml
@@ -0,0 +1,4 @@
+.inputs
+ = f.input :name, :label => t('phone_models.form.name.label'), :hint => conditional_hint('phone_models.form.name.hint')
+ = f.input :product_manual_homepage_url, :label => t('phone_models.form.product_manual_homepage_url.label'), :hint => conditional_hint('phone_models.form.product_manual_homepage_url.hint')
+ = f.input :product_homepage_url, :label => t('phone_models.form.product_homepage_url.label'), :hint => conditional_hint('phone_models.form.product_homepage_url.hint')
diff --git a/app/views/phone_models/_index_core.html.haml b/app/views/phone_models/_index_core.html.haml
new file mode 100644
index 0000000..b07eb68
--- /dev/null
+++ b/app/views/phone_models/_index_core.html.haml
@@ -0,0 +1,19 @@
+%table
+ %tr
+ %th= t('phone_models.index.name')
+ %th= t('phone_models.index.product_manual_homepage_url')
+ %th= t('phone_models.index.product_homepage_url')
+ %th= t('phone_models.index.number_of_phones')
+
+ - reset_cycle
+ - for phone_model in phone_models
+ %tr{:class => cycle('odd', 'even')}
+ %td= phone_model.name
+ %td
+ - if phone_model.product_manual_homepage_url
+ =link_to truncate(phone_model.product_manual_homepage_url, :length => 40), phone_model.product_manual_homepage_url
+ %td
+ - if phone_model.product_homepage_url
+ =link_to truncate(phone_model.product_homepage_url, :length => 40), phone_model.product_homepage_url
+ %td= phone_model.phones.count
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => phone_model, :parent => phone_model.manufacturer} \ No newline at end of file
diff --git a/app/views/phone_models/edit.html.haml b/app/views/phone_models/edit.html.haml
new file mode 100644
index 0000000..bf31ffc
--- /dev/null
+++ b/app/views/phone_models/edit.html.haml
@@ -0,0 +1,3 @@
+- title t("phone_models.edit.page_title")
+
+= render "form"
diff --git a/app/views/phone_models/index.html.haml b/app/views/phone_models/index.html.haml
new file mode 100644
index 0000000..90aa4ce
--- /dev/null
+++ b/app/views/phone_models/index.html.haml
@@ -0,0 +1,6 @@
+- title t("phone_models.index.page_title")
+
+- if @phone_models.count > 0
+ = render "index_core", :phone_models => @phone_models
+
+= render :partial => 'shared/create_link', :locals => {:parent => @manufacturer, :child_class => PhoneModel} \ No newline at end of file
diff --git a/app/views/phone_models/new.html.haml b/app/views/phone_models/new.html.haml
new file mode 100644
index 0000000..9e900d4
--- /dev/null
+++ b/app/views/phone_models/new.html.haml
@@ -0,0 +1,3 @@
+- title t("phone_models.new.page_title")
+
+= render "form"
diff --git a/app/views/phone_models/show.html.haml b/app/views/phone_models/show.html.haml
new file mode 100644
index 0000000..06fae4b
--- /dev/null
+++ b/app/views/phone_models/show.html.haml
@@ -0,0 +1,18 @@
+- title t("phone_models.show.page_title")
+
+%p
+ %strong= t('phone_models.show.name') + ":"
+ = @phone_model.name
+%p
+ %strong= t('phone_models.show.manufacturer_id') + ":"
+ = @phone_model.manufacturer
+%p
+ %strong= t('phone_models.show.product_manual_homepage_url') + ":"
+ - if @phone_model.product_manual_homepage_url
+ =link_to @phone_model.product_manual_homepage_url, @phone_model.product_manual_homepage_url
+%p
+ %strong= t('phone_models.show.product_homepage_url') + ":"
+ - if @phone_model.product_homepage_url
+ =link_to @phone_model.product_homepage_url, @phone_model.product_homepage_url
+
+= render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @manufacturer, :child => @phone_model } \ No newline at end of file