From 5341d680be8c7701f97cd497015da37806046f03 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Wed, 27 Feb 2013 06:27:16 -0500 Subject: sip_account can be in b leg --- app/models/sip_account.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/sip_account.rb b/app/models/sip_account.rb index 2040b41..5660e37 100644 --- a/app/models/sip_account.rb +++ b/app/models/sip_account.rb @@ -38,7 +38,7 @@ class SipAccount < ActiveRecord::Base has_many :ringtones, :as => :ringtoneable, :dependent => :destroy - has_many :calls, :finder_sql => lambda { |s| "SELECT DISTINCT detailed_calls.* FROM detailed_calls WHERE presence_id LIKE '#{self.auth_name}@%'" } + has_many :calls, :finder_sql => lambda { |s| "SELECT DISTINCT detailed_calls.* FROM detailed_calls WHERE presence_id LIKE '#{self.auth_name}@%' OR b_presence_id LIKE '#{self.auth_name}@%'" } # Delegations: # -- cgit v1.2.3 From 30dffaac93c96edb5ba0100cbbdf62f5691d07f5 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Wed, 27 Feb 2013 20:27:24 +0100 Subject: Don't send a PIN e-mail for a just created conference. --- app/models/conference.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/conference.rb b/app/models/conference.rb index 8c5a752..aee75d5 100644 --- a/app/models/conference.rb +++ b/app/models/conference.rb @@ -31,7 +31,7 @@ class Conference < ActiveRecord::Base validate :start_and_end_dates_must_make_sense, :if => Proc.new { |conference| !conference.start.blank? && !conference.end.blank? } - after_save :send_pin_email_when_pin_has_changed + before_save :send_pin_email_when_pin_has_changed default_scope where(:state => 'active').order(:start) @@ -55,7 +55,7 @@ class Conference < ActiveRecord::Base end def send_pin_email_when_pin_has_changed - if self.conferenceable.class == User && self.pin_changed? + if !self.new_record? && self.conferenceable.class == User && self.pin_changed? Notifications.new_pin(self).deliver end end -- cgit v1.2.3 From ef2acbfebeefdd17f8896a3e5eb44775febf4dee Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Wed, 27 Feb 2013 20:38:32 +0100 Subject: UI improvements. --- app/views/conferences/_form_core.html.haml | 2 +- app/views/conferences/show.html.haml | 72 +++++++++++++++++++----------- 2 files changed, 46 insertions(+), 28 deletions(-) diff --git a/app/views/conferences/_form_core.html.haml b/app/views/conferences/_form_core.html.haml index f8d6c8e..0e2cb50 100644 --- a/app/views/conferences/_form_core.html.haml +++ b/app/views/conferences/_form_core.html.haml @@ -3,7 +3,7 @@ - if !f.object.start.nil? = f.input :start, :label => t('conferences.form.start.label'), :hint => conditional_hint('conferences.form.start.hint'), :include_blank => true, :start_year => Time.now.year, :end_year => Time.now.year + 2 = f.input :end, :label => t('conferences.form.end.label'), :hint => conditional_hint('conferences.form.end.hint'), :include_blank => true, :start_year => Time.now.year, :end_year => Time.now.year + 2 - = f.input :description, :label => t('conferences.form.description.label'), :hint => conditional_hint('conferences.form.description.hint') + = f.input :description, :label => t('conferences.form.description.label'), :hint => conditional_hint('conferences.form.description.hint'), :input_html => { :rows => 3 } = f.input :pin, :label => t('conferences.form.pin.label'), :hint => conditional_hint('conferences.form.pin.hint') = f.input :max_members, :collection => 1..GsParameter.get('MAXIMUM_NUMBER_OF_PEOPLE_IN_A_CONFERENCE'), :include_blank => false, :label => t('conferences.form.max_members.label'), :hint => conditional_hint('conferences.form.max_members.hint') = f.input :open_for_anybody, :label => t('conferences.form.open_for_anybody.label'), :hint => conditional_hint('conferences.form.open_for_anybody.hint') diff --git a/app/views/conferences/show.html.haml b/app/views/conferences/show.html.haml index 0afa822..302f294 100644 --- a/app/views/conferences/show.html.haml +++ b/app/views/conferences/show.html.haml @@ -1,32 +1,50 @@ - content_for :title, t("conferences.show.page_title") -%p - %strong= t('conferences.show.name') + ":" - = @conference.name -- if @conference.start - %p - %strong= t('conferences.show.start') + ":" - = @conference.start - %p - %strong= t('conferences.show.end') + ":" - = @conference.end -- if !@conference.description.blank? - %p - %strong= t('conferences.show.description') + ":" - = @conference.description -- if !@conference.pin.blank? - %p - %strong= t('conferences.show.pin') + ":" - = @conference.pin -%p - %strong= t('conferences.show.open_for_anybody') + ":" - = @conference.open_for_anybody -%p - %strong= t('conferences.show.announce_new_member_by_name') + ":" - = @conference.announce_new_member_by_name -%p - %strong= t('conferences.show.announce_left_member_by_name') + ":" - = @conference.announce_left_member_by_name +%table.table.table-striped + %tbody + %tr + %td + %strong= t('conferences.show.name') + ":" + %td + = @conference.name + - if @conference.start + %tr + %td + %strong= t('conferences.show.start') + ":" + %td + = @conference.start + %tr + %td + %strong= t('conferences.show.end') + ":" + %td + = @conference.end + - if !@conference.description.blank? + %tr + %td + %strong= t('conferences.show.description') + ":" + %td + = @conference.description + - if !@conference.pin.blank? + %tr + %td + %strong= t('conferences.show.pin') + ":" + %td + = @conference.pin + %tr + %td + %strong= t('conferences.show.open_for_anybody') + ":" + %td + = @conference.open_for_anybody + %tr + %td + %strong= t('conferences.show.announce_new_member_by_name') + ":" + %td + = @conference.announce_new_member_by_name + %tr + %td + %strong= t('conferences.show.announce_left_member_by_name') + ":" + %td + = @conference.announce_left_member_by_name = render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @parent, :child => @conference } -- cgit v1.2.3