From 902447a1baf7e9d8385c269a601361c8c3f2f14b Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Tue, 12 Feb 2013 13:07:05 +0000 Subject: parking_stall added --- app/views/parking_stalls/_form.html.haml | 7 +++++++ app/views/parking_stalls/_form_core.html.haml | 6 ++++++ app/views/parking_stalls/_index_core.html.haml | 17 +++++++++++++++++ app/views/parking_stalls/edit.html.haml | 3 +++ app/views/parking_stalls/index.html.haml | 6 ++++++ app/views/parking_stalls/new.html.haml | 3 +++ app/views/parking_stalls/show.html.haml | 19 +++++++++++++++++++ 7 files changed, 61 insertions(+) create mode 100644 app/views/parking_stalls/_form.html.haml create mode 100644 app/views/parking_stalls/_form_core.html.haml create mode 100644 app/views/parking_stalls/_index_core.html.haml create mode 100644 app/views/parking_stalls/edit.html.haml create mode 100644 app/views/parking_stalls/index.html.haml create mode 100644 app/views/parking_stalls/new.html.haml create mode 100644 app/views/parking_stalls/show.html.haml (limited to 'app/views/parking_stalls') diff --git a/app/views/parking_stalls/_form.html.haml b/app/views/parking_stalls/_form.html.haml new file mode 100644 index 0000000..5b1523b --- /dev/null +++ b/app/views/parking_stalls/_form.html.haml @@ -0,0 +1,7 @@ += simple_form_for(@parking_stall) do |f| + = f.error_notification + + = render "form_core", :f => f + + .actions + = f.button :submit, conditional_t('parking_stalls.form.submit') \ No newline at end of file diff --git a/app/views/parking_stalls/_form_core.html.haml b/app/views/parking_stalls/_form_core.html.haml new file mode 100644 index 0000000..db68f99 --- /dev/null +++ b/app/views/parking_stalls/_form_core.html.haml @@ -0,0 +1,6 @@ +.inputs + = f.input :name, :label => t('parking_stalls.form.name.label'), :hint => conditional_hint('parking_stalls.form.name.hint') + = f.input :lot, :label => t('parking_stalls.form.lot.label'), :hint => conditional_hint('parking_stalls.form.lot.hint') + = f.input :parking_stallable_id, :label => t('parking_stalls.form.parking_stallable_id.label'), :hint => conditional_hint('parking_stalls.form.parking_stallable_id.hint') + = f.input :parking_stallable_type, :label => t('parking_stalls.form.parking_stallable_type.label'), :hint => conditional_hint('parking_stalls.form.parking_stallable_type.hint') + = f.input :comment, :label => t('parking_stalls.form.comment.label'), :hint => conditional_hint('parking_stalls.form.comment.hint') diff --git a/app/views/parking_stalls/_index_core.html.haml b/app/views/parking_stalls/_index_core.html.haml new file mode 100644 index 0000000..fb317a0 --- /dev/null +++ b/app/views/parking_stalls/_index_core.html.haml @@ -0,0 +1,17 @@ +%table.table.table-striped + %tr + %th= t('parking_stalls.index.name') + %th= t('parking_stalls.index.lot') + %th= t('parking_stalls.index.parking_stallable_id') + %th= t('parking_stalls.index.parking_stallable_type') + %th= t('parking_stalls.index.comment') + + + - for parking_stall in parking_stalls + %tr + %td= parking_stall.name + %td= parking_stall.lot + %td= parking_stall.parking_stallable_id + %td= parking_stall.parking_stallable_type + %td= parking_stall.comment + =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => parking_stall} \ No newline at end of file diff --git a/app/views/parking_stalls/edit.html.haml b/app/views/parking_stalls/edit.html.haml new file mode 100644 index 0000000..ec5d97f --- /dev/null +++ b/app/views/parking_stalls/edit.html.haml @@ -0,0 +1,3 @@ +- content_for :title, t("parking_stalls.edit.page_title") + += render "form" \ No newline at end of file diff --git a/app/views/parking_stalls/index.html.haml b/app/views/parking_stalls/index.html.haml new file mode 100644 index 0000000..9472ff0 --- /dev/null +++ b/app/views/parking_stalls/index.html.haml @@ -0,0 +1,6 @@ +- content_for :title, t("parking_stalls.index.page_title") + +- if @parking_stalls && @parking_stalls.count > 0 + = render "index_core", :parking_stalls => @parking_stalls + += render :partial => 'shared/create_link', :locals => {:child_class => ParkingStall} \ No newline at end of file diff --git a/app/views/parking_stalls/new.html.haml b/app/views/parking_stalls/new.html.haml new file mode 100644 index 0000000..c068e52 --- /dev/null +++ b/app/views/parking_stalls/new.html.haml @@ -0,0 +1,3 @@ +- content_for :title, t("parking_stalls.new.page_title") + += render "form" \ No newline at end of file diff --git a/app/views/parking_stalls/show.html.haml b/app/views/parking_stalls/show.html.haml new file mode 100644 index 0000000..a95c111 --- /dev/null +++ b/app/views/parking_stalls/show.html.haml @@ -0,0 +1,19 @@ +- content_for :title, t("parking_stalls.show.page_title") + +%p + %strong= t('parking_stalls.show.name') + ":" + = @parking_stall.name +%p + %strong= t('parking_stalls.show.lot') + ":" + = @parking_stall.lot +%p + %strong= t('parking_stalls.show.parking_stallable_id') + ":" + = @parking_stall.parking_stallable_id +%p + %strong= t('parking_stalls.show.parking_stallable_type') + ":" + = @parking_stall.parking_stallable_type +%p + %strong= t('parking_stalls.show.comment') + ":" + = @parking_stall.comment + += render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @parking_stall } \ No newline at end of file -- cgit v1.2.3 From 36d1a38594361dcd021c23ae9c5040a37d0918df Mon Sep 17 00:00:00 2001 From: spag Date: Tue, 12 Feb 2013 15:53:49 +0100 Subject: make parking stall child of user/tenant --- app/views/parking_stalls/_form.html.haml | 2 +- app/views/parking_stalls/_form_core.html.haml | 2 -- app/views/parking_stalls/_index_core.html.haml | 6 +----- app/views/parking_stalls/index.html.haml | 2 +- app/views/parking_stalls/show.html.haml | 8 +------- 5 files changed, 4 insertions(+), 16 deletions(-) (limited to 'app/views/parking_stalls') diff --git a/app/views/parking_stalls/_form.html.haml b/app/views/parking_stalls/_form.html.haml index 5b1523b..60b60b7 100644 --- a/app/views/parking_stalls/_form.html.haml +++ b/app/views/parking_stalls/_form.html.haml @@ -1,4 +1,4 @@ -= simple_form_for(@parking_stall) do |f| += simple_form_for([@parent, @parking_stall]) do |f| = f.error_notification = render "form_core", :f => f diff --git a/app/views/parking_stalls/_form_core.html.haml b/app/views/parking_stalls/_form_core.html.haml index db68f99..add5c53 100644 --- a/app/views/parking_stalls/_form_core.html.haml +++ b/app/views/parking_stalls/_form_core.html.haml @@ -1,6 +1,4 @@ .inputs = f.input :name, :label => t('parking_stalls.form.name.label'), :hint => conditional_hint('parking_stalls.form.name.hint') = f.input :lot, :label => t('parking_stalls.form.lot.label'), :hint => conditional_hint('parking_stalls.form.lot.hint') - = f.input :parking_stallable_id, :label => t('parking_stalls.form.parking_stallable_id.label'), :hint => conditional_hint('parking_stalls.form.parking_stallable_id.hint') - = f.input :parking_stallable_type, :label => t('parking_stalls.form.parking_stallable_type.label'), :hint => conditional_hint('parking_stalls.form.parking_stallable_type.hint') = f.input :comment, :label => t('parking_stalls.form.comment.label'), :hint => conditional_hint('parking_stalls.form.comment.hint') diff --git a/app/views/parking_stalls/_index_core.html.haml b/app/views/parking_stalls/_index_core.html.haml index fb317a0..9f25217 100644 --- a/app/views/parking_stalls/_index_core.html.haml +++ b/app/views/parking_stalls/_index_core.html.haml @@ -2,8 +2,6 @@ %tr %th= t('parking_stalls.index.name') %th= t('parking_stalls.index.lot') - %th= t('parking_stalls.index.parking_stallable_id') - %th= t('parking_stalls.index.parking_stallable_type') %th= t('parking_stalls.index.comment') @@ -11,7 +9,5 @@ %tr %td= parking_stall.name %td= parking_stall.lot - %td= parking_stall.parking_stallable_id - %td= parking_stall.parking_stallable_type %td= parking_stall.comment - =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => parking_stall} \ No newline at end of file + =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => parking_stall.parking_stallable, :child => parking_stall} \ No newline at end of file diff --git a/app/views/parking_stalls/index.html.haml b/app/views/parking_stalls/index.html.haml index 9472ff0..7f82bbe 100644 --- a/app/views/parking_stalls/index.html.haml +++ b/app/views/parking_stalls/index.html.haml @@ -3,4 +3,4 @@ - if @parking_stalls && @parking_stalls.count > 0 = render "index_core", :parking_stalls => @parking_stalls -= render :partial => 'shared/create_link', :locals => {:child_class => ParkingStall} \ No newline at end of file += render :partial => 'shared/create_link', :locals => {:parent => @parent, :child_class => ParkingStall} \ No newline at end of file diff --git a/app/views/parking_stalls/show.html.haml b/app/views/parking_stalls/show.html.haml index a95c111..583a0ee 100644 --- a/app/views/parking_stalls/show.html.haml +++ b/app/views/parking_stalls/show.html.haml @@ -6,14 +6,8 @@ %p %strong= t('parking_stalls.show.lot') + ":" = @parking_stall.lot -%p - %strong= t('parking_stalls.show.parking_stallable_id') + ":" - = @parking_stall.parking_stallable_id -%p - %strong= t('parking_stalls.show.parking_stallable_type') + ":" - = @parking_stall.parking_stallable_type %p %strong= t('parking_stalls.show.comment') + ":" = @parking_stall.comment -= render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @parking_stall } \ No newline at end of file += render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @parking_stall.parking_stallable, :child => @parking_stall } -- cgit v1.2.3 From 791bf973b02b626f876b7e5819e2037dcff90f84 Mon Sep 17 00:00:00 2001 From: "Mario \"Kuroir\" Ricalde" Date: Wed, 13 Feb 2013 05:39:21 -0600 Subject: Simple Form Fixes for Form Actions --- app/views/parking_stalls/_form.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/views/parking_stalls') diff --git a/app/views/parking_stalls/_form.html.haml b/app/views/parking_stalls/_form.html.haml index 60b60b7..f72c190 100644 --- a/app/views/parking_stalls/_form.html.haml +++ b/app/views/parking_stalls/_form.html.haml @@ -3,5 +3,5 @@ = render "form_core", :f => f - .actions - = f.button :submit, conditional_t('parking_stalls.form.submit') \ No newline at end of file + .form-actions + = f.button :submit, conditional_t('parking_stalls.form.submit') -- cgit v1.2.3