summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-19 09:05:50 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-19 09:05:50 +0100
commitb4abd87252db53e3d79a9601cf9c581f61827f10 (patch)
tree6d26fff9ec773589707c390bf0453999e0e4d4d1
parenta4c2b5b00c074d8861ef313f672032611d662fff (diff)
Added call_routes to tenant#show
-rw-r--r--app/models/route_element.rb2
-rw-r--r--app/views/tenants/_admin_area.de.html.haml4
-rw-r--r--app/views/tenants/_call_routes.html.haml8
-rw-r--r--config/locales/views/call_routes/de.yml28
4 files changed, 26 insertions, 16 deletions
diff --git a/app/models/route_element.rb b/app/models/route_element.rb
index 87b26ef..324a26d 100644
--- a/app/models/route_element.rb
+++ b/app/models/route_element.rb
@@ -13,7 +13,7 @@ class RouteElement < ActiveRecord::Base
def to_s
- "#{var_in} #{var_out}"
+ "#{pattern} => #{var_in} #{var_out}"
end
end
diff --git a/app/views/tenants/_admin_area.de.html.haml b/app/views/tenants/_admin_area.de.html.haml
index fed7d4f..ba64e9a 100644
--- a/app/views/tenants/_admin_area.de.html.haml
+++ b/app/views/tenants/_admin_area.de.html.haml
@@ -25,4 +25,6 @@
=link_to manufacturer, manufacturer_path(manufacturer)
- else
= succeed '.' do
- =link_to manufacturer, manufacturer_path(manufacturer) \ No newline at end of file
+ =link_to manufacturer, manufacturer_path(manufacturer)
+
+= render :partial => 'call_routes', :locals => {:tenant => @tenant} \ No newline at end of file
diff --git a/app/views/tenants/_call_routes.html.haml b/app/views/tenants/_call_routes.html.haml
new file mode 100644
index 0000000..ade24c9
--- /dev/null
+++ b/app/views/tenants/_call_routes.html.haml
@@ -0,0 +1,8 @@
+%h2= t("call_routes.index.page_title")
+
+- if CallRoute.count <= GsParameter.get('NUMBER_OF_SHOWN_ITEMS')
+ = render "call_routes/index_core", :call_routes => CallRoute.call
+ = render :partial => 'shared/create_link', :locals => {:child_class => CallRoute}
+- else
+ %p
+ = link_to t("call_routes.index.page_title"), call_routes_path \ No newline at end of file
diff --git a/config/locales/views/call_routes/de.yml b/config/locales/views/call_routes/de.yml
index 34af575..71ad51a 100644
--- a/config/locales/views/call_routes/de.yml
+++ b/config/locales/views/call_routes/de.yml
@@ -1,27 +1,27 @@
de:
call_routes:
- name: 'Call route'
+ name: 'Call Route'
controller:
- successfuly_created: 'Call route wurde angelegt.'
- successfuly_updated: 'Call route wurde aktualisiert.'
- successfuly_destroyed: 'Call route wurde gelöscht.'
+ successfuly_created: 'Call Route wurde angelegt.'
+ successfuly_updated: 'Call Route wurde aktualisiert.'
+ successfuly_destroyed: 'Call Route wurde gelöscht.'
index:
- page_title: 'Übersicht von Call route'
- table: 'Table'
+ page_title: 'Liste aller Call Routen'
+ routing_table: 'Routing Table'
name: 'Name'
endpoint_type: 'Endpoint type'
endpoint_id: 'Endpoint'
position: 'Position'
actions:
- confirm: 'Sind Sie sicher, dass Sie folgendes löschen möchten: Call route'
+ confirm: 'Sind Sie sicher, dass Sie folgendes löschen möchten: Call Route'
destroy: 'Löschen'
edit: 'Bearbeiten'
show: 'Anzeigen'
create: 'Neu anlegen'
- create_for: 'Call route neu anlegen für %{resource}'
+ create_for: 'Call Route neu anlegen für %{resource}'
show:
- page_title: 'Call route bearbeiten'
- table: 'Table'
+ page_title: 'Call Route bearbeiten'
+ routing_table: 'Routing Table'
name: 'Name'
endpoint_type: 'Endpoint type'
endpoint_id: 'Endpoint'
@@ -32,18 +32,18 @@ de:
edit: 'Bearbeiten'
view_all: 'Alle anzeigen'
new:
- page_title: 'Call route neu anlegen'
+ page_title: 'Call Route neu anlegen'
actions:
back_to_list: 'Zurück zur Übersicht'
edit:
- page_title: 'Call route bearbeiten'
+ page_title: 'Call Route bearbeiten'
actions:
back_to_list: 'Zurück zur Übersicht'
edit: 'Bearbeiten'
view_all: 'Alle anzeigen'
form:
- table:
- label: 'Table'
+ routing_table:
+ label: 'Routing Table'
hint: ''
name:
label: 'Name'