summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorspag <spag@golwen.net>2013-01-19 09:10:13 +0100
committerspag <spag@golwen.net>2013-01-19 09:10:13 +0100
commit617118f91bb77aa4cd37dc8ecfd77059818c9cec (patch)
tree34ca274cdd6a10505f1284724ba1198f6c360978
parent1e290840497225c50373d0b860036505fa91e13a (diff)
parentb4abd87252db53e3d79a9601cf9c581f61827f10 (diff)
Merge branch 'develop' of github.com:amooma/GS5 into develop
-rw-r--r--.gitignore3
-rw-r--r--app/models/route_element.rb2
-rw-r--r--app/views/tenants/_admin_area.de.html.haml19
-rw-r--r--app/views/tenants/_admin_area.html.haml15
-rw-r--r--app/views/tenants/_call_routes.html.haml8
-rw-r--r--app/views/tenants/_table_of_phone_books.html.haml1
-rw-r--r--app/views/tenants/_user_groups_table.de.html.haml4
-rw-r--r--app/views/tenants/_users_table.de.html.haml7
-rw-r--r--config/initializers/update_gs_version_number.rb7
-rw-r--r--config/locales/views/call_routes/de.yml28
10 files changed, 49 insertions, 45 deletions
diff --git a/.gitignore b/.gitignore
index 65a18ad..4d70e4a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -83,3 +83,6 @@ tmp/**/*
# Freeswitch
/misc/freeswitch/conf/freeswitch.serial
/misc/freeswitch/scripts/ini/gateway_gateway1.ini
+
+# Cache
+/public/gemeinschaft_setups/*
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 268c8e7..ba64e9a 100644
--- a/app/views/tenants/_admin_area.de.html.haml
+++ b/app/views/tenants/_admin_area.de.html.haml
@@ -1,23 +1,12 @@
-%h2 Admin Bereich
= render :partial => 'tenants/sip_accounts_and_phones', :locals => {:tenant => @tenant}
-%h2= t("users.index.page_title")
-- if @tenant.users.count <= GsParameter.get('NUMBER_OF_SHOWN_ITEMS')
- = render "users/index_core", :users => @tenant.users
- = render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => User}
-- else
- %p
- = link_to "Liste aller User.", tenant_users_path(@tenant)
+= render :partial => 'users_table', :locals => {:tenant => @tenant}
-- if @tenant.user_groups.any?
- %h2= t("user_groups.index.page_title")
- = render "user_groups/index_core", :user_groups => @tenant.user_groups
- = render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => UserGroup}
+= render :partial => 'user_groups_table', :locals => {:tenant => @tenant}
%h2 Features
= render :partial => 'tenants/table_of_functions', :locals => {:tenant => @tenant}
-%h2=t("phone_books.index.page_title")
= render :partial => 'tenants/table_of_phone_books', :locals => {:tenant => @tenant}
%h2 Gemeinschaft Konfiguration
@@ -36,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/_admin_area.html.haml b/app/views/tenants/_admin_area.html.haml
index e708215..50ed372 100644
--- a/app/views/tenants/_admin_area.html.haml
+++ b/app/views/tenants/_admin_area.html.haml
@@ -1,23 +1,12 @@
-%h2 Admin Area
= render :partial => 'tenants/sip_accounts_and_phones', :locals => {:tenant => @tenant}
-%h2= t("users.index.page_title")
-- if @tenant.users.count <= GsParameter.get('NUMBER_OF_SHOWN_ITEMS')
- = render "users/index_core", :users => @tenant.users
- = render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => User}
-- else
- %p
- = link_to "Liste aller User.", tenant_users_path(@tenant)
+= render :partial => 'users_table', :locals => {:tenant => @tenant}
-- if @tenant.user_groups.any?
- %h2= t("user_groups.index.page_title")
- = render "user_groups/index_core", :user_groups => @tenant.user_groups
- = render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => UserGroup}
+= render :partial => 'user_groups_table', :locals => {:tenant => @tenant}
%h2 Features
= render :partial => 'tenants/table_of_functions', :locals => {:tenant => @tenant}
-%h2=t("phone_books.index.page_title")
= render :partial => 'tenants/table_of_phone_books', :locals => {:tenant => @tenant}
%h2 Gemeinschaft Configuration
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/app/views/tenants/_table_of_phone_books.html.haml b/app/views/tenants/_table_of_phone_books.html.haml
index 6baca58..9d9b97c 100644
--- a/app/views/tenants/_table_of_phone_books.html.haml
+++ b/app/views/tenants/_table_of_phone_books.html.haml
@@ -1,4 +1,5 @@
- cache(['user_show_phone_books', I18n.locale, tenant, tenant.phone_books]) do
+ %h2=t("phone_books.index.page_title")
-# Phone books
-#
- if GuiFunction.display?('show_phone_books_in_user_show_view', current_user)
diff --git a/app/views/tenants/_user_groups_table.de.html.haml b/app/views/tenants/_user_groups_table.de.html.haml
new file mode 100644
index 0000000..61b3e3d
--- /dev/null
+++ b/app/views/tenants/_user_groups_table.de.html.haml
@@ -0,0 +1,4 @@
+- if @tenant.user_groups.any?
+ %h2= t("user_groups.index.page_title")
+ = render "user_groups/index_core", :user_groups => tenant.user_groups
+ = render :partial => 'shared/create_link', :locals => {:parent => tenant, :child_class => UserGroup}
diff --git a/app/views/tenants/_users_table.de.html.haml b/app/views/tenants/_users_table.de.html.haml
new file mode 100644
index 0000000..850ea5e
--- /dev/null
+++ b/app/views/tenants/_users_table.de.html.haml
@@ -0,0 +1,7 @@
+%h2= t("users.index.page_title")
+- if @tenant.users.count <= GsParameter.get('NUMBER_OF_SHOWN_ITEMS')
+ = render "users/index_core", :users => tenant.users
+ = render :partial => 'shared/create_link', :locals => {:parent => tenant, :child_class => User}
+- else
+ %p
+ = link_to "Liste aller User.", tenant_users_path(tenant) \ No newline at end of file
diff --git a/config/initializers/update_gs_version_number.rb b/config/initializers/update_gs_version_number.rb
index 972c480..4770858 100644
--- a/config/initializers/update_gs_version_number.rb
+++ b/config/initializers/update_gs_version_number.rb
@@ -2,7 +2,8 @@
# It equals the branch in git.
#
if !ENV['GS_VERSION'].nil? && GsParameter.table_exists? && GsParameter.get('GEMEINSCHAFT_VERSION') != ENV['GS_VERSION']
- if GsParameter.where(:name => 'GEMEINSCHAFT_VERSION').any?
- GsParameter.where(:name => 'GEMEINSCHAFT_VERSION').first.update_attributes(:name => ENV['GS_VERSION'])
- end
+ version = GsParameter.find_or_create_by_name('GEMEINSCHAFT_VERSION')
+ version.section = 'Generic'
+ version.value = ENV['GS_VERSION']
+ version.save
end
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'