summaryrefslogtreecommitdiff
path: root/app/views/call_routes
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/call_routes')
-rw-r--r--app/views/call_routes/_form.html.haml7
-rw-r--r--app/views/call_routes/_form_core.html.haml5
-rw-r--r--app/views/call_routes/_index_core.html.haml21
-rw-r--r--app/views/call_routes/edit.html.haml3
-rw-r--r--app/views/call_routes/index.html.haml11
-rw-r--r--app/views/call_routes/new.html.haml3
-rw-r--r--app/views/call_routes/show.html.haml22
7 files changed, 72 insertions, 0 deletions
diff --git a/app/views/call_routes/_form.html.haml b/app/views/call_routes/_form.html.haml
new file mode 100644
index 0000000..1415852
--- /dev/null
+++ b/app/views/call_routes/_form.html.haml
@@ -0,0 +1,7 @@
+= simple_form_for(@call_route) do |f|
+ = f.error_notification
+
+ = render "form_core", :f => f
+
+ .actions
+ = f.button :submit, conditional_t('call_routes.form.submit') \ No newline at end of file
diff --git a/app/views/call_routes/_form_core.html.haml b/app/views/call_routes/_form_core.html.haml
new file mode 100644
index 0000000..b64d660
--- /dev/null
+++ b/app/views/call_routes/_form_core.html.haml
@@ -0,0 +1,5 @@
+.inputs
+ = f.input :routing_table, :collection => CallRoute::ROUTING_TABLES, :label => t('call_routes.form.table.label'), :hint => conditional_hint('call_routes.form.table.hint'), :include_blank => false, :autofocus => true
+ = f.input :name, :label => t('call_routes.form.name.label'), :hint => conditional_hint('call_routes.form.name.hint')
+ = f.input :endpoint_type, :label => t('call_routes.form.endpoint_type.label'), :hint => conditional_hint('call_routes.form.endpoint_type.hint')
+ = f.input :endpoint_id, :label => t('call_routes.form.endpoint_id.label'), :hint => conditional_hint('call_routes.form.endpoint_id.hint')
diff --git a/app/views/call_routes/_index_core.html.haml b/app/views/call_routes/_index_core.html.haml
new file mode 100644
index 0000000..5dc7c21
--- /dev/null
+++ b/app/views/call_routes/_index_core.html.haml
@@ -0,0 +1,21 @@
+- cache(['call_routes_table', call_routes.count, call_routes.reorder(:updated_at).last]) do
+ %table{:class => 'table table-striped'}
+ %tr
+ %th= t('call_routes.index.name')
+ %th= t('route_elements.index.pattern')
+ %th= t('call_routes.index.endpoint_type')
+ %th{:colspan => '3'}
+
+ - for call_route in call_routes
+ - cache(['call_route_single_table_row', call_route, call_routes.count]) do
+ %tr
+ %td= call_route.name
+ %td
+ - if call_route.route_elements.any?
+ = call_route.route_elements.first.pattern
+ - if call_route.route_elements.count > 1
+ = ', ...'
+ - else
+ = '-'
+ %td= call_route.endpoint_type
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => call_route} \ No newline at end of file
diff --git a/app/views/call_routes/edit.html.haml b/app/views/call_routes/edit.html.haml
new file mode 100644
index 0000000..6048200
--- /dev/null
+++ b/app/views/call_routes/edit.html.haml
@@ -0,0 +1,3 @@
+- content_for :title, t("call_routes.edit.page_title")
+
+= render "form" \ No newline at end of file
diff --git a/app/views/call_routes/index.html.haml b/app/views/call_routes/index.html.haml
new file mode 100644
index 0000000..bd4468c
--- /dev/null
+++ b/app/views/call_routes/index.html.haml
@@ -0,0 +1,11 @@
+- content_for :title, t("call_routes.index.page_title")
+
+- if @call_routes && @call_routes.count > 0
+ %table{:class => 'table table-striped'}
+ - @routing_tables.each do |routing_table|
+ %tr
+ %td{:colspan => 3}
+ %h3= routing_table
+ = render "index_core", :call_routes => @call_routes.where(:routing_table => routing_table)
+
+= render :partial => 'shared/create_link', :locals => {:child_class => CallRoute}
diff --git a/app/views/call_routes/new.html.haml b/app/views/call_routes/new.html.haml
new file mode 100644
index 0000000..28aead9
--- /dev/null
+++ b/app/views/call_routes/new.html.haml
@@ -0,0 +1,3 @@
+- content_for :title, t("call_routes.new.page_title")
+
+= render "form" \ No newline at end of file
diff --git a/app/views/call_routes/show.html.haml b/app/views/call_routes/show.html.haml
new file mode 100644
index 0000000..70fe13e
--- /dev/null
+++ b/app/views/call_routes/show.html.haml
@@ -0,0 +1,22 @@
+- content_for :title, t("call_routes.show.page_title")
+
+%p
+ %strong= t('call_routes.show.table') + ":"
+ = @call_route.routing_table
+%p
+ %strong= t('call_routes.show.name') + ":"
+ = @call_route.name
+%p
+ %strong= t('call_routes.show.endpoint_type') + ":"
+ = @call_route.endpoint_type
+%p
+ %strong= t('call_routes.show.endpoint_id') + ":"
+ = @call_route.endpoint_id
+
+= render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @call_route }
+
+%h3= t('route_elements.index.page_title')
+- if @call_route.route_elements && @call_route.route_elements.count > 0
+ = render "route_elements/index_core", :route_elements => @call_route.route_elements
+
+= render :partial => 'shared/create_link', :locals => { :parent => @call_route, :child_class => RouteElement }