From 29db90c2c8a9a6a3087e77eae8615ddf0049087b Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Mon, 11 Feb 2013 14:40:38 +0100 Subject: Deleted PrivatePub stuff. --- Gemfile | 3 -- Gemfile.lock | 24 ----------- app/controllers/system_messages_controller.rb | 30 ------------- app/helpers/system_messages_helper.rb | 2 - app/models/ability.rb | 4 -- app/views/system_messages/_form.html.haml | 7 ---- app/views/system_messages/_form_core.html.haml | 2 - app/views/system_messages/_index_core.html.haml | 12 ------ app/views/system_messages/index.html.haml | 3 -- app/views/system_messages/new.html.haml | 3 -- app/views/system_messages/show.html.haml | 8 ---- config/locales/views/system_messages/de.yml | 38 ----------------- config/locales/views/system_messages/en.yml | 38 ----------------- private_pub.ru | 8 ---- test/functional/system_messages_controller_test.rb | 49 ---------------------- 15 files changed, 231 deletions(-) delete mode 100644 app/controllers/system_messages_controller.rb delete mode 100644 app/helpers/system_messages_helper.rb delete mode 100644 app/views/system_messages/_form.html.haml delete mode 100644 app/views/system_messages/_form_core.html.haml delete mode 100644 app/views/system_messages/_index_core.html.haml delete mode 100644 app/views/system_messages/index.html.haml delete mode 100644 app/views/system_messages/new.html.haml delete mode 100644 app/views/system_messages/show.html.haml delete mode 100644 config/locales/views/system_messages/de.yml delete mode 100644 config/locales/views/system_messages/en.yml delete mode 100644 private_pub.ru delete mode 100644 test/functional/system_messages_controller_test.rb diff --git a/Gemfile b/Gemfile index f273864..b390a28 100644 --- a/Gemfile +++ b/Gemfile @@ -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/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('#{(I18n.l @system_message.created_at, :format => :short )} #{@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/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..4ec64b1 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 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/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/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 -- cgit v1.2.3 From ca8121930d7e75b9f6bac08591c6ffea3ca1fea1 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Mon, 11 Feb 2013 14:42:22 +0100 Subject: Removed PrivatePub stuff. --- app/models/ability.rb | 4 ---- app/models/system_message.rb | 7 ------- db/migrate/20120127101726_create_system_messages.rb | 13 ------------- test/unit/system_message_test.rb | 7 ------- 4 files changed, 31 deletions(-) delete mode 100644 app/models/system_message.rb delete mode 100644 db/migrate/20120127101726_create_system_messages.rb delete mode 100644 test/unit/system_message_test.rb diff --git a/app/models/ability.rb b/app/models/ability.rb index 4ec64b1..4c0844c 100644 --- a/app/models/ability.rb +++ b/app/models/ability.rb @@ -156,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/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/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 -- cgit v1.2.3 From c5b10519dd1ade04a25c43b100c15deb7e39b6d0 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Mon, 11 Feb 2013 15:07:23 +0100 Subject: Added entity in the table. But it's fare from pretty. #136 --- app/views/gs_parameters/_index_core.html.haml | 14 ++++++++++++-- app/views/gs_parameters/index.html.haml | 12 +++++------- 2 files changed, 17 insertions(+), 9 deletions(-) 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,8 +11,15 @@ %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')) 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 -- cgit v1.2.3 From 42ee5557a5ac11743b573b25eb8fdb60c8c13aa3 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Mon, 11 Feb 2013 16:24:55 +0100 Subject: Use the copyright symbol. --- app/views/layouts/_footer.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3 From da362f73cf417aa2eda9124d17c66850087ea0f6 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Mon, 11 Feb 2013 16:52:24 +0100 Subject: Backup GUI improvements. --- app/controllers/backup_jobs_controller.rb | 15 ++++--- app/controllers/tenants_controller.rb | 1 + app/views/backup_jobs/_index_core.html.haml | 34 +++++++++++---- app/views/backup_jobs/show.html.haml | 4 +- app/views/tenants/_admin_area.de.html.haml | 4 +- app/views/tenants/_admin_area.en.html.haml | 4 +- app/views/tenants/_table_of_backup_jobs.html.haml | 11 +++++ app/views/tenants/show.html.haml | 2 +- config/locales/views/backup_jobs/de.yml | 51 ++++++++++++----------- config/locales/views/backup_jobs/en.yml | 19 +++++---- 10 files changed, 94 insertions(+), 51 deletions(-) create mode 100644 app/views/tenants/_table_of_backup_jobs.html.haml 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/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/views/backup_jobs/_index_core.html.haml b/app/views/backup_jobs/_index_core.html.haml index 9eebefd..9dc0e92 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.current_path} + %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..6c55320 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.current_path} + %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/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' -- cgit v1.2.3 From 0ba495685589e99e1100af6d7af9d69ee4f40b78 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Mon, 11 Feb 2013 16:59:15 +0100 Subject: Removed icons. --- app/views/layouts/_navbar.html.haml | 2 -- 1 file changed, 2 deletions(-) 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 -- cgit v1.2.3 From b5cb8b7fa389c0a542825173b058dfcf428f6680 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Mon, 11 Feb 2013 17:44:09 +0100 Subject: Fix URL --- app/views/backup_jobs/_index_core.html.haml | 2 +- app/views/backup_jobs/show.html.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/backup_jobs/_index_core.html.haml b/app/views/backup_jobs/_index_core.html.haml index 9dc0e92..0102546 100644 --- a/app/views/backup_jobs/_index_core.html.haml +++ b/app/views/backup_jobs/_index_core.html.haml @@ -41,7 +41,7 @@ %td %span.hidden-phone - if backup_job.backup_file? - %a{:href => backup_job.backup_file.current_path} + %a{:href => backup_job.backup_file.url} %i{:class => 'icon-download'} = number_to_human_size(backup_job.backup_file.size, :precision => 2) - else diff --git a/app/views/backup_jobs/show.html.haml b/app/views/backup_jobs/show.html.haml index 6c55320..6fcb1dc 100644 --- a/app/views/backup_jobs/show.html.haml +++ b/app/views/backup_jobs/show.html.haml @@ -15,7 +15,7 @@ %p %strong= t('backup_jobs.show.size_of_the_backup') + ":" - if @backup_job.backup_file? - %a{:href => backup_job.backup_file.current_path} + %a{:href => backup_job.backup_file.url} %i{:class => 'icon-download'} = number_to_human_size(backup_job.backup_file.size, :precision => 2) -- cgit v1.2.3 From 3d817bef265f70b147455db4b0fb5e1ca3c0d379 Mon Sep 17 00:00:00 2001 From: Julian Pawlowski Date: Tue, 12 Feb 2013 00:21:15 +0100 Subject: add german language settings --- misc/freeswitch/conf/freeswitch.xml | 465 ++++++++++++++++++++++++++++++++++++ 1 file changed, 465 insertions(+) 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 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
@@ -632,6 +1096,7 @@ + -- cgit v1.2.3