From 8c83a89c6fbfdb31cae8ea6fcf2fd50c12c076a5 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Wed, 16 Jan 2013 08:37:56 -0500 Subject: route_elements added --- app/views/route_elements/_form.html.haml | 7 +++++++ app/views/route_elements/_form_core.html.haml | 9 +++++++++ app/views/route_elements/_index_core.html.haml | 23 +++++++++++++++++++++ app/views/route_elements/edit.html.haml | 3 +++ app/views/route_elements/index.html.haml | 6 ++++++ app/views/route_elements/new.html.haml | 3 +++ app/views/route_elements/show.html.haml | 28 ++++++++++++++++++++++++++ 7 files changed, 79 insertions(+) create mode 100644 app/views/route_elements/_form.html.haml create mode 100644 app/views/route_elements/_form_core.html.haml create mode 100644 app/views/route_elements/_index_core.html.haml create mode 100644 app/views/route_elements/edit.html.haml create mode 100644 app/views/route_elements/index.html.haml create mode 100644 app/views/route_elements/new.html.haml create mode 100644 app/views/route_elements/show.html.haml (limited to 'app/views/route_elements') diff --git a/app/views/route_elements/_form.html.haml b/app/views/route_elements/_form.html.haml new file mode 100644 index 0000000..cfa4c6b --- /dev/null +++ b/app/views/route_elements/_form.html.haml @@ -0,0 +1,7 @@ += simple_form_for(@route_element) do |f| + = f.error_notification + + = render "form_core", :f => f + + .actions + = f.button :submit, conditional_t('route_elements.form.submit') \ No newline at end of file diff --git a/app/views/route_elements/_form_core.html.haml b/app/views/route_elements/_form_core.html.haml new file mode 100644 index 0000000..7697cb0 --- /dev/null +++ b/app/views/route_elements/_form_core.html.haml @@ -0,0 +1,9 @@ +.inputs + = f.input :call_route_id, :label => t('route_elements.form.call_route_id.label'), :hint => conditional_hint('route_elements.form.call_route_id.hint') + = f.input :var_in, :label => t('route_elements.form.var_in.label'), :hint => conditional_hint('route_elements.form.var_in.hint') + = f.input :var_out, :label => t('route_elements.form.var_out.label'), :hint => conditional_hint('route_elements.form.var_out.hint') + = f.input :pattern, :label => t('route_elements.form.pattern.label'), :hint => conditional_hint('route_elements.form.pattern.hint') + = f.input :replacement, :label => t('route_elements.form.replacement.label'), :hint => conditional_hint('route_elements.form.replacement.hint') + = f.input :action, :label => t('route_elements.form.action.label'), :hint => conditional_hint('route_elements.form.action.hint') + = f.input :mandatory, :label => t('route_elements.form.mandatory.label'), :hint => conditional_hint('route_elements.form.mandatory.hint') + = f.input :position, :label => t('route_elements.form.position.label'), :hint => conditional_hint('route_elements.form.position.hint') diff --git a/app/views/route_elements/_index_core.html.haml b/app/views/route_elements/_index_core.html.haml new file mode 100644 index 0000000..63665fd --- /dev/null +++ b/app/views/route_elements/_index_core.html.haml @@ -0,0 +1,23 @@ +%table + %tr + %th= t('route_elements.index.call_route_id') + %th= t('route_elements.index.var_in') + %th= t('route_elements.index.var_out') + %th= t('route_elements.index.pattern') + %th= t('route_elements.index.replacement') + %th= t('route_elements.index.action') + %th= t('route_elements.index.mandatory') + %th= t('route_elements.index.position') + + - reset_cycle + - for route_element in route_elements + %tr{:class => cycle('odd', 'even')} + %td= route_element.call_route_id + %td= route_element.var_in + %td= route_element.var_out + %td= route_element.pattern + %td= route_element.replacement + %td= route_element.action + %td= route_element.mandatory + %td= route_element.position + =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => route_element} \ No newline at end of file diff --git a/app/views/route_elements/edit.html.haml b/app/views/route_elements/edit.html.haml new file mode 100644 index 0000000..770eb6c --- /dev/null +++ b/app/views/route_elements/edit.html.haml @@ -0,0 +1,3 @@ +- title t("route_elements.edit.page_title") + += render "form" \ No newline at end of file diff --git a/app/views/route_elements/index.html.haml b/app/views/route_elements/index.html.haml new file mode 100644 index 0000000..b05236b --- /dev/null +++ b/app/views/route_elements/index.html.haml @@ -0,0 +1,6 @@ +- title t("route_elements.index.page_title") + +- if @route_elements && @route_elements.count > 0 + = render "index_core", :route_elements => @route_elements + += render :partial => 'shared/create_link', :locals => {:child_class => RouteElement} \ No newline at end of file diff --git a/app/views/route_elements/new.html.haml b/app/views/route_elements/new.html.haml new file mode 100644 index 0000000..903e808 --- /dev/null +++ b/app/views/route_elements/new.html.haml @@ -0,0 +1,3 @@ +- title t("route_elements.new.page_title") + += render "form" \ No newline at end of file diff --git a/app/views/route_elements/show.html.haml b/app/views/route_elements/show.html.haml new file mode 100644 index 0000000..a439353 --- /dev/null +++ b/app/views/route_elements/show.html.haml @@ -0,0 +1,28 @@ +- title t("route_elements.show.page_title") + +%p + %strong= t('route_elements.show.call_route_id') + ":" + = @route_element.call_route_id +%p + %strong= t('route_elements.show.var_in') + ":" + = @route_element.var_in +%p + %strong= t('route_elements.show.var_out') + ":" + = @route_element.var_out +%p + %strong= t('route_elements.show.pattern') + ":" + = @route_element.pattern +%p + %strong= t('route_elements.show.replacement') + ":" + = @route_element.replacement +%p + %strong= t('route_elements.show.action') + ":" + = @route_element.action +%p + %strong= t('route_elements.show.mandatory') + ":" + = @route_element.mandatory +%p + %strong= t('route_elements.show.position') + ":" + = @route_element.position + += render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @route_element } \ No newline at end of file -- cgit v1.2.3 From 0ee17f52f8ad337c1240b4c55dbd8f6c6c74dc90 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Wed, 16 Jan 2013 16:32:59 +0100 Subject: Fixed routes and breadcrumbs. #106 --- app/views/route_elements/_form.html.haml | 2 +- app/views/route_elements/_form_core.html.haml | 1 - app/views/route_elements/_index_core.html.haml | 4 +--- app/views/route_elements/index.html.haml | 2 +- app/views/route_elements/show.html.haml | 5 +---- 5 files changed, 4 insertions(+), 10 deletions(-) (limited to 'app/views/route_elements') diff --git a/app/views/route_elements/_form.html.haml b/app/views/route_elements/_form.html.haml index cfa4c6b..8feacaa 100644 --- a/app/views/route_elements/_form.html.haml +++ b/app/views/route_elements/_form.html.haml @@ -1,4 +1,4 @@ -= simple_form_for(@route_element) do |f| += simple_form_for([@call_route, @route_element]) do |f| = f.error_notification = render "form_core", :f => f diff --git a/app/views/route_elements/_form_core.html.haml b/app/views/route_elements/_form_core.html.haml index 7697cb0..133d1df 100644 --- a/app/views/route_elements/_form_core.html.haml +++ b/app/views/route_elements/_form_core.html.haml @@ -1,5 +1,4 @@ .inputs - = f.input :call_route_id, :label => t('route_elements.form.call_route_id.label'), :hint => conditional_hint('route_elements.form.call_route_id.hint') = f.input :var_in, :label => t('route_elements.form.var_in.label'), :hint => conditional_hint('route_elements.form.var_in.hint') = f.input :var_out, :label => t('route_elements.form.var_out.label'), :hint => conditional_hint('route_elements.form.var_out.hint') = f.input :pattern, :label => t('route_elements.form.pattern.label'), :hint => conditional_hint('route_elements.form.pattern.hint') diff --git a/app/views/route_elements/_index_core.html.haml b/app/views/route_elements/_index_core.html.haml index 63665fd..c1df665 100644 --- a/app/views/route_elements/_index_core.html.haml +++ b/app/views/route_elements/_index_core.html.haml @@ -1,6 +1,5 @@ %table %tr - %th= t('route_elements.index.call_route_id') %th= t('route_elements.index.var_in') %th= t('route_elements.index.var_out') %th= t('route_elements.index.pattern') @@ -12,7 +11,6 @@ - reset_cycle - for route_element in route_elements %tr{:class => cycle('odd', 'even')} - %td= route_element.call_route_id %td= route_element.var_in %td= route_element.var_out %td= route_element.pattern @@ -20,4 +18,4 @@ %td= route_element.action %td= route_element.mandatory %td= route_element.position - =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => route_element} \ No newline at end of file + =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => @call_route, :child => route_element} \ No newline at end of file diff --git a/app/views/route_elements/index.html.haml b/app/views/route_elements/index.html.haml index b05236b..8a6f7bc 100644 --- a/app/views/route_elements/index.html.haml +++ b/app/views/route_elements/index.html.haml @@ -3,4 +3,4 @@ - if @route_elements && @route_elements.count > 0 = render "index_core", :route_elements => @route_elements -= render :partial => 'shared/create_link', :locals => {:child_class => RouteElement} \ No newline at end of file += render :partial => 'shared/create_link', :locals => {:parent => @call_route, :child_class => RouteElement} \ No newline at end of file diff --git a/app/views/route_elements/show.html.haml b/app/views/route_elements/show.html.haml index a439353..8e41f80 100644 --- a/app/views/route_elements/show.html.haml +++ b/app/views/route_elements/show.html.haml @@ -1,8 +1,5 @@ - title t("route_elements.show.page_title") -%p - %strong= t('route_elements.show.call_route_id') + ":" - = @route_element.call_route_id %p %strong= t('route_elements.show.var_in') + ":" = @route_element.var_in @@ -25,4 +22,4 @@ %strong= t('route_elements.show.position') + ":" = @route_element.position -= render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @route_element } \ No newline at end of file += render :partial => 'shared/show_edit_destroy_part', :locals => {:parent => @call_route, :child => @route_element } \ No newline at end of file -- cgit v1.2.3 From 808a9d19c7376907370e58662856cd028e9b83b1 Mon Sep 17 00:00:00 2001 From: spag Date: Thu, 17 Jan 2013 12:31:28 +0100 Subject: route elements views --- app/views/route_elements/_form_core.html.haml | 3 +-- app/views/route_elements/_index_core.html.haml | 2 -- app/views/route_elements/show.html.haml | 3 --- 3 files changed, 1 insertion(+), 7 deletions(-) (limited to 'app/views/route_elements') diff --git a/app/views/route_elements/_form_core.html.haml b/app/views/route_elements/_form_core.html.haml index 133d1df..a9a38a7 100644 --- a/app/views/route_elements/_form_core.html.haml +++ b/app/views/route_elements/_form_core.html.haml @@ -3,6 +3,5 @@ = f.input :var_out, :label => t('route_elements.form.var_out.label'), :hint => conditional_hint('route_elements.form.var_out.hint') = f.input :pattern, :label => t('route_elements.form.pattern.label'), :hint => conditional_hint('route_elements.form.pattern.hint') = f.input :replacement, :label => t('route_elements.form.replacement.label'), :hint => conditional_hint('route_elements.form.replacement.hint') - = f.input :action, :label => t('route_elements.form.action.label'), :hint => conditional_hint('route_elements.form.action.hint') + = f.input :action, :collection => RouteElement::ELEMENT_ACTIONS, :label => t('route_elements.form.action.label'), :hint => conditional_hint('route_elements.form.action.hint'), :include_blank => false = f.input :mandatory, :label => t('route_elements.form.mandatory.label'), :hint => conditional_hint('route_elements.form.mandatory.hint') - = f.input :position, :label => t('route_elements.form.position.label'), :hint => conditional_hint('route_elements.form.position.hint') diff --git a/app/views/route_elements/_index_core.html.haml b/app/views/route_elements/_index_core.html.haml index c1df665..3435686 100644 --- a/app/views/route_elements/_index_core.html.haml +++ b/app/views/route_elements/_index_core.html.haml @@ -6,7 +6,6 @@ %th= t('route_elements.index.replacement') %th= t('route_elements.index.action') %th= t('route_elements.index.mandatory') - %th= t('route_elements.index.position') - reset_cycle - for route_element in route_elements @@ -17,5 +16,4 @@ %td= route_element.replacement %td= route_element.action %td= route_element.mandatory - %td= route_element.position =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => @call_route, :child => route_element} \ No newline at end of file diff --git a/app/views/route_elements/show.html.haml b/app/views/route_elements/show.html.haml index 8e41f80..c637a4d 100644 --- a/app/views/route_elements/show.html.haml +++ b/app/views/route_elements/show.html.haml @@ -18,8 +18,5 @@ %p %strong= t('route_elements.show.mandatory') + ":" = @route_element.mandatory -%p - %strong= t('route_elements.show.position') + ":" - = @route_element.position = render :partial => 'shared/show_edit_destroy_part', :locals => {:parent => @call_route, :child => @route_element } \ No newline at end of file -- cgit v1.2.3 From 18ed88c7e3c789366f6e5443dc4ee0bc981a4b88 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Mon, 21 Jan 2013 20:18:16 +0100 Subject: Started the migration to Twitter Bootstrap. --- app/views/route_elements/_index_core.html.haml | 2 +- app/views/route_elements/edit.html.haml | 2 +- app/views/route_elements/index.html.haml | 2 +- app/views/route_elements/new.html.haml | 2 +- app/views/route_elements/show.html.haml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'app/views/route_elements') diff --git a/app/views/route_elements/_index_core.html.haml b/app/views/route_elements/_index_core.html.haml index 3435686..f769c01 100644 --- a/app/views/route_elements/_index_core.html.haml +++ b/app/views/route_elements/_index_core.html.haml @@ -1,4 +1,4 @@ -%table +%table{:class => 'table table-striped'} %tr %th= t('route_elements.index.var_in') %th= t('route_elements.index.var_out') diff --git a/app/views/route_elements/edit.html.haml b/app/views/route_elements/edit.html.haml index 770eb6c..c2da3e6 100644 --- a/app/views/route_elements/edit.html.haml +++ b/app/views/route_elements/edit.html.haml @@ -1,3 +1,3 @@ -- title t("route_elements.edit.page_title") +- content_for :title, t("route_elements.edit.page_title") = render "form" \ No newline at end of file diff --git a/app/views/route_elements/index.html.haml b/app/views/route_elements/index.html.haml index 8a6f7bc..43d47f1 100644 --- a/app/views/route_elements/index.html.haml +++ b/app/views/route_elements/index.html.haml @@ -1,4 +1,4 @@ -- title t("route_elements.index.page_title") +- content_for :title, t("route_elements.index.page_title") - if @route_elements && @route_elements.count > 0 = render "index_core", :route_elements => @route_elements diff --git a/app/views/route_elements/new.html.haml b/app/views/route_elements/new.html.haml index 903e808..2b9b9c1 100644 --- a/app/views/route_elements/new.html.haml +++ b/app/views/route_elements/new.html.haml @@ -1,3 +1,3 @@ -- title t("route_elements.new.page_title") +- content_for :title, t("route_elements.new.page_title") = render "form" \ No newline at end of file diff --git a/app/views/route_elements/show.html.haml b/app/views/route_elements/show.html.haml index c637a4d..808f2a0 100644 --- a/app/views/route_elements/show.html.haml +++ b/app/views/route_elements/show.html.haml @@ -1,4 +1,4 @@ -- title t("route_elements.show.page_title") +- content_for :title, t("route_elements.show.page_title") %p %strong= t('route_elements.show.var_in') + ":" -- cgit v1.2.3 From d8fe3b636cab1504cb5d3cb5dc57ed818749ccf5 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Mon, 21 Jan 2013 21:30:48 +0100 Subject: Twitter Bootstrap stuff. --- app/views/route_elements/_index_core.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/views/route_elements') diff --git a/app/views/route_elements/_index_core.html.haml b/app/views/route_elements/_index_core.html.haml index f769c01..5336057 100644 --- a/app/views/route_elements/_index_core.html.haml +++ b/app/views/route_elements/_index_core.html.haml @@ -7,9 +7,9 @@ %th= t('route_elements.index.action') %th= t('route_elements.index.mandatory') - - reset_cycle + - for route_element in route_elements - %tr{:class => cycle('odd', 'even')} + %tr %td= route_element.var_in %td= route_element.var_out %td= route_element.pattern -- cgit v1.2.3