summaryrefslogtreecommitdiff
path: root/app/views/manufacturers
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/manufacturers')
-rw-r--r--app/views/manufacturers/_form.html.haml7
-rw-r--r--app/views/manufacturers/_form_core.html.haml4
-rw-r--r--app/views/manufacturers/_index_core.html.haml18
-rw-r--r--app/views/manufacturers/edit.html.haml3
-rw-r--r--app/views/manufacturers/index.html.haml5
-rw-r--r--app/views/manufacturers/new.html.haml3
-rw-r--r--app/views/manufacturers/show.html.haml18
7 files changed, 58 insertions, 0 deletions
diff --git a/app/views/manufacturers/_form.html.haml b/app/views/manufacturers/_form.html.haml
new file mode 100644
index 0000000..d89c603
--- /dev/null
+++ b/app/views/manufacturers/_form.html.haml
@@ -0,0 +1,7 @@
+= simple_form_for(@manufacturer) do |f|
+ = f.error_notification
+
+ = render "form_core", :f => f
+
+ .actions
+ = f.button :submit, conditional_t('manufacturers.form.submit') \ No newline at end of file
diff --git a/app/views/manufacturers/_form_core.html.haml b/app/views/manufacturers/_form_core.html.haml
new file mode 100644
index 0000000..84b85c9
--- /dev/null
+++ b/app/views/manufacturers/_form_core.html.haml
@@ -0,0 +1,4 @@
+.inputs
+ = f.input :name, :label => t('manufacturers.form.name.label'), :hint => conditional_hint('manufacturers.form.name.hint')
+ = f.input :ieee_name, :label => t('manufacturers.form.ieee_name.label'), :hint => conditional_hint('manufacturers.form.ieee_name.hint')
+ = f.input :homepage_url, :label => t('manufacturers.form.homepage_url.label'), :hint => conditional_hint('manufacturers.form.homepage_url.hint')
diff --git a/app/views/manufacturers/_index_core.html.haml b/app/views/manufacturers/_index_core.html.haml
new file mode 100644
index 0000000..8937909
--- /dev/null
+++ b/app/views/manufacturers/_index_core.html.haml
@@ -0,0 +1,18 @@
+%table
+ %tr
+ %th= t('manufacturers.index.name')
+ %th= t('manufacturers.index.ieee_name')
+ %th= t('manufacturers.index.homepage_url')
+ %th= t('manufacturers.index.phone_models')
+
+ - reset_cycle
+ - for manufacturer in manufacturers
+ %tr{:class => cycle('odd', 'even')}
+ %td= manufacturer.name
+ %td= manufacturer.ieee_name
+ %td
+ - if manufacturer.homepage_url
+ =link_to manufacturer.homepage_url, manufacturer.homepage_url
+ %td
+ = manufacturer.phone_models.map{|x| x.to_s }.join(', ')
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => manufacturer} \ No newline at end of file
diff --git a/app/views/manufacturers/edit.html.haml b/app/views/manufacturers/edit.html.haml
new file mode 100644
index 0000000..61bcba0
--- /dev/null
+++ b/app/views/manufacturers/edit.html.haml
@@ -0,0 +1,3 @@
+- title t("manufacturers.edit.page_title")
+
+= render "form"
diff --git a/app/views/manufacturers/index.html.haml b/app/views/manufacturers/index.html.haml
new file mode 100644
index 0000000..43fecc6
--- /dev/null
+++ b/app/views/manufacturers/index.html.haml
@@ -0,0 +1,5 @@
+- title t("manufacturers.index.page_title")
+
+= render "index_core", :manufacturers => @manufacturers
+
+= render :partial => 'shared/create_link', :locals => {:child_class => Manufacturer} \ No newline at end of file
diff --git a/app/views/manufacturers/new.html.haml b/app/views/manufacturers/new.html.haml
new file mode 100644
index 0000000..4fb9dbf
--- /dev/null
+++ b/app/views/manufacturers/new.html.haml
@@ -0,0 +1,3 @@
+- title t("manufacturers.new.page_title")
+
+= render "form"
diff --git a/app/views/manufacturers/show.html.haml b/app/views/manufacturers/show.html.haml
new file mode 100644
index 0000000..1b8383b
--- /dev/null
+++ b/app/views/manufacturers/show.html.haml
@@ -0,0 +1,18 @@
+- title t("manufacturers.show.page_title")
+
+%p
+ %strong= t('manufacturers.show.name') + ":"
+ = @manufacturer.name
+%p
+ %strong= t('manufacturers.show.ieee_name') + ":"
+ = @manufacturer.ieee_name
+%p
+ %strong= t('manufacturers.show.homepage_url') + ":"
+ - if @manufacturer.homepage_url
+ =link_to @manufacturer.homepage_url, @manufacturer.homepage_url
+
+= render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @manufacturer }
+
+%h2=t("phone_models.index.page_title")
+
+=render 'phone_models/index_core', :phone_models => @manufacturer.phone_models \ No newline at end of file