diff options
33 files changed, 577 insertions, 325 deletions
@@ -62,9 +62,6 @@ gem 'will_paginate' gem 'daemons' gem 'delayed_job_active_record' -# Private Pub http://railscasts.com/episodes/316-private-pub -gem 'private_pub' - # https://github.com/iain/http_accept_language gem 'http_accept_language' diff --git a/Gemfile.lock b/Gemfile.lock index 6d348e0..ad47697 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -29,7 +29,6 @@ GEM i18n (~> 0.6) multi_json (~> 1.0) acts_as_list (0.1.9) - addressable (2.3.2) arel (3.0.2) backup (3.0.27) open4 (~> 1.3.0) @@ -63,7 +62,6 @@ GEM sass (~> 3.1) compass-rails (1.0.3) compass (>= 0.12.2, < 0.14) - cookiejar (0.3.0) daemons (1.1.9) dalli (2.6.2) delayed_job (3.0.4) @@ -71,14 +69,6 @@ GEM delayed_job_active_record (0.3.3) activerecord (>= 2.1.0, < 4) delayed_job (~> 3.0) - em-http-request (1.0.3) - addressable (>= 2.2.3) - cookiejar - em-socksify - eventmachine (>= 1.0.0.beta.4) - http_parser.rb (>= 0.5.3) - em-socksify (0.2.1) - eventmachine (>= 1.0.0.beta.4) erubis (2.7.0) eventmachine (1.0.0) execjs (1.4.0) @@ -88,21 +78,11 @@ GEM factory_girl_rails (4.2.0) factory_girl (~> 4.2.0) railties (>= 3.0.0) - faye (0.8.8) - cookiejar (>= 0.3.0) - em-http-request (>= 0.3.0) - eventmachine (>= 0.12.0) - faye-websocket (>= 0.4.0) - rack (>= 1.0.0) - yajl-ruby (>= 1.0.0) - faye-websocket (0.4.6) - eventmachine (>= 0.12.0) fssm (0.2.10) haml (3.1.7) hike (1.2.1) hirb (0.7.1) http_accept_language (1.0.2) - http_parser.rb (0.5.3) i18n (0.6.1) inifile (2.0.2) journey (1.0.4) @@ -125,8 +105,6 @@ GEM nokogiri (1.5.6) open4 (1.3.0) polyglot (0.3.3) - private_pub (1.0.3) - faye quiet_assets (1.0.1) railties (~> 3.1) rack (1.4.4) @@ -202,7 +180,6 @@ GEM activesupport (>= 2.3.4) chronic (>= 0.6.3) will_paginate (3.0.4) - yajl-ruby (1.1.0) PLATFORMS ruby @@ -233,7 +210,6 @@ DEPENDENCIES mini_magick mysql2 nokogiri - private_pub quiet_assets rails (= 3.2.11) sass-rails diff --git a/app/controllers/backup_jobs_controller.rb b/app/controllers/backup_jobs_controller.rb index 4f242ba..31b9c21 100644 --- a/app/controllers/backup_jobs_controller.rb +++ b/app/controllers/backup_jobs_controller.rb @@ -4,29 +4,34 @@ class BackupJobsController < ApplicationController before_filter :spread_breadcrumbs def index - # @backup_jobs = BackupJob.all end def show - # @backup_job = BackupJob.find(params[:id]) end def new - @backup_job = BackupJob.new + # Do the same as create. + # + @backup_job = BackupJob.new(:started_at => Time.now) + + if @backup_job.save + redirect_to backup_jobs_path, :notice => t('backup_jobs.controller.successfuly_created') + else + render :new + end end def create @backup_job = BackupJob.new(:started_at => Time.now) if @backup_job.save - redirect_to @backup_job, :notice => t('backup_jobs.controller.successfuly_created') + redirect_to backup_jobs_path, :notice => t('backup_jobs.controller.successfuly_created') else render :new end end def destroy - # @backup_job = BackupJob.find(params[:id]) @backup_job.destroy redirect_to backup_jobs_url, :notice => t('backup_jobs.controller.successfuly_destroyed') end diff --git a/app/controllers/system_messages_controller.rb b/app/controllers/system_messages_controller.rb deleted file mode 100644 index d7fe515..0000000 --- a/app/controllers/system_messages_controller.rb +++ /dev/null @@ -1,30 +0,0 @@ -class SystemMessagesController < ApplicationController - load_and_authorize_resource :user - load_and_authorize_resource :system_message, :through => [:user] - - def index - @system_messages = @system_messages.where(:created_at => Time.now - 6.hours .. Time.now) - end - - def show - end - - def new - @system_message = @user.system_messages.build - end - - def create - @system_message = @user.system_messages.build(params[:system_message]) - if @system_message.save - # Push the new message via AJAX to the browser. - # - # PrivatePub.publish_to("/users/#{@system_message.user.id}/system_messages", - # "$('#system_message').empty();$('#system_message').append('<span class=\"created_at\">#{(I18n.l @system_message.created_at, :format => :short )}</span> #{@system_message.content}');$('#system_message_display').fadeIn();" - # ) - - redirect_to user_system_message_path(@user, @system_message), :notice => t('system_messages.controller.successfuly_created') - else - render :new - end - end -end diff --git a/app/controllers/tenants_controller.rb b/app/controllers/tenants_controller.rb index f30246b..b6a96b7 100644 --- a/app/controllers/tenants_controller.rb +++ b/app/controllers/tenants_controller.rb @@ -8,6 +8,7 @@ class TenantsController < ApplicationController def show @tenant = Tenant.find(params[:id]) @gateways = Gateway.order(:updated_at) + @backup_jobs = BackupJob.order(:finished_at).last(5) end def new diff --git a/app/helpers/system_messages_helper.rb b/app/helpers/system_messages_helper.rb deleted file mode 100644 index fef2386..0000000 --- a/app/helpers/system_messages_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module SystemMessagesHelper -end diff --git a/app/models/ability.rb b/app/models/ability.rb index 01f26aa..4c0844c 100644 --- a/app/models/ability.rb +++ b/app/models/ability.rb @@ -56,10 +56,6 @@ class Ability can :read, PhoneBookEntry, :phone_book => { :id => user_group.phone_book_ids } end - # SystemMessages - # - cannot [:destroy, :edit, :update], SystemMessage - # A FacDocument can't be changed # cannot [:edit, :update], FaxDocument @@ -160,10 +156,6 @@ class Ability # can :manage, CallForward, :phone_number_id => user.phone_number_ids - # SystemMessages - # - can :read, SystemMessage, :user_id => user.id - # SoftkeyFunctions # can :read, SoftkeyFunction diff --git a/app/models/system_message.rb b/app/models/system_message.rb deleted file mode 100644 index 0d9e862..0000000 --- a/app/models/system_message.rb +++ /dev/null @@ -1,7 +0,0 @@ -class SystemMessage < ActiveRecord::Base - attr_accessible :content - - belongs_to :user - - validates_presence_of :content -end diff --git a/app/views/backup_jobs/_index_core.html.haml b/app/views/backup_jobs/_index_core.html.haml index 9eebefd..0102546 100644 --- a/app/views/backup_jobs/_index_core.html.haml +++ b/app/views/backup_jobs/_index_core.html.haml @@ -1,12 +1,15 @@ %table.table.table-striped %tr %th= t('backup_jobs.index.started_at') - %th= t('backup_jobs.index.finished_at') + %th + %span.hidden-phone + = t('backup_jobs.index.finished_at') %th= t('backup_jobs.index.state') - %th= t('backup_jobs.index.size_of_the_backup') + %th + %span.hidden-phone + = t('backup_jobs.index.size_of_the_backup') %th{:colspan => '2'} - - for backup_job in backup_jobs - if backup_job.state == 'queued' - row_marker = 'warning' @@ -18,14 +21,29 @@ %tr{:class => row_marker} - if backup_job.finished_at.blank? %td{:colspan => '2'} - = time_ago_in_words(backup_job.started_at) + - if (Time.now - 1.day) > backup_job.started_at + = l backup_job.started_at, :format => :short + - else + - case I18n.locale + - when :de + = "vor #{time_ago_in_words(backup_job.started_at)}" + - when :en + = "#{time_ago_in_words(backup_job.started_at)} ago" + - else + = l backup_job.started_at, :format => :short - else %td = l backup_job.started_at, :format => :short %td - = l backup_job.finished_at, :format => :short + %span.hidden-phone + = l backup_job.finished_at, :format => :short %td= backup_job.state %td - - if backup_job.backup_file? - = number_to_human_size(backup_job.backup_file.size, :precision => 2) - =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => backup_job}
\ No newline at end of file + %span.hidden-phone + - if backup_job.backup_file? + %a{:href => backup_job.backup_file.url} + %i{:class => 'icon-download'} + = number_to_human_size(backup_job.backup_file.size, :precision => 2) + - else + = '-' + =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => backup_job} diff --git a/app/views/backup_jobs/show.html.haml b/app/views/backup_jobs/show.html.haml index 5d85bbc..6fcb1dc 100644 --- a/app/views/backup_jobs/show.html.haml +++ b/app/views/backup_jobs/show.html.haml @@ -15,6 +15,8 @@ %p %strong= t('backup_jobs.show.size_of_the_backup') + ":" - if @backup_job.backup_file? - = number_to_human_size(@backup_job.backup_file.size, :precision => 2) + %a{:href => backup_job.backup_file.url} + %i{:class => 'icon-download'} + = number_to_human_size(backup_job.backup_file.size, :precision => 2) = render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @backup_job }
\ No newline at end of file diff --git a/app/views/gs_parameters/_index_core.html.haml b/app/views/gs_parameters/_index_core.html.haml index 11d60db..2105126 100644 --- a/app/views/gs_parameters/_index_core.html.haml +++ b/app/views/gs_parameters/_index_core.html.haml @@ -1,6 +1,9 @@ -- cache(['gs_parameters_table_section', gs_parameters.first.section, gs_parameters.reorder(:updated_at).last, gs_parameters.pluck(:id)]) do +- cache(['gs_parameter_sub_table', I18n.locale, gs_parameters.count, gs_parameters.reorder(:updated_at).first, gs_parameters.reorder(:updated_at).last]) do %thead %tr + %th + %span.hidden-phone + = t('gs_parameters.index.entity') %th= t('gs_parameters.index.name') - if !@sections %th= t('gs_parameters.index.section') @@ -8,9 +11,16 @@ %tbody - for gs_parameter in gs_parameters - - cache(['gs_parameters_table_single_row', gs_parameter]) do + - cache(['gs_parameters_table_single_row', I18n.locale, gs_parameter]) do %tr %td + - if gs_parameter.entity.blank? + %span.hidden-phone + = '-' + - else + %span.hidden-phone + = truncate(gs_parameter.entity, :length => GsParameter.get('DESKTOP_MAX_STRING_LENGTH')) + %td %span.hidden-phone = truncate(gs_parameter.name, :length => GsParameter.get('DESKTOP_MAX_STRING_LENGTH')) %span.visible-phone diff --git a/app/views/gs_parameters/index.html.haml b/app/views/gs_parameters/index.html.haml index 1189a45..8df2bb3 100644 --- a/app/views/gs_parameters/index.html.haml +++ b/app/views/gs_parameters/index.html.haml @@ -1,13 +1,11 @@ - content_for :title, t("gs_parameters.index.page_title") -- if @gs_parameters && @gs_parameters.count > 0 - - cache(['gs_parameters_table', I18n.locale, @gs_parameters_unordered.reorder(:updated_at).last, @gs_parameters_unordered.count]) do +- cache(['gs_parameter_all_tables', I18n.locale, @gs_parameters.count, @gs_parameters.reorder(:updated_at).first, @gs_parameters.reorder(:updated_at).last]) do + - if @gs_parameters && @gs_parameters.count > 0 - if @sections - %table.table.table-striped - - @sections.each do |section| - %tr - %td{:colspan => 3} - %h3= section + - @sections.each do |section| + %h3= section + %table.table.table-striped -# Template Dependency: gs_parameters/_index_core = render "index_core", :gs_parameters => @gs_parameters.where(:section => section) - else diff --git a/app/views/layouts/_footer.html.haml b/app/views/layouts/_footer.html.haml index 3d4658b..2703844 100644 --- a/app/views/layouts/_footer.html.haml +++ b/app/views/layouts/_footer.html.haml @@ -16,4 +16,4 @@ %li =link_to t('misc.send_a_bugreport'), URI::escape("https://github.com/amooma/GS5/issues/new?title=Bugreport&body=URL which triggered the bugreport is: #{request.fullpath}\nGS5 buildname: #{(GsParameter.get('GEMEINSCHAFT_BUILDNAME').blank? ? 'unknown' : GsParameter.get('GEMEINSCHAFT_BUILDNAME'))} (#{GsParameter.get('GEMEINSCHAFT_VERSION')})\n\nPlease provide your bugreport below this line and update the title of this issue to a more specific one.") %li{:class => 'pull-right'} - = link_to 'brought to you by AMOOMA GmbH', 'http://amooma.de'
\ No newline at end of file + = link_to '© AMOOMA GmbH', 'http://amooma.de'
\ No newline at end of file diff --git a/app/views/layouts/_navbar.html.haml b/app/views/layouts/_navbar.html.haml index 335dd3d..7084090 100644 --- a/app/views/layouts/_navbar.html.haml +++ b/app/views/layouts/_navbar.html.haml @@ -21,11 +21,9 @@ - if current_user && current_user.sip_accounts.any? %li %a{:href => sip_account_call_histories_path(current_user.sip_accounts.first)} - %i.icon-list-alt.icon-white =t("call_histories.index.page_title") %li %a{:href => sip_account_voicemail_messages_path(current_user.sip_accounts.first)} - %i.icon-volume-up.icon-white =t("voicemail_messages.index.page_title") - if current_user diff --git a/app/views/system_messages/_form.html.haml b/app/views/system_messages/_form.html.haml deleted file mode 100644 index 036ee00..0000000 --- a/app/views/system_messages/_form.html.haml +++ /dev/null @@ -1,7 +0,0 @@ -= simple_form_for([@user, @system_message]) do |f| - = f.error_notification - - = render "form_core", :f => f - - .actions - = f.button :submit, conditional_t('system_messages.form.submit')
\ No newline at end of file diff --git a/app/views/system_messages/_form_core.html.haml b/app/views/system_messages/_form_core.html.haml deleted file mode 100644 index a85db28..0000000 --- a/app/views/system_messages/_form_core.html.haml +++ /dev/null @@ -1,2 +0,0 @@ -.inputs - = f.input :content, :label => t('system_messages.form.content.label'), :hint => conditional_hint('system_messages.form.content.hint') diff --git a/app/views/system_messages/_index_core.html.haml b/app/views/system_messages/_index_core.html.haml deleted file mode 100644 index 7c9dab5..0000000 --- a/app/views/system_messages/_index_core.html.haml +++ /dev/null @@ -1,12 +0,0 @@ -%table.table.table-striped - %thead - %tr - %th= t('system_messages.index.created_at') - %th= t('system_messages.index.content') - - %tbody - - for system_message in system_messages - %tr - %td= system_message.created_at - %td= system_message.content - =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => system_message}
\ No newline at end of file diff --git a/app/views/system_messages/index.html.haml b/app/views/system_messages/index.html.haml deleted file mode 100644 index ffd3fc3..0000000 --- a/app/views/system_messages/index.html.haml +++ /dev/null @@ -1,3 +0,0 @@ -- content_for :title, t("system_messages.index.page_title") - -= render "index_core", :system_messages => @system_messages
\ No newline at end of file diff --git a/app/views/system_messages/new.html.haml b/app/views/system_messages/new.html.haml deleted file mode 100644 index 565f5c5..0000000 --- a/app/views/system_messages/new.html.haml +++ /dev/null @@ -1,3 +0,0 @@ -- content_for :title, t("system_messages.new.page_title") - -= render "form" diff --git a/app/views/system_messages/show.html.haml b/app/views/system_messages/show.html.haml deleted file mode 100644 index 70be6f2..0000000 --- a/app/views/system_messages/show.html.haml +++ /dev/null @@ -1,8 +0,0 @@ -- content_for :title, t("system_messages.show.page_title") - -%p - %strong= t('system_messages.show.created_at') + ":" - = @system_message.created_at -%p - %strong= t('system_messages.show.content') + ":" - = @system_message.content diff --git a/app/views/tenants/_admin_area.de.html.haml b/app/views/tenants/_admin_area.de.html.haml index 98809d1..2aed4e1 100644 --- a/app/views/tenants/_admin_area.de.html.haml +++ b/app/views/tenants/_admin_area.de.html.haml @@ -37,4 +37,6 @@ = render :partial => 'call_routes', :locals => {:tenant => tenant} - = render :partial => 'gateways', :locals => {:tenant => tenant, :gateways => gateways}
\ No newline at end of file + = render :partial => 'gateways', :locals => {:tenant => tenant, :gateways => gateways} + + = render :partial => 'table_of_backup_jobs', :locals => {:tenant => tenant, :backup_jobs => backup_jobs} diff --git a/app/views/tenants/_admin_area.en.html.haml b/app/views/tenants/_admin_area.en.html.haml index 4f0032c..8e7bfea 100644 --- a/app/views/tenants/_admin_area.en.html.haml +++ b/app/views/tenants/_admin_area.en.html.haml @@ -37,4 +37,6 @@ = render :partial => 'call_routes', :locals => {:tenant => tenant} - = render :partial => 'gateways', :locals => {:tenant => tenant, :gateways => gateways}
\ No newline at end of file + = render :partial => 'gateways', :locals => {:tenant => tenant, :gateways => gateways} + + = render :partial => 'table_of_backup_jobs', :locals => {:tenant => tenant, :backup_jobs => backup_jobs}
\ No newline at end of file diff --git a/app/views/tenants/_table_of_backup_jobs.html.haml b/app/views/tenants/_table_of_backup_jobs.html.haml new file mode 100644 index 0000000..a585010 --- /dev/null +++ b/app/views/tenants/_table_of_backup_jobs.html.haml @@ -0,0 +1,11 @@ +-# BackupJobs +-# +- if (can?( :index, BackupJob ) && backup_jobs.count > 0 ) || can?( :create, BackupJob ) + - if backup_jobs.count == BackupJob.count + %h2= t('backup_jobs.index.page_title') + - else + %h2= t('backup_jobs.index.page_title_with_limit', :limit => '5') + + - if can?( :index, BackupJob ) && backup_jobs.count > 0 + = render "backup_jobs/index_core", :backup_jobs => backup_jobs + = render :partial => 'shared/create_link', :locals => {:child_class => BackupJob}
\ No newline at end of file diff --git a/app/views/tenants/show.html.haml b/app/views/tenants/show.html.haml index 818e584..23ec81a 100644 --- a/app/views/tenants/show.html.haml +++ b/app/views/tenants/show.html.haml @@ -15,4 +15,4 @@ = render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @tenant } - if @tenant.user_groups.where(:name => 'Admins').any? && @tenant.user_groups.where(:name => 'Admins').first.users.include?(current_user) - = render :partial => 'admin_area', :locals => { :tenant => @tenant, :gateways => @gateways}
\ No newline at end of file + = render :partial => 'admin_area', :locals => { :tenant => @tenant, :gateways => @gateways, :backup_jobs => @backup_jobs}
\ No newline at end of file diff --git a/config/locales/views/backup_jobs/de.yml b/config/locales/views/backup_jobs/de.yml index b81b532..8e23feb 100644 --- a/config/locales/views/backup_jobs/de.yml +++ b/config/locales/views/backup_jobs/de.yml @@ -1,60 +1,61 @@ de: backup_jobs: - name: 'Backup job' + name: 'Backup-Auftrag' controller: - successfuly_created: 'Backup job wurde angelegt.' - successfuly_updated: 'Backup job wurde aktualisiert.' - successfuly_destroyed: 'Backup job wurde gelöscht.' + successfuly_created: 'Backup-Auftrag wurde angelegt.' + successfuly_updated: 'Backup-Auftrag wurde aktualisiert.' + successfuly_destroyed: 'Backup-Auftrag wurde gelöscht.' index: - page_title: 'Übersicht von Backup job' - started_at: 'Started at' - finished_at: 'Finished at' - state: 'State' - directory: 'Directory' - size_of_the_backup: 'Size of the backup' + page_title: 'Liste aller Backup-Aufträge' + page_title_with_limit: 'Liste der letzten %{limit} Backup-Aufträge' + started_at: 'Start' + finished_at: 'Ende' + state: 'Status' + directory: 'Verzeichnis' + size_of_the_backup: 'Größe' actions: - confirm_destroy: 'Sind Sie sicher, dass Sie folgendes löschen möchten: Backup job' + confirm_destroy: 'Sind Sie sicher, dass Sie folgendes löschen möchten: Backup-Auftrag' destroy: 'Löschen' edit: 'Bearbeiten' show: 'Anzeigen' create: 'Neu anlegen' - create_for: 'Backup job neu anlegen für %{resource}' + create_for: 'Backup-Auftrag neu anlegen für %{resource}' show: - page_title: 'Backup job bearbeiten' - started_at: 'Started at' - finished_at: 'Finished at' - state: 'State' - directory: 'Directory' - size_of_the_backup: 'Size of the backup' + page_title: 'Backup-Auftrag bearbeiten' + started_at: 'Start' + finished_at: 'Ende' + state: 'Status' + directory: 'Verzeichnis' + size_of_the_backup: 'Größe' actions: confirm_destroy: 'Sind Sie sicher, dass die dieses Element löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' view_all: 'Alle anzeigen' new: - page_title: 'Backup job neu anlegen' + page_title: 'Backup-Auftrag neu anlegen' actions: back_to_list: 'Zurück zur Übersicht' edit: - page_title: 'Backup job bearbeiten' + page_title: 'Backup-Auftrag bearbeiten' actions: back_to_list: 'Zurück zur Übersicht' edit: 'Bearbeiten' view_all: 'Alle anzeigen' form: started_at: - label: 'Started at' + label: 'Start' hint: '' finished_at: - label: 'Finished at' + label: 'Ende' hint: '' state: - label: 'State' + label: 'Status' hint: '' directory: - label: 'Directory' + label: 'Verzeichnis' hint: '' size_of_the_backup: - label: 'Size of the backup' + label: 'Größe' hint: '' submit: 'Absenden'
\ No newline at end of file diff --git a/config/locales/views/backup_jobs/en.yml b/config/locales/views/backup_jobs/en.yml index 83f4388..74d14c2 100644 --- a/config/locales/views/backup_jobs/en.yml +++ b/config/locales/views/backup_jobs/en.yml @@ -2,25 +2,26 @@ en: backup_jobs: name: 'Backup job' controller: - successfuly_created: 'Successfully created Backup job.' - successfuly_updated: 'Successfully updated Backup job.' - successfuly_destroyed: 'Successfully destroyed Backup job.' + successfuly_created: 'Successfully created backup job.' + successfuly_updated: 'Successfully updated backup job.' + successfuly_destroyed: 'Successfully destroyed backup job.' index: - page_title: 'Listing Backup job' + page_title: 'Listing backup jobs' + page_title_with_limit: 'Listing of the last %{limit} backup jobs' started_at: 'Started at' finished_at: 'Finished at' state: 'State' directory: 'Directory' size_of_the_backup: 'Size of the backup' actions: - confirm_destroy: 'Are you sure you want to delete this Backup job?' + confirm_destroy: 'Are you sure you want to delete this backup job?' destroy: 'Delete' edit: 'Edit' show: 'View' create: 'New' - create_for: 'New Backup job for %{resource}' + create_for: 'New backup job for %{resource}' show: - page_title: 'Show Backup job' + page_title: 'Show backup job' started_at: 'Started at' finished_at: 'Finished at' state: 'State' @@ -32,11 +33,11 @@ en: edit: 'Edit' view_all: 'View All' new: - page_title: 'New Backup job' + page_title: 'New backup job' actions: back_to_list: 'Back to Index' edit: - page_title: 'Editing Backup job' + page_title: 'Editing backup job' actions: back_to_list: 'Back to Index' edit: 'Edit' diff --git a/config/locales/views/system_messages/de.yml b/config/locales/views/system_messages/de.yml deleted file mode 100644 index d841d0b..0000000 --- a/config/locales/views/system_messages/de.yml +++ /dev/null @@ -1,38 +0,0 @@ -de: - system_messages: - name: 'Systemnachricht' - controller: - successfuly_created: 'Eine Systemnachricht wurde erstellt.' - successfuly_updated: 'Eine Systemnachricht wurde aktualisiert.' - successfuly_destroyed: 'Eine Systemnachricht wurde gelöscht.' - index: - page_title: 'Systemnachrichten' - user_id: 'Benutzer' - content: 'Nachricht' - actions: - confirm_destroy: 'Sind Sie sicher, dass Sie diese Systemnachricht löschen möchten?' - destroy: 'Löschen' - edit: 'Bearbeiten' - show: 'Anzeigen' - create: 'Neu anlegen' - show: - page_title: 'Systemnachricht anzeigen' - user_id: 'Benutzer' - content: 'Nachricht' - actions: - confirm_destroy: 'Sind Sie sicher, dass Sie diese Systemnachricht löschen möchten?' - destroy: 'Löschen' - edit: 'Bearbeiten' - view_all: 'Alle anzeigen' - new: - page_title: 'Neue Systemnachricht' - edit: - page_title: 'Systemnachricht bezüglich %{resource} bearbeiten' - form: - user_id: - label: 'Benutzer' - hint: '' - content: - label: 'Nachricht' - hint: '' - submit: 'Absenden'
\ No newline at end of file diff --git a/config/locales/views/system_messages/en.yml b/config/locales/views/system_messages/en.yml deleted file mode 100644 index a039b10..0000000 --- a/config/locales/views/system_messages/en.yml +++ /dev/null @@ -1,38 +0,0 @@ -en: - system_messages: - name: 'System message' - controller: - successfuly_created: 'Successfully created System message.' - successfuly_updated: 'Successfully updated System message.' - successfuly_destroyed: 'Successfully destroyed System message.' - index: - page_title: 'System messages' - user_id: 'User' - content: 'Content' - actions: - confirm_destroy: 'Are you sure you want to delete this element?' - destroy: 'Delete' - edit: 'Edit' - show: 'View' - create: 'New' - show: - page_title: 'Editing System message' - user_id: 'User' - content: 'Content' - actions: - confirm_destroy: 'Are you sure you want to delete this element?' - destroy: 'Delete' - edit: 'Edit' - view_all: 'View All' - new: - page_title: 'New System message' - edit: - page_title: 'Editing System message %{resource}' - form: - user_id: - label: 'User' - hint: '' - content: - label: 'Content' - hint: '' - submit: 'Submit'
\ No newline at end of file diff --git a/db/migrate/20120127101726_create_system_messages.rb b/db/migrate/20120127101726_create_system_messages.rb deleted file mode 100644 index 830f54a..0000000 --- a/db/migrate/20120127101726_create_system_messages.rb +++ /dev/null @@ -1,13 +0,0 @@ -class CreateSystemMessages < ActiveRecord::Migration - def self.up - create_table :system_messages do |t| - t.integer :user_id - t.string :content - t.timestamps - end - end - - def self.down - drop_table :system_messages - end -end diff --git a/misc/freeswitch/conf/freeswitch.xml b/misc/freeswitch/conf/freeswitch.xml index 2ecb618..a7eb44d 100644 --- a/misc/freeswitch/conf/freeswitch.xml +++ b/misc/freeswitch/conf/freeswitch.xml @@ -466,6 +466,470 @@ </macros> </phrases> </language> + <language name="de" say-module="de" sound-prefix="/opt/freeswitch/sounds/de/de/callie"> + <phrases> + <macros> + <macro name="voicemail_hello"> + <input pattern="(.*)"> + <match> + <action function="play-file" data="voicemail/vm-hello.wav"/> + </match> + </input> + </macro> + <macro name="voicemail_enter_id"> + <input pattern="(.*)"> + <match> + <action function="play-file" data="voicemail/vm-enter_id.wav"/> + <action function="say" data="$1" method="pronounced" type="name_spelled"/> + </match> + </input> + </macro> + <macro name="voicemail_enter_pass"> + <input pattern="(.*)"> + <match> + <action function="play-file" data="voicemail/vm-enter_pass.wav"/> + <action function="say" data="$1" method="pronounced" type="name_spelled"/> + </match> + </input> + </macro> + <macro name="voicemail_fail_auth"> + <input pattern="(.*)"> + <match> + <action function="play-file" data="voicemail/vm-fail_auth.wav"/> + </match> + </input> + </macro> + <macro name="voicemail_goodbye"> + <input pattern="(.*)"> + <match> + <action function="play-file" data="voicemail/vm-goodbye.wav"/> + </match> + </input> + </macro> + <macro name="voicemail_abort"> + <input pattern="(.*)"> + <match> + <action function="play-file" data="voicemail/vm-abort.wav"/> + </match> + </input> + </macro> + <macro name="voicemail_message_count"> + <input pattern="^(1):(.*)$" break_on_match="true"> + <match> + <action function="play-file" data="voicemail/vm-you_have.wav"/> + <action function="say" data="$1" method="pronounced" type="items"/> + <action function="play-file" data="voicemail/vm-$2.wav"/> + <action function="play-file" data="voicemail/vm-message.wav"/> + </match> + </input> + <input pattern="^(\d+):(.*)$"> + <match> + <action function="play-file" data="voicemail/vm-you_have.wav"/> + <action function="say" data="$1" method="pronounced" type="items"/> + <action function="play-file" data="voicemail/vm-$2.wav"/> + <action function="play-file" data="voicemail/vm-messages.wav"/> + </match> + </input> + </macro> + <macro name="voicemail_menu"> + <input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$"> + <match> + <action function="play-file" data="voicemail/vm-listen_new.wav"/> + <action function="play-file" data="voicemail/vm-press.wav"/> + <action function="say" data="$1" method="pronounced" type="name_spelled"/> + <action function="execute" data="sleep(100)"/> + <action function="play-file" data="voicemail/vm-listen_saved.wav"/> + <action function="play-file" data="voicemail/vm-press.wav"/> + <action function="say" data="$2" method="pronounced" type="name_spelled"/> + <action function="execute" data="sleep(100)"/> + <action function="play-file" data="voicemail/vm-advanced.wav"/> + <action function="play-file" data="voicemail/vm-press.wav"/> + <action function="say" data="$3" method="pronounced" type="name_spelled"/> + <action function="execute" data="sleep(100)"/> + <action function="play-file" data="voicemail/vm-to_exit.wav"/> + <action function="play-file" data="voicemail/vm-press.wav"/> + <action function="say" data="$4" method="pronounced" type="name_phonetic"/> + </match> + </input> + </macro> + <macro name="voicemail_config_menu"> + <input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$"> + <match> + <action function="play-file" data="voicemail/vm-to_record_greeting.wav"/> + <action function="play-file" data="voicemail/vm-press.wav"/> + <action function="say" data="$1" method="pronounced" type="name_spelled"/> + <action function="execute" data="sleep(100)"/> + <action function="play-file" data="voicemail/vm-choose_greeting.wav"/> + <action function="play-file" data="voicemail/vm-press.wav"/> + <action function="say" data="$2" method="pronounced" type="name_spelled"/> + <action function="execute" data="sleep(100)"/> + <action function="play-file" data="voicemail/vm-record_name2.wav"/> + <action function="play-file" data="voicemail/vm-press.wav"/> + <action function="say" data="$3" method="pronounced" type="name_spelled"/> + <action function="execute" data="sleep(100)"/> + <action function="play-file" data="voicemail/vm-change_password.wav"/> + <action function="play-file" data="voicemail/vm-press.wav"/> + <action function="say" data="$4" method="pronounced" type="name_spelled"/> + <action function="execute" data="sleep(100)"/> + <action function="play-file" data="voicemail/vm-main_menu.wav"/> + <action function="play-file" data="voicemail/vm-press.wav"/> + <action function="say" data="$5" method="pronounced" type="name_spelled"/> + </match> + </input> + </macro> + <macro name="voicemail_record_name"> + <input pattern="^(.*)$"> + <match> + <action function="play-file" data="voicemail/vm-record_name1.wav"/> + </match> + </input> + </macro> + <macro name="voicemail_record_file_check"> + <input pattern="^([0-9#*]):([0-9#*]):([0-9#*])$"> + <match> + <action function="play-file" data="voicemail/vm-press.wav"/> + <action function="say" data="$1" method="pronounced" type="name_spelled"/> + <action function="play-file" data="voicemail/vm-listen_to_recording.wav"/> + <action function="play-file" data="voicemail/vm-press.wav"/> + <action function="say" data="$2" method="pronounced" type="name_spelled"/> + <action function="play-file" data="voicemail/vm-save_recording.wav"/> + <action function="play-file" data="voicemail/vm-press.wav"/> + <action function="say" data="$3" method="pronounced" type="name_spelled"/> + <action function="play-file" data="voicemail/vm-rerecord.wav"/> + </match> + </input> + </macro> + <macro name="voicemail_record_urgent_check"> + <input pattern="^([0-9#*]):([0-9#*])$"> + <match> + <action function="play-file" data="voicemail/vm-mark-urgent.wav"/> + <action function="play-file" data="voicemail/vm-press.wav"/> + <action function="say" data="$1" method="pronounced" type="name_spelled"/> + <action function="play-file" data="voicemail/vm-continue.wav"/> + <action function="play-file" data="voicemail/vm-press.wav"/> + <action function="say" data="$2" method="pronounced" type="name_spelled"/> + </match> + </input> + </macro> + <macro name="voicemail_forward_prepend"> + <input pattern="^([0-9#*]):([0-9#*])$"> + <match> + <action function="play-file" data="voicemail/vm-forward_add_intro.wav"/> + <action function="play-file" data="voicemail/vm-press.wav"/> + <action function="say" data="$1" method="pronounced" type="name_spelled"/> + <action function="play-file" data="voicemail/vm-send_message_now.wav"/> + <action function="play-file" data="voicemail/vm-press.wav"/> + <action function="say" data="$2" method="pronounced" type="name_spelled"/> + </match> + </input> + </macro> + <macro name="voicemail_forward_message_enter_extension"> + <input pattern="^([0-9#*])$"> + <match> + <action function="play-file" data="voicemail/vm-forward_enter_ext.wav"/> + <action function="play-file" data="voicemail/vm-followed_by.wav"/> + <action function="say" data="$1" method="pronounced" type="name_spelled"/> + </match> + </input> + </macro> + <macro name="voicemail_invalid_extension"> + <input pattern="^(.*)$"> + <match> + <action function="play-file" data="voicemail/vm-that_was_an_invalid_ext.wav"/> + </match> + </input> + </macro> + <macro name="voicemail_listen_file_check"> + <input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):(.*)$"> + <match> + <action function="play-file" data="voicemail/vm-listen_to_recording.wav"/> + <action function="play-file" data="voicemail/vm-press.wav"/> + <action function="say" data="$1" method="pronounced" type="name_spelled"/> + <action function="play-file" data="voicemail/vm-save_recording.wav"/> + <action function="play-file" data="voicemail/vm-press.wav"/> + <action function="say" data="$2" method="pronounced" type="name_spelled"/> + <action function="play-file" data="voicemail/vm-delete_recording.wav"/> + <action function="play-file" data="voicemail/vm-press.wav"/> + <action function="say" data="$3" method="pronounced" type="name_spelled"/> + <action function="play-file" data="voicemail/vm-forward_to_email.wav"/> + <action function="play-file" data="voicemail/vm-press.wav"/> + <action function="say" data="$4" method="pronounced" type="name_spelled"/> + <action function="play-file" data="voicemail/vm-return_call.wav"/> + <action function="play-file" data="voicemail/vm-press.wav"/> + <action function="say" data="$5" method="pronounced" type="name_spelled"/> + <action function="play-file" data="voicemail/vm-to_forward.wav"/> + <action function="play-file" data="voicemail/vm-press.wav"/> + <action function="say" data="$6" method="pronounced" type="name_spelled"/> + </match> + </input> + <input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$"> + <match> + <action function="play-file" data="voicemail/vm-listen_to_recording.wav"/> + <action function="play-file" data="voicemail/vm-press.wav"/> + <action function="say" data="$1" method="pronounced" type="name_spelled"/> + <action function="play-file" data="voicemail/vm-save_recording.wav"/> + <action function="play-file" data="voicemail/vm-press.wav"/> + <action function="say" data="$2" method="pronounced" type="name_spelled"/> + <action function="play-file" data="voicemail/vm-delete_recording.wav"/> + <action function="play-file" data="voicemail/vm-press.wav"/> + <action function="say" data="$3" method="pronounced" type="name_spelled"/> + <action function="play-file" data="voicemail/vm-return_call.wav"/> + <action function="play-file" data="voicemail/vm-press.wav"/> + <action function="say" data="$5" method="pronounced" type="name_spelled"/> + <action function="play-file" data="voicemail/vm-to_forward.wav"/> + <action function="play-file" data="voicemail/vm-press.wav"/> + <action function="say" data="$6" method="pronounced" type="name_spelled"/> + </match> + </input> + </macro> + <macro name="voicemail_choose_greeting"> + <input pattern="^(.*)$"> + <match> + <action function="play-file" data="voicemail/vm-choose_greeting_choose.wav"/> + </match> + </input> + </macro> + <macro name="voicemail_choose_greeting_fail"> + <input pattern="^(.*)$"> + <match> + <action function="play-file" data="voicemail/vm-choose_greeting_fail.wav"/> + </match> + </input> + </macro> + <macro name="voicemail_record_greeting"> + <input pattern="^(.*)$"> + <match> + <action function="play-file" data="voicemail/vm-record_greeting.wav"/> + </match> + </input> + </macro> + <macro name="voicemail_record_message"> + <input pattern="^(.*)$"> + <match> + <action function="play-file" data="voicemail/vm-record_message.wav"/> + </match> + </input> + </macro> + <macro name="voicemail_greeting_selected"> + <input pattern="^(\d+)$"> + <match> + <action function="play-file" data="voicemail/vm-greeting.wav"/> + <action function="say" data="$1" method="pronounced" type="items"/> + <action function="play-file" data="voicemail/vm-selected.wav"/> + </match> + </input> + </macro> + <macro name="voicemail_play_greeting"> + <input pattern="^(\d+)$"> + <match> + <action function="play-file" data="voicemail/vm-person.wav"/> + <action function="say" data="$1" method="pronounced" type="name_spelled"/> + <action function="play-file" data="voicemail/vm-not_available.wav"/> + </match> + </input> + <input pattern="^name:(.+)$"> + <match> + <action function="play-file" data="$1"/> + <action function="play-file" data="voicemail/vm-not_available.wav"/> + </match> + </input> + <input pattern="^greeting:(.+)$"> + <match> + <action function="play-file" data="$1"/> + </match> + </input> + </macro> + <macro name="voicemail_say_number"> + <input pattern="^(\d+)$"> + <match> + <action function="say" data="$1" method="pronounced" type="items"/> + </match> + </input> + </macro> + <macro name="voicemail_say_message_number"> + <input pattern="^([a-z]+):(\d+)$"> + <match> + <action function="play-file" data="voicemail/vm-$1.wav"/> + <action function="play-file" data="voicemail/vm-message_number.wav"/> + <action function="say" data="$2" method="pronounced" type="items"/> + </match> + </input> + </macro> + <macro name="voicemail_say_phone_number"> + <input pattern="^(.*)$"> + <match> + <action function="say" data="$1" method="pronounced" type="name_spelled"/> + </match> + </input> + </macro> + <macro name="voicemail_say_name"> + <input pattern="^(.*)$"> + <match> + <action function="say" data="$1" method="pronounced" type="name_spelled"/> + </match> + </input> + </macro> + <macro name="voicemail_ack"> + <input pattern="^(too-small)$"> + <match> + <action function="play-file" data="voicemail/vm-too-small.wav"/> + </match> + </input> + <input pattern="^(deleted)$"> + <match> + <action function="play-file" data="voicemail/vm-message.wav"/> + <action function="play-file" data="voicemail/vm-$1.wav"/> + </match> + </input> + <input pattern="^(saved)$"> + <match> + <action function="play-file" data="voicemail/vm-message.wav"/> + <action function="play-file" data="voicemail/vm-$1.wav"/> + </match> + </input> + <input pattern="^(emailed)$"> + <match> + <action function="play-file" data="voicemail/vm-message.wav"/> + <action function="play-file" data="voicemail/vm-$1.wav"/> + </match> + </input> + <input pattern="^(marked-urgent)$"> + <match> + <action function="play-file" data="voicemail/vm-message.wav"/> + <action function="play-file" data="voicemail/vm-$1.wav"/> + </match> + </input> + </macro> + <macro name="voicemail_say_date"> + <input pattern="^(.*)$"> + <match> + <action function="say" data="$1" method="pronounced" type="current_date_time"/> + </match> + </input> + </macro> + <macro name="voicemail_disk_quota_exceeded"> + <input pattern="^(.*)$"> + <match> + <action function="play-file" data="voicemail/vm-mailbox_full.wav"/> + </match> + </input> + </macro> + <macro name="valet_announce_ext"> + <input pattern="^([^\:]+):(.*)$"> + <match> + <action function="say" data="$2" method="pronounced" type="name_spelled"/> + </match> + </input> + </macro> + <macro name="valet_lot_full"> + <input pattern="^(.*)$"> + <match> + <action function="play-file" data="tone_stream://%(275,10,600);%(275,100,300)"/> + </match> + </input> + </macro> + <macro name="valet_lot_empty"> + <input pattern="^(.*)$"> + <match> + <action function="play-file" data="tone_stream://%(275,10,600);%(275,100,300)"/> + </match> + </input> + </macro> + <macro name="logged_in"> + <input pattern="^(.*)$"> + <match> + <action function="play-file" data="ivr/ivr-you_are_now_logged_in.wav"/> + </match> + </input> + </macro> + <macro name="logged_out"> + <input pattern="^(.*)$"> + <match> + <action function="play-file" data="ivr/ivr-you_are_now_logged_out.wav"/> + </match> + </input> + </macro> + <macro name="acd_announce_position_enter"> + <input pattern="^([0-9]+)$"> + <match> + <action function="play-file" data="ivr/ivr-you_are_number.wav"/> + <action function="say" data="$1" method="pronounced" type="number"/> + <action function="play-file" data="ivr/ivr-in_line.wav"/> + </match> + </input> + </macro> + <macro name="acd_announce_position_change"> + <input pattern="^1$"> + <match> + <action function="play-file" data="ivr/ivr-you_are_number.wav"/> + <action function="say" data="1" method="pronounced" type="number"/> + <action function="play-file" data="ivr/ivr-in_line.wav"/> + <action function="break"/> + </match> + </input> + <input pattern="^([0-9]+)$"> + <match> + <action function="play-file" data="ivr/ivr-you_are_number.wav"/> + <action function="say" data="$1" method="pronounced" type="number"/> + <action function="play-file" data="ivr/ivr-in_line.wav"/> + <action function="play-file" data="ivr/ivr-thank_you_for_holding.wav"/> + </match> + </input> + </macro> + <macro name="acd_announce_position_periodic"> + <input pattern="^1$"> + <match> + <action function="play-file" data="ivr/ivr-you_are_number.wav"/> + <action function="say" data="1" method="pronounced" type="number"/> + <action function="play-file" data="ivr/ivr-in_line.wav"/> + <action function="break"/> + </match> + </input> + <input pattern="^([0-9]+)$"> + <match> + <action function="play-file" data="ivr/ivr-you_are_number.wav"/> + <action function="say" data="$1" method="pronounced" type="number"/> + <action function="play-file" data="ivr/ivr-in_line.wav"/> + <action function="play-file" data="ivr/ivr-thank_you_for_holding.wav"/> + </match> + </input> + </macro> + <macro name="acd_announce_call_agents"> + <input pattern="^(.*)$"> + <match> + <action function="play-file" data="$1"/> + </match> + </input> + </macro> + <macro name="acd_greeting"> + <input pattern="^(.*)$"> + <match> + <action function="play-file" data="$1"/> + </match> + </input> + </macro> + <macro name="acd_goodbye"> + <input pattern="^(.*)$"> + <match> + <action function="play-file" data="$1"/> + </match> + </input> + </macro> + <macro name="acd_agent_status"> + <input pattern="^active$"> + <match> + <action function="play-file" data="ivr/ivr-you_are_now_logged_in.wav"/> + </match> + </input> + <input pattern="^inactive$"> + <match> + <action function="play-file" data="ivr/ivr-you_are_now_logged_out.wav"/> + </match> + </input> + </macro> + </macros> + </phrases> + </language> </section> <section name="configuration" description="Gemeinschaft5 FreeSwitch configuration"> <configuration name="acl.conf" description="Network Lists"> @@ -632,6 +1096,7 @@ <load module="mod_local_stream"/> <load module="mod_tone_stream"/> <load module="mod_say_en"/> + <load module="mod_say_de"/> <load module="mod_spandsp"/> <load module="mod_snmp"/> <load module="mod_dingaling"/> diff --git a/private_pub.ru b/private_pub.ru deleted file mode 100644 index 2db4acf..0000000 --- a/private_pub.ru +++ /dev/null @@ -1,8 +0,0 @@ -# Run with: rackup private_pub.ru -s thin -E production -require "bundler/setup" -require "yaml" -require "faye" -require "private_pub" - -PrivatePub.load_config(File.expand_path("../config/private_pub.yml", __FILE__), ENV["RAILS_ENV"] || "development") -run PrivatePub.faye_app diff --git a/test/functional/system_messages_controller_test.rb b/test/functional/system_messages_controller_test.rb deleted file mode 100644 index 2894cd3..0000000 --- a/test/functional/system_messages_controller_test.rb +++ /dev/null @@ -1,49 +0,0 @@ -require 'test_helper' - -class SystemMessagesControllerTest < ActionController::TestCase - setup do - @system_message = system_messages(:one) - end - - test "should get index" do - get :index - assert_response :success - assert_not_nil assigns(:system_messages) - end - - test "should get new" do - get :new - assert_response :success - end - - test "should create system_message" do - assert_difference('SystemMessage.count') do - post :create, system_message: @system_message.attributes - end - - assert_redirected_to system_message_path(assigns(:system_message)) - end - - test "should show system_message" do - get :show, id: @system_message.to_param - assert_response :success - end - - test "should get edit" do - get :edit, id: @system_message.to_param - assert_response :success - end - - test "should update system_message" do - put :update, id: @system_message.to_param, system_message: @system_message.attributes - assert_redirected_to system_message_path(assigns(:system_message)) - end - - test "should destroy system_message" do - assert_difference('SystemMessage.count', -1) do - delete :destroy, id: @system_message.to_param - end - - assert_redirected_to system_messages_path - end -end diff --git a/test/unit/system_message_test.rb b/test/unit/system_message_test.rb deleted file mode 100644 index 0476ac8..0000000 --- a/test/unit/system_message_test.rb +++ /dev/null @@ -1,7 +0,0 @@ -require 'test_helper' - -class SystemMessageTest < ActiveSupport::TestCase - # def test_should_be_valid - # assert SystemMessage.new.valid? - # end -end |