From b80bd744ad873f6fc43018bc4bfb90677de167bd Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Mon, 17 Dec 2012 12:01:45 +0100 Subject: Start of GS5. --- app/views/phone_models/_form.html.haml | 7 +++++++ app/views/phone_models/_form_core.html.haml | 4 ++++ app/views/phone_models/_index_core.html.haml | 19 +++++++++++++++++++ app/views/phone_models/edit.html.haml | 3 +++ app/views/phone_models/index.html.haml | 6 ++++++ app/views/phone_models/new.html.haml | 3 +++ app/views/phone_models/show.html.haml | 18 ++++++++++++++++++ 7 files changed, 60 insertions(+) create mode 100644 app/views/phone_models/_form.html.haml create mode 100644 app/views/phone_models/_form_core.html.haml create mode 100644 app/views/phone_models/_index_core.html.haml create mode 100644 app/views/phone_models/edit.html.haml create mode 100644 app/views/phone_models/index.html.haml create mode 100644 app/views/phone_models/new.html.haml create mode 100644 app/views/phone_models/show.html.haml (limited to 'app/views/phone_models') 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 -- cgit v1.2.3