From 3833ac1506fb336cd617ec41d25e35c34e74064e Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Tue, 26 Mar 2013 15:51:35 +0100 Subject: voicemail refactored --- app/views/sip_accounts/_form_core.html.haml | 1 + app/views/sip_accounts/show.html.haml | 5 ++++ app/views/voicemail_accounts/_form.html.haml | 7 +++++ app/views/voicemail_accounts/_form_core.html.haml | 3 ++ app/views/voicemail_accounts/_index_core.html.haml | 15 ++++++++++ app/views/voicemail_accounts/edit.html.haml | 3 ++ app/views/voicemail_accounts/index.html.haml | 6 ++++ app/views/voicemail_accounts/new.html.haml | 3 ++ app/views/voicemail_accounts/show.html.haml | 19 +++++++++++++ app/views/voicemail_settings/_form.html.haml | 3 +- app/views/voicemail_settings/_form_core.html.haml | 17 ++++++----- app/views/voicemail_settings/_index_core.html.haml | 14 +++++++++ app/views/voicemail_settings/edit.html.haml | 2 +- app/views/voicemail_settings/index.html.haml | 6 ++++ app/views/voicemail_settings/new.html.haml | 3 ++ app/views/voicemail_settings/show.html.haml | 33 +++++++++------------- 16 files changed, 109 insertions(+), 31 deletions(-) create mode 100644 app/views/voicemail_accounts/_form.html.haml create mode 100644 app/views/voicemail_accounts/_form_core.html.haml create mode 100644 app/views/voicemail_accounts/_index_core.html.haml create mode 100644 app/views/voicemail_accounts/edit.html.haml create mode 100644 app/views/voicemail_accounts/index.html.haml create mode 100644 app/views/voicemail_accounts/new.html.haml create mode 100644 app/views/voicemail_accounts/show.html.haml create mode 100644 app/views/voicemail_settings/_index_core.html.haml create mode 100644 app/views/voicemail_settings/index.html.haml create mode 100644 app/views/voicemail_settings/new.html.haml (limited to 'app/views') diff --git a/app/views/sip_accounts/_form_core.html.haml b/app/views/sip_accounts/_form_core.html.haml index d7c65d0..2e4882e 100644 --- a/app/views/sip_accounts/_form_core.html.haml +++ b/app/views/sip_accounts/_form_core.html.haml @@ -14,3 +14,4 @@ = f.input :hotdeskable, :label => t('sip_accounts.form.hotdeskable.label'), :hint => conditional_hint('sip_accounts.form.hotdeskable.hint') = f.input :clip_no_screening, :label => t('sip_accounts.form.clip_no_screening.label'), :hint => conditional_hint('sip_accounts.form.clip_no_screening.hint') = f.input :language_code, :collection => Language.all.collect{|l| [l.to_s, l.code]}, :label => t('sip_accounts.form.language_code.label'), :hint => conditional_hint('sip_accounts.form.language_id.hint'), :include_blank => false + = f.input :voicemail_account_id, :collection => @possible_voicemail_accounts.collect{|l| [l.to_s, l.id]}, :label => t('sip_accounts.form.voicemail_account_id.label'), :hint => conditional_hint('voicemail_accounts.form.sip_account_id.hint'), :include_blank => true diff --git a/app/views/sip_accounts/show.html.haml b/app/views/sip_accounts/show.html.haml index e79907f..a7cd3ce 100644 --- a/app/views/sip_accounts/show.html.haml +++ b/app/views/sip_accounts/show.html.haml @@ -37,6 +37,11 @@ %strong= t('sip_accounts.show.hotdeskable') + ":" %td = @sip_account.hotdeskable == true ? t('simple_form.yes') : t('simple_form.no') + %tr + %td + %strong= t('sip_accounts.show.voicemail_account') + ":" + %td + = @sip_account.voicemail_account - if @sip_account.registration.try(:network_ip) && @sip_account.registration.try(:network_port) %tr diff --git a/app/views/voicemail_accounts/_form.html.haml b/app/views/voicemail_accounts/_form.html.haml new file mode 100644 index 0000000..1e5ffc0 --- /dev/null +++ b/app/views/voicemail_accounts/_form.html.haml @@ -0,0 +1,7 @@ += simple_form_for([@parent, @voicemail_account]) do |f| + = f.error_notification + + = render "form_core", :f => f + + .form-actions + = f.button :submit, conditional_t('voicemail_accounts.form.submit') diff --git a/app/views/voicemail_accounts/_form_core.html.haml b/app/views/voicemail_accounts/_form_core.html.haml new file mode 100644 index 0000000..a13ae51 --- /dev/null +++ b/app/views/voicemail_accounts/_form_core.html.haml @@ -0,0 +1,3 @@ +.inputs + = f.input :name, :label => t('voicemail_accounts.form.name.label'), :hint => conditional_hint('voicemail_accounts.form.name.hint') + = f.input :active, :label => t('voicemail_accounts.form.active.label'), :hint => conditional_hint('voicemail_accounts.form.active.hint') diff --git a/app/views/voicemail_accounts/_index_core.html.haml b/app/views/voicemail_accounts/_index_core.html.haml new file mode 100644 index 0000000..908c2b4 --- /dev/null +++ b/app/views/voicemail_accounts/_index_core.html.haml @@ -0,0 +1,15 @@ +%table.table.table-striped + %tr + %th + %th= t('voicemail_accounts.index.name') + + + - for voicemail_account in voicemail_accounts + %tr + %td + - if voicemail_account.active + %i.icon-ok + - else + %i.icon-ban-circle + %td= voicemail_account.name + =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => voicemail_account.voicemail_accountable, :child => voicemail_account} \ No newline at end of file diff --git a/app/views/voicemail_accounts/edit.html.haml b/app/views/voicemail_accounts/edit.html.haml new file mode 100644 index 0000000..8d1518e --- /dev/null +++ b/app/views/voicemail_accounts/edit.html.haml @@ -0,0 +1,3 @@ +- content_for :title, t("voicemail_accounts.edit.page_title") + += render "form" \ No newline at end of file diff --git a/app/views/voicemail_accounts/index.html.haml b/app/views/voicemail_accounts/index.html.haml new file mode 100644 index 0000000..2bc8ae4 --- /dev/null +++ b/app/views/voicemail_accounts/index.html.haml @@ -0,0 +1,6 @@ +- content_for :title, t("voicemail_accounts.index.page_title") + +- if @voicemail_accounts && @voicemail_accounts.count > 0 + = render "index_core", :voicemail_accounts => @voicemail_accounts + += render :partial => 'shared/create_link', :locals => {:parent => @parent, :child_class => VoicemailAccount} \ No newline at end of file diff --git a/app/views/voicemail_accounts/new.html.haml b/app/views/voicemail_accounts/new.html.haml new file mode 100644 index 0000000..193779d --- /dev/null +++ b/app/views/voicemail_accounts/new.html.haml @@ -0,0 +1,3 @@ +- content_for :title, t("voicemail_accounts.new.page_title") + += render "form" \ No newline at end of file diff --git a/app/views/voicemail_accounts/show.html.haml b/app/views/voicemail_accounts/show.html.haml new file mode 100644 index 0000000..06b4d1a --- /dev/null +++ b/app/views/voicemail_accounts/show.html.haml @@ -0,0 +1,19 @@ +- content_for :title, t("voicemail_accounts.show.page_title") + +%p + %strong= t('voicemail_accounts.show.uuid') + ":" + = @voicemail_account.uuid +%p + %strong= t('voicemail_accounts.show.name') + ":" + = @voicemail_account.name +%p + %strong= t('voicemail_accounts.show.active') + ":" + = @voicemail_account.active + += render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @parent, :child => @voicemail_account } + +%h3= t('voicemail_settings.index.page_title') +- if @voicemail_account.voicemail_settings.any? + = render "voicemail_settings/index_core", :voicemail_settings => @voicemail_account.voicemail_settings + %br += render :partial => 'shared/create_link', :locals => { :parent => @voicemail_account, :child_class => VoicemailSetting } \ No newline at end of file diff --git a/app/views/voicemail_settings/_form.html.haml b/app/views/voicemail_settings/_form.html.haml index cd43b2d..08fc37b 100644 --- a/app/views/voicemail_settings/_form.html.haml +++ b/app/views/voicemail_settings/_form.html.haml @@ -1,4 +1,5 @@ -= simple_form_for([@sip_account,@voicemail_setting]) do |f| + += simple_form_for([@voicemail_account, @voicemail_setting]) do |f| = f.error_notification = render "form_core", :f => f diff --git a/app/views/voicemail_settings/_form_core.html.haml b/app/views/voicemail_settings/_form_core.html.haml index 08bdfc2..bf47e46 100644 --- a/app/views/voicemail_settings/_form_core.html.haml +++ b/app/views/voicemail_settings/_form_core.html.haml @@ -1,11 +1,10 @@ .inputs + - if !@no_edit or !@no_edit[:name] + = f.input :name, :collection => VoicemailSetting::VOICEMAIL_SETTINGS.keys.collect{|i, k| [t("voicemail_settings.settings.#{i}"), i]}, :label => t('voicemail_settings.form.name.label'), :hint => conditional_hint('voicemail_settings.form.name.hint'), :autofocus => true, :include_blank => false + = f.input :value, :label => t('voicemail_settings.form.value.label'), :hint => conditional_hint('voicemail_settings.form.value.hint') + - else + = f.input :value, :label => t("voicemail_settings.settings.#{@no_edit[:name][:name]}"), :hint => conditional_hint('voicemail_settings.form.value.hint'), :as => @no_edit[:name][:input] - = f.input :greeting_path, :as => :select, :label => t('voicemail_settings.form.greeting.label'), :hint => conditional_hint('voicemail_settings.form.greeting.hint'), :collection => @greeting_files - = f.input :name_path, :as => :select, :label => t('voicemail_settings.form.name.label'), :hint => conditional_hint('voicemail_settings.form.name.hint'), :collection => @name_files - - = f.input :password, :label => t('voicemail_settings.form.pin.label'), :hint => conditional_hint('voicemail_settings.form.pin.hint') - - = f.input :notify, :as => :boolean, :label => t('voicemail_settings.form.notify.label'), :hint => conditional_hint('voicemail_settings.form.notify.hint') - = f.input :attachment, :as => :boolean, :label => t('voicemail_settings.form.attachment.label'), :hint => conditional_hint('voicemail_settings.form.attachment.hint') - = f.input :mark_read, :as => :boolean, :label => t('voicemail_settings.form.mark_read.label'), :hint => conditional_hint('voicemail_settings.form.mark_read.hint') - = f.input :purge, :as => :boolean, :label => t('voicemail_settings.form.purge.label'), :hint => conditional_hint('voicemail_settings.form.purge.hint') + - if !@no_edit or !@no_edit[:description] + = f.input :description, :label => t('voicemail_settings.form.description.label'), :hint => conditional_hint('voicemail_settings.form.description.hint') + diff --git a/app/views/voicemail_settings/_index_core.html.haml b/app/views/voicemail_settings/_index_core.html.haml new file mode 100644 index 0000000..94ebfb1 --- /dev/null +++ b/app/views/voicemail_settings/_index_core.html.haml @@ -0,0 +1,14 @@ +%table.table.table-striped + %thead + %tr + %th= t('voicemail_settings.index.name') + %th= t('voicemail_settings.index.value') + %th= t('voicemail_settings.index.description') + + %tbody + - for voicemail_setting in voicemail_settings + %tr + %td= voicemail_setting.name + %td= voicemail_setting.value + %td= voicemail_setting.description + =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => voicemail_setting.voicemail_account, :child => voicemail_setting} diff --git a/app/views/voicemail_settings/edit.html.haml b/app/views/voicemail_settings/edit.html.haml index 56e5765..cb9924b 100644 --- a/app/views/voicemail_settings/edit.html.haml +++ b/app/views/voicemail_settings/edit.html.haml @@ -1,3 +1,3 @@ - content_for :title, t("voicemail_settings.edit.page_title") -= render "form" += render "form" \ No newline at end of file diff --git a/app/views/voicemail_settings/index.html.haml b/app/views/voicemail_settings/index.html.haml new file mode 100644 index 0000000..5eb9940 --- /dev/null +++ b/app/views/voicemail_settings/index.html.haml @@ -0,0 +1,6 @@ +- content_for :title, t("voicemail_settings.index.page_title") + +- if @voicemail_settings && @voicemail_settings.count > 0 + = render "index_core", :voicemail_settings => @voicemail_settings + += render :partial => 'shared/create_link', :locals => {:parent => @voicemail_account, :child_class => VoicemailSetting} diff --git a/app/views/voicemail_settings/new.html.haml b/app/views/voicemail_settings/new.html.haml new file mode 100644 index 0000000..6eddc39 --- /dev/null +++ b/app/views/voicemail_settings/new.html.haml @@ -0,0 +1,3 @@ +- content_for :title, t("voicemail_settings.new.page_title") + += render "form" \ No newline at end of file diff --git a/app/views/voicemail_settings/show.html.haml b/app/views/voicemail_settings/show.html.haml index e156d7b..f1a3e61 100644 --- a/app/views/voicemail_settings/show.html.haml +++ b/app/views/voicemail_settings/show.html.haml @@ -1,26 +1,19 @@ - content_for :title, t("voicemail_settings.show.page_title") %p - %strong= t('voicemail_settings.show.greeting_path') + ":" - = File.basename(@voicemail_setting.greeting_path.to_s) - + %strong= t('voicemail_settings.show.voicemail_id') + ":" + = @voicemail_setting.voicemail %p - %strong= t('voicemail_settings.show.name_path') + ":" - = File.basename(@voicemail_setting.name_path.to_s) - + %strong= t('voicemail_settings.show.name') + ":" + = @voicemail_setting.name +%p + %strong= t('voicemail_settings.show.value') + ":" + = @voicemail_setting.value +%p + %strong= t('voicemail_settings.show.class_type') + ":" + = @voicemail_setting.class_type %p - %strong= t('voicemail_settings.show.flags') + ":" - - if @voicemail_setting.notify - %br - = "- " + t('voicemail_settings.show.notify') - - if @voicemail_setting.attachment - %br - = "- " + t('voicemail_settings.show.attachment') - - if @voicemail_setting.mark_read - %br - = "- " + t('voicemail_settings.show.mark_read') - - if @voicemail_setting.purge - %br - = "- " + t('voicemail_settings.show.purge') + %strong= t('voicemail_settings.show.description') + ":" + = @voicemail_setting.description -= link_to t('voicemail_settings.actions.edit'), edit_sip_account_voicemail_setting_path(@sip_account, @voicemail_setting) += render :partial => 'shared/show_edit_destroy_part', :locals => {:parent => @voicemail_setting.voicemail_account, :child => @voicemail_setting} \ No newline at end of file -- cgit v1.2.3 From 41b306402d020aff3615308cdd555b0a05221343 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Wed, 27 Mar 2013 08:13:21 +0100 Subject: voicemail settings --- app/views/voicemail_settings/_form_core.html.haml | 3 ++- app/views/voicemail_settings/_index_core.html.haml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'app/views') diff --git a/app/views/voicemail_settings/_form_core.html.haml b/app/views/voicemail_settings/_form_core.html.haml index bf47e46..31c6bbf 100644 --- a/app/views/voicemail_settings/_form_core.html.haml +++ b/app/views/voicemail_settings/_form_core.html.haml @@ -1,9 +1,10 @@ + .inputs - if !@no_edit or !@no_edit[:name] = f.input :name, :collection => VoicemailSetting::VOICEMAIL_SETTINGS.keys.collect{|i, k| [t("voicemail_settings.settings.#{i}"), i]}, :label => t('voicemail_settings.form.name.label'), :hint => conditional_hint('voicemail_settings.form.name.hint'), :autofocus => true, :include_blank => false = f.input :value, :label => t('voicemail_settings.form.value.label'), :hint => conditional_hint('voicemail_settings.form.value.hint') - else - = f.input :value, :label => t("voicemail_settings.settings.#{@no_edit[:name][:name]}"), :hint => conditional_hint('voicemail_settings.form.value.hint'), :as => @no_edit[:name][:input] + = f.input :value, :label => t("voicemail_settings.settings.#{@no_edit[:name][:name]}"), :hint => conditional_hint('voicemail_settings.form.value.hint'), :as => @no_edit[:name][:input], input_html: @no_edit[:name][:html] - if !@no_edit or !@no_edit[:description] = f.input :description, :label => t('voicemail_settings.form.description.label'), :hint => conditional_hint('voicemail_settings.form.description.hint') diff --git a/app/views/voicemail_settings/_index_core.html.haml b/app/views/voicemail_settings/_index_core.html.haml index 94ebfb1..9173fe6 100644 --- a/app/views/voicemail_settings/_index_core.html.haml +++ b/app/views/voicemail_settings/_index_core.html.haml @@ -8,7 +8,7 @@ %tbody - for voicemail_setting in voicemail_settings %tr - %td= voicemail_setting.name + %td= t("voicemail_settings.settings.#{voicemail_setting.name}") %td= voicemail_setting.value %td= voicemail_setting.description =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => voicemail_setting.voicemail_account, :child => voicemail_setting} -- cgit v1.2.3 From ec565b14adfdb21c74e6c3558dc8a56082ec1c7a Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Wed, 27 Mar 2013 10:29:01 +0100 Subject: voicemail_pin removed --- app/views/sip_accounts/_form_core.html.haml | 1 - 1 file changed, 1 deletion(-) (limited to 'app/views') diff --git a/app/views/sip_accounts/_form_core.html.haml b/app/views/sip_accounts/_form_core.html.haml index 2e4882e..f84f38a 100644 --- a/app/views/sip_accounts/_form_core.html.haml +++ b/app/views/sip_accounts/_form_core.html.haml @@ -6,7 +6,6 @@ - else = f.input :auth_name, :as => :string, :label => t('sip_accounts.form.auth_name.label'), :hint => conditional_hint('sip_accounts.form.auth_name.hint') = f.input :password, :as => :string, :label => t('sip_accounts.form.password.label'), :hint => conditional_hint('sip_accounts.form.password.hint') - = f.input :voicemail_pin, :as => :string, :label => t('sip_accounts.form.voicemail_pin.label'), :hint => conditional_hint('sip_accounts.form.voicemail_pin.hint') = f.input :call_waiting, :label => t('sip_accounts.form.call_waiting.label'), :hint => conditional_hint('sip_accounts.form.call_waiting.hint') = f.input :clir, :label => t('sip_accounts.form.clir.label'), :hint => conditional_hint('sip_accounts.form.clir.hint') = f.input :clip, :label => t('sip_accounts.form.clip.label'), :hint => conditional_hint('sip_accounts.form.clip.hint') -- cgit v1.2.3 From a51e98d9487ade1079c962739ac8fe2b3aa11312 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Wed, 27 Mar 2013 10:36:18 +0100 Subject: destinationable_type can be a non model string --- app/views/call_forwards/_index_core.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/call_forwards/_index_core.html.haml b/app/views/call_forwards/_index_core.html.haml index 3c57405..ab8873b 100644 --- a/app/views/call_forwards/_index_core.html.haml +++ b/app/views/call_forwards/_index_core.html.haml @@ -22,7 +22,7 @@ - if call_forward.destinationable_type %br = call_forward.destinationable_type - - if call_forward.destinationable_id + - if Module.constants.include?(call_forward.destinationable_type.to_sym) = ": #{call_forward.destinationable}" %td= call_forward.source =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => call_forward.call_forwardable, :child => call_forward} -- cgit v1.2.3 From 15d961291513ec240f683552f5b547df443beed9 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Wed, 27 Mar 2013 12:15:12 +0100 Subject: email notifications mailer --- app/views/notifications/new_voicemail.text.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/notifications/new_voicemail.text.erb b/app/views/notifications/new_voicemail.text.erb index adeabda..926610b 100644 --- a/app/views/notifications/new_voicemail.text.erb +++ b/app/views/notifications/new_voicemail.text.erb @@ -1,4 +1,4 @@ -Hello <%= @voicemail[:greeting] %>, +Hello, You've just received a voicemail on your Gemeinschaft account <%= @voicemail[:destination] %>. -- cgit v1.2.3 From 595e5f9d32c9dda8f7b6c0dd5e7e4fba4693eca4 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Wed, 20 Mar 2013 17:08:14 +0100 Subject: basic Ember.js setup --- app/views/switchboards/app.js | 8 ++++++++ app/views/switchboards/show-old.html.haml | 21 +++++++++++++++++++++ app/views/switchboards/show.html.erb | 23 +++++++++++++++++++++++ app/views/switchboards/show.html.haml | 21 --------------------- 4 files changed, 52 insertions(+), 21 deletions(-) create mode 100644 app/views/switchboards/app.js create mode 100644 app/views/switchboards/show-old.html.haml create mode 100644 app/views/switchboards/show.html.erb delete mode 100644 app/views/switchboards/show.html.haml (limited to 'app/views') diff --git a/app/views/switchboards/app.js b/app/views/switchboards/app.js new file mode 100644 index 0000000..a4aa100 --- /dev/null +++ b/app/views/switchboards/app.js @@ -0,0 +1,8 @@ +window.App = Ember.Application.create({ + rootElement: '#xxxyyy', + + ready: function() { + App.view.appendTo('#xxxyyy'); + } +}); + diff --git a/app/views/switchboards/show-old.html.haml b/app/views/switchboards/show-old.html.haml new file mode 100644 index 0000000..a825806 --- /dev/null +++ b/app/views/switchboards/show-old.html.haml @@ -0,0 +1,21 @@ +- content_for :title, "Switchboard #{@switchboard.name}" + +.row + .span12 + = render :partial => "current_user_dashboard", :current_user => current_user + + %ul.thumbnails + = render :partial => "switchboard_entries/switchboard_entry", :collection => @switchboard_entries + + - if can? :edit, @switchboard + .row + .span12 + %a.btn.btn-small.btn-warning{:href => switchboard_switchboard_entries_path(@switchboard) } + %i.icon-edit.icon-white + %span.hidden-phone + =t("switchboard_entries.index.page_title") + + .span6 + + += subscribe_to "/switchboards/#{@switchboard.id}" \ No newline at end of file diff --git a/app/views/switchboards/show.html.erb b/app/views/switchboards/show.html.erb new file mode 100644 index 0000000..337d00c --- /dev/null +++ b/app/views/switchboards/show.html.erb @@ -0,0 +1,23 @@ +<% content_for :title, "Switchboard #{@switchboard.name}" %> + +
+
+
+ +
+ + + + + +
+
+ + + + + diff --git a/app/views/switchboards/show.html.haml b/app/views/switchboards/show.html.haml deleted file mode 100644 index a825806..0000000 --- a/app/views/switchboards/show.html.haml +++ /dev/null @@ -1,21 +0,0 @@ -- content_for :title, "Switchboard #{@switchboard.name}" - -.row - .span12 - = render :partial => "current_user_dashboard", :current_user => current_user - - %ul.thumbnails - = render :partial => "switchboard_entries/switchboard_entry", :collection => @switchboard_entries - - - if can? :edit, @switchboard - .row - .span12 - %a.btn.btn-small.btn-warning{:href => switchboard_switchboard_entries_path(@switchboard) } - %i.icon-edit.icon-white - %span.hidden-phone - =t("switchboard_entries.index.page_title") - - .span6 - - -= subscribe_to "/switchboards/#{@switchboard.id}" \ No newline at end of file -- cgit v1.2.3 From 877364c24ef9c7954f0e193456bb3f2d39169977 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Mon, 25 Mar 2013 10:26:49 +0100 Subject: First try --- app/views/switchboards/show.html.erb | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'app/views') diff --git a/app/views/switchboards/show.html.erb b/app/views/switchboards/show.html.erb index 337d00c..a4bdae0 100644 --- a/app/views/switchboards/show.html.erb +++ b/app/views/switchboards/show.html.erb @@ -1,19 +1,26 @@ <% content_for :title, "Switchboard #{@switchboard.name}" %> + +
-
- -
+
+ -
-- cgit v1.2.3 From 64653a9149eca977c16233abb0a472730b94a464 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Tue, 26 Mar 2013 16:55:08 +0100 Subject: Store reload interval in the Switchboard table. --- app/views/switchboards/_form_core.html.haml | 3 +++ app/views/switchboards/app.js | 8 ------ app/views/switchboards/show.html.erb | 40 +++++++++++++++++++++++------ 3 files changed, 35 insertions(+), 16 deletions(-) delete mode 100644 app/views/switchboards/app.js (limited to 'app/views') diff --git a/app/views/switchboards/_form_core.html.haml b/app/views/switchboards/_form_core.html.haml index 61b5934..59a2442 100644 --- a/app/views/switchboards/_form_core.html.haml +++ b/app/views/switchboards/_form_core.html.haml @@ -1,2 +1,5 @@ .inputs = f.input :name, :label => t('switchboards.form.name.label'), :hint => conditional_hint('switchboards.form.name.hint'), :autofocus => true + = f.input :reload_interval, :label => t('switchboards.form.reload_interval.label'), :hint => conditional_hint('switchboards.form.reload_interval.hint') + = f.input :show_avatars, :label => t('switchboards.form.show_avatars.label'), :hint => conditional_hint('switchboards.form.show_avatars.hint') + = f.input :entry_width, :label => t('switchboards.form.entry_width.label'), :hint => conditional_hint('switchboards.form.entry_width.hint') diff --git a/app/views/switchboards/app.js b/app/views/switchboards/app.js deleted file mode 100644 index a4aa100..0000000 --- a/app/views/switchboards/app.js +++ /dev/null @@ -1,8 +0,0 @@ -window.App = Ember.Application.create({ - rootElement: '#xxxyyy', - - ready: function() { - App.view.appendTo('#xxxyyy'); - } -}); - diff --git a/app/views/switchboards/show.html.erb b/app/views/switchboards/show.html.erb index a4bdae0..87bb551 100644 --- a/app/views/switchboards/show.html.erb +++ b/app/views/switchboards/show.html.erb @@ -2,23 +2,47 @@
-
- -
-- cgit v1.2.3 From cea2cc3c1cc1e48fc4600c698d52dfda2bde4505 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Wed, 3 Apr 2013 22:08:19 +0200 Subject: Massive changes to the switchboard. --- app/views/switchboards/show.html.erb | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'app/views') diff --git a/app/views/switchboards/show.html.erb b/app/views/switchboards/show.html.erb index 87bb551..1fd9d9a 100644 --- a/app/views/switchboards/show.html.erb +++ b/app/views/switchboards/show.html.erb @@ -22,20 +22,18 @@ {{#each switchboardEntry in switchboardEntrys}}
  • - - User-male-16x - + {{avatar_img switchboardEntry.avatar_src}}

    - {{switchboardEntry.name}} -
    - - 33 - + {{switchboardEntry.name}}
    + + {{#each phoneNumber in switchboardEntry.sipAccount.phoneNumbers}} + + {{phoneNumber.number}} + + {{/each}}
    - - - + {{show_callstate switchboardEntry.callstate}}

    -- cgit v1.2.3 From d6a733440eee34dab3daf25089d40aed91018a49 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Thu, 4 Apr 2013 12:04:34 +0200 Subject: Limit the amount of displayed phone_numbers in a switchboard_entry --- app/views/switchboards/_form_core.html.haml | 1 + app/views/switchboards/show.html.erb | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/switchboards/_form_core.html.haml b/app/views/switchboards/_form_core.html.haml index 59a2442..2258640 100644 --- a/app/views/switchboards/_form_core.html.haml +++ b/app/views/switchboards/_form_core.html.haml @@ -3,3 +3,4 @@ = f.input :reload_interval, :label => t('switchboards.form.reload_interval.label'), :hint => conditional_hint('switchboards.form.reload_interval.hint') = f.input :show_avatars, :label => t('switchboards.form.show_avatars.label'), :hint => conditional_hint('switchboards.form.show_avatars.hint') = f.input :entry_width, :label => t('switchboards.form.entry_width.label'), :hint => conditional_hint('switchboards.form.entry_width.hint') + = f.input :amount_of_displayed_phone_numbers, :label => t('switchboards.form.amount_of_displayed_phone_numbers.label'), :hint => conditional_hint('switchboards.form.amount_of_displayed_phone_numbers.hint') \ No newline at end of file diff --git a/app/views/switchboards/show.html.erb b/app/views/switchboards/show.html.erb index 1fd9d9a..a240b55 100644 --- a/app/views/switchboards/show.html.erb +++ b/app/views/switchboards/show.html.erb @@ -4,6 +4,7 @@ var switchboard_id = <%= @switchboard.id %>; var show_avatars = <%= @switchboard.show_avatars.to_s %>; var reload_interval = <%= @switchboard.reload_interval.nil? ? 0 : @switchboard.reload_interval %>; + var amount_of_displayed_phone_numbers = <%= @switchboard.amount_of_displayed_phone_numbers %>;
    @@ -27,7 +28,7 @@ {{switchboardEntry.name}}
    - {{#each phoneNumber in switchboardEntry.sipAccount.phoneNumbers}} + {{#each phoneNumber in switchboardEntry.sipAccount.phoneNumberShortList}} {{phoneNumber.number}} -- cgit v1.2.3 From 78ea4bcd397a4d8f39ad3c08066fe918a8fc89ad Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Thu, 11 Apr 2013 10:51:28 +0200 Subject: file uploader --- app/views/generic_files/_form.html.haml | 7 +++++++ app/views/generic_files/_form_core.html.haml | 7 +++++++ app/views/generic_files/_index_core.html.haml | 14 ++++++++++++++ app/views/generic_files/edit.html.haml | 3 +++ app/views/generic_files/index.html.haml | 6 ++++++ app/views/generic_files/new.html.haml | 3 +++ app/views/generic_files/show.html.haml | 20 ++++++++++++++++++++ 7 files changed, 60 insertions(+) create mode 100644 app/views/generic_files/_form.html.haml create mode 100644 app/views/generic_files/_form_core.html.haml create mode 100644 app/views/generic_files/_index_core.html.haml create mode 100644 app/views/generic_files/edit.html.haml create mode 100644 app/views/generic_files/index.html.haml create mode 100644 app/views/generic_files/new.html.haml create mode 100644 app/views/generic_files/show.html.haml (limited to 'app/views') diff --git a/app/views/generic_files/_form.html.haml b/app/views/generic_files/_form.html.haml new file mode 100644 index 0000000..8912daa --- /dev/null +++ b/app/views/generic_files/_form.html.haml @@ -0,0 +1,7 @@ += simple_form_for([@parent, @generic_file]) do |f| + = f.error_notification + + = render "form_core", :f => f + + .form-actions + = f.button :submit, conditional_t('generic_files.form.submit') diff --git a/app/views/generic_files/_form_core.html.haml b/app/views/generic_files/_form_core.html.haml new file mode 100644 index 0000000..b0e8889 --- /dev/null +++ b/app/views/generic_files/_form_core.html.haml @@ -0,0 +1,7 @@ +.inputs + - if @generic_file.new_record? + = f.input :file, :label => t('generic_files.form.file.label'), :hint => conditional_hint('generic_files.form.file.hint') + - else + = f.input :file_type, :label => t('generic_files.form.file_type.label'), :hint => conditional_hint('generic_files.form.file_type.hint'), :disabled => true + = f.input :name, :label => t('generic_files.form.name.label'), :hint => conditional_hint('generic_files.form.name.hint') + = f.input :category, :label => t('generic_files.form.category.label'), :collection => GenericFile::CATEGORIES, :hint => conditional_hint('generic_files.form.category.hint'), :include_blank => false diff --git a/app/views/generic_files/_index_core.html.haml b/app/views/generic_files/_index_core.html.haml new file mode 100644 index 0000000..5fa66f7 --- /dev/null +++ b/app/views/generic_files/_index_core.html.haml @@ -0,0 +1,14 @@ +%table.table.table-striped + %tr + %th= t('generic_files.index.category') + %th= t('generic_files.index.name') + %th= t('generic_files.index.file_type') + + - for generic_file in generic_files + %tr + %td= generic_file.category + %td= generic_file.name + %td= generic_file.file_type + + + =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => generic_file.owner, :child => generic_file} \ No newline at end of file diff --git a/app/views/generic_files/edit.html.haml b/app/views/generic_files/edit.html.haml new file mode 100644 index 0000000..b59dd2b --- /dev/null +++ b/app/views/generic_files/edit.html.haml @@ -0,0 +1,3 @@ +- content_for :title, t("generic_files.edit.page_title") + += render "form" \ No newline at end of file diff --git a/app/views/generic_files/index.html.haml b/app/views/generic_files/index.html.haml new file mode 100644 index 0000000..b3c489e --- /dev/null +++ b/app/views/generic_files/index.html.haml @@ -0,0 +1,6 @@ +- content_for :title, t("generic_files.index.page_title") + +- if @generic_files && @generic_files.count > 0 + = render "index_core", :generic_files => @generic_files + += render :partial => 'shared/create_link', :locals => {:parent => @parent, :child_class => GenericFile} \ No newline at end of file diff --git a/app/views/generic_files/new.html.haml b/app/views/generic_files/new.html.haml new file mode 100644 index 0000000..05af0da --- /dev/null +++ b/app/views/generic_files/new.html.haml @@ -0,0 +1,3 @@ +- content_for :title, t("generic_files.new.page_title") + += render "form" \ No newline at end of file diff --git a/app/views/generic_files/show.html.haml b/app/views/generic_files/show.html.haml new file mode 100644 index 0000000..b375dfc --- /dev/null +++ b/app/views/generic_files/show.html.haml @@ -0,0 +1,20 @@ +- content_for :title, t("generic_files.show.page_title") + +%p + %strong= t('generic_files.show.category') + ":" + = @generic_file.category + +%p + %strong= t('generic_files.show.name') + ":" + = @generic_file.name + +%p + %strong= t('generic_files.show.file_type') + ":" + = @generic_file.file_type + +%p + %strong= t('generic_files.show.file_size') + ":" + = number_to_human_size(@generic_file.file_size) + + += render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @parent, :child => @generic_file } \ No newline at end of file -- cgit v1.2.3 From 4cbc64ec6a0a800d14ba37acb3b210dc6aa39269 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Thu, 11 Apr 2013 10:51:51 +0200 Subject: show destination --- app/views/call_forwards/show.html.haml | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/views') diff --git a/app/views/call_forwards/show.html.haml b/app/views/call_forwards/show.html.haml index ad9ab16..fdd5197 100644 --- a/app/views/call_forwards/show.html.haml +++ b/app/views/call_forwards/show.html.haml @@ -10,6 +10,8 @@ %strong= t('call_forwards.show.destination') + ":" - if @call_forward.destinationable_id && @call_forward.destinationable = "#{@call_forward.destinationable_type}: #{@call_forward.destinationable}" + - if !@call_forward.destination.blank? + = "(#{@call_forward.destination})" - elsif !@call_forward.destinationable_type.blank? = "#{@call_forward.destinationable_type}: #{@call_forward.destination}" - else -- cgit v1.2.3 From f0ab616d674d7c7e9d0018ba7a9fde7107b0519f Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Fri, 12 Apr 2013 11:52:13 +0200 Subject: files view added --- app/views/users/_generic_files.html.haml | 7 +++++++ app/views/users/show.html.haml | 5 ++++- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 app/views/users/_generic_files.html.haml (limited to 'app/views') diff --git a/app/views/users/_generic_files.html.haml b/app/views/users/_generic_files.html.haml new file mode 100644 index 0000000..15bdb74 --- /dev/null +++ b/app/views/users/_generic_files.html.haml @@ -0,0 +1,7 @@ +-# Files +-# +- if (can?( :index, GenericFile ) && user.generic_files.count > 0 ) || can?( :create, GenericFile ) + %h2= t('generic_files.index.page_title') + - if can?( :index, GenericFile ) && user.generic_files.count > 0 + = render "generic_files/index_core", :generic_files => user.generic_files + = render :partial => 'shared/create_link', :locals => {:parent => user, :child_class => GenericFile} \ No newline at end of file diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml index 98f7cc6..9bf76df 100644 --- a/app/views/users/show.html.haml +++ b/app/views/users/show.html.haml @@ -89,4 +89,7 @@ = render :partial => 'conferences', :locals => {:user => @user} - cache(['user_switchboards_overview', I18n.locale, @user, @user.switchboards]) do - = render :partial => 'switchboards', :locals => {:user => @user} \ No newline at end of file + = render :partial => 'switchboards', :locals => {:user => @user} + + - cache(['user_show_generic_files_overview', I18n.locale, @user, @user.generic_files]) do + = render :partial => 'generic_files', :locals => {:user => @user} \ No newline at end of file -- cgit v1.2.3 From e1462c8f4159e332b729819281fca7c2937e49eb Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Tue, 16 Apr 2013 13:02:18 +0200 Subject: voicemail settigs disabled --- app/views/users/show.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/views') diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml index 9bf76df..8421c40 100644 --- a/app/views/users/show.html.haml +++ b/app/views/users/show.html.haml @@ -47,8 +47,8 @@ =link_to t("voicemail_messages.index.page_title"), sip_account_voicemail_messages_path(sip_account) %br =link_to t("call_forwards.index.page_title"), sip_account_call_forwards_path(sip_account) - %br - =link_to t("voicemail_settings.index.page_title"), sip_account_voicemail_settings_path(sip_account) + /%br + /=link_to t("voicemail_settings.index.page_title"), sip_account_voicemail_settings_path(sip_account) %br =link_to t("softkeys.index.page_title"), sip_account_softkeys_path(sip_account) %br -- cgit v1.2.3 From f8e34e0e948352f18db9665b55c9848b1b71b512 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Wed, 17 Apr 2013 10:27:05 +0200 Subject: files view --- app/views/tenants/_admin_area.de.html.haml | 2 ++ app/views/tenants/_admin_area.en.html.haml | 4 +++- app/views/tenants/_generic_files.html.haml | 5 +++++ 3 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 app/views/tenants/_generic_files.html.haml (limited to 'app/views') diff --git a/app/views/tenants/_admin_area.de.html.haml b/app/views/tenants/_admin_area.de.html.haml index 8acc95d..cfcbcf3 100644 --- a/app/views/tenants/_admin_area.de.html.haml +++ b/app/views/tenants/_admin_area.de.html.haml @@ -16,6 +16,8 @@ = render :partial => 'tenants/table_of_phone_books', :locals => {:tenant => tenant} + = render :partial => 'generic_files', :locals => {:tenant => tenant} + .well %h2 Gemeinschaft Konfiguration = render :partial => 'tenants/gs_parameter_table', :locals => {:tenant => tenant} diff --git a/app/views/tenants/_admin_area.en.html.haml b/app/views/tenants/_admin_area.en.html.haml index c40e3ca..f0d1e56 100644 --- a/app/views/tenants/_admin_area.en.html.haml +++ b/app/views/tenants/_admin_area.en.html.haml @@ -16,6 +16,8 @@ = render :partial => 'tenants/table_of_phone_books', :locals => {:tenant => tenant} + = render :partial => 'generic_files', :locals => {:tenant => tenant} + .well %h2 Gemeinschaft Configuration = render :partial => 'tenants/gs_parameter_table', :locals => {:tenant => tenant} @@ -42,4 +44,4 @@ = 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 + = render :partial => 'table_of_backup_jobs', :locals => {:tenant => tenant, :backup_jobs => backup_jobs} diff --git a/app/views/tenants/_generic_files.html.haml b/app/views/tenants/_generic_files.html.haml new file mode 100644 index 0000000..1b6fee5 --- /dev/null +++ b/app/views/tenants/_generic_files.html.haml @@ -0,0 +1,5 @@ +-# Files +-# +%h2= t('generic_files.index.page_title') += render "generic_files/index_core", :generic_files => tenant.generic_files += render :partial => 'shared/create_link', :locals => {:parent => tenant, :child_class => GenericFile} \ No newline at end of file -- cgit v1.2.3 From fc1e3b48b69d5b358ea19256cd48523d82821326 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Fri, 19 Apr 2013 10:18:47 +0200 Subject: voicemail_accounts in voicemail_messages view --- app/views/voicemail_messages/_index_core.html.haml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'app/views') diff --git a/app/views/voicemail_messages/_index_core.html.haml b/app/views/voicemail_messages/_index_core.html.haml index 5e82761..ceb6fb3 100644 --- a/app/views/voicemail_messages/_index_core.html.haml +++ b/app/views/voicemail_messages/_index_core.html.haml @@ -1,4 +1,4 @@ -= form_tag(destroy_multiple_sip_account_voicemail_messages_path(@sip_account), :method => :delete, :id => 'voicemail_message_form') do += form_tag(destroy_multiple_voicemail_account_voicemail_messages_path(@voicemail_account), :method => :delete, :id => 'voicemail_message_form') do %header.entries-nav= render :partial => "voicemail_messages/navigation" .content %table.table.table-striped @@ -26,18 +26,18 @@ = t("voicemail_messages.index.flags.#{voicemail_message.flags}") %td.form-actions - if can?(:show, voicemail_message) && File.readable?(voicemail_message.file_path) - = link_to t('voicemail_messages.index.actions.download'), sip_account_voicemail_message_path(@sip_account, voicemail_message, :format => :wav), :method => :get - %td.actions - - if @sip_account.registration && can?(:call, voicemail_message) - = link_to t('voicemail_messages.index.actions.call'), call_sip_account_voicemail_message_path(@sip_account, voicemail_message), :method => :put + = link_to t('voicemail_messages.index.actions.download'), voicemail_account_voicemail_message_path(@voicemail_account, voicemail_message, :format => :wav), :method => :get + /%td.actions + / - if @voicemail_account.registration && can?(:call, voicemail_message) + / = link_to t('voicemail_messages.index.actions.call'), call_voicemail_account_voicemail_message_path(@voicemail_account, voicemail_message), :method => :put %td.form-actions - if can?(:edit, voicemail_message) && voicemail_message.read_epoch > 0 - = link_to t('voicemail_messages.index.actions.mark_unread'), mark_unread_sip_account_voicemail_message_path(@sip_account, voicemail_message), :method => :put + = link_to t('voicemail_messages.index.actions.mark_unread'), mark_unread_voicemail_account_voicemail_message_path(@voicemail_account, voicemail_message), :method => :put - else - = link_to t('voicemail_messages.index.actions.mark_read'), mark_read_sip_account_voicemail_message_path(@sip_account, voicemail_message), :method => :put + = link_to t('voicemail_messages.index.actions.mark_read'), mark_read_voicemail_account_voicemail_message_path(@voicemail_account, voicemail_message), :method => :put %td.form-actions - if can? :destroy, voicemail_message - = link_to t('voicemail_messages.index.actions.destroy'), sip_account_voicemail_message_path(@sip_account, voicemail_message), :method => :delete + = link_to t('voicemail_messages.index.actions.destroy'), voicemail_account_voicemail_message_path(@voicemail_account, voicemail_message), :method => :delete %footer.entries-nav= render :partial => "voicemail_messages/navigation" = link_to Haml::Engine.new("%i.icon-remove").render + ' test ', root_url -- cgit v1.2.3 From 5e728545915b87683087d7814bf08034b8d44a33 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Fri, 19 Apr 2013 10:19:45 +0200 Subject: list voicemails count --- app/views/voicemail_accounts/_index_core.html.haml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/voicemail_accounts/_index_core.html.haml b/app/views/voicemail_accounts/_index_core.html.haml index 908c2b4..cd87c31 100644 --- a/app/views/voicemail_accounts/_index_core.html.haml +++ b/app/views/voicemail_accounts/_index_core.html.haml @@ -2,6 +2,7 @@ %tr %th %th= t('voicemail_accounts.index.name') + %th= t('voicemail_messages.index.page_title') - for voicemail_account in voicemail_accounts @@ -12,4 +13,6 @@ - else %i.icon-ban-circle %td= voicemail_account.name - =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => voicemail_account.voicemail_accountable, :child => voicemail_account} \ No newline at end of file + %td= link_to voicemail_account.voicemail_messages.count, voicemail_account_voicemail_messages_path(voicemail_account) + + =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => voicemail_account.voicemail_accountable, :child => voicemail_account} -- cgit v1.2.3 From 4c4deedd65d8c459795ed83d282022a07f38757e Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Fri, 19 Apr 2013 10:20:33 +0200 Subject: link to voicemail messages of first account found --- app/views/layouts/_navbar.html.haml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'app/views') diff --git a/app/views/layouts/_navbar.html.haml b/app/views/layouts/_navbar.html.haml index 3e1da1c..f4914b2 100644 --- a/app/views/layouts/_navbar.html.haml +++ b/app/views/layouts/_navbar.html.haml @@ -20,9 +20,10 @@ %li %a{:href => sip_account_call_histories_path(current_user.sip_accounts.first)} =t("call_histories.index.page_title") - %li - %a{:href => sip_account_voicemail_messages_path(current_user.sip_accounts.first)} - =t("voicemail_messages.index.page_title") + - if current_user.voicemail_accounts.first + %li + %a{:href => voicemail_account_voicemail_messages_path(current_user.voicemail_accounts.first)} + =t("voicemail_messages.index.page_title") - if current_user %ul.nav.pull-right -- cgit v1.2.3 From 75bc8af34e4ea625725206f015b04730fad8de63 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Fri, 19 Apr 2013 10:21:29 +0200 Subject: list voicemail accounts in user view --- app/views/users/_voicemail_accounts.html.haml | 7 +++++++ app/views/users/show.html.haml | 10 ++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 app/views/users/_voicemail_accounts.html.haml (limited to 'app/views') diff --git a/app/views/users/_voicemail_accounts.html.haml b/app/views/users/_voicemail_accounts.html.haml new file mode 100644 index 0000000..4410b09 --- /dev/null +++ b/app/views/users/_voicemail_accounts.html.haml @@ -0,0 +1,7 @@ +-# VoicemailAccount +-# +- if (can?( :index, VoicemailAccount ) && user.voicemail_accounts.count > 0 ) || can?( :create, VoicemailAccount ) + %h2= t('voicemail_accounts.index.page_title') + - if can?( :index, VoicemailAccount ) && user.voicemail_accounts.count > 0 + = render "voicemail_accounts/index_core", {:voicemail_accounts => user.voicemail_accounts, :voicemail_accountable => user} + = render :partial => 'shared/create_link', :locals => {:parent => user, :child_class => VoicemailAccount} \ No newline at end of file diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml index 8421c40..697604a 100644 --- a/app/views/users/show.html.haml +++ b/app/views/users/show.html.haml @@ -43,12 +43,11 @@ %strong ... %p =link_to t("call_histories.index.page_title"), sip_account_call_histories_path(sip_account) - %br - =link_to t("voicemail_messages.index.page_title"), sip_account_voicemail_messages_path(sip_account) + - if ! sip_account.voicemail_account.blank? + %br + =link_to t("voicemail_messages.index.page_title"), voicemail_account_voicemail_messages_path(sip_account.voicemail_account) %br =link_to t("call_forwards.index.page_title"), sip_account_call_forwards_path(sip_account) - /%br - /=link_to t("voicemail_settings.index.page_title"), sip_account_voicemail_settings_path(sip_account) %br =link_to t("softkeys.index.page_title"), sip_account_softkeys_path(sip_account) %br @@ -85,6 +84,9 @@ - cache(['user_show_fax_accounts_overview', I18n.locale, @user, @user.fax_accounts]) do = render :partial => 'fax_accounts', :locals => {:user => @user} + - cache(['user_show_voicemail_accounts_overview', I18n.locale, @user, @user.voicemail_accounts]) do + = render :partial => 'voicemail_accounts', :locals => {:user => @user} + - cache(['user_show_conferences_overview', I18n.locale, @user, @user.conferences]) do = render :partial => 'conferences', :locals => {:user => @user} -- cgit v1.2.3 From 9a78a0b46509751f912275f8290b009d4a2221fc Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Fri, 19 Apr 2013 10:34:34 +0200 Subject: voicemai_accounts added to tenant view --- app/views/tenants/_admin_area.de.html.haml | 2 ++ app/views/tenants/_admin_area.en.html.haml | 2 ++ app/views/tenants/_table_of_voicemail_accounts.html.haml | 8 ++++++++ 3 files changed, 12 insertions(+) create mode 100644 app/views/tenants/_table_of_voicemail_accounts.html.haml (limited to 'app/views') diff --git a/app/views/tenants/_admin_area.de.html.haml b/app/views/tenants/_admin_area.de.html.haml index cfcbcf3..8ca1e79 100644 --- a/app/views/tenants/_admin_area.de.html.haml +++ b/app/views/tenants/_admin_area.de.html.haml @@ -16,6 +16,8 @@ = render :partial => 'tenants/table_of_phone_books', :locals => {:tenant => tenant} + = render :partial => 'tenants/table_of_voicemail_accounts', :locals => {:tenant => tenant} + = render :partial => 'generic_files', :locals => {:tenant => tenant} .well diff --git a/app/views/tenants/_admin_area.en.html.haml b/app/views/tenants/_admin_area.en.html.haml index f0d1e56..a10f75a 100644 --- a/app/views/tenants/_admin_area.en.html.haml +++ b/app/views/tenants/_admin_area.en.html.haml @@ -16,6 +16,8 @@ = render :partial => 'tenants/table_of_phone_books', :locals => {:tenant => tenant} + = render :partial => 'tenants/table_of_voicemail_accounts', :locals => {:tenant => tenant} + = render :partial => 'generic_files', :locals => {:tenant => tenant} .well diff --git a/app/views/tenants/_table_of_voicemail_accounts.html.haml b/app/views/tenants/_table_of_voicemail_accounts.html.haml new file mode 100644 index 0000000..1cf455a --- /dev/null +++ b/app/views/tenants/_table_of_voicemail_accounts.html.haml @@ -0,0 +1,8 @@ +- cache(['table_of_pbx_features_voicemail_accounts_row', I18n.locale, tenant, tenant.voicemail_accounts.count, tenant.voicemail_accounts.reorder(:updated_at).last]) do + -# VoicemailAccounts + -# + - if (can?( :index, VoicemailAccount ) && tenant.voicemail_accounts.count > 0 ) || can?( :create, VoicemailAccount ) + %h2= t('voicemail_accounts.index.page_title') + - if can?( :index, VoicemailAccount ) && tenant.voicemail_accounts.count > 0 + = render "voicemail_accounts/index_core", :voicemail_accounts => tenant.voicemail_accounts + = render :partial => 'shared/create_link', :locals => {:parent => tenant, :child_class => VoicemailAccount} -- cgit v1.2.3 From 819978b3d4abffdd49bc5adec47746486d5153a2 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Fri, 19 Apr 2013 10:44:31 +0200 Subject: groups added to tenant view --- app/views/tenants/_admin_area.de.html.haml | 2 ++ app/views/tenants/_admin_area.en.html.haml | 3 +++ app/views/tenants/_table_of_groups.html.haml | 8 ++++++++ 3 files changed, 13 insertions(+) create mode 100644 app/views/tenants/_table_of_groups.html.haml (limited to 'app/views') diff --git a/app/views/tenants/_admin_area.de.html.haml b/app/views/tenants/_admin_area.de.html.haml index 8ca1e79..db21c80 100644 --- a/app/views/tenants/_admin_area.de.html.haml +++ b/app/views/tenants/_admin_area.de.html.haml @@ -24,6 +24,8 @@ %h2 Gemeinschaft Konfiguration = render :partial => 'tenants/gs_parameter_table', :locals => {:tenant => tenant} + = render :partial => 'tenants/table_of_groups', :locals => {:tenant => tenant} + %p Das System kann = PhoneModel.count diff --git a/app/views/tenants/_admin_area.en.html.haml b/app/views/tenants/_admin_area.en.html.haml index a10f75a..4b687af 100644 --- a/app/views/tenants/_admin_area.en.html.haml +++ b/app/views/tenants/_admin_area.en.html.haml @@ -12,6 +12,7 @@ = render :partial => 'tenants/table_of_automatic_call_distributors', :locals => {:tenant => tenant} = render :partial => 'tenants/users_table', :locals => {:tenant => tenant} + = render :partial => 'tenants/user_groups_table', :locals => {:tenant => tenant} = render :partial => 'tenants/table_of_phone_books', :locals => {:tenant => tenant} @@ -24,6 +25,8 @@ %h2 Gemeinschaft Configuration = render :partial => 'tenants/gs_parameter_table', :locals => {:tenant => tenant} + = render :partial => 'tenants/table_of_groups', :locals => {:tenant => tenant} + %p This system can provision a total of = PhoneModel.count diff --git a/app/views/tenants/_table_of_groups.html.haml b/app/views/tenants/_table_of_groups.html.haml new file mode 100644 index 0000000..60f93cc --- /dev/null +++ b/app/views/tenants/_table_of_groups.html.haml @@ -0,0 +1,8 @@ +%h2= t("groups.index.page_title") + +- if Group.count <= GsParameter.get('NUMBER_OF_SHOWN_ITEMS') + = render "groups/index_core", :groups => Group.all + = render :partial => 'shared/create_link', :locals => {:child_class => Group} +- else + %p + = link_to t("groups.index.page_title"), groups_path -- cgit v1.2.3 From 3680e51d0a10dad80f46ecc6cbb52cb5dc0519e1 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Fri, 19 Apr 2013 23:16:54 +0200 Subject: test removed --- app/views/voicemail_messages/_index_core.html.haml | 1 - 1 file changed, 1 deletion(-) (limited to 'app/views') diff --git a/app/views/voicemail_messages/_index_core.html.haml b/app/views/voicemail_messages/_index_core.html.haml index ceb6fb3..7324bd3 100644 --- a/app/views/voicemail_messages/_index_core.html.haml +++ b/app/views/voicemail_messages/_index_core.html.haml @@ -40,6 +40,5 @@ = link_to t('voicemail_messages.index.actions.destroy'), voicemail_account_voicemail_message_path(@voicemail_account, voicemail_message), :method => :delete %footer.entries-nav= render :partial => "voicemail_messages/navigation" - = link_to Haml::Engine.new("%i.icon-remove").render + ' test ', root_url = image_submit_tag('icons/cross-16x.png', :confirm => t("voicemail_messages.index.actions.confirm_selected")) = t("voicemail_messages.index.actions.destroy_multiple") -- cgit v1.2.3 From e3b373bcf144dcd0c8e36f8894954dc2b752a05b Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Sat, 20 Apr 2013 12:51:50 +0200 Subject: voicemaiL_account in call_histories index --- app/views/call_histories/_index_core.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/call_histories/_index_core.html.haml b/app/views/call_histories/_index_core.html.haml index 8bbf761..2faa220 100644 --- a/app/views/call_histories/_index_core.html.haml +++ b/app/views/call_histories/_index_core.html.haml @@ -28,7 +28,7 @@ %td - if call_history.voicemail_message? .voicemail-message - %a{:href => sip_account_voicemail_messages_path(@sip_account, :anchor => "message_#{call_history.voicemail_message.id}")} + %a{:href => voicemail_account_voicemail_messages_path(@sip_account.voicemail_account, :anchor => "message_#{call_history.voicemail_message.id}")} = image_tag('icons/gs_envelope_16x.png') = call_history.display_call_date(t("call_histories.index.date_format"), t("call_histories.index.date_today_format")) -- cgit v1.2.3 From 00e26f18486d953814fc0c0a4ba0d30432b56f23 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Wed, 24 Apr 2013 22:48:50 +0200 Subject: pickup indication disabled --- app/views/config_snom/show.xml.haml | 1 + 1 file changed, 1 insertion(+) (limited to 'app/views') diff --git a/app/views/config_snom/show.xml.haml b/app/views/config_snom/show.xml.haml index 3d0edf1..16a05d0 100644 --- a/app/views/config_snom/show.xml.haml +++ b/app/views/config_snom/show.xml.haml @@ -36,6 +36,7 @@ %ringer_animation{:perm => 'RW'}= 'on' %display_method{:perm => 'RW'}= 'display_name_number' %callpickup_dialoginfo{:perm => 'RW'}= 'on' + %pickup_indication{:perm => 'RW'}= 'off' %show_local_line{:perm => 'RW'}= 'off' %mwi_notification{:perm => 'RW'}= 'silent' %mwi_dialtone{:perm => 'RW'}= 'normal' -- cgit v1.2.3 From ebd0b70051c53d207ab21d9671944201894baea3 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Thu, 25 Apr 2013 12:13:12 +0200 Subject: form_core fixed --- app/views/voicemail_settings/_form_core.html.haml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'app/views') diff --git a/app/views/voicemail_settings/_form_core.html.haml b/app/views/voicemail_settings/_form_core.html.haml index 31c6bbf..00d2a9e 100644 --- a/app/views/voicemail_settings/_form_core.html.haml +++ b/app/views/voicemail_settings/_form_core.html.haml @@ -1,11 +1,5 @@ .inputs - - if !@no_edit or !@no_edit[:name] - = f.input :name, :collection => VoicemailSetting::VOICEMAIL_SETTINGS.keys.collect{|i, k| [t("voicemail_settings.settings.#{i}"), i]}, :label => t('voicemail_settings.form.name.label'), :hint => conditional_hint('voicemail_settings.form.name.hint'), :autofocus => true, :include_blank => false - = f.input :value, :label => t('voicemail_settings.form.value.label'), :hint => conditional_hint('voicemail_settings.form.value.hint') - - else - = f.input :value, :label => t("voicemail_settings.settings.#{@no_edit[:name][:name]}"), :hint => conditional_hint('voicemail_settings.form.value.hint'), :as => @no_edit[:name][:input], input_html: @no_edit[:name][:html] - - - if !@no_edit or !@no_edit[:description] - = f.input :description, :label => t('voicemail_settings.form.description.label'), :hint => conditional_hint('voicemail_settings.form.description.hint') - + = f.input :name, :collection => @names_possible, :label => t('voicemail_settings.form.name.label'), :hint => conditional_hint('voicemail_settings.form.name.hint'), :autofocus => true, :include_blank => false + = f.input :value, :label => t('voicemail_settings.form.value.label'), :hint => conditional_hint('voicemail_settings.form.value.hint') + = f.input :description, :label => t('voicemail_settings.form.description.label'), :hint => conditional_hint('voicemail_settings.form.description.hint') -- cgit v1.2.3 From 7e6b6a93a2d21c0e5bd8ad4c2b7be6172cb2638b Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Thu, 25 Apr 2013 12:13:49 +0200 Subject: edit form --- app/views/voicemail_settings/_edit_form.html.haml | 8 ++++++++ app/views/voicemail_settings/_edit_form_core.html.haml | 2 ++ app/views/voicemail_settings/edit.html.haml | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 app/views/voicemail_settings/_edit_form.html.haml create mode 100644 app/views/voicemail_settings/_edit_form_core.html.haml (limited to 'app/views') diff --git a/app/views/voicemail_settings/_edit_form.html.haml b/app/views/voicemail_settings/_edit_form.html.haml new file mode 100644 index 0000000..374df9f --- /dev/null +++ b/app/views/voicemail_settings/_edit_form.html.haml @@ -0,0 +1,8 @@ + += simple_form_for([@voicemail_account, @voicemail_setting]) do |f| + = f.error_notification + + = render "edit_form_core", :f => f + + .form-actions + = f.button :submit, conditional_t('voicemail_settings.form.submit') diff --git a/app/views/voicemail_settings/_edit_form_core.html.haml b/app/views/voicemail_settings/_edit_form_core.html.haml new file mode 100644 index 0000000..4352f24 --- /dev/null +++ b/app/views/voicemail_settings/_edit_form_core.html.haml @@ -0,0 +1,2 @@ +.inputs + = f.input :value, :label => t("voicemail_settings.settings.#{@voicemail_setting.name.to_s}"), :hint => @voicemail_setting.description, :as => @input_type, input_html: @input_html diff --git a/app/views/voicemail_settings/edit.html.haml b/app/views/voicemail_settings/edit.html.haml index cb9924b..cfda363 100644 --- a/app/views/voicemail_settings/edit.html.haml +++ b/app/views/voicemail_settings/edit.html.haml @@ -1,3 +1,3 @@ - content_for :title, t("voicemail_settings.edit.page_title") -= render "form" \ No newline at end of file += render "edit_form" \ No newline at end of file -- cgit v1.2.3 From f9012f9ffa7eb074cf5c7db74a372437017e2ddd Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Thu, 25 Apr 2013 12:14:26 +0200 Subject: voicemail_settings view fixed --- app/views/voicemail_settings/show.html.haml | 3 --- 1 file changed, 3 deletions(-) (limited to 'app/views') diff --git a/app/views/voicemail_settings/show.html.haml b/app/views/voicemail_settings/show.html.haml index f1a3e61..277874e 100644 --- a/app/views/voicemail_settings/show.html.haml +++ b/app/views/voicemail_settings/show.html.haml @@ -1,8 +1,5 @@ - content_for :title, t("voicemail_settings.show.page_title") -%p - %strong= t('voicemail_settings.show.voicemail_id') + ":" - = @voicemail_setting.voicemail %p %strong= t('voicemail_settings.show.name') + ":" = @voicemail_setting.name -- cgit v1.2.3 From f80fb1082eaf083557acd1fa92da4d2ffbfe1de9 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Fri, 26 Apr 2013 10:31:08 +0200 Subject: display download link --- app/views/generic_files/_index_core.html.haml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'app/views') diff --git a/app/views/generic_files/_index_core.html.haml b/app/views/generic_files/_index_core.html.haml index 5fa66f7..3e21b30 100644 --- a/app/views/generic_files/_index_core.html.haml +++ b/app/views/generic_files/_index_core.html.haml @@ -9,6 +9,10 @@ %td= generic_file.category %td= generic_file.name %td= generic_file.file_type - + %td + %p + %a{:href => method( :"#{@parent.class.name.underscore}_generic_file_path" ).(@parent, generic_file, :format => generic_file.file_extension), :method => :get} + %i{:class => 'icon-download'} + = t("generic_files.index.actions.download") - =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => generic_file.owner, :child => generic_file} \ No newline at end of file + =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => generic_file.owner, :child => generic_file} -- cgit v1.2.3 From 025c5730f7bc746687730044909652950ffb9b95 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Fri, 26 Apr 2013 10:31:45 +0200 Subject: display download link --- app/views/generic_files/show.html.haml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/generic_files/show.html.haml b/app/views/generic_files/show.html.haml index b375dfc..9405444 100644 --- a/app/views/generic_files/show.html.haml +++ b/app/views/generic_files/show.html.haml @@ -16,5 +16,10 @@ %strong= t('generic_files.show.file_size') + ":" = number_to_human_size(@generic_file.file_size) +%p + %i{:class => 'icon-download'} + %strong= t('generic_files.index.actions.download') + ":" + %a{:href => method( :"#{@parent.class.name.underscore}_generic_file_path" ).(@parent, @generic_file, :format => @generic_file.file_extension), :method => :get} + = "#{@generic_file.name}.#{@generic_file.file_extension}" -= render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @parent, :child => @generic_file } \ No newline at end of file += render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @parent, :child => @generic_file } -- cgit v1.2.3 From 5129d7701de57224030468ef547859f7b651a6cd Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Fri, 26 Apr 2013 10:45:18 +0200 Subject: parent fixed --- app/views/generic_files/_index_core.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/generic_files/_index_core.html.haml b/app/views/generic_files/_index_core.html.haml index 3e21b30..b8ed1f6 100644 --- a/app/views/generic_files/_index_core.html.haml +++ b/app/views/generic_files/_index_core.html.haml @@ -11,7 +11,7 @@ %td= generic_file.file_type %td %p - %a{:href => method( :"#{@parent.class.name.underscore}_generic_file_path" ).(@parent, generic_file, :format => generic_file.file_extension), :method => :get} + %a{:href => method( :"#{generic_file.owner.class.name.underscore}_generic_file_path" ).(generic_file.owner, generic_file, :format => generic_file.file_extension), :method => :get} %i{:class => 'icon-download'} = t("generic_files.index.actions.download") -- cgit v1.2.3 From e1177a1d6ae27d3c23e3723fdea05c6ac2893294 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Fri, 26 Apr 2013 10:49:12 +0200 Subject: table headers --- app/views/generic_files/_index_core.html.haml | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/views') diff --git a/app/views/generic_files/_index_core.html.haml b/app/views/generic_files/_index_core.html.haml index b8ed1f6..2cea8a1 100644 --- a/app/views/generic_files/_index_core.html.haml +++ b/app/views/generic_files/_index_core.html.haml @@ -3,6 +3,8 @@ %th= t('generic_files.index.category') %th= t('generic_files.index.name') %th= t('generic_files.index.file_type') + %th + %th - for generic_file in generic_files %tr -- cgit v1.2.3 From 24e872cdd9be4f5f3397a93bad3ef2c21e3fd419 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Fri, 26 Apr 2013 12:14:18 +0200 Subject: uuid removed --- app/views/voicemail_accounts/show.html.haml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'app/views') diff --git a/app/views/voicemail_accounts/show.html.haml b/app/views/voicemail_accounts/show.html.haml index 06b4d1a..8c75c93 100644 --- a/app/views/voicemail_accounts/show.html.haml +++ b/app/views/voicemail_accounts/show.html.haml @@ -1,8 +1,5 @@ - content_for :title, t("voicemail_accounts.show.page_title") -%p - %strong= t('voicemail_accounts.show.uuid') + ":" - = @voicemail_account.uuid %p %strong= t('voicemail_accounts.show.name') + ":" = @voicemail_account.name @@ -16,4 +13,4 @@ - if @voicemail_account.voicemail_settings.any? = render "voicemail_settings/index_core", :voicemail_settings => @voicemail_account.voicemail_settings %br -= render :partial => 'shared/create_link', :locals => { :parent => @voicemail_account, :child_class => VoicemailSetting } \ No newline at end of file += render :partial => 'shared/create_link', :locals => { :parent => @voicemail_account, :child_class => VoicemailSetting } -- cgit v1.2.3 From 3d04f33c0281ef62f6868c58565bd8220c94de99 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Fri, 26 Apr 2013 12:46:02 +0200 Subject: _id removed --- app/views/gateway_parameters/show.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/gateway_parameters/show.html.haml b/app/views/gateway_parameters/show.html.haml index 9bdad76..8314b3c 100644 --- a/app/views/gateway_parameters/show.html.haml +++ b/app/views/gateway_parameters/show.html.haml @@ -1,7 +1,7 @@ - content_for :title, t("gateway_parameters.show.page_title") %p - %strong= t('gateway_parameters.show.gateway_id') + ":" + %strong= t('gateway_parameters.show.gateway') + ":" = @gateway_parameter.gateway %p %strong= t('gateway_parameters.show.name') + ":" -- cgit v1.2.3 From d5a9128e4d9d95691214064a6d6960b251623c9e Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Fri, 26 Apr 2013 12:46:11 +0200 Subject: _id removed --- app/views/gateway_settings/show.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/gateway_settings/show.html.haml b/app/views/gateway_settings/show.html.haml index 019aec4..9880d01 100644 --- a/app/views/gateway_settings/show.html.haml +++ b/app/views/gateway_settings/show.html.haml @@ -1,7 +1,7 @@ - content_for :title, t("gateway_settings.show.page_title") %p - %strong= t('gateway_settings.show.gateway_id') + ":" + %strong= t('gateway_settings.show.gateway') + ":" = @gateway_setting.gateway %p %strong= t('gateway_settings.show.name') + ":" -- cgit v1.2.3 From a5cedf9149f4444f0d53b777fc31f3db00ccc206 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Fri, 26 Apr 2013 12:46:26 +0200 Subject: _id removed --- app/views/group_permissions/show.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/views') diff --git a/app/views/group_permissions/show.html.haml b/app/views/group_permissions/show.html.haml index 402c5ce..8fe4c2b 100644 --- a/app/views/group_permissions/show.html.haml +++ b/app/views/group_permissions/show.html.haml @@ -4,7 +4,7 @@ %strong= t('group_permissions.show.permission') + ":" = @group_permission.permission %p - %strong= t('group_permissions.show.target_group_id') + ":" - = @group_permission.target_group_id + %strong= t('group_permissions.show.target_group') + ":" + = @group_permission.target_group = render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @group, :child => @group_permission } -- cgit v1.2.3 From 2e3f13b5519f6764bbad4bb16232d1dc22be7551 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Mon, 29 Apr 2013 13:39:40 +0200 Subject: padination added to navigation view --- app/views/call_histories/_navigation.html.haml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'app/views') diff --git a/app/views/call_histories/_navigation.html.haml b/app/views/call_histories/_navigation.html.haml index d72ad64..2218c50 100644 --- a/app/views/call_histories/_navigation.html.haml +++ b/app/views/call_histories/_navigation.html.haml @@ -1,14 +1,14 @@ %ul{:class => 'nav nav-pills'} - %li + %li{:class => (type.blank? ? :active : nil )} %a{ :href => "?type=" }= t("call_histories.index.navigation.all", :calls => @calls_count) - %li + %li{:class => (type == 'missed' ? :active : nil )} %a{ :href => "?type=missed" }= t("call_histories.index.navigation.missed", :calls => @calls_missed_count) - %li + %li{:class => (type == 'received' ? :active : nil )} %a{ :href => "?type=received" }= t("call_histories.index.navigation.received", :calls => @calls_received_count) - %li + %li{:class => (type == 'dialed' ? :active : nil )} %a{ :href => "?type=dialed" }= t("call_histories.index.navigation.dialed", :calls => @calls_dialed_count) - %li + %li{:class => (type == 'forwarded' ? :active : nil )} %a{ :href => "?type=forwarded" }= t("call_histories.index.navigation.forwarded", :calls => @calls_forwarded_count) -/ .pagination -/ = will_paginate @call_histories +.pagination + = will_paginate call_histories, :renderer => BootstrapPagination::Rails -- cgit v1.2.3 From 4cb4a33bb831439f3a6060bcabc4590a61fae27b Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Mon, 29 Apr 2013 13:43:00 +0200 Subject: call histories index --- app/views/call_histories/_index_core.html.haml | 143 +++++++++++-------------- 1 file changed, 61 insertions(+), 82 deletions(-) (limited to 'app/views') diff --git a/app/views/call_histories/_index_core.html.haml b/app/views/call_histories/_index_core.html.haml index 2faa220..bc10cde 100644 --- a/app/views/call_histories/_index_core.html.haml +++ b/app/views/call_histories/_index_core.html.haml @@ -1,85 +1,64 @@ -= render :partial => "call_histories/navigation" -%table.table.table-striped - %thead - %tr - %th - Datum - %th - Uhrzeit - %th - Misc - %th - Avatar - %th - Teilnehmer - %th - Status += render :partial => "call_histories/navigation", :locals => {:call_histories => call_histories, :type => @type} - %tbody - - for call_history in call_histories - - if !call_history.display_number.blank? - - phone_book_entry = call_history.phone_book_entry_by_number(call_history.display_number) - %tr{:id => "call_history_id_#{call_history.id}_tr", :class => (call_history.duration.blank? ? 'warning' : '')} - %td - = l call_history.start_stamp, :format => :short - %td - = l call_history.start_stamp, :format => :short - %td - - if call_history.voicemail_message? - .voicemail-message - %a{:href => voicemail_account_voicemail_messages_path(@sip_account.voicemail_account, :anchor => "message_#{call_history.voicemail_message.id}")} - = image_tag('icons/gs_envelope_16x.png') - = call_history.display_call_date(t("call_histories.index.date_format"), t("call_histories.index.date_today_format")) += form_tag(destroy_multiple_sip_account_call_histories_path(@sip_account), :method => :delete, :id => 'call_hostory_form') do + %table.table.table-striped + %thead + %tr + %th{:width => '10px'} + %th + =sortable :start_stamp, t("call_histories.index.date") + %th{:width => '10px'} + %th + =sortable :caller_id_name, t("call_histories.index.called_party") + %th + =sortable :duration, t("call_histories.index.duration") + %th + =sortable :result, t("call_histories.index.status") + %th - - else - - case call_history.entry_type - - when 'forwarded' - .call-forwarded= call_history.display_call_date(t("call_histories.index.date_format"), t("call_histories.index.date_today_format")) - - if call_history.callee_account_type.to_s.downcase == 'voicemail' - = t("call_histories.index.voicemail") - - else - = call_history.destination_number - - when 'dialed' - .call-placed= call_history.display_call_date(t("call_histories.index.date_format"), t("call_histories.index.date_today_format")) - - when 'received' - .call-received= call_history.display_call_date(t("call_histories.index.date_format"), t("call_histories.index.date_today_format")) - - when 'missed' - .call-missed= call_history.display_call_date(t("call_histories.index.date_format"), t("call_histories.index.date_today_format")) - - else - .call-unknown - = t("call_histories.index.#{call_history.entry_type}") - = call_history.display_call_date(t("call_histories.index.date_format"), t("call_histories.index.date_today_format")) - - - if call_history.forwarding_service && call_history.entry_type != 'forwarded' - = t("call_histories.index.forwarded_by") - = call_history.display_auth_account_name - %td - - image = call_history.display_image(:small, phone_book_entry) - - if image - %ul.thumbnails - %li.span1 - %div.thumbnail - %a.thumbnail{:href => call_history.display_image(:profile, phone_book_entry)} - =image_tag(image, :alt => phone_book_entry.to_s, :class => 'img-rounded') - %td - - display_name = call_history.display_name - - if display_name.blank? - - display_name = phone_book_entry.to_s - - if phone_book_entry - %a.name{:href => phone_book_phone_book_entry_path(phone_book_entry.phone_book, phone_book_entry), :itemprop => "name"}= display_name - - else - .name= display_name - .phone= call_history.display_number - %td - - if call_history.display_duration - = call_history.display_duration - - else - = t("call_histories.call_results.#{call_history.result}") - %td - - if @sip_account.registration && can?(:call, call_history) - = link_to raw(" ") + t('call_histories.index.actions.call'), call_sip_account_call_history_path(@sip_account, call_history), :method => :put, :class => 'btn btn-mini' - %td - - if can? :destroy, call_history - = link_to raw(" ") + t('call_histories.index.actions.destroy'), [@sip_account, call_history], :method => :delete, :remote => true, :class => 'btn btn-mini btn-danger' - \ No newline at end of file + %tbody + - for call_history in call_histories + - if !call_history.display_number.blank? + - phone_book_entry = call_history.phone_book_entry_by_number(call_history.display_number) + %tr{:id => "call_history_id_#{call_history.id}_tr", :class => (call_history.duration.blank? ? 'warning' : '')} + %td.select_box= check_box_tag("selected_ids[]", call_history.id, false, :uuid => "select_item_#{call_history.id}", :class => 'select_item') + %td + -if call_history.entry_type == 'dialed' + %i{:class => 'icon-arrow-left'} + -elsif call_history.entry_type == 'missed' + %i{:class => 'icon-time'} + -elsif call_history.entry_type == 'forwarded' + %i{:class => 'icon-random'} + - else + %i{:class => 'icon-arrow-right'} + = l call_history.start_stamp, :format => :short + %br= t("call_histories.index.missed.#{call_history.entry_type}") + %td + - image = call_history.display_image(:mini, phone_book_entry) + - if image + %ul.thumbnails + =image_tag(image, :alt => phone_book_entry.to_s, :class => 'img-rounded') + %td + - display_name = call_history.display_name + - if display_name.blank? + - display_name = phone_book_entry.to_s + - if phone_book_entry + %a.name{:href => phone_book_phone_book_entry_path(phone_book_entry.phone_book, phone_book_entry), :itemprop => "name"}= display_name + - else + .name= display_name + .phone= call_history.display_number + %td + - if call_history.display_duration + = call_history.display_duration + %td + - if t("call_histories.call_results.#{call_history.result}").include?('translation missing') + = call_history.result.gsub('_', ' ').titleize + - else + = t("call_histories.call_results.#{call_history.result}") + %td + - if @sip_account.registration && can?(:call, call_history) + = link_to raw(" ") + t('call_histories.index.actions.call'), call_sip_account_call_history_path(@sip_account, call_history), :method => :put, :class => 'btn btn-mini' + %td + - if can? :destroy, call_history + = link_to raw(" ") + t('call_histories.index.actions.destroy'), [@sip_account, call_history], :method => :delete, :remote => true, :class => 'btn btn-mini btn-danger' -- cgit v1.2.3 From 1cc85875f35b69c31b25b7d426439f38e6936893 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Mon, 29 Apr 2013 14:54:26 +0200 Subject: display sounrce/destination number --- app/views/call_histories/_index_core.html.haml | 33 +++++++++++++++++++------- 1 file changed, 24 insertions(+), 9 deletions(-) (limited to 'app/views') diff --git a/app/views/call_histories/_index_core.html.haml b/app/views/call_histories/_index_core.html.haml index bc10cde..0cbcd60 100644 --- a/app/views/call_histories/_index_core.html.haml +++ b/app/views/call_histories/_index_core.html.haml @@ -24,16 +24,30 @@ %tr{:id => "call_history_id_#{call_history.id}_tr", :class => (call_history.duration.blank? ? 'warning' : '')} %td.select_box= check_box_tag("selected_ids[]", call_history.id, false, :uuid => "select_item_#{call_history.id}", :class => 'select_item') %td - -if call_history.entry_type == 'dialed' - %i{:class => 'icon-arrow-left'} - -elsif call_history.entry_type == 'missed' - %i{:class => 'icon-time'} - -elsif call_history.entry_type == 'forwarded' - %i{:class => 'icon-random'} - - else - %i{:class => 'icon-arrow-right'} = l call_history.start_stamp, :format => :short - %br= t("call_histories.index.missed.#{call_history.entry_type}") + %br + -if call_history.entry_type == 'dialed' + %i{:class => 'icon-arrow-left'} + -elsif call_history.entry_type == 'missed' + %i{:class => 'icon-time'} + -elsif call_history.entry_type == 'forwarded' + - if call_history.callee_account_type.to_s.downcase == 'voicemailaccount' + %i{:class => 'icon-envelope'} + - else + %i{:class => 'icon-random'} + - else + %i{:class => 'icon-arrow-right'} + + - if call_history.entry_type == 'forwarded' + - if call_history.callee_account_type.to_s.downcase == 'phonenumber' + = call_history.destination_number + - if call_history.callee_account_type.to_s.downcase == 'voicemailaccount' + = VoicemailAccount.where(:id => call_history.callee_account_id).first.to_s + - elsif call_history.entry_type == 'dialed' + = call_history.caller_id_number + - else + = call_history.destination_number + %td - image = call_history.display_image(:mini, phone_book_entry) - if image @@ -56,6 +70,7 @@ = call_history.result.gsub('_', ' ').titleize - else = t("call_histories.call_results.#{call_history.result}") + /= call_history.inspect %td - if @sip_account.registration && can?(:call, call_history) = link_to raw(" ") + t('call_histories.index.actions.call'), call_sip_account_call_history_path(@sip_account, call_history), :method => :put, :class => 'btn btn-mini' -- cgit v1.2.3 From 165d746547658d63ad80ed6a7c781629c29be5ea Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Mon, 29 Apr 2013 15:11:16 +0200 Subject: pagination and sorting added --- app/views/users/_index_core.html.haml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'app/views') diff --git a/app/views/users/_index_core.html.haml b/app/views/users/_index_core.html.haml index 9d63afc..c994997 100644 --- a/app/views/users/_index_core.html.haml +++ b/app/views/users/_index_core.html.haml @@ -1,16 +1,18 @@ - cache(['user_table_row_inner_td', I18n.locale, current_user, users.reorder(:updated_at).last, users.count, GsParameter.get('NUMBER_OF_SHOWN_ITEMS')]) do + .pagination + = will_paginate users, :renderer => BootstrapPagination::Rails %table.table.table-striped %thead %tr %th - %th= t('users.index.user_name') + %th= sortable :user_name, t('users.index.user_name') %th %span.hidden-phone - = t('users.index.email') + = sortable :email, t('users.index.email') %th %span.hidden-phone - = t('users.index.first_name') - %th= t('users.index.last_name') + = sortable :first_name, t('users.index.first_name') + %th= sortable :last_name, t('users.index.last_name') %tbody - for user in users -- cgit v1.2.3 From 92fd1b2e6611aaf0910b9c5a80908e9160559bcc Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Mon, 29 Apr 2013 15:25:06 +0200 Subject: omit pagination for embedded views --- app/views/users/_index_core.html.haml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/users/_index_core.html.haml b/app/views/users/_index_core.html.haml index c994997..d741282 100644 --- a/app/views/users/_index_core.html.haml +++ b/app/views/users/_index_core.html.haml @@ -1,6 +1,7 @@ - cache(['user_table_row_inner_td', I18n.locale, current_user, users.reorder(:updated_at).last, users.count, GsParameter.get('NUMBER_OF_SHOWN_ITEMS')]) do .pagination - = will_paginate users, :renderer => BootstrapPagination::Rails + - if defined?(users.total_pages) + = will_paginate users, :renderer => BootstrapPagination::Rails %table.table.table-striped %thead %tr -- cgit v1.2.3 From 905a8d0715018188d952d99af5f4686437b4a779 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Mon, 29 Apr 2013 15:40:44 +0200 Subject: sorting and paginations --- app/views/sip_accounts/_index_core.html.haml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/sip_accounts/_index_core.html.haml b/app/views/sip_accounts/_index_core.html.haml index d98ea0a..7f393d7 100644 --- a/app/views/sip_accounts/_index_core.html.haml +++ b/app/views/sip_accounts/_index_core.html.haml @@ -1,10 +1,13 @@ +.pagination + - if defined?(users.total_pages) + = will_paginate users, :renderer => BootstrapPagination::Rails %table.table.table-striped %thead %tr %th %span.hidden-phone = t('sip_accounts.index.online') - %th= t('sip_accounts.index.caller_name') + %th= sortable :caller_name, t('sip_accounts.index.caller_name') %th %span.hidden-phone = t('sip_accounts.index.phone_numbers') -- cgit v1.2.3 From 2beeef5436da123dac0b3a9020c0ee352c8724c9 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Tue, 30 Apr 2013 10:13:42 +0200 Subject: delete multiple items --- app/views/call_histories/_index_core.html.haml | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/views') diff --git a/app/views/call_histories/_index_core.html.haml b/app/views/call_histories/_index_core.html.haml index 0cbcd60..fd335d4 100644 --- a/app/views/call_histories/_index_core.html.haml +++ b/app/views/call_histories/_index_core.html.haml @@ -6,6 +6,8 @@ %thead %tr %th{:width => '10px'} + = button_tag(:type => 'submit', :class => 'btn btn-mini btn-danger', :confirm => t("call_histories.index.actions.confirm_selected")) do + %i{:class => 'icon-trash icon-white'} %th =sortable :start_stamp, t("call_histories.index.date") %th{:width => '10px'} -- cgit v1.2.3 From 40875583e650747c6ad7f3be22ed5c365c667f36 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Tue, 30 Apr 2013 10:14:55 +0200 Subject: voicemail messages index view --- app/views/voicemail_messages/_index_core.html.haml | 87 +++++++++++++--------- app/views/voicemail_messages/_navigation.html.haml | 15 ++-- 2 files changed, 61 insertions(+), 41 deletions(-) (limited to 'app/views') diff --git a/app/views/voicemail_messages/_index_core.html.haml b/app/views/voicemail_messages/_index_core.html.haml index 7324bd3..fcaefb4 100644 --- a/app/views/voicemail_messages/_index_core.html.haml +++ b/app/views/voicemail_messages/_index_core.html.haml @@ -1,44 +1,63 @@ -= form_tag(destroy_multiple_voicemail_account_voicemail_messages_path(@voicemail_account), :method => :delete, :id => 'voicemail_message_form') do - %header.entries-nav= render :partial => "voicemail_messages/navigation" - .content - %table.table.table-striped - + += render :partial => "voicemail_messages/navigation", :locals => {:type => @type} + += form_tag(destroy_multiple_voicemail_account_voicemail_messages_path(@voicemail_account), :method => :delete, :id => 'Setting_form') do + %table.table.table-striped + %thead + %tr + %th{:width => '10px'} + = button_tag(:type => 'submit', :class => 'btn btn-mini btn-danger', :confirm => t("voicemail_messages.index.actions.confirm_selected")) do + %i{:class => 'icon-trash icon-white'} + %th + =sortable :created_epoch, t("voicemail_messages.index.date") + %th{:width => '10px'} + %th + =sortable :cid_name, t("voicemail_messages.index.calling_party") + %th + =sortable :message_len, t("voicemail_messages.index.duration") + %th + =sortable :flags, t("voicemail_messages.index.message_flags") + %th + %th + + %tbody - for voicemail_message in voicemail_messages - %tr.voicemail-messages-entry{:id => "message_#{voicemail_message.uuid}"} + - phone_book_entry = nil + %tr{:id => "message_#{voicemail_message.uuid}"} %td.select_box= check_box_tag("selected_uuids[]", voicemail_message.uuid, false, :uuid => "select_item_#{voicemail_message.uuid}", :class => 'select_item') - %td.time - .voicemail-received - = voicemail_message.format_date(voicemail_message.created_epoch, t("voicemail_messages.index.date_format"), t("voicemail_messages.index.date_today_format")) - - - read_date = voicemail_message.format_date(voicemail_message.read_epoch, t("voicemail_messages.index.date_format"), t("voicemail_messages.index.date_today_format")) - - if read_date - .voicemail-read - = read_date - %td.folder - = t("voicemail_messages.index.mailbox.#{voicemail_message.in_folder}") - %td.user - .name= voicemail_message.cid_name + %td + = l Time.at(voicemail_message.created_epoch).to_datetime, :format => :short + - if voicemail_message.read_epoch > 0 + %br + %i{:class => 'icon-bullhorn'} + = l Time.at(voicemail_message.read_epoch).to_datetime, :format => :short + - else + %br + %i{:class => 'icon-envelope'} + = t("voicemail_messages.index.unread") + %td + - image = nil + - if image + %ul.thumbnails + =image_tag(image, :alt => phone_book_entry.to_s, :class => 'img-rounded') + %td + - if phone_book_entry + %a.name{:href => phone_book_phone_book_entry_path(phone_book_entry.phone_book, phone_book_entry), :itemprop => "name"}= voicemail_message.cid_name + - else + .name= voicemail_message.cid_name .phone= voicemail_message.cid_number - %td.status - .duration= voicemail_message.display_duration + %td + = voicemail_message.display_duration %td - if ! voicemail_message.flags.blank? = t("voicemail_messages.index.flags.#{voicemail_message.flags}") - %td.form-actions + %td - if can?(:show, voicemail_message) && File.readable?(voicemail_message.file_path) - = link_to t('voicemail_messages.index.actions.download'), voicemail_account_voicemail_message_path(@voicemail_account, voicemail_message, :format => :wav), :method => :get - /%td.actions - / - if @voicemail_account.registration && can?(:call, voicemail_message) - / = link_to t('voicemail_messages.index.actions.call'), call_voicemail_account_voicemail_message_path(@voicemail_account, voicemail_message), :method => :put - %td.form-actions + = link_to raw(" ") + t('voicemail_messages.index.actions.download'), voicemail_account_voicemail_message_path(@voicemail_account, voicemail_message, :format => :wav), :method => :get - if can?(:edit, voicemail_message) && voicemail_message.read_epoch > 0 - = link_to t('voicemail_messages.index.actions.mark_unread'), mark_unread_voicemail_account_voicemail_message_path(@voicemail_account, voicemail_message), :method => :put + = link_to raw(" ") + t('voicemail_messages.index.actions.mark_unread'), mark_unread_voicemail_account_voicemail_message_path(@voicemail_account, voicemail_message), :method => :put - else - = link_to t('voicemail_messages.index.actions.mark_read'), mark_read_voicemail_account_voicemail_message_path(@voicemail_account, voicemail_message), :method => :put - %td.form-actions + = link_to raw(" ") + t('voicemail_messages.index.actions.mark_read'), mark_read_voicemail_account_voicemail_message_path(@voicemail_account, voicemail_message), :method => :put + %td - if can? :destroy, voicemail_message - = link_to t('voicemail_messages.index.actions.destroy'), voicemail_account_voicemail_message_path(@voicemail_account, voicemail_message), :method => :delete - - %footer.entries-nav= render :partial => "voicemail_messages/navigation" - = image_submit_tag('icons/cross-16x.png', :confirm => t("voicemail_messages.index.actions.confirm_selected")) - = t("voicemail_messages.index.actions.destroy_multiple") + = link_to raw(" ") + t('voicemail_messages.index.actions.destroy'), [@voicemail_account, voicemail_message], :method => :delete, :remote => true, :class => 'btn btn-mini btn-danger' diff --git a/app/views/voicemail_messages/_navigation.html.haml b/app/views/voicemail_messages/_navigation.html.haml index 2277bf2..d3b9c5d 100644 --- a/app/views/voicemail_messages/_navigation.html.haml +++ b/app/views/voicemail_messages/_navigation.html.haml @@ -1,9 +1,10 @@ -%nav - %ol.abc - %li - %a{ :href => "?type=" }= t('voicemail_messages.index.navigation.all', :count => @messages_count) - %a{ :href => "?type=read" }= t('voicemail_messages.index.navigation.read', :count => @messages_read_count) - %a{ :href => "?type=unread" }= t('voicemail_messages.index.navigation.unread', :count => @messages_unread_count) +%ul{:class => 'nav nav-pills'} + %li{:class => (type.blank? ? :active : nil )} + %a{ :href => "?type=" }= t('voicemail_messages.index.navigation.all', :count => @messages_count) + %li{:class => (type == 'read' ? :active : nil )} + %a{ :href => "?type=read" }= t('voicemail_messages.index.navigation.read', :count => @messages_read_count) + %li{:class => (type == 'unread' ? :active : nil )} + %a{ :href => "?type=unread" }= t('voicemail_messages.index.navigation.unread', :count => @messages_unread_count) .pagination - = will_paginate @voicemail_messages + = will_paginate @voicemail_messages, :renderer => BootstrapPagination::Rails -- cgit v1.2.3 From 4b118eb90f6b87d3346c77efd6d6c2d37ef0e6d1 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Tue, 30 Apr 2013 11:43:34 +0200 Subject: comment removed --- app/views/call_histories/_index_core.html.haml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'app/views') diff --git a/app/views/call_histories/_index_core.html.haml b/app/views/call_histories/_index_core.html.haml index fd335d4..8c40890 100644 --- a/app/views/call_histories/_index_core.html.haml +++ b/app/views/call_histories/_index_core.html.haml @@ -72,10 +72,9 @@ = call_history.result.gsub('_', ' ').titleize - else = t("call_histories.call_results.#{call_history.result}") - /= call_history.inspect %td - if @sip_account.registration && can?(:call, call_history) = link_to raw(" ") + t('call_histories.index.actions.call'), call_sip_account_call_history_path(@sip_account, call_history), :method => :put, :class => 'btn btn-mini' - %td + - if can? :destroy, call_history = link_to raw(" ") + t('call_histories.index.actions.destroy'), [@sip_account, call_history], :method => :delete, :remote => true, :class => 'btn btn-mini btn-danger' -- cgit v1.2.3 From 8bf701532cfb0009a367aa936b21b7f3fe338a5d Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Tue, 30 Apr 2013 11:44:31 +0200 Subject: call button added --- app/views/voicemail_messages/_index_core.html.haml | 3 +++ 1 file changed, 3 insertions(+) (limited to 'app/views') diff --git a/app/views/voicemail_messages/_index_core.html.haml b/app/views/voicemail_messages/_index_core.html.haml index fcaefb4..0616b61 100644 --- a/app/views/voicemail_messages/_index_core.html.haml +++ b/app/views/voicemail_messages/_index_core.html.haml @@ -59,5 +59,8 @@ - else = link_to raw(" ") + t('voicemail_messages.index.actions.mark_read'), mark_read_voicemail_account_voicemail_message_path(@voicemail_account, voicemail_message), :method => :put %td + - if @available_sip_account && @available_sip_account.registration && can?(:call, voicemail_message) + = link_to raw(" ") + t('voicemail_messages.index.actions.call'), call_voicemail_account_voicemail_message_path(@voicemail_account, voicemail_message), :method => :put, :class => 'btn btn-mini' + - if can? :destroy, voicemail_message = link_to raw(" ") + t('voicemail_messages.index.actions.destroy'), [@voicemail_account, voicemail_message], :method => :delete, :remote => true, :class => 'btn btn-mini btn-danger' -- cgit v1.2.3 From 466c90b7c7e04901142ca40b0220293de36af0c2 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Tue, 30 Apr 2013 11:58:40 +0200 Subject: table footer added --- app/views/voicemail_messages/_index_core.html.haml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/voicemail_messages/_index_core.html.haml b/app/views/voicemail_messages/_index_core.html.haml index 0616b61..09e3b95 100644 --- a/app/views/voicemail_messages/_index_core.html.haml +++ b/app/views/voicemail_messages/_index_core.html.haml @@ -19,7 +19,13 @@ =sortable :flags, t("voicemail_messages.index.message_flags") %th %th - + %tfoot + %tr + %td{:colspan => 2} + = button_tag(:type => 'submit', :class => 'btn btn-mini btn-danger', :confirm => t("voicemail_messages.index.actions.confirm_selected")) do + %i{:class => 'icon-trash icon-white'} + = t("voicemail_messages.index.actions.destroy_multiple") + %td{:colspan => 4} %tbody - for voicemail_message in voicemail_messages - phone_book_entry = nil -- cgit v1.2.3 From 4b904201187892676a0fd12e518513334924c534 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Tue, 30 Apr 2013 11:58:48 +0200 Subject: table footer added --- app/views/call_histories/_index_core.html.haml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/call_histories/_index_core.html.haml b/app/views/call_histories/_index_core.html.haml index 8c40890..f5e73ca 100644 --- a/app/views/call_histories/_index_core.html.haml +++ b/app/views/call_histories/_index_core.html.haml @@ -18,7 +18,13 @@ %th =sortable :result, t("call_histories.index.status") %th - + %tfoot + %tr + %td{:colspan => 2} + = button_tag(:type => 'submit', :class => 'btn btn-mini btn-danger', :confirm => t("call_histories.index.actions.confirm_selected")) do + %i{:class => 'icon-trash icon-white'} + = t("call_histories.index.actions.destroy_multiple") + %td{:colspan => 5} %tbody - for call_history in call_histories - if !call_history.display_number.blank? -- cgit v1.2.3 From 645901c2cb3fd52df146f086e1bc3ae6f59cabaf Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Tue, 30 Apr 2013 12:24:09 +0200 Subject: phone book lookup added --- app/views/voicemail_messages/_index_core.html.haml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/voicemail_messages/_index_core.html.haml b/app/views/voicemail_messages/_index_core.html.haml index 09e3b95..57226aa 100644 --- a/app/views/voicemail_messages/_index_core.html.haml +++ b/app/views/voicemail_messages/_index_core.html.haml @@ -29,6 +29,10 @@ %tbody - for voicemail_message in voicemail_messages - phone_book_entry = nil + - image = nil + - if !voicemail_message.cid_number.blank? + - phone_book_entry = voicemail_message.phone_book_entry_by_number(voicemail_message.cid_number) + - image = phone_book_entry.image_url(:mini) %tr{:id => "message_#{voicemail_message.uuid}"} %td.select_box= check_box_tag("selected_uuids[]", voicemail_message.uuid, false, :uuid => "select_item_#{voicemail_message.uuid}", :class => 'select_item') %td @@ -42,7 +46,6 @@ %i{:class => 'icon-envelope'} = t("voicemail_messages.index.unread") %td - - image = nil - if image %ul.thumbnails =image_tag(image, :alt => phone_book_entry.to_s, :class => 'img-rounded') @@ -57,6 +60,7 @@ %td - if ! voicemail_message.flags.blank? = t("voicemail_messages.index.flags.#{voicemail_message.flags}") + = voicemail_message.phone_book_entry_by_number(voicemail_message.cid_number) %td - if can?(:show, voicemail_message) && File.readable?(voicemail_message.file_path) = link_to raw(" ") + t('voicemail_messages.index.actions.download'), voicemail_account_voicemail_message_path(@voicemail_account, voicemail_message, :format => :wav), :method => :get -- cgit v1.2.3 From 55763dfa7b4072cf057b72c15e68c4d6c6bc1d14 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Tue, 30 Apr 2013 15:07:33 +0200 Subject: phone_book_entry can be nil --- app/views/voicemail_messages/_index_core.html.haml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/voicemail_messages/_index_core.html.haml b/app/views/voicemail_messages/_index_core.html.haml index 57226aa..e5dc853 100644 --- a/app/views/voicemail_messages/_index_core.html.haml +++ b/app/views/voicemail_messages/_index_core.html.haml @@ -32,7 +32,8 @@ - image = nil - if !voicemail_message.cid_number.blank? - phone_book_entry = voicemail_message.phone_book_entry_by_number(voicemail_message.cid_number) - - image = phone_book_entry.image_url(:mini) + - if phone_book_entry + - image = phone_book_entry.image_url(:mini) %tr{:id => "message_#{voicemail_message.uuid}"} %td.select_box= check_box_tag("selected_uuids[]", voicemail_message.uuid, false, :uuid => "select_item_#{voicemail_message.uuid}", :class => 'select_item') %td -- cgit v1.2.3 From fc40cc2b38a3b83115881a557c4c1fbf417fa95f Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Thu, 2 May 2013 10:50:24 +0200 Subject: pagination --- app/views/call_histories/_navigation.html.haml | 27 +++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'app/views') diff --git a/app/views/call_histories/_navigation.html.haml b/app/views/call_histories/_navigation.html.haml index 2218c50..d293471 100644 --- a/app/views/call_histories/_navigation.html.haml +++ b/app/views/call_histories/_navigation.html.haml @@ -1,14 +1,15 @@ -%ul{:class => 'nav nav-pills'} - %li{:class => (type.blank? ? :active : nil )} - %a{ :href => "?type=" }= t("call_histories.index.navigation.all", :calls => @calls_count) - %li{:class => (type == 'missed' ? :active : nil )} - %a{ :href => "?type=missed" }= t("call_histories.index.navigation.missed", :calls => @calls_missed_count) - %li{:class => (type == 'received' ? :active : nil )} - %a{ :href => "?type=received" }= t("call_histories.index.navigation.received", :calls => @calls_received_count) - %li{:class => (type == 'dialed' ? :active : nil )} - %a{ :href => "?type=dialed" }= t("call_histories.index.navigation.dialed", :calls => @calls_dialed_count) - %li{:class => (type == 'forwarded' ? :active : nil )} - %a{ :href => "?type=forwarded" }= t("call_histories.index.navigation.forwarded", :calls => @calls_forwarded_count) +%div{:class => 'pagination'} + %ul + %li{:class => (type.blank? ? :active : nil )} + %a{ :href => "?type=" }= t("call_histories.index.navigation.all", :calls => @calls_count) + %li{:class => (type == 'missed' ? :active : nil )} + %a{ :href => "?type=missed" }= t("call_histories.index.navigation.missed", :calls => @calls_missed_count) + %li{:class => (type == 'received' ? :active : nil )} + %a{ :href => "?type=received" }= t("call_histories.index.navigation.received", :calls => @calls_received_count) + %li{:class => (type == 'dialed' ? :active : nil )} + %a{ :href => "?type=dialed" }= t("call_histories.index.navigation.dialed", :calls => @calls_dialed_count) + %li{:class => (type == 'forwarded' ? :active : nil )} + %a{ :href => "?type=forwarded" }= t("call_histories.index.navigation.forwarded", :calls => @calls_forwarded_count) -.pagination - = will_paginate call_histories, :renderer => BootstrapPagination::Rails + + = will_paginate call_histories, :renderer => BootstrapPagination::Rails, :previous_label => raw(''), :next_label => raw(''), :class => nil -- cgit v1.2.3 From 59a4200095e983f8dbb94a76603944dab9f06a41 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Thu, 2 May 2013 10:50:34 +0200 Subject: pagination --- app/views/voicemail_messages/_navigation.html.haml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'app/views') diff --git a/app/views/voicemail_messages/_navigation.html.haml b/app/views/voicemail_messages/_navigation.html.haml index d3b9c5d..225801c 100644 --- a/app/views/voicemail_messages/_navigation.html.haml +++ b/app/views/voicemail_messages/_navigation.html.haml @@ -1,10 +1,10 @@ -%ul{:class => 'nav nav-pills'} - %li{:class => (type.blank? ? :active : nil )} - %a{ :href => "?type=" }= t('voicemail_messages.index.navigation.all', :count => @messages_count) - %li{:class => (type == 'read' ? :active : nil )} - %a{ :href => "?type=read" }= t('voicemail_messages.index.navigation.read', :count => @messages_read_count) - %li{:class => (type == 'unread' ? :active : nil )} - %a{ :href => "?type=unread" }= t('voicemail_messages.index.navigation.unread', :count => @messages_unread_count) +%div{:class => 'pagination'} + %ul + %li{:class => (type.blank? ? :active : nil )} + %a{ :href => "?type=" }= t('voicemail_messages.index.navigation.all', :count => @messages_count) + %li{:class => (type == 'read' ? :active : nil )} + %a{ :href => "?type=read" }= t('voicemail_messages.index.navigation.read', :count => @messages_read_count) + %li{:class => (type == 'unread' ? :active : nil )} + %a{ :href => "?type=unread" }= t('voicemail_messages.index.navigation.unread', :count => @messages_unread_count) -.pagination - = will_paginate @voicemail_messages, :renderer => BootstrapPagination::Rails + = will_paginate @voicemail_messages, :renderer => BootstrapPagination::Rails, :previous_label => raw(''), :next_label => raw(''), :class => nil -- cgit v1.2.3 From 20570c967e0d63fd6d1644cd64e4c0c7859bc57f Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Thu, 2 May 2013 10:50:47 +0200 Subject: pagination --- app/views/sip_accounts/_index_core.html.haml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'app/views') diff --git a/app/views/sip_accounts/_index_core.html.haml b/app/views/sip_accounts/_index_core.html.haml index 7f393d7..d91a3ef 100644 --- a/app/views/sip_accounts/_index_core.html.haml +++ b/app/views/sip_accounts/_index_core.html.haml @@ -1,6 +1,7 @@ -.pagination - - if defined?(users.total_pages) - = will_paginate users, :renderer => BootstrapPagination::Rails + +- if defined?(users.total_pages) + = will_paginate users, :renderer => BootstrapPagination::Rails, :previous_label => raw(''), :next_label => raw('') + %table.table.table-striped %thead %tr -- cgit v1.2.3 From 5525a9af9229f0ac65d44472519aac4ab8751018 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Thu, 2 May 2013 10:50:53 +0200 Subject: pagination --- app/views/users/_index_core.html.haml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'app/views') diff --git a/app/views/users/_index_core.html.haml b/app/views/users/_index_core.html.haml index d741282..78510a2 100644 --- a/app/views/users/_index_core.html.haml +++ b/app/views/users/_index_core.html.haml @@ -1,7 +1,8 @@ - cache(['user_table_row_inner_td', I18n.locale, current_user, users.reorder(:updated_at).last, users.count, GsParameter.get('NUMBER_OF_SHOWN_ITEMS')]) do - .pagination - - if defined?(users.total_pages) - = will_paginate users, :renderer => BootstrapPagination::Rails + + - if defined?(users.total_pages) + = will_paginate users, :renderer => BootstrapPagination::Rails, :previous_label => raw(''), :next_label => raw('') + %table.table.table-striped %thead %tr -- cgit v1.2.3 From 8b592b0a04c2ebc51794537275ec8ac7500ccda3 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Fri, 3 May 2013 09:36:10 +0200 Subject: display table only if some items are present --- app/views/call_histories/_index_core.html.haml | 157 +++++++++++++------------ 1 file changed, 79 insertions(+), 78 deletions(-) (limited to 'app/views') diff --git a/app/views/call_histories/_index_core.html.haml b/app/views/call_histories/_index_core.html.haml index f5e73ca..ef5654a 100644 --- a/app/views/call_histories/_index_core.html.haml +++ b/app/views/call_histories/_index_core.html.haml @@ -1,86 +1,87 @@ = render :partial => "call_histories/navigation", :locals => {:call_histories => call_histories, :type => @type} -= form_tag(destroy_multiple_sip_account_call_histories_path(@sip_account), :method => :delete, :id => 'call_hostory_form') do - %table.table.table-striped - %thead - %tr - %th{:width => '10px'} - = button_tag(:type => 'submit', :class => 'btn btn-mini btn-danger', :confirm => t("call_histories.index.actions.confirm_selected")) do - %i{:class => 'icon-trash icon-white'} - %th - =sortable :start_stamp, t("call_histories.index.date") - %th{:width => '10px'} - %th - =sortable :caller_id_name, t("call_histories.index.called_party") - %th - =sortable :duration, t("call_histories.index.duration") - %th - =sortable :result, t("call_histories.index.status") - %th - %tfoot - %tr - %td{:colspan => 2} - = button_tag(:type => 'submit', :class => 'btn btn-mini btn-danger', :confirm => t("call_histories.index.actions.confirm_selected")) do - %i{:class => 'icon-trash icon-white'} - = t("call_histories.index.actions.destroy_multiple") - %td{:colspan => 5} - %tbody - - for call_history in call_histories - - if !call_history.display_number.blank? - - phone_book_entry = call_history.phone_book_entry_by_number(call_history.display_number) - %tr{:id => "call_history_id_#{call_history.id}_tr", :class => (call_history.duration.blank? ? 'warning' : '')} - %td.select_box= check_box_tag("selected_ids[]", call_history.id, false, :uuid => "select_item_#{call_history.id}", :class => 'select_item') - %td - = l call_history.start_stamp, :format => :short - %br - -if call_history.entry_type == 'dialed' - %i{:class => 'icon-arrow-left'} - -elsif call_history.entry_type == 'missed' - %i{:class => 'icon-time'} - -elsif call_history.entry_type == 'forwarded' - - if call_history.callee_account_type.to_s.downcase == 'voicemailaccount' - %i{:class => 'icon-envelope'} +- if call_histories.any? + = form_tag(destroy_multiple_sip_account_call_histories_path(@sip_account), :method => :delete, :id => 'call_hostory_form') do + %table.table.table-striped + %thead + %tr + %th{:width => '10px'} + = button_tag(:type => 'submit', :class => 'btn btn-mini btn-danger', :confirm => t("call_histories.index.actions.confirm_selected")) do + %i{:class => 'icon-trash icon-white'} + %th + =sortable :start_stamp, t("call_histories.index.date") + %th{:width => '10px'} + %th + =sortable :caller_id_name, t("call_histories.index.called_party") + %th + =sortable :duration, t("call_histories.index.duration") + %th + =sortable :result, t("call_histories.index.status") + %th + %tfoot + %tr + %td{:colspan => 2} + = button_tag(:type => 'submit', :class => 'btn btn-mini btn-danger', :confirm => t("call_histories.index.actions.confirm_selected")) do + %i{:class => 'icon-trash icon-white'} + = t("call_histories.index.actions.destroy_multiple") + %td{:colspan => 5} + %tbody + - for call_history in call_histories + - if !call_history.display_number.blank? + - phone_book_entry = call_history.phone_book_entry_by_number(call_history.display_number) + %tr{:id => "call_history_id_#{call_history.id}_tr", :class => (call_history.duration.blank? ? 'warning' : '')} + %td.select_box= check_box_tag("selected_ids[]", call_history.id, false, :uuid => "select_item_#{call_history.id}", :class => 'select_item') + %td + = l call_history.start_stamp, :format => :short + %br + -if call_history.entry_type == 'dialed' + %i{:class => 'icon-arrow-left'} + -elsif call_history.entry_type == 'missed' + %i{:class => 'icon-time'} + -elsif call_history.entry_type == 'forwarded' + - if call_history.callee_account_type.to_s.downcase == 'voicemailaccount' + %i{:class => 'icon-envelope'} + - else + %i{:class => 'icon-random'} - else - %i{:class => 'icon-random'} - - else - %i{:class => 'icon-arrow-right'} + %i{:class => 'icon-arrow-right'} - - if call_history.entry_type == 'forwarded' - - if call_history.callee_account_type.to_s.downcase == 'phonenumber' + - if call_history.entry_type == 'forwarded' + - if call_history.callee_account_type.to_s.downcase == 'phonenumber' + = call_history.destination_number + - if call_history.callee_account_type.to_s.downcase == 'voicemailaccount' + = VoicemailAccount.where(:id => call_history.callee_account_id).first.to_s + - elsif call_history.entry_type == 'dialed' + = call_history.caller_id_number + - else = call_history.destination_number - - if call_history.callee_account_type.to_s.downcase == 'voicemailaccount' - = VoicemailAccount.where(:id => call_history.callee_account_id).first.to_s - - elsif call_history.entry_type == 'dialed' - = call_history.caller_id_number + + %td + - image = call_history.display_image(:mini, phone_book_entry) + - if image + %ul.thumbnails + =image_tag(image, :alt => phone_book_entry.to_s, :class => 'img-rounded') + %td + - display_name = call_history.display_name + - if display_name.blank? + - display_name = phone_book_entry.to_s + - if phone_book_entry + %a.name{:href => phone_book_phone_book_entry_path(phone_book_entry.phone_book, phone_book_entry), :itemprop => "name"}= display_name + - else + .name= display_name + .phone= call_history.display_number + %td + - if call_history.display_duration + = call_history.display_duration + %td + - if t("call_histories.call_results.#{call_history.result}").include?('translation missing') + = call_history.result.gsub('_', ' ').titleize - else - = call_history.destination_number - - %td - - image = call_history.display_image(:mini, phone_book_entry) - - if image - %ul.thumbnails - =image_tag(image, :alt => phone_book_entry.to_s, :class => 'img-rounded') - %td - - display_name = call_history.display_name - - if display_name.blank? - - display_name = phone_book_entry.to_s - - if phone_book_entry - %a.name{:href => phone_book_phone_book_entry_path(phone_book_entry.phone_book, phone_book_entry), :itemprop => "name"}= display_name - - else - .name= display_name - .phone= call_history.display_number - %td - - if call_history.display_duration - = call_history.display_duration - %td - - if t("call_histories.call_results.#{call_history.result}").include?('translation missing') - = call_history.result.gsub('_', ' ').titleize - - else - = t("call_histories.call_results.#{call_history.result}") - %td - - if @sip_account.registration && can?(:call, call_history) - = link_to raw(" ") + t('call_histories.index.actions.call'), call_sip_account_call_history_path(@sip_account, call_history), :method => :put, :class => 'btn btn-mini' + = t("call_histories.call_results.#{call_history.result}") + %td + - if @sip_account.registration && can?(:call, call_history) + = link_to raw(" ") + t('call_histories.index.actions.call'), call_sip_account_call_history_path(@sip_account, call_history), :method => :put, :class => 'btn btn-mini' - - if can? :destroy, call_history - = link_to raw(" ") + t('call_histories.index.actions.destroy'), [@sip_account, call_history], :method => :delete, :remote => true, :class => 'btn btn-mini btn-danger' + - if can? :destroy, call_history + = link_to raw(" ") + t('call_histories.index.actions.destroy'), [@sip_account, call_history], :method => :delete, :remote => true, :class => 'btn btn-mini btn-danger' -- cgit v1.2.3 From 6d8466c44d31007dc3ec469b83855286ca553c5d Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Fri, 3 May 2013 09:36:19 +0200 Subject: display table only if some items are present --- app/views/voicemail_messages/_index_core.html.haml | 144 ++++++++++----------- 1 file changed, 72 insertions(+), 72 deletions(-) (limited to 'app/views') diff --git a/app/views/voicemail_messages/_index_core.html.haml b/app/views/voicemail_messages/_index_core.html.haml index e5dc853..f93365c 100644 --- a/app/views/voicemail_messages/_index_core.html.haml +++ b/app/views/voicemail_messages/_index_core.html.haml @@ -1,77 +1,77 @@ = render :partial => "voicemail_messages/navigation", :locals => {:type => @type} -= form_tag(destroy_multiple_voicemail_account_voicemail_messages_path(@voicemail_account), :method => :delete, :id => 'Setting_form') do - %table.table.table-striped - %thead - %tr - %th{:width => '10px'} - = button_tag(:type => 'submit', :class => 'btn btn-mini btn-danger', :confirm => t("voicemail_messages.index.actions.confirm_selected")) do - %i{:class => 'icon-trash icon-white'} - %th - =sortable :created_epoch, t("voicemail_messages.index.date") - %th{:width => '10px'} - %th - =sortable :cid_name, t("voicemail_messages.index.calling_party") - %th - =sortable :message_len, t("voicemail_messages.index.duration") - %th - =sortable :flags, t("voicemail_messages.index.message_flags") - %th - %th - %tfoot - %tr - %td{:colspan => 2} - = button_tag(:type => 'submit', :class => 'btn btn-mini btn-danger', :confirm => t("voicemail_messages.index.actions.confirm_selected")) do - %i{:class => 'icon-trash icon-white'} - = t("voicemail_messages.index.actions.destroy_multiple") - %td{:colspan => 4} - %tbody - - for voicemail_message in voicemail_messages - - phone_book_entry = nil - - image = nil - - if !voicemail_message.cid_number.blank? - - phone_book_entry = voicemail_message.phone_book_entry_by_number(voicemail_message.cid_number) - - if phone_book_entry - - image = phone_book_entry.image_url(:mini) - %tr{:id => "message_#{voicemail_message.uuid}"} - %td.select_box= check_box_tag("selected_uuids[]", voicemail_message.uuid, false, :uuid => "select_item_#{voicemail_message.uuid}", :class => 'select_item') - %td - = l Time.at(voicemail_message.created_epoch).to_datetime, :format => :short - - if voicemail_message.read_epoch > 0 - %br - %i{:class => 'icon-bullhorn'} - = l Time.at(voicemail_message.read_epoch).to_datetime, :format => :short - - else - %br - %i{:class => 'icon-envelope'} - = t("voicemail_messages.index.unread") - %td - - if image - %ul.thumbnails - =image_tag(image, :alt => phone_book_entry.to_s, :class => 'img-rounded') - %td +- if voicemail_messages.any? + = form_tag(destroy_multiple_voicemail_account_voicemail_messages_path(@voicemail_account), :method => :delete, :id => 'Setting_form') do + %table.table.table-striped + %thead + %tr + %th{:width => '10px'} + = button_tag(:type => 'submit', :class => 'btn btn-mini btn-danger', :confirm => t("voicemail_messages.index.actions.confirm_selected")) do + %i{:class => 'icon-trash icon-white'} + %th + =sortable :created_epoch, t("voicemail_messages.index.date") + %th{:width => '10px'} + %th + =sortable :cid_name, t("voicemail_messages.index.calling_party") + %th + =sortable :message_len, t("voicemail_messages.index.duration") + %th + =sortable :flags, t("voicemail_messages.index.message_flags") + %th + %th + %tfoot + %tr + %td{:colspan => 2} + = button_tag(:type => 'submit', :class => 'btn btn-mini btn-danger', :confirm => t("voicemail_messages.index.actions.confirm_selected")) do + %i{:class => 'icon-trash icon-white'} + = t("voicemail_messages.index.actions.destroy_multiple") + %td{:colspan => 4} + %tbody + - for voicemail_message in voicemail_messages + - phone_book_entry = nil + - image = nil + - if !voicemail_message.cid_number.blank? + - phone_book_entry = voicemail_message.phone_book_entry_by_number(voicemail_message.cid_number) - if phone_book_entry - %a.name{:href => phone_book_phone_book_entry_path(phone_book_entry.phone_book, phone_book_entry), :itemprop => "name"}= voicemail_message.cid_name - - else - .name= voicemail_message.cid_name - .phone= voicemail_message.cid_number - %td - = voicemail_message.display_duration - %td - - if ! voicemail_message.flags.blank? - = t("voicemail_messages.index.flags.#{voicemail_message.flags}") - = voicemail_message.phone_book_entry_by_number(voicemail_message.cid_number) - %td - - if can?(:show, voicemail_message) && File.readable?(voicemail_message.file_path) - = link_to raw(" ") + t('voicemail_messages.index.actions.download'), voicemail_account_voicemail_message_path(@voicemail_account, voicemail_message, :format => :wav), :method => :get - - if can?(:edit, voicemail_message) && voicemail_message.read_epoch > 0 - = link_to raw(" ") + t('voicemail_messages.index.actions.mark_unread'), mark_unread_voicemail_account_voicemail_message_path(@voicemail_account, voicemail_message), :method => :put - - else - = link_to raw(" ") + t('voicemail_messages.index.actions.mark_read'), mark_read_voicemail_account_voicemail_message_path(@voicemail_account, voicemail_message), :method => :put - %td - - if @available_sip_account && @available_sip_account.registration && can?(:call, voicemail_message) - = link_to raw(" ") + t('voicemail_messages.index.actions.call'), call_voicemail_account_voicemail_message_path(@voicemail_account, voicemail_message), :method => :put, :class => 'btn btn-mini' + - image = phone_book_entry.image_url(:mini) + %tr{:id => "message_#{voicemail_message.uuid}"} + %td.select_box= check_box_tag("selected_uuids[]", voicemail_message.uuid, false, :uuid => "select_item_#{voicemail_message.uuid}", :class => 'select_item') + %td + = l Time.at(voicemail_message.created_epoch).to_datetime, :format => :short + - if voicemail_message.read_epoch > 0 + %br + %i{:class => 'icon-bullhorn'} + = l Time.at(voicemail_message.read_epoch).to_datetime, :format => :short + - else + %br + %i{:class => 'icon-envelope'} + = t("voicemail_messages.index.unread") + %td + - if image + %ul.thumbnails + =image_tag(image, :alt => phone_book_entry.to_s, :class => 'img-rounded') + %td + - if phone_book_entry + %a.name{:href => phone_book_phone_book_entry_path(phone_book_entry.phone_book, phone_book_entry), :itemprop => "name"}= voicemail_message.cid_name + - else + .name= voicemail_message.cid_name + .phone= voicemail_message.cid_number + %td + = voicemail_message.display_duration + %td + - if ! voicemail_message.flags.blank? + = t("voicemail_messages.index.flags.#{voicemail_message.flags}") + %td + - if can?(:show, voicemail_message) && File.readable?(voicemail_message.file_path) + = link_to raw(" ") + t('voicemail_messages.index.actions.download'), voicemail_account_voicemail_message_path(@voicemail_account, voicemail_message, :format => :wav), :method => :get + - if can?(:edit, voicemail_message) && voicemail_message.read_epoch > 0 + = link_to raw(" ") + t('voicemail_messages.index.actions.mark_unread'), mark_unread_voicemail_account_voicemail_message_path(@voicemail_account, voicemail_message), :method => :put + - else + = link_to raw(" ") + t('voicemail_messages.index.actions.mark_read'), mark_read_voicemail_account_voicemail_message_path(@voicemail_account, voicemail_message), :method => :put + %td + - if @available_sip_account && @available_sip_account.registration && can?(:call, voicemail_message) + = link_to raw(" ") + t('voicemail_messages.index.actions.call'), call_voicemail_account_voicemail_message_path(@voicemail_account, voicemail_message), :method => :put, :class => 'btn btn-mini' - - if can? :destroy, voicemail_message - = link_to raw(" ") + t('voicemail_messages.index.actions.destroy'), [@voicemail_account, voicemail_message], :method => :delete, :remote => true, :class => 'btn btn-mini btn-danger' + - if can? :destroy, voicemail_message + = link_to raw(" ") + t('voicemail_messages.index.actions.destroy'), [@voicemail_account, voicemail_message], :method => :delete, :remote => true, :class => 'btn btn-mini btn-danger' -- cgit v1.2.3 From c910e18564a401284296ea7e1f5f86650f5ddc7b Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Tue, 7 May 2013 14:43:04 +0200 Subject: translations --- app/views/config_snom/state_settings.xml.haml | 47 +++++++++++++++------------ 1 file changed, 27 insertions(+), 20 deletions(-) (limited to 'app/views') diff --git a/app/views/config_snom/state_settings.xml.haml b/app/views/config_snom/state_settings.xml.haml index 6be1efc..8bb5239 100644 --- a/app/views/config_snom/state_settings.xml.haml +++ b/app/views/config_snom/state_settings.xml.haml @@ -1,49 +1,56 @@ !!! XML %SnomIPPhoneMenu{:state => 'relevant', :title => "Gemeinschaft #{GsParameter.get('GEMEINSCHAFT_VERSION')}"} - %MenuItem{:name => '$(lang:menu100_phone_book)'} + %MenuItem{:name => t('config_snom.main_menu.phone_book')} %URL= "#{@base_url}/#{@sip_account_ids.first}/phone_book.xml" - %Menu{:name => '$(lang:menu100_call_lists)'} - %MenuItem{:name => '$(lang:list_missed)'} + %Menu{:name => t('config_snom.main_menu.call_history')} + %MenuItem{:name => t('config_snom.call_history.missed')} - @sip_account_ids.each_with_index do |id, index| %If{:condition => "$(current_line)==#{index+1}"} %URL= "#{@base_url}/#{id}/call_history_missed.xml" - %MenuItem{:name => '$(lang:list_taken)'} + %MenuItem{:name => t('config_snom.call_history.received')} - @sip_account_ids.each_with_index do |id, index| %If{:condition => "$(current_line)==#{index+1}"} %URL= "#{@base_url}/#{id}/call_history_received.xml" - %MenuItem{:name => '$(lang:list_dialed)'} + %MenuItem{:name => t('config_snom.call_history.dialed')} - @sip_account_ids.each_with_index do |id, index| %If{:condition => "$(current_line)==#{index+1}"} %URL= "#{@base_url}/#{id}/call_history_dialed.xml" - %MenuItem{:name => '$(lang:sel100_activeline)'} + %MenuItem{:name => t('config_snom.call_history.forwarded')} + - @sip_account_ids.each_with_index do |id, index| + %If{:condition => "$(current_line)==#{index+1}"} + %URL= "#{@base_url}/#{id}/call_history_forwarded.xml" + + %MenuItem{:name => t('config_snom.main_menu.voicemail')} + %URL= "#{@base_url}/#{@sip_account_ids.first}/voicemail.xml" + %MenuItem{:name => t('config_snom.main_menu.sip_account')} %Action= 'active_line' - if @enable_login - %MenuItem{:name => 'Log in'} + %MenuItem{:name => t('config_snom.main_menu.log_in')} %URL= "#{@base_url}/log_in.xml" - if @enable_logout - %MenuItem{:name => 'Log out'} + %MenuItem{:name => t('config_snom.main_menu.log_out')} %URL= "#{@base_url}/log_out.xml" - %Menu{:name => '$(lang:preferences_settings)'} - %MenuItem{:name => '$(lang:menu_gen_contrast)'} + %Menu{:name => t('config_snom.main_menu.preferences')} + %MenuItem{:name => t('config_snom.preferences.contrast')} %Action= 'contrast' - %MenuItem{:name => '$(lang:use_backlight)'} + %MenuItem{:name => t('config_snom.preferences.use_backlight')} %Action= 'use_backlight' - %MenuItem{:name => '$(lang:use_backlight) $(lang:backlight_when_active)'} + %MenuItem{:name => t('config_snom.preferences.backlight_active')} %Action= 'backlight_active' - %MenuItem{:name => '$(lang:use_backlight) $(lang:backlight_when_idle)'} + %MenuItem{:name => t('config_snom.preferences.backlight_idle')} %Action= 'backlight_idle' - %MenuItem{:name => '$(lang:menu_equalizer)'} + %MenuItem{:name => t('config_snom.preferences.equalizer')} %Action= 'equalizer' - %Menu{:name => '$(lang:maintenance_settings)'} - %MenuItem{:name => '$(lang:system_information_menu)'} + %Menu{:name => t('config_snom.main_menu.maintenance')} + %MenuItem{:name => t('config_snom.maintenance.system_info')} %Action= 'sysinfo' - %MenuItem{:name => '$(lang:sel100_reboot)'} + %MenuItem{:name => t('config_snom.maintenance.reboot')} %Action= 'reboot' %If{:condition => '$(set:admin_mode)'} - %MenuItem{:name => '$(lang:reset_settings)'} + %MenuItem{:name => t('config_snom.maintenance.reset_settings')} %Action= 'reset_settings' %If{:condition => '$(update_available)'} - %MenuItem{:name => '$(lang:update_header)'} - %Action= 'software_update' \ No newline at end of file + %MenuItem{:name => t('config_snom.maintenance.software_update')} + %Action= 'software_update' -- cgit v1.2.3 From 91b9da216d001c749b6d3429d88b35d0c1d3537b Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Tue, 7 May 2013 14:44:01 +0200 Subject: set user_idle_text --- app/views/config_snom/show.xml.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/views') diff --git a/app/views/config_snom/show.xml.haml b/app/views/config_snom/show.xml.haml index 16a05d0..22df8bc 100644 --- a/app/views/config_snom/show.xml.haml +++ b/app/views/config_snom/show.xml.haml @@ -129,7 +129,7 @@ != "\