diff options
author | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2012-12-17 12:01:45 +0100 |
---|---|---|
committer | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2012-12-17 12:01:45 +0100 |
commit | b80bd744ad873f6fc43018bc4bfb90677de167bd (patch) | |
tree | 072c4b0e33d442528555b82c415f5e7a1712b2b0 /app/views/phone_number_ranges | |
parent | 3e706c2025ecc5523e81ad649639ef2ff75e7bac (diff) |
Start of GS5.
Diffstat (limited to 'app/views/phone_number_ranges')
-rw-r--r-- | app/views/phone_number_ranges/_form.html.haml | 7 | ||||
-rw-r--r-- | app/views/phone_number_ranges/_form_core.html.haml | 3 | ||||
-rw-r--r-- | app/views/phone_number_ranges/_index_core.html.haml | 21 | ||||
-rw-r--r-- | app/views/phone_number_ranges/edit.html.haml | 3 | ||||
-rw-r--r-- | app/views/phone_number_ranges/index.html.haml | 6 | ||||
-rw-r--r-- | app/views/phone_number_ranges/new.html.haml | 3 | ||||
-rw-r--r-- | app/views/phone_number_ranges/show.html.haml | 18 |
7 files changed, 61 insertions, 0 deletions
diff --git a/app/views/phone_number_ranges/_form.html.haml b/app/views/phone_number_ranges/_form.html.haml new file mode 100644 index 0000000..a86d45b --- /dev/null +++ b/app/views/phone_number_ranges/_form.html.haml @@ -0,0 +1,7 @@ += simple_form_for([ @phone_number_range.phone_number_rangeable, @phone_number_range ]) do |f| + = f.error_notification + + = render "form_core", :f => f + + .actions + = f.button :submit, conditional_t('phone_number_ranges.form.submit')
\ No newline at end of file diff --git a/app/views/phone_number_ranges/_form_core.html.haml b/app/views/phone_number_ranges/_form_core.html.haml new file mode 100644 index 0000000..f553f08 --- /dev/null +++ b/app/views/phone_number_ranges/_form_core.html.haml @@ -0,0 +1,3 @@ +.inputs + = f.input :name, :label => t('phone_number_ranges.form.name.label'), :hint => conditional_hint('phone_number_ranges.form.name.hint') + = f.input :description, :label => t('phone_number_ranges.form.description.label'), :hint => conditional_hint('phone_number_ranges.form.description.hint') diff --git a/app/views/phone_number_ranges/_index_core.html.haml b/app/views/phone_number_ranges/_index_core.html.haml new file mode 100644 index 0000000..24ea96d --- /dev/null +++ b/app/views/phone_number_ranges/_index_core.html.haml @@ -0,0 +1,21 @@ +%table + %tr + %th= t('phone_number_ranges.index.name') + %th= t('phone_number_ranges.index.description') + %th= t('phone_number_ranges.index.numbers') + %th= t('phone_number_ranges.index.amount') + + - reset_cycle + - for phone_number_range in phone_number_ranges + %tr{:class => cycle('odd', 'even')} + %td= t("phone_number_ranges.ranges.#{phone_number_range}.label") + %td= t("phone_number_ranges.ranges.#{phone_number_range}.description") + %td + - if phone_number_range.phone_numbers.count > 0 + = render 'phone_numbers/listing', :phone_numbers => phone_number_range.phone_numbers.order(:number) + %br + = render :partial => 'shared/create_link', :locals => {:parent => phone_number_range, :child_class => PhoneNumber, :short_link => true} + + %td= phone_number_range.phone_numbers.count + - if phone_number_range.phone_number_rangeable.class != Country + =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => phone_number_range.phone_number_rangeable, :child => phone_number_range}
\ No newline at end of file diff --git a/app/views/phone_number_ranges/edit.html.haml b/app/views/phone_number_ranges/edit.html.haml new file mode 100644 index 0000000..fbf6d12 --- /dev/null +++ b/app/views/phone_number_ranges/edit.html.haml @@ -0,0 +1,3 @@ +- title t("phone_number_ranges.edit.page_title", :resource => @phone_number_range) + += render "form" diff --git a/app/views/phone_number_ranges/index.html.haml b/app/views/phone_number_ranges/index.html.haml new file mode 100644 index 0000000..56cf137 --- /dev/null +++ b/app/views/phone_number_ranges/index.html.haml @@ -0,0 +1,6 @@ +- title t("phone_number_ranges.index.page_title") + +- if @phone_number_ranges.count > 0 + = render "index_core", :phone_number_ranges => @phone_number_ranges + += render :partial => 'shared/create_link', :locals => {:child_class => PhoneNumberRange}
\ No newline at end of file diff --git a/app/views/phone_number_ranges/new.html.haml b/app/views/phone_number_ranges/new.html.haml new file mode 100644 index 0000000..d26b34d --- /dev/null +++ b/app/views/phone_number_ranges/new.html.haml @@ -0,0 +1,3 @@ +- title t("phone_number_ranges.new.page_title") + += render "form" diff --git a/app/views/phone_number_ranges/show.html.haml b/app/views/phone_number_ranges/show.html.haml new file mode 100644 index 0000000..64df556 --- /dev/null +++ b/app/views/phone_number_ranges/show.html.haml @@ -0,0 +1,18 @@ +- title t("phone_number_ranges.show.page_title") + +%p + %strong= t('phone_number_ranges.show.name') + ":" + = t("phone_number_ranges.ranges.#{@phone_number_range}.label") +%p + %strong= t('phone_number_ranges.show.description') + ":" + = @phone_number_range.description + += render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @phone_number_range.phone_number_rangeable, :child => @phone_number_range } + +%h2= t("phone_number_ranges.show.phone_numbers") + +- if @phone_number_range.try(:phone_numbers).try(:count).to_i > 0 + = render "phone_numbers/index_core", :phone_numbers => @phone_number_range.phone_numbers.order(:number) + +%p + = render :partial => 'shared/create_link', :locals => {:parent => @phone_number_range, :child_class => PhoneNumber}
\ No newline at end of file |