From dbb740151dabceeec4891a2233d37b4ad55c9edc Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Sun, 13 Jan 2013 16:37:07 +0000 Subject: gateway_settings views --- app/views/gateway_settings/_form.html.haml | 7 +++++++ app/views/gateway_settings/_form_core.html.haml | 5 +++++ app/views/gateway_settings/_index_core.html.haml | 17 +++++++++++++++++ app/views/gateway_settings/edit.html.haml | 3 +++ app/views/gateway_settings/index.html.haml | 6 ++++++ app/views/gateway_settings/new.html.haml | 3 +++ app/views/gateway_settings/show.html.haml | 19 +++++++++++++++++++ 7 files changed, 60 insertions(+) create mode 100644 app/views/gateway_settings/_form.html.haml create mode 100644 app/views/gateway_settings/_form_core.html.haml create mode 100644 app/views/gateway_settings/_index_core.html.haml create mode 100644 app/views/gateway_settings/edit.html.haml create mode 100644 app/views/gateway_settings/index.html.haml create mode 100644 app/views/gateway_settings/new.html.haml create mode 100644 app/views/gateway_settings/show.html.haml (limited to 'app/views/gateway_settings') diff --git a/app/views/gateway_settings/_form.html.haml b/app/views/gateway_settings/_form.html.haml new file mode 100644 index 0000000..af26d2a --- /dev/null +++ b/app/views/gateway_settings/_form.html.haml @@ -0,0 +1,7 @@ += simple_form_for([@gateway, @gateway_setting]) do |f| + = f.error_notification + + = render "form_core", :f => f + + .actions + = f.button :submit, conditional_t('gateway_settings.form.submit') diff --git a/app/views/gateway_settings/_form_core.html.haml b/app/views/gateway_settings/_form_core.html.haml new file mode 100644 index 0000000..3880113 --- /dev/null +++ b/app/views/gateway_settings/_form_core.html.haml @@ -0,0 +1,5 @@ +.inputs + = f.input :name, :label => t('gateway_settings.form.name.label'), :hint => conditional_hint('gateway_settings.form.name.hint') + = f.input :value, :label => t('gateway_settings.form.value.label'), :hint => conditional_hint('gateway_settings.form.value.hint') + = f.input :class_type, :label => t('gateway_settings.form.class_type.label'), :hint => conditional_hint('gateway_settings.form.class_type.hint') + = f.input :description, :label => t('gateway_settings.form.description.label'), :hint => conditional_hint('gateway_settings.form.description.hint') diff --git a/app/views/gateway_settings/_index_core.html.haml b/app/views/gateway_settings/_index_core.html.haml new file mode 100644 index 0000000..1b8e443 --- /dev/null +++ b/app/views/gateway_settings/_index_core.html.haml @@ -0,0 +1,17 @@ +%table + %tr + %th= t('gateway_settings.index.gateway_id') + %th= t('gateway_settings.index.name') + %th= t('gateway_settings.index.value') + %th= t('gateway_settings.index.class_type') + %th= t('gateway_settings.index.description') + + - reset_cycle + - for gateway_setting in gateway_settings + %tr{:class => cycle('odd', 'even')} + %td= gateway_setting.gateway_id + %td= gateway_setting.name + %td= gateway_setting.value + %td= gateway_setting.class_type + %td= gateway_setting.description + =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => gateway_setting} \ No newline at end of file diff --git a/app/views/gateway_settings/edit.html.haml b/app/views/gateway_settings/edit.html.haml new file mode 100644 index 0000000..b374f42 --- /dev/null +++ b/app/views/gateway_settings/edit.html.haml @@ -0,0 +1,3 @@ +- title t("gateway_settings.edit.page_title") + += render "form" \ No newline at end of file diff --git a/app/views/gateway_settings/index.html.haml b/app/views/gateway_settings/index.html.haml new file mode 100644 index 0000000..b85ef0a --- /dev/null +++ b/app/views/gateway_settings/index.html.haml @@ -0,0 +1,6 @@ +- title t("gateway_settings.index.page_title") + +- if @gateway_settings && @gateway_settings.count > 0 + = render "index_core", :gateway_settings => @gateway_settings + += render :partial => 'shared/create_link', :locals => {:parent => @gateway, :child_class => GatewaySetting} diff --git a/app/views/gateway_settings/new.html.haml b/app/views/gateway_settings/new.html.haml new file mode 100644 index 0000000..5399dc3 --- /dev/null +++ b/app/views/gateway_settings/new.html.haml @@ -0,0 +1,3 @@ +- title t("gateway_settings.new.page_title") + += render "form" \ No newline at end of file diff --git a/app/views/gateway_settings/show.html.haml b/app/views/gateway_settings/show.html.haml new file mode 100644 index 0000000..4f38e0b --- /dev/null +++ b/app/views/gateway_settings/show.html.haml @@ -0,0 +1,19 @@ +- title t("gateway_settings.show.page_title") + +%p + %strong= t('gateway_settings.show.gateway_id') + ":" + = @gateway_setting.gateway_id +%p + %strong= t('gateway_settings.show.name') + ":" + = @gateway_setting.name +%p + %strong= t('gateway_settings.show.value') + ":" + = @gateway_setting.value +%p + %strong= t('gateway_settings.show.class_type') + ":" + = @gateway_setting.class_type +%p + %strong= t('gateway_settings.show.description') + ":" + = @gateway_setting.description + += render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @gateway_setting } \ No newline at end of file -- cgit v1.2.3 From bfacc7b5de2f3a5a9d09a16683a9ba1fcf184d98 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sun, 13 Jan 2013 22:11:11 +0100 Subject: Fixed some gateway stuff. --- app/views/gateway_settings/_index_core.html.haml | 4 ++-- app/views/gateway_settings/show.html.haml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'app/views/gateway_settings') diff --git a/app/views/gateway_settings/_index_core.html.haml b/app/views/gateway_settings/_index_core.html.haml index 1b8e443..5b93f16 100644 --- a/app/views/gateway_settings/_index_core.html.haml +++ b/app/views/gateway_settings/_index_core.html.haml @@ -9,9 +9,9 @@ - reset_cycle - for gateway_setting in gateway_settings %tr{:class => cycle('odd', 'even')} - %td= gateway_setting.gateway_id + %td= gateway_setting.gateway %td= gateway_setting.name %td= gateway_setting.value %td= gateway_setting.class_type %td= gateway_setting.description - =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => gateway_setting} \ No newline at end of file + =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => gateway_setting.gateway, :child_class => gateway_setting} \ No newline at end of file diff --git a/app/views/gateway_settings/show.html.haml b/app/views/gateway_settings/show.html.haml index 4f38e0b..14de6de 100644 --- a/app/views/gateway_settings/show.html.haml +++ b/app/views/gateway_settings/show.html.haml @@ -2,7 +2,7 @@ %p %strong= t('gateway_settings.show.gateway_id') + ":" - = @gateway_setting.gateway_id + = @gateway_setting.gateway %p %strong= t('gateway_settings.show.name') + ":" = @gateway_setting.name @@ -16,4 +16,4 @@ %strong= t('gateway_settings.show.description') + ":" = @gateway_setting.description -= render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @gateway_setting } \ No newline at end of file += render :partial => 'shared/show_edit_destroy_part', :locals => {:parent => @gateway_setting.gateway, :child_class => @gateway_setting} \ 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/gateway_settings/_form_core.html.haml | 2 +- app/views/gateway_settings/_index_core.html.haml | 2 +- app/views/gateway_settings/show.html.haml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'app/views/gateway_settings') diff --git a/app/views/gateway_settings/_form_core.html.haml b/app/views/gateway_settings/_form_core.html.haml index 3880113..90f4eba 100644 --- a/app/views/gateway_settings/_form_core.html.haml +++ b/app/views/gateway_settings/_form_core.html.haml @@ -1,5 +1,5 @@ .inputs - = f.input :name, :label => t('gateway_settings.form.name.label'), :hint => conditional_hint('gateway_settings.form.name.hint') + = f.input :name, :label => t('gateway_settings.form.name.label'), :hint => conditional_hint('gateway_settings.form.name.hint'), :autofocus => true = f.input :value, :label => t('gateway_settings.form.value.label'), :hint => conditional_hint('gateway_settings.form.value.hint') = f.input :class_type, :label => t('gateway_settings.form.class_type.label'), :hint => conditional_hint('gateway_settings.form.class_type.hint') = f.input :description, :label => t('gateway_settings.form.description.label'), :hint => conditional_hint('gateway_settings.form.description.hint') diff --git a/app/views/gateway_settings/_index_core.html.haml b/app/views/gateway_settings/_index_core.html.haml index 5b93f16..ca4ce09 100644 --- a/app/views/gateway_settings/_index_core.html.haml +++ b/app/views/gateway_settings/_index_core.html.haml @@ -14,4 +14,4 @@ %td= gateway_setting.value %td= gateway_setting.class_type %td= gateway_setting.description - =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => gateway_setting.gateway, :child_class => gateway_setting} \ No newline at end of file + =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => gateway_setting.gateway, :child => gateway_setting} \ No newline at end of file diff --git a/app/views/gateway_settings/show.html.haml b/app/views/gateway_settings/show.html.haml index 14de6de..7a9ecc3 100644 --- a/app/views/gateway_settings/show.html.haml +++ b/app/views/gateway_settings/show.html.haml @@ -16,4 +16,4 @@ %strong= t('gateway_settings.show.description') + ":" = @gateway_setting.description -= render :partial => 'shared/show_edit_destroy_part', :locals => {:parent => @gateway_setting.gateway, :child_class => @gateway_setting} \ No newline at end of file += render :partial => 'shared/show_edit_destroy_part', :locals => {:parent => @gateway_setting.gateway, :child => @gateway_setting} \ No newline at end of file -- cgit v1.2.3 From 4670a33c504f36ddb93cf8ed846c65ceb6810c82 Mon Sep 17 00:00:00 2001 From: spag Date: Mon, 14 Jan 2013 00:13:45 +0100 Subject: gateway_setting views --- app/views/gateway_settings/_form_core.html.haml | 2 +- app/views/gateway_settings/_index_core.html.haml | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) (limited to 'app/views/gateway_settings') diff --git a/app/views/gateway_settings/_form_core.html.haml b/app/views/gateway_settings/_form_core.html.haml index 90f4eba..3d93509 100644 --- a/app/views/gateway_settings/_form_core.html.haml +++ b/app/views/gateway_settings/_form_core.html.haml @@ -1,5 +1,5 @@ .inputs = f.input :name, :label => t('gateway_settings.form.name.label'), :hint => conditional_hint('gateway_settings.form.name.hint'), :autofocus => true = f.input :value, :label => t('gateway_settings.form.value.label'), :hint => conditional_hint('gateway_settings.form.value.hint') - = f.input :class_type, :label => t('gateway_settings.form.class_type.label'), :hint => conditional_hint('gateway_settings.form.class_type.hint') + = f.input :class_type, :collection => GatewaySetting::CLASS_TYPES, :label => t('gateway_settings.form.class_type.label'), :hint => conditional_hint('gateway_settings.form.class_type.hint'), :include_blank => false = f.input :description, :label => t('gateway_settings.form.description.label'), :hint => conditional_hint('gateway_settings.form.description.hint') diff --git a/app/views/gateway_settings/_index_core.html.haml b/app/views/gateway_settings/_index_core.html.haml index ca4ce09..40946f5 100644 --- a/app/views/gateway_settings/_index_core.html.haml +++ b/app/views/gateway_settings/_index_core.html.haml @@ -1,17 +1,13 @@ %table %tr - %th= t('gateway_settings.index.gateway_id') %th= t('gateway_settings.index.name') %th= t('gateway_settings.index.value') - %th= t('gateway_settings.index.class_type') %th= t('gateway_settings.index.description') - reset_cycle - for gateway_setting in gateway_settings %tr{:class => cycle('odd', 'even')} - %td= gateway_setting.gateway %td= gateway_setting.name %td= gateway_setting.value - %td= gateway_setting.class_type %td= gateway_setting.description - =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => gateway_setting.gateway, :child => gateway_setting} \ No newline at end of file + =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => gateway_setting.gateway, :child => gateway_setting} -- cgit v1.2.3 From 9452ebcbe1f04d15105e1cd21890cd1a60cdeb8f Mon Sep 17 00:00:00 2001 From: spag Date: Mon, 14 Jan 2013 09:49:43 +0100 Subject: selection --- app/views/gateway_settings/_form_core.html.haml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'app/views/gateway_settings') diff --git a/app/views/gateway_settings/_form_core.html.haml b/app/views/gateway_settings/_form_core.html.haml index 3d93509..3e7dc49 100644 --- a/app/views/gateway_settings/_form_core.html.haml +++ b/app/views/gateway_settings/_form_core.html.haml @@ -1,5 +1,4 @@ .inputs - = f.input :name, :label => t('gateway_settings.form.name.label'), :hint => conditional_hint('gateway_settings.form.name.hint'), :autofocus => true + = f.input :name, :collection => GatewaySetting::GATEWAY_SETTINGS['sip'].keys, :label => t('gateway_settings.form.name.label'), :hint => conditional_hint('gateway_settings.form.name.hint'), :autofocus => true, :include_blank => false = f.input :value, :label => t('gateway_settings.form.value.label'), :hint => conditional_hint('gateway_settings.form.value.hint') - = f.input :class_type, :collection => GatewaySetting::CLASS_TYPES, :label => t('gateway_settings.form.class_type.label'), :hint => conditional_hint('gateway_settings.form.class_type.hint'), :include_blank => false = f.input :description, :label => t('gateway_settings.form.description.label'), :hint => conditional_hint('gateway_settings.form.description.hint') -- 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/gateway_settings/_index_core.html.haml | 2 +- app/views/gateway_settings/edit.html.haml | 2 +- app/views/gateway_settings/index.html.haml | 2 +- app/views/gateway_settings/new.html.haml | 2 +- app/views/gateway_settings/show.html.haml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'app/views/gateway_settings') diff --git a/app/views/gateway_settings/_index_core.html.haml b/app/views/gateway_settings/_index_core.html.haml index 40946f5..0743bcd 100644 --- a/app/views/gateway_settings/_index_core.html.haml +++ b/app/views/gateway_settings/_index_core.html.haml @@ -1,4 +1,4 @@ -%table +%table{:class => 'table table-striped'} %tr %th= t('gateway_settings.index.name') %th= t('gateway_settings.index.value') diff --git a/app/views/gateway_settings/edit.html.haml b/app/views/gateway_settings/edit.html.haml index b374f42..464c36e 100644 --- a/app/views/gateway_settings/edit.html.haml +++ b/app/views/gateway_settings/edit.html.haml @@ -1,3 +1,3 @@ -- title t("gateway_settings.edit.page_title") +- content_for :title, t("gateway_settings.edit.page_title") = render "form" \ No newline at end of file diff --git a/app/views/gateway_settings/index.html.haml b/app/views/gateway_settings/index.html.haml index b85ef0a..3f1400e 100644 --- a/app/views/gateway_settings/index.html.haml +++ b/app/views/gateway_settings/index.html.haml @@ -1,4 +1,4 @@ -- title t("gateway_settings.index.page_title") +- content_for :title, t("gateway_settings.index.page_title") - if @gateway_settings && @gateway_settings.count > 0 = render "index_core", :gateway_settings => @gateway_settings diff --git a/app/views/gateway_settings/new.html.haml b/app/views/gateway_settings/new.html.haml index 5399dc3..ec8c346 100644 --- a/app/views/gateway_settings/new.html.haml +++ b/app/views/gateway_settings/new.html.haml @@ -1,3 +1,3 @@ -- title t("gateway_settings.new.page_title") +- content_for :title, t("gateway_settings.new.page_title") = render "form" \ No newline at end of file diff --git a/app/views/gateway_settings/show.html.haml b/app/views/gateway_settings/show.html.haml index 7a9ecc3..019aec4 100644 --- a/app/views/gateway_settings/show.html.haml +++ b/app/views/gateway_settings/show.html.haml @@ -1,4 +1,4 @@ -- title t("gateway_settings.show.page_title") +- content_for :title, t("gateway_settings.show.page_title") %p %strong= t('gateway_settings.show.gateway_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/gateway_settings/_index_core.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/views/gateway_settings') diff --git a/app/views/gateway_settings/_index_core.html.haml b/app/views/gateway_settings/_index_core.html.haml index 0743bcd..ded7eb8 100644 --- a/app/views/gateway_settings/_index_core.html.haml +++ b/app/views/gateway_settings/_index_core.html.haml @@ -4,9 +4,9 @@ %th= t('gateway_settings.index.value') %th= t('gateway_settings.index.description') - - reset_cycle + - for gateway_setting in gateway_settings - %tr{:class => cycle('odd', 'even')} + %tr %td= gateway_setting.name %td= gateway_setting.value %td= gateway_setting.description -- cgit v1.2.3