From f48e68fbf5889a837cb4f7442e39997eea94511c Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Sun, 13 Jan 2013 16:36:51 +0000 Subject: gateway views --- app/views/gateways/_form.html.haml | 7 +++++++ app/views/gateways/_form_core.html.haml | 6 ++++++ app/views/gateways/_index_core.html.haml | 17 +++++++++++++++++ app/views/gateways/edit.html.haml | 3 +++ app/views/gateways/index.html.haml | 6 ++++++ app/views/gateways/new.html.haml | 3 +++ app/views/gateways/show.html.haml | 19 +++++++++++++++++++ 7 files changed, 61 insertions(+) create mode 100644 app/views/gateways/_form.html.haml create mode 100644 app/views/gateways/_form_core.html.haml create mode 100644 app/views/gateways/_index_core.html.haml create mode 100644 app/views/gateways/edit.html.haml create mode 100644 app/views/gateways/index.html.haml create mode 100644 app/views/gateways/new.html.haml create mode 100644 app/views/gateways/show.html.haml (limited to 'app/views/gateways') diff --git a/app/views/gateways/_form.html.haml b/app/views/gateways/_form.html.haml new file mode 100644 index 0000000..5f6d5dd --- /dev/null +++ b/app/views/gateways/_form.html.haml @@ -0,0 +1,7 @@ += simple_form_for(@gateway) do |f| + = f.error_notification + + = render "form_core", :f => f + + .actions + = f.button :submit, conditional_t('gateways.form.submit') \ No newline at end of file diff --git a/app/views/gateways/_form_core.html.haml b/app/views/gateways/_form_core.html.haml new file mode 100644 index 0000000..3545772 --- /dev/null +++ b/app/views/gateways/_form_core.html.haml @@ -0,0 +1,6 @@ +.inputs + = f.input :name, :label => t('gateways.form.name.label'), :hint => conditional_hint('gateways.form.name.hint') + = f.input :technology, :label => t('gateways.form.technology.label'), :hint => conditional_hint('gateways.form.technology.hint') + = f.input :inbound, :label => t('gateways.form.inbound.label'), :hint => conditional_hint('gateways.form.inbound.hint') + = f.input :outbound, :label => t('gateways.form.outbound.label'), :hint => conditional_hint('gateways.form.outbound.hint') + = f.input :description, :label => t('gateways.form.description.label'), :hint => conditional_hint('gateways.form.description.hint') diff --git a/app/views/gateways/_index_core.html.haml b/app/views/gateways/_index_core.html.haml new file mode 100644 index 0000000..21414c3 --- /dev/null +++ b/app/views/gateways/_index_core.html.haml @@ -0,0 +1,17 @@ +%table + %tr + %th= t('gateways.index.name') + %th= t('gateways.index.technology') + %th= t('gateways.index.inbound') + %th= t('gateways.index.outbound') + %th= t('gateways.index.description') + + - reset_cycle + - for gateway in gateways + %tr{:class => cycle('odd', 'even')} + %td= gateway.name + %td= gateway.technology + %td= gateway.inbound + %td= gateway.outbound + %td= gateway.description + =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => gateway} \ No newline at end of file diff --git a/app/views/gateways/edit.html.haml b/app/views/gateways/edit.html.haml new file mode 100644 index 0000000..417dd09 --- /dev/null +++ b/app/views/gateways/edit.html.haml @@ -0,0 +1,3 @@ +- title t("gateways.edit.page_title") + += render "form" \ No newline at end of file diff --git a/app/views/gateways/index.html.haml b/app/views/gateways/index.html.haml new file mode 100644 index 0000000..cec9cd1 --- /dev/null +++ b/app/views/gateways/index.html.haml @@ -0,0 +1,6 @@ +- title t("gateways.index.page_title") + +- if @gateways && @gateways.count > 0 + = render "index_core", :gateways => @gateways + += render :partial => 'shared/create_link', :locals => {:child_class => Gateway} \ No newline at end of file diff --git a/app/views/gateways/new.html.haml b/app/views/gateways/new.html.haml new file mode 100644 index 0000000..a2609f3 --- /dev/null +++ b/app/views/gateways/new.html.haml @@ -0,0 +1,3 @@ +- title t("gateways.new.page_title") + += render "form" \ No newline at end of file diff --git a/app/views/gateways/show.html.haml b/app/views/gateways/show.html.haml new file mode 100644 index 0000000..c9942dd --- /dev/null +++ b/app/views/gateways/show.html.haml @@ -0,0 +1,19 @@ +- title t("gateways.show.page_title") + +%p + %strong= t('gateways.show.name') + ":" + = @gateway.name +%p + %strong= t('gateways.show.technology') + ":" + = @gateway.technology +%p + %strong= t('gateways.show.inbound') + ":" + = @gateway.inbound +%p + %strong= t('gateways.show.outbound') + ":" + = @gateway.outbound +%p + %strong= t('gateways.show.description') + ":" + = @gateway.description + += render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @gateway } \ No newline at end of file -- cgit v1.2.3 From 57097d16d2a7e86f9e03625fd2fb6796504c32a2 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sun, 13 Jan 2013 22:26:28 +0100 Subject: Bugfixes for gateway stuff. --- app/views/gateways/_form_core.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views/gateways') diff --git a/app/views/gateways/_form_core.html.haml b/app/views/gateways/_form_core.html.haml index 3545772..13ed8b1 100644 --- a/app/views/gateways/_form_core.html.haml +++ b/app/views/gateways/_form_core.html.haml @@ -1,5 +1,5 @@ .inputs - = f.input :name, :label => t('gateways.form.name.label'), :hint => conditional_hint('gateways.form.name.hint') + = f.input :name, :label => t('gateways.form.name.label'), :hint => conditional_hint('gateways.form.name.hint'), :autofocus => true = f.input :technology, :label => t('gateways.form.technology.label'), :hint => conditional_hint('gateways.form.technology.hint') = f.input :inbound, :label => t('gateways.form.inbound.label'), :hint => conditional_hint('gateways.form.inbound.hint') = f.input :outbound, :label => t('gateways.form.outbound.label'), :hint => conditional_hint('gateways.form.outbound.hint') -- cgit v1.2.3 From 1ddeac8a2d7066323dc388bfbdf31a005d4e562f Mon Sep 17 00:00:00 2001 From: spag Date: Sun, 13 Jan 2013 23:45:21 +0100 Subject: gateway view display settings/parameters --- app/views/gateways/show.html.haml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'app/views/gateways') diff --git a/app/views/gateways/show.html.haml b/app/views/gateways/show.html.haml index c9942dd..3460c58 100644 --- a/app/views/gateways/show.html.haml +++ b/app/views/gateways/show.html.haml @@ -16,4 +16,17 @@ %strong= t('gateways.show.description') + ":" = @gateway.description -= render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @gateway } \ No newline at end of file += render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @gateway } + + +%h2= t('gateway_settings.index.page_title') +- if @gateway.gateway_settings.any? + = render "gateway_settings/index_core", :gateway_settings => @gateway.gateway_settings + %br += render :partial => 'shared/create_link', :locals => { :parent => @gateway, :child_class => GatewaySetting } + +%h2= t('gateway_parameters.index.page_title') +- if @gateway.gateway_parameters.any? + = render "gateway_parameters/index_core", :gateway_parameters => @gateway.gateway_parameters + %br += render :partial => 'shared/create_link', :locals => { :parent => @gateway, :child_class => GatewayParameter } -- cgit v1.2.3 From cb5fdade73a9e06ce25cb0c688ac9be4ea7f1e49 Mon Sep 17 00:00:00 2001 From: spag Date: Mon, 14 Jan 2013 09:48:46 +0100 Subject: make gateway_parameters less prominent --- app/views/gateways/show.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views/gateways') diff --git a/app/views/gateways/show.html.haml b/app/views/gateways/show.html.haml index 3460c58..ebf75a5 100644 --- a/app/views/gateways/show.html.haml +++ b/app/views/gateways/show.html.haml @@ -25,8 +25,8 @@ %br = render :partial => 'shared/create_link', :locals => { :parent => @gateway, :child_class => GatewaySetting } -%h2= t('gateway_parameters.index.page_title') - if @gateway.gateway_parameters.any? + %h2= t('gateway_parameters.index.page_title') = render "gateway_parameters/index_core", :gateway_parameters => @gateway.gateway_parameters %br = render :partial => 'shared/create_link', :locals => { :parent => @gateway, :child_class => GatewayParameter } -- cgit v1.2.3 From a248db30eb469f1fd99508df0cfbf47c4ad80b8c Mon Sep 17 00:00:00 2001 From: spag Date: Tue, 15 Jan 2013 14:00:19 +0100 Subject: display id --- app/views/gateways/show.html.haml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'app/views/gateways') diff --git a/app/views/gateways/show.html.haml b/app/views/gateways/show.html.haml index ebf75a5..a9b0d18 100644 --- a/app/views/gateways/show.html.haml +++ b/app/views/gateways/show.html.haml @@ -1,5 +1,8 @@ - title t("gateways.show.page_title") +%p + %strong= t('gateways.show.id') + ":" + = @gateway.id %p %strong= t('gateways.show.name') + ":" = @gateway.name @@ -19,14 +22,14 @@ = render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @gateway } -%h2= t('gateway_settings.index.page_title') +%h3= t('gateway_settings.index.page_title') - if @gateway.gateway_settings.any? = render "gateway_settings/index_core", :gateway_settings => @gateway.gateway_settings %br = render :partial => 'shared/create_link', :locals => { :parent => @gateway, :child_class => GatewaySetting } - if @gateway.gateway_parameters.any? - %h2= t('gateway_parameters.index.page_title') + %h3= t('gateway_parameters.index.page_title') = render "gateway_parameters/index_core", :gateway_parameters => @gateway.gateway_parameters %br = render :partial => 'shared/create_link', :locals => { :parent => @gateway, :child_class => GatewayParameter } -- cgit v1.2.3 From 4ea0e252683d89794deff7b1b3689d2cdf61e0d0 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sun, 20 Jan 2013 19:54:11 +0100 Subject: Added a gateways table to tenant#view. --- app/views/gateways/show.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views/gateways') diff --git a/app/views/gateways/show.html.haml b/app/views/gateways/show.html.haml index a9b0d18..9d0ee53 100644 --- a/app/views/gateways/show.html.haml +++ b/app/views/gateways/show.html.haml @@ -28,8 +28,8 @@ %br = render :partial => 'shared/create_link', :locals => { :parent => @gateway, :child_class => GatewaySetting } +%h3= t('gateway_parameters.index.page_title') - if @gateway.gateway_parameters.any? - %h3= t('gateway_parameters.index.page_title') = render "gateway_parameters/index_core", :gateway_parameters => @gateway.gateway_parameters %br = render :partial => 'shared/create_link', :locals => { :parent => @gateway, :child_class => GatewayParameter } -- cgit v1.2.3 From 4e67f8769a3a3199bfb5b363fe9baa231c329a2b Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sun, 20 Jan 2013 20:57:35 +0100 Subject: Refactoring --- app/views/gateways/_index_core.html.haml | 34 +++++++++++++++++--------------- 1 file changed, 18 insertions(+), 16 deletions(-) (limited to 'app/views/gateways') diff --git a/app/views/gateways/_index_core.html.haml b/app/views/gateways/_index_core.html.haml index 21414c3..dd2d1f5 100644 --- a/app/views/gateways/_index_core.html.haml +++ b/app/views/gateways/_index_core.html.haml @@ -1,17 +1,19 @@ -%table - %tr - %th= t('gateways.index.name') - %th= t('gateways.index.technology') - %th= t('gateways.index.inbound') - %th= t('gateways.index.outbound') - %th= t('gateways.index.description') +- cache(['gateways_table', gateways.count, gateways.first, gateways.last]) do + %table + %tr + %th= t('gateways.index.name') + %th= t('gateways.index.technology') + %th= t('gateways.index.inbound') + %th= t('gateways.index.outbound') + %th= t('gateways.index.description') - - reset_cycle - - for gateway in gateways - %tr{:class => cycle('odd', 'even')} - %td= gateway.name - %td= gateway.technology - %td= gateway.inbound - %td= gateway.outbound - %td= gateway.description - =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => gateway} \ No newline at end of file + - reset_cycle + - for gateway in gateways + %tr{:class => cycle('odd', 'even')} + - cache(['gateway_single_table_row_within_tr', gateway, gateways.count]) do + %td= gateway.name + %td= gateway.technology + %td= gateway.inbound + %td= gateway.outbound + %td= gateway.description + =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => gateway} \ 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/gateways/_index_core.html.haml | 2 +- app/views/gateways/edit.html.haml | 2 +- app/views/gateways/index.html.haml | 2 +- app/views/gateways/new.html.haml | 2 +- app/views/gateways/show.html.haml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'app/views/gateways') diff --git a/app/views/gateways/_index_core.html.haml b/app/views/gateways/_index_core.html.haml index dd2d1f5..fc03eb1 100644 --- a/app/views/gateways/_index_core.html.haml +++ b/app/views/gateways/_index_core.html.haml @@ -1,5 +1,5 @@ - cache(['gateways_table', gateways.count, gateways.first, gateways.last]) do - %table + %table{:class => 'table table-striped'} %tr %th= t('gateways.index.name') %th= t('gateways.index.technology') diff --git a/app/views/gateways/edit.html.haml b/app/views/gateways/edit.html.haml index 417dd09..238dc3c 100644 --- a/app/views/gateways/edit.html.haml +++ b/app/views/gateways/edit.html.haml @@ -1,3 +1,3 @@ -- title t("gateways.edit.page_title") +- content_for :title, t("gateways.edit.page_title") = render "form" \ No newline at end of file diff --git a/app/views/gateways/index.html.haml b/app/views/gateways/index.html.haml index cec9cd1..f5d3275 100644 --- a/app/views/gateways/index.html.haml +++ b/app/views/gateways/index.html.haml @@ -1,4 +1,4 @@ -- title t("gateways.index.page_title") +- content_for :title, t("gateways.index.page_title") - if @gateways && @gateways.count > 0 = render "index_core", :gateways => @gateways diff --git a/app/views/gateways/new.html.haml b/app/views/gateways/new.html.haml index a2609f3..d17ff6e 100644 --- a/app/views/gateways/new.html.haml +++ b/app/views/gateways/new.html.haml @@ -1,3 +1,3 @@ -- title t("gateways.new.page_title") +- content_for :title, t("gateways.new.page_title") = render "form" \ No newline at end of file diff --git a/app/views/gateways/show.html.haml b/app/views/gateways/show.html.haml index 9d0ee53..9a3e1c4 100644 --- a/app/views/gateways/show.html.haml +++ b/app/views/gateways/show.html.haml @@ -1,4 +1,4 @@ -- title t("gateways.show.page_title") +- content_for :title, t("gateways.show.page_title") %p %strong= t('gateways.show.id') + ":" -- 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/gateways/_index_core.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/views/gateways') diff --git a/app/views/gateways/_index_core.html.haml b/app/views/gateways/_index_core.html.haml index fc03eb1..3fcf064 100644 --- a/app/views/gateways/_index_core.html.haml +++ b/app/views/gateways/_index_core.html.haml @@ -7,9 +7,9 @@ %th= t('gateways.index.outbound') %th= t('gateways.index.description') - - reset_cycle + - for gateway in gateways - %tr{:class => cycle('odd', 'even')} + %tr - cache(['gateway_single_table_row_within_tr', gateway, gateways.count]) do %td= gateway.name %td= gateway.technology -- cgit v1.2.3 From c52babd4346b1a52c28bb7437d0434ecfb9ab70f Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Mon, 21 Jan 2013 22:25:32 +0100 Subject: Twitter Bootstrap stuff. --- app/views/gateways/_index_core.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views/gateways') diff --git a/app/views/gateways/_index_core.html.haml b/app/views/gateways/_index_core.html.haml index 3fcf064..0eec67f 100644 --- a/app/views/gateways/_index_core.html.haml +++ b/app/views/gateways/_index_core.html.haml @@ -6,7 +6,7 @@ %th= t('gateways.index.inbound') %th= t('gateways.index.outbound') %th= t('gateways.index.description') - + %th{:colspan => '3'} - for gateway in gateways %tr -- cgit v1.2.3