summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'app/views')
-rw-r--r--app/views/call_forwards/_form_core.html.haml13
-rw-r--r--app/views/call_forwards/_index_core.html.haml2
-rw-r--r--app/views/call_forwards/show.html.haml2
-rw-r--r--app/views/call_histories/_index_core.html.haml174
-rw-r--r--app/views/call_histories/_navigation.html.haml27
-rw-r--r--app/views/call_routes/_form_core.html.haml7
-rw-r--r--app/views/call_routes/test.html.haml23
-rw-r--r--app/views/config_snom/show.xml.haml5
-rw-r--r--app/views/config_snom/state_settings.xml.haml47
-rw-r--r--app/views/gateway_parameters/show.html.haml2
-rw-r--r--app/views/gateway_settings/_form_core.html.haml2
-rw-r--r--app/views/gateway_settings/_index_core.html.haml8
-rw-r--r--app/views/gateway_settings/show.html.haml2
-rw-r--r--app/views/gemeinschaft_setups/new.de.html.haml6
-rw-r--r--app/views/gemeinschaft_setups/new.html.haml6
-rw-r--r--app/views/generic_files/_form.html.haml7
-rw-r--r--app/views/generic_files/_form_core.html.haml7
-rw-r--r--app/views/generic_files/_index_core.html.haml20
-rw-r--r--app/views/generic_files/edit.html.haml3
-rw-r--r--app/views/generic_files/index.html.haml6
-rw-r--r--app/views/generic_files/new.html.haml3
-rw-r--r--app/views/generic_files/show.html.haml25
-rw-r--r--app/views/group_permissions/show.html.haml4
-rw-r--r--app/views/intruders/_index_core.html.haml2
-rw-r--r--app/views/intruders/show.html.haml3
-rw-r--r--app/views/layouts/_navbar.html.haml9
-rw-r--r--app/views/notifications/new_voicemail.text.erb2
-rw-r--r--app/views/pager_group_destinations/_form.html.haml7
-rw-r--r--app/views/pager_group_destinations/_form_core.html.haml3
-rw-r--r--app/views/pager_group_destinations/_index_core.html.haml11
-rw-r--r--app/views/pager_group_destinations/edit.html.haml3
-rw-r--r--app/views/pager_group_destinations/index.html.haml6
-rw-r--r--app/views/pager_group_destinations/new.html.haml3
-rw-r--r--app/views/pager_group_destinations/show.html.haml10
-rw-r--r--app/views/pager_groups/_form.html.haml7
-rw-r--r--app/views/pager_groups/_form_core.html.haml3
-rw-r--r--app/views/pager_groups/_index_core.html.haml11
-rw-r--r--app/views/pager_groups/edit.html.haml3
-rw-r--r--app/views/pager_groups/index.html.haml6
-rw-r--r--app/views/pager_groups/new.html.haml3
-rw-r--r--app/views/pager_groups/show.html.haml10
-rw-r--r--app/views/phones/_index_core.html.haml16
-rw-r--r--app/views/phones/index.html.haml2
-rw-r--r--app/views/sip_accounts/_form_core.html.haml2
-rw-r--r--app/views/sip_accounts/_index_core.html.haml11
-rw-r--r--app/views/sip_accounts/index.html.haml2
-rw-r--r--app/views/sip_accounts/show.html.haml5
-rw-r--r--app/views/switchboards/_form_core.html.haml4
-rw-r--r--app/views/switchboards/show-old.html.haml (renamed from app/views/switchboards/show.html.haml)0
-rw-r--r--app/views/switchboards/show.html.erb79
-rw-r--r--app/views/tenants/_admin_area.de.html.haml6
-rw-r--r--app/views/tenants/_admin_area.en.html.haml9
-rw-r--r--app/views/tenants/_generic_files.html.haml5
-rw-r--r--app/views/tenants/_table_of_groups.html.haml8
-rw-r--r--app/views/tenants/_table_of_phones.html.haml12
-rw-r--r--app/views/tenants/_table_of_sip_accounts.html.haml12
-rw-r--r--app/views/tenants/_table_of_voicemail_accounts.html.haml8
-rw-r--r--app/views/tenants/_users_table.html.haml2
-rw-r--r--app/views/users/_generic_files.html.haml7
-rw-r--r--app/views/users/_index_core.html.haml14
-rw-r--r--app/views/users/_voicemail_accounts.html.haml7
-rw-r--r--app/views/users/show.html.haml15
-rw-r--r--app/views/voicemail_accounts/_form.html.haml7
-rw-r--r--app/views/voicemail_accounts/_form_core.html.haml3
-rw-r--r--app/views/voicemail_accounts/_index_core.html.haml18
-rw-r--r--app/views/voicemail_accounts/edit.html.haml3
-rw-r--r--app/views/voicemail_accounts/index.html.haml6
-rw-r--r--app/views/voicemail_accounts/new.html.haml3
-rw-r--r--app/views/voicemail_accounts/show.html.haml16
-rw-r--r--app/views/voicemail_messages/_index_core.html.haml118
-rw-r--r--app/views/voicemail_messages/_navigation.html.haml11
-rw-r--r--app/views/voicemail_settings/_edit_form.html.haml8
-rw-r--r--app/views/voicemail_settings/_edit_form_core.html.haml2
-rw-r--r--app/views/voicemail_settings/_form.html.haml3
-rw-r--r--app/views/voicemail_settings/_form_core.html.haml14
-rw-r--r--app/views/voicemail_settings/_index_core.html.haml14
-rw-r--r--app/views/voicemail_settings/edit.html.haml2
-rw-r--r--app/views/voicemail_settings/index.html.haml6
-rw-r--r--app/views/voicemail_settings/new.html.haml3
-rw-r--r--app/views/voicemail_settings/show.html.haml30
80 files changed, 756 insertions, 240 deletions
diff --git a/app/views/call_forwards/_form_core.html.haml b/app/views/call_forwards/_form_core.html.haml
index 83de044..b730941 100644
--- a/app/views/call_forwards/_form_core.html.haml
+++ b/app/views/call_forwards/_form_core.html.haml
@@ -1,11 +1,18 @@
.inputs
= f.input :call_forward_case_id, :as => :select, :collection => @available_call_forward_cases.map {|x| [I18n.t("call_forward_cases.#{x.value}"), x.id] }, :label => t('call_forwards.form.call_forward_case.label'), :hint => conditional_hint('call_forwards.form.call_forward_case_id.hint'), :include_blank => false, :autofocus => true
- = f.input :timeout, :label => t('call_forwards.form.timeout.label'), :hint => conditional_hint('call_forwards.form.timeout.hint')
+
+ %div{:id => 'timeout_div'}
+ = f.input :timeout, :label => t('call_forwards.form.timeout.label'), :hint => conditional_hint('call_forwards.form.timeout.hint')
= f.input :call_forwarding_destination , :as => :select, :collection => @call_forwarding_destinations, :label => t('call_forwards.form.call_forwarding_destination.label'), :hint => conditional_hint('call_forwards.form.call_forwarding_destination.hint'), :include_blank => false
- = f.input :destination, :label => t('call_forwards.form.destination.label'), :hint => conditional_hint('call_forwards.form.destination.hint')
+ %div{:id => 'destination_phone_number_div'}
+ = f.input :destination, :label => t('call_forwards.form.destination_phone_number.label'), :hint => conditional_hint('call_forwards.form.destination_phone_number.hint'), :input_html => { :id => 'destination_phone_number', :value => @destination_phone_number }
+ - if @available_greetings.any?
+ %div{:id => 'destination_greeting_div'}
+ = f.input :destination, :as => :select, :collection => @available_greetings, :label => t('call_forwards.form.destination_greeting.label'), :hint => conditional_hint('call_forwards.form.destination_greeting.hint'), :input_html => { :id => 'destination_greeting' }
- = f.input :source, :label => t('call_forwards.form.source.label'), :hint => conditional_hint('call_forwards.form.source.hint')
= f.input :active, :label => t('call_forwards.form.active.label'), :hint => conditional_hint('call_forwards.form.active.hint')
+
+ = f.input :source, :label => t('call_forwards.form.source.label'), :hint => conditional_hint('call_forwards.form.source.hint')
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}
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
diff --git a/app/views/call_histories/_index_core.html.haml b/app/views/call_histories/_index_core.html.haml
index 8bbf761..9c2cf39 100644
--- a/app/views/call_histories/_index_core.html.haml
+++ b/app/views/call_histories/_index_core.html.haml
@@ -1,85 +1,99 @@
-= 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 => sip_account_voicemail_messages_path(@sip_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"))
+- 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'
+ - voicemail_message = call_history.voicemail_message
+ - if voicemail_message
+ - if voicemail_message.read_epoch > 0
+ %i{:class => 'icon-bullhorn'}
+ - else
+ %i{:class => 'icon-envelope'}
+ - else
+ %i{:class => 'icon-random'}
+ - else
+ %i{:class => 'icon-random'}
+ - else
+ %i{:class => 'icon-arrow-right'}
- - 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")
+ - if call_history.entry_type == 'forwarded'
+ - if call_history.callee_account_type.to_s.downcase == 'voicemailaccount'
+ - if voicemail_message
+ %a.name{:href => voicemail_account_voicemail_messages_path(voicemail_message.voicemail_account, :anchor => "message_#{voicemail_message.uuid}")}
+ = voicemail_message.display_duration
+ /= VoicemailAccount.where(:id => call_history.callee_account_id).first.to_s
+ - else
+ = VoicemailAccount.where(:id => call_history.callee_account_id).first.to_s
+ - else
+ = call_history.destination_number
+ - 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
+ %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
- = 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"))
+ .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("<i class = 'icon-bell'></i> ") + t('call_histories.index.actions.call'), call_sip_account_call_history_path(@sip_account, call_history), :method => :put, :class => 'btn btn-mini'
- - 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("<i class = 'icon-bell'></i> ") + 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("<i class = 'icon-trash icon-white'></i> ") + 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
+ - if can? :destroy, call_history
+ = link_to raw("<i class = 'icon-trash icon-white'></i> ") + t('call_histories.index.actions.destroy'), [@sip_account, call_history], :method => :delete, :remote => true, :class => 'btn btn-mini btn-danger'
diff --git a/app/views/call_histories/_navigation.html.haml b/app/views/call_histories/_navigation.html.haml
index d72ad64..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
- %a{ :href => "?type=" }= t("call_histories.index.navigation.all", :calls => @calls_count)
- %li
- %a{ :href => "?type=missed" }= t("call_histories.index.navigation.missed", :calls => @calls_missed_count)
- %li
- %a{ :href => "?type=received" }= t("call_histories.index.navigation.received", :calls => @calls_received_count)
- %li
- %a{ :href => "?type=dialed" }= t("call_histories.index.navigation.dialed", :calls => @calls_dialed_count)
- %li
- %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
+
+ = will_paginate call_histories, :renderer => BootstrapPagination::Rails, :previous_label => raw('<i class = "icon-chevron-left"></i>'), :next_label => raw('<i class = "icon-chevron-right"></i>'), :class => nil
diff --git a/app/views/call_routes/_form_core.html.haml b/app/views/call_routes/_form_core.html.haml
index 926c985..73b6338 100644
--- a/app/views/call_routes/_form_core.html.haml
+++ b/app/views/call_routes/_form_core.html.haml
@@ -2,4 +2,9 @@
= f.input :routing_table, :collection => CallRoute::ROUTING_TABLES, :label => t('call_routes.form.table.label'), :hint => conditional_hint('call_routes.form.table.hint'), :include_blank => false, :autofocus => true
= f.input :name, :label => t('call_routes.form.name.label'), :hint => conditional_hint('call_routes.form.name.hint')
= f.input :endpoint_str, :collection => @endpoints, :label => t('call_routes.form.endpoint.label'), :hint => conditional_hint('call_routes.form.endpoint.hint'), :include_blank => false
- = f.input :position, :label => t('call_routes.form.position.label'), :hint => conditional_hint('call_routes.form.position.hint') \ No newline at end of file
+ = f.input :position, :label => t('call_routes.form.position.label'), :hint => conditional_hint('call_routes.form.position.hint')
+
+ - if @call_route.new_record?
+ %p
+ %strong= t('call_routes.form.xml.separator')
+ = f.input :xml, :as => 'text', :label => t('call_routes.form.xml.label'), :hint => conditional_hint('call_routes.form.xml.hint') \ No newline at end of file
diff --git a/app/views/call_routes/test.html.haml b/app/views/call_routes/test.html.haml
index 0b0fba7..2183987 100644
--- a/app/views/call_routes/test.html.haml
+++ b/app/views/call_routes/test.html.haml
@@ -1,5 +1,28 @@
%h2= 'Routing Test'
+= form_tag('test', :method => "get") do |f|
+ %p
+ %strong Routing Table
+ = label_tag(:routing_table_outbound, "Outbound")
+ = radio_button_tag(:routing_table, "outbound")
+ = label_tag(:routing_table_inbound, "Inbound")
+ = radio_button_tag(:routing_table, "inbound")
+ = label_tag(:routing_table_prerouting, "Prerouting")
+ = radio_button_tag(:routing_table, "prerouting")
+ %p
+ %strong From
+ %br
+ = collection_select(nil, :sip_account_id, SipAccount.all, :id, :to_s, {:include_blank => false, :prompt => 'Select SIP Account'})
+ = collection_select(nil, :fax_account_id, FaxAccount.all, :id, :to_s, {:include_blank => false, :prompt => 'Select Fax Account'})
+ = collection_select(nil, :hunt_group_id, HuntGroup.all, :id, :to_s, {:include_blank => false, :prompt => 'Select Hunt Group'})
+
+ %p
+ %strong Number
+ %br
+ = text_field_tag(:destination_number)
+
+ %p= submit_tag("Test Route")
+
- if @route_test
- if @route_test['destination']
%h3= 'Destination'
diff --git a/app/views/config_snom/show.xml.haml b/app/views/config_snom/show.xml.haml
index 3d0edf1..22df8bc 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'
@@ -128,7 +129,7 @@
!= "\<!-- sip accounts: #{@sip_accounts.count} --\>"
- @sip_accounts.each_with_index do |sip_account, array_index|
- index = array_index + 1
- != "\<!-- sip account #{array_index}: #{sip_account[:idle_text]}, #{sip_account[:active]} --\>"
+ != "\<!-- sip account #{array_index}: #{sip_account[:user_idle_text]}, #{sip_account[:active]} --\>"
%user_active{:idx => index, :perm => 'R'}= sip_account[:active]
%user_pname{:idx => index, :perm => 'R'}= sip_account[:pname]
%user_pass{:idx => index, :perm => 'R'}= sip_account[:pass]
@@ -136,7 +137,7 @@
%user_outbound{:idx => index, :perm => 'R'}= sip_account[:outbound]
%user_name{:idx => index, :perm => 'R'}= sip_account[:name]
%user_realname{:idx => index, :perm => 'R'}= sip_account[:realname]
- %user_idle_text{:idx => index, :perm => 'R'}= sip_account[:idle_text]
+ %user_idle_text{:idx => index, :perm => 'R'}= sip_account[:user_idle_text]
%user_mailbox{:idx => index, :perm => 'R'}= sip_account[:mailbox]
%user_expiry{:idx => index, :perm => 'R'}= sip_account[:expiry]
%user_server_type{:idx => index, :perm => 'R'}= 'default'
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'
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') + ":"
diff --git a/app/views/gateway_settings/_form_core.html.haml b/app/views/gateway_settings/_form_core.html.haml
index 229009b..a66dd2e 100644
--- a/app/views/gateway_settings/_form_core.html.haml
+++ b/app/views/gateway_settings/_form_core.html.haml
@@ -1,4 +1,4 @@
.inputs
- = f.input :name, :collection => GatewaySetting::GATEWAY_SETTINGS[@gateway.technology].keys, :label => t('gateway_settings.form.name.label'), :hint => conditional_hint('gateway_settings.form.name.hint'), :autofocus => true, :include_blank => false
+ = f.input :name, :collection => GatewaySetting::GATEWAY_SETTINGS[@gateway.technology].map {|k,v| [t("gateway_settings.settings.#{@gateway.technology}.#{k}.label"), k] }, :label => t('gateway_settings.form.name.label'), :hint => conditional_hint('gateway_settings.form.name.hint'), :autofocus => true, :include_blank => false
= f.input :value, :label => t('gateway_settings.form.value.label'), :hint => conditional_hint('gateway_settings.form.value.hint')
= f.input :description, :label => t('gateway_settings.form.description.label'), :hint => conditional_hint('gateway_settings.form.description.hint')
diff --git a/app/views/gateway_settings/_index_core.html.haml b/app/views/gateway_settings/_index_core.html.haml
index 8098488..36b47c8 100644
--- a/app/views/gateway_settings/_index_core.html.haml
+++ b/app/views/gateway_settings/_index_core.html.haml
@@ -8,7 +8,11 @@
%tbody
- for gateway_setting in gateway_settings
%tr
- %td= gateway_setting.name
+ %td= t("gateway_settings.settings.#{@gateway.technology}.#{gateway_setting.name}.label")
%td= gateway_setting.value
- %td= gateway_setting.description
+ %td
+ - if gateway_setting.description.blank?
+ = t("gateway_settings.settings.#{@gateway.technology}.#{gateway_setting.name}.hint")
+ - else
+ = gateway_setting.description
=render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => gateway_setting.gateway, :child => gateway_setting}
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') + ":"
diff --git a/app/views/gemeinschaft_setups/new.de.html.haml b/app/views/gemeinschaft_setups/new.de.html.haml
index 3c215d1..bba60d3 100644
--- a/app/views/gemeinschaft_setups/new.de.html.haml
+++ b/app/views/gemeinschaft_setups/new.de.html.haml
@@ -20,6 +20,12 @@
= f.input :default_system_email, :label => t('gemeinschaft_setups.form.default_system_email.label'), :hint => conditional_hint('gemeinschaft_setups.form.default_system_email.hint')
+ %strong Angriffserkennung
+
+ = f.input :detect_attacks, :as => :boolean, :label => t('gemeinschaft_setups.form.detect_attacks.label'), :hint => conditional_hint('gemeinschaft_setups.form.detect_attacks.hint')
+ = f.input :report_attacks, :as => :boolean, :label => t('gemeinschaft_setups.form.report_attacks.label'), :hint => conditional_hint('gemeinschaft_setups.form.report_attacks.hint')
+
+
%h3 SIP-Domain
%p In den meisten Fällen sollten Sie den gleichen Wert für SIP-Realm und SIP-Domain benutzen. Wenn Sie mit diesen Begriffen nichts anfangen können, dann geben Sie hier bitte die IP-Adresse dieses Servers ein.
diff --git a/app/views/gemeinschaft_setups/new.html.haml b/app/views/gemeinschaft_setups/new.html.haml
index deac19d..88b73fd 100644
--- a/app/views/gemeinschaft_setups/new.html.haml
+++ b/app/views/gemeinschaft_setups/new.html.haml
@@ -20,6 +20,12 @@
= f.input :default_system_email, :label => t('gemeinschaft_setups.form.default_system_email.label'), :hint => conditional_hint('gemeinschaft_setups.form.default_system_email.hint')
+ %strong Intrusion detection / prevention
+
+ = f.input :detect_attacks, :as => :boolean, :label => t('gemeinschaft_setups.form.detect_attacks.label'), :hint => conditional_hint('gemeinschaft_setups.form.detect_attacks.hint')
+ = f.input :report_attacks, :as => :boolean, :label => t('gemeinschaft_setups.form.report_attacks.label'), :hint => conditional_hint('gemeinschaft_setups.form.report_attacks.hint')
+
+
%h3 SIP-Domain
%p You should use the same value for the SIP realm as for the SIP domain to ensure compatibility with different phone models. In case you have no clue what we are talking about: Just enter the IP address of this server.
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..2cea8a1
--- /dev/null
+++ b/app/views/generic_files/_index_core.html.haml
@@ -0,0 +1,20 @@
+%table.table.table-striped
+ %tr
+ %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
+ %td= generic_file.category
+ %td= generic_file.name
+ %td= generic_file.file_type
+ %td
+ %p
+ %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")
+
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => generic_file.owner, :child => generic_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..9405444
--- /dev/null
+++ b/app/views/generic_files/show.html.haml
@@ -0,0 +1,25 @@
+- 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)
+
+%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 }
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 }
diff --git a/app/views/intruders/_index_core.html.haml b/app/views/intruders/_index_core.html.haml
index 1fca601..fa1cf8f 100644
--- a/app/views/intruders/_index_core.html.haml
+++ b/app/views/intruders/_index_core.html.haml
@@ -2,6 +2,7 @@
%tr
%th
%th= t('intruders.index.contact_ip')
+ %th= t('intruders.index.country')
%th= t('intruders.index.points')
%th= t('intruders.index.ban_last')
%th= t('intruders.index.contact_count')
@@ -31,6 +32,7 @@
%i.icon-warning-sign
%td= intruder.contact_ip
+ %td= intruder.country
%td= intruder.points
%td
- if intruder.ban_last
diff --git a/app/views/intruders/show.html.haml b/app/views/intruders/show.html.haml
index df50872..5096941 100644
--- a/app/views/intruders/show.html.haml
+++ b/app/views/intruders/show.html.haml
@@ -22,6 +22,9 @@
%strong= t('intruders.show.contact_ip') + ":"
= @intruder.contact_ip
%p
+ %strong= t('intruders.show.country') + ":"
+ = @intruder.country
+%p
%strong= t('intruders.show.contact_port') + ":"
= @intruder.contact_port
%p
diff --git a/app/views/layouts/_navbar.html.haml b/app/views/layouts/_navbar.html.haml
index 3e1da1c..d83660b 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
@@ -60,5 +61,5 @@
- if GuiFunction.display?('search_field_in_top_navigation_bar', current_user)
= form_tag search_path, :method => :post, :class => 'navbar-search pull-right' do
- %input.text{:placeholder => 'Suchen ...', :name => 'q', :class => 'search-query span2'}
+ %input.text{:placeholder => t('navigation.search_placeholder'), :name => 'q', :class => 'search-query span2'}
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] %>.
diff --git a/app/views/pager_group_destinations/_form.html.haml b/app/views/pager_group_destinations/_form.html.haml
new file mode 100644
index 0000000..80cb7bb
--- /dev/null
+++ b/app/views/pager_group_destinations/_form.html.haml
@@ -0,0 +1,7 @@
+= simple_form_for(@pager_group_destination) do |f|
+ = f.error_notification
+
+ = render "form_core", :f => f
+
+ .form-actions
+ = f.button :submit, conditional_t('pager_group_destinations.form.submit')
diff --git a/app/views/pager_group_destinations/_form_core.html.haml b/app/views/pager_group_destinations/_form_core.html.haml
new file mode 100644
index 0000000..2adae24
--- /dev/null
+++ b/app/views/pager_group_destinations/_form_core.html.haml
@@ -0,0 +1,3 @@
+.inputs
+ = f.input :pager_group_id, :label => t('pager_group_destinations.form.pager_group_id.label'), :hint => conditional_hint('pager_group_destinations.form.pager_group_id.hint')
+ = f.input :sip_account_id, :label => t('pager_group_destinations.form.sip_account_id.label'), :hint => conditional_hint('pager_group_destinations.form.sip_account_id.hint')
diff --git a/app/views/pager_group_destinations/_index_core.html.haml b/app/views/pager_group_destinations/_index_core.html.haml
new file mode 100644
index 0000000..78bf3e5
--- /dev/null
+++ b/app/views/pager_group_destinations/_index_core.html.haml
@@ -0,0 +1,11 @@
+%table.table.table-striped
+ %tr
+ %th= t('pager_group_destinations.index.pager_group_id')
+ %th= t('pager_group_destinations.index.sip_account_id')
+
+
+ - for pager_group_destination in pager_group_destinations
+ %tr
+ %td= pager_group_destination.pager_group_id
+ %td= pager_group_destination.sip_account_id
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => pager_group_destination} \ No newline at end of file
diff --git a/app/views/pager_group_destinations/edit.html.haml b/app/views/pager_group_destinations/edit.html.haml
new file mode 100644
index 0000000..4086329
--- /dev/null
+++ b/app/views/pager_group_destinations/edit.html.haml
@@ -0,0 +1,3 @@
+- content_for :title, t("pager_group_destinations.edit.page_title")
+
+= render "form" \ No newline at end of file
diff --git a/app/views/pager_group_destinations/index.html.haml b/app/views/pager_group_destinations/index.html.haml
new file mode 100644
index 0000000..8072fb7
--- /dev/null
+++ b/app/views/pager_group_destinations/index.html.haml
@@ -0,0 +1,6 @@
+- content_for :title, t("pager_group_destinations.index.page_title")
+
+- if @pager_group_destinations && @pager_group_destinations.count > 0
+ = render "index_core", :pager_group_destinations => @pager_group_destinations
+
+= render :partial => 'shared/create_link', :locals => {:child_class => PagerGroupDestination} \ No newline at end of file
diff --git a/app/views/pager_group_destinations/new.html.haml b/app/views/pager_group_destinations/new.html.haml
new file mode 100644
index 0000000..346911c
--- /dev/null
+++ b/app/views/pager_group_destinations/new.html.haml
@@ -0,0 +1,3 @@
+- content_for :title, t("pager_group_destinations.new.page_title")
+
+= render "form" \ No newline at end of file
diff --git a/app/views/pager_group_destinations/show.html.haml b/app/views/pager_group_destinations/show.html.haml
new file mode 100644
index 0000000..4bc3adb
--- /dev/null
+++ b/app/views/pager_group_destinations/show.html.haml
@@ -0,0 +1,10 @@
+- content_for :title, t("pager_group_destinations.show.page_title")
+
+%p
+ %strong= t('pager_group_destinations.show.pager_group_id') + ":"
+ = @pager_group_destination.pager_group_id
+%p
+ %strong= t('pager_group_destinations.show.sip_account_id') + ":"
+ = @pager_group_destination.sip_account_id
+
+= render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @pager_group_destination } \ No newline at end of file
diff --git a/app/views/pager_groups/_form.html.haml b/app/views/pager_groups/_form.html.haml
new file mode 100644
index 0000000..a9d5782
--- /dev/null
+++ b/app/views/pager_groups/_form.html.haml
@@ -0,0 +1,7 @@
+= simple_form_for(@pager_group) do |f|
+ = f.error_notification
+
+ = render "form_core", :f => f
+
+ .form-actions
+ = f.button :submit, conditional_t('pager_groups.form.submit')
diff --git a/app/views/pager_groups/_form_core.html.haml b/app/views/pager_groups/_form_core.html.haml
new file mode 100644
index 0000000..eeb23d2
--- /dev/null
+++ b/app/views/pager_groups/_form_core.html.haml
@@ -0,0 +1,3 @@
+.inputs
+ = f.input :sip_account_id, :label => t('pager_groups.form.sip_account_id.label'), :hint => conditional_hint('pager_groups.form.sip_account_id.hint')
+ = f.input :callback_url, :label => t('pager_groups.form.callback_url.label'), :hint => conditional_hint('pager_groups.form.callback_url.hint')
diff --git a/app/views/pager_groups/_index_core.html.haml b/app/views/pager_groups/_index_core.html.haml
new file mode 100644
index 0000000..9515bcf
--- /dev/null
+++ b/app/views/pager_groups/_index_core.html.haml
@@ -0,0 +1,11 @@
+%table.table.table-striped
+ %tr
+ %th= t('pager_groups.index.sip_account_id')
+ %th= t('pager_groups.index.callback_url')
+
+
+ - for pager_group in pager_groups
+ %tr
+ %td= pager_group.sip_account_id
+ %td= pager_group.callback_url
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => pager_group} \ No newline at end of file
diff --git a/app/views/pager_groups/edit.html.haml b/app/views/pager_groups/edit.html.haml
new file mode 100644
index 0000000..ec71984
--- /dev/null
+++ b/app/views/pager_groups/edit.html.haml
@@ -0,0 +1,3 @@
+- content_for :title, t("pager_groups.edit.page_title")
+
+= render "form" \ No newline at end of file
diff --git a/app/views/pager_groups/index.html.haml b/app/views/pager_groups/index.html.haml
new file mode 100644
index 0000000..455e90e
--- /dev/null
+++ b/app/views/pager_groups/index.html.haml
@@ -0,0 +1,6 @@
+- content_for :title, t("pager_groups.index.page_title")
+
+- if @pager_groups && @pager_groups.count > 0
+ = render "index_core", :pager_groups => @pager_groups
+
+= render :partial => 'shared/create_link', :locals => {:child_class => PagerGroup} \ No newline at end of file
diff --git a/app/views/pager_groups/new.html.haml b/app/views/pager_groups/new.html.haml
new file mode 100644
index 0000000..fbb6ac3
--- /dev/null
+++ b/app/views/pager_groups/new.html.haml
@@ -0,0 +1,3 @@
+- content_for :title, t("pager_groups.new.page_title")
+
+= render "form" \ No newline at end of file
diff --git a/app/views/pager_groups/show.html.haml b/app/views/pager_groups/show.html.haml
new file mode 100644
index 0000000..5e0a8c7
--- /dev/null
+++ b/app/views/pager_groups/show.html.haml
@@ -0,0 +1,10 @@
+- content_for :title, t("pager_groups.show.page_title")
+
+%p
+ %strong= t('pager_groups.show.sip_account_id') + ":"
+ = @pager_group.sip_account_id
+%p
+ %strong= t('pager_groups.show.callback_url') + ":"
+ = @pager_group.callback_url
+
+= render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @pager_group } \ No newline at end of file
diff --git a/app/views/phones/_index_core.html.haml b/app/views/phones/_index_core.html.haml
index 9a865f0..175aeb0 100644
--- a/app/views/phones/_index_core.html.haml
+++ b/app/views/phones/_index_core.html.haml
@@ -1,22 +1,30 @@
+- if defined?(phones.total_pages)
+ = will_paginate phones, :renderer => BootstrapPagination::Rails, :previous_label => raw('<i class = "icon-chevron-left"></i>'), :next_label => raw('<i class = "icon-chevron-right"></i>')
+
%table.table.table-striped
%thead
%tr
- %th= t('phones.index.mac_address')
+ - if defined?(show_phoneable) && show_phoneable
+ %th= sortable :phoneable_id, t('phones.index.phoneable')
+ %th= sortable :mac_address, t('phones.index.mac_address')
%th
%span.hidden-phone
- = t('phones.index.phone_model_id')
+ = sortable :phone_model_id, t('phones.index.phone_model_id')
%span.visible-phone
= truncate(t('phones.index.phone_model_id'), :length => 9)
%th
%span.hidden-phone
- = t('phones.index.hot_deskable')
+ = sortable :hot_deskable, t('phones.index.hot_deskable')
%th
%span.hidden-phone
- = t('phones.index.ip_address')
+ = sortable :ip_address, t('phones.index.ip_address')
%tbody
- for phone in phones
%tr{:class => (phone.ip_address.blank? ? 'warning' : '')}
+ - if defined?(show_phoneable) && show_phoneable
+ %td
+ = phone.phoneable
%td= phone.pretty_mac_address
%td= phone.phone_model
%td
diff --git a/app/views/phones/index.html.haml b/app/views/phones/index.html.haml
index 4de7919..8e61706 100644
--- a/app/views/phones/index.html.haml
+++ b/app/views/phones/index.html.haml
@@ -1,6 +1,6 @@
- content_for :title, t("phones.index.page_title")
- if @phones.count > 0
- = render "index_core", :phones => @phones
+ = render "index_core", :phones => @phones, :show_phoneable => (@parent.class == Tenant)
= render :partial => 'shared/create_link', :locals => {:parent => @parent, :child_class => Phone} \ No newline at end of file
diff --git a/app/views/sip_accounts/_form_core.html.haml b/app/views/sip_accounts/_form_core.html.haml
index d7c65d0..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')
@@ -14,3 +13,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/_index_core.html.haml b/app/views/sip_accounts/_index_core.html.haml
index d98ea0a..be1f4cb 100644
--- a/app/views/sip_accounts/_index_core.html.haml
+++ b/app/views/sip_accounts/_index_core.html.haml
@@ -1,10 +1,16 @@
+
+- if defined?(users.total_pages)
+ = will_paginate users, :renderer => BootstrapPagination::Rails, :previous_label => raw('<i class = "icon-chevron-left"></i>'), :next_label => raw('<i class = "icon-chevron-right"></i>')
+
%table.table.table-striped
%thead
%tr
+ - if defined?(show_sip_accountable) && show_sip_accountable
+ %th= sortable :sip_accountable_id, t('sip_accounts.index.sip_accountable')
%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')
@@ -16,6 +22,9 @@
%tbody
- for sip_account in sip_accounts
%tr{:class => (sip_account.registration ? '' : 'warning')}
+ - if defined?(show_sip_accountable) && show_sip_accountable
+ %td
+ = sip_account.sip_accountable
%td
- if sip_account.registration
%i.icon-ok
diff --git a/app/views/sip_accounts/index.html.haml b/app/views/sip_accounts/index.html.haml
index fbdba48..114943e 100644
--- a/app/views/sip_accounts/index.html.haml
+++ b/app/views/sip_accounts/index.html.haml
@@ -1,6 +1,6 @@
- content_for :title, t("sip_accounts.index.page_title")
- if @sip_accounts.count > 0
- = render "index_core", :sip_accounts => @sip_accounts
+ = render "index_core", :sip_accounts => @sip_accounts, :show_sip_accountable => (@parent.class == Tenant)
= render :partial => 'shared/create_link', :locals => {:parent => @parent, :child_class => SipAccount} \ No newline at end of file
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/switchboards/_form_core.html.haml b/app/views/switchboards/_form_core.html.haml
index 61b5934..2258640 100644
--- a/app/views/switchboards/_form_core.html.haml
+++ b/app/views/switchboards/_form_core.html.haml
@@ -1,2 +1,6 @@
.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')
+ = 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.haml b/app/views/switchboards/show-old.html.haml
index a825806..a825806 100644
--- a/app/views/switchboards/show.html.haml
+++ b/app/views/switchboards/show-old.html.haml
diff --git a/app/views/switchboards/show.html.erb b/app/views/switchboards/show.html.erb
new file mode 100644
index 0000000..2a2765f
--- /dev/null
+++ b/app/views/switchboards/show.html.erb
@@ -0,0 +1,79 @@
+<% content_for :title, "Switchboard #{@switchboard.name}" %>
+
+<script>
+ 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 %>;
+</script>
+
+<div class='row'>
+ <div class='span12'>
+ <div id='emberjs-container'></div>
+
+ <script type="text/x-handlebars">
+ {{outlet}}
+ </script>
+
+ <script type="text/x-handlebars" data-template-name="switchboard">
+ <h2>{{name}}</h2>
+
+ {{#if switchboardEntrys.length}}
+ <ul class="thumbnails">
+ {{#each switchboardEntry in switchboardEntrys}}
+ <li class="span2">
+ <div class="thumbnail">
+ {{avatar_img switchboardEntry.avatar_src}}
+ <small>
+ <p>
+ <span class="label">{{switchboardEntry.name}}</span>
+
+ {{#each phoneNumber in switchboardEntry.sipAccount.phoneNumberShortList}}
+ <span class="label">
+ {{phoneNumber.number}}
+ </span>
+ {{/each}}
+ </p>
+
+ {{show_callstate switchboardEntry.callstate}}
+ {{#if switchboardEntry.sipAccount.calls.length}}
+ <p>
+ Anrufe:
+ <br>
+ {{#each call in switchboardEntry.sipAccount.calls}}
+ <span {{bindAttr class=":label call.isActive:label-success"}}>
+ {{call.b_caller_id_number}} -> {{call.destination}}
+ {{#if call.isActive}}
+ *
+ {{/if}}
+ </span>
+ {{/each}}
+ </p>
+ {{/if}}
+
+ {{#if activeCalls.length}}
+ <p>
+ Verbinden mit:
+ <br>
+ {{#each activeCall in activeCalls}}
+ <button {{action blind_transfer}}>
+ {{activeCall.b_caller_id_number}}
+ </button>
+ {{/each}}
+ </p>
+ {{/if}}
+ </small>
+ </div>
+ </li>
+ {{/each}}
+ </ul>
+ {{/if}}
+ </script>
+
+ </div>
+</div>
+
+<script src="/js/libs/handlebars.js"></script>
+<script src="/js/libs/ember.js"></script>
+<script src="/js/libs/ember-data.js"></script>
+<script src="/js/app.js"></script>
diff --git a/app/views/tenants/_admin_area.de.html.haml b/app/views/tenants/_admin_area.de.html.haml
index 8acc95d..db21c80 100644
--- a/app/views/tenants/_admin_area.de.html.haml
+++ b/app/views/tenants/_admin_area.de.html.haml
@@ -16,10 +16,16 @@
= 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
%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 c40e3ca..4b687af 100644
--- a/app/views/tenants/_admin_area.en.html.haml
+++ b/app/views/tenants/_admin_area.en.html.haml
@@ -12,14 +12,21 @@
= 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}
+ = render :partial => 'tenants/table_of_voicemail_accounts', :locals => {:tenant => tenant}
+
+ = render :partial => 'generic_files', :locals => {:tenant => tenant}
+
.well
%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
@@ -42,4 +49,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
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
diff --git a/app/views/tenants/_table_of_phones.html.haml b/app/views/tenants/_table_of_phones.html.haml
index e87191d..9736ece 100644
--- a/app/views/tenants/_table_of_phones.html.haml
+++ b/app/views/tenants/_table_of_phones.html.haml
@@ -1,7 +1,11 @@
-- cache(['tenant_show_table_of_phones', I18n.locale, tenant, tenant.phones.count, tenant.phones.reorder(:updated_at).last]) do
+- phones = @tenant.tenant_user_phones
+- cache(['tenant_show_table_of_phones', I18n.locale, tenant, phones.count, phones.reorder(:updated_at).last]) do
-# Phones
-#
%h2= t('phones.index.page_title')
- - if tenant.phones.any?
- = render "phones/index_core", :phones => tenant.phones
- = render :partial => 'shared/create_link', :locals => {:parent => tenant, :child_class => Phone}
+ - if phones.count <= GsParameter.get('NUMBER_OF_SHOWN_ITEMS')
+ = render "phones/index_core", :phones => phones, :show_phoneable => true
+ = render :partial => 'shared/create_link', :locals => {:parent => tenant, :child_class => Phone}
+ - else
+ %p
+ = link_to t('phones.index.page_title'), tenant_phones_path(tenant)
diff --git a/app/views/tenants/_table_of_sip_accounts.html.haml b/app/views/tenants/_table_of_sip_accounts.html.haml
index b2f2612..4a1d570 100644
--- a/app/views/tenants/_table_of_sip_accounts.html.haml
+++ b/app/views/tenants/_table_of_sip_accounts.html.haml
@@ -5,7 +5,7 @@
-#
%h2= t('sip_accounts.index.page_title')
- if tenant.sip_accounts.any?
- = render "sip_accounts/index_core", :sip_accounts => tenant.sip_accounts
+ = render "sip_accounts/index_core", :sip_accounts => tenant.sip_accounts, :show_sip_accountable => true
= render :partial => 'shared/create_link', :locals => {:parent => tenant, :child_class => SipAccount}
.span8
@@ -18,7 +18,11 @@
.span12
-# SIP accounts
-#
+ - sip_accounts = @tenant.tenant_user_sip_accounts
%h2= t('sip_accounts.index.page_title')
- - if tenant.sip_accounts.any?
- = render "sip_accounts/index_core", :sip_accounts => tenant.sip_accounts
- = render :partial => 'shared/create_link', :locals => {:parent => tenant, :child_class => SipAccount}
+ - if sip_accounts.count <= GsParameter.get('NUMBER_OF_SHOWN_ITEMS')
+ = render "sip_accounts/index_core", :sip_accounts => sip_accounts, :show_sip_accountable => true
+ = render :partial => 'shared/create_link', :locals => {:parent => tenant, :child_class => SipAccount}
+ - else
+ %p
+ = link_to t('sip_accounts.index.page_title'), tenant_sip_accounts_path(tenant)
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}
diff --git a/app/views/tenants/_users_table.html.haml b/app/views/tenants/_users_table.html.haml
index 850ea5e..099b27a 100644
--- a/app/views/tenants/_users_table.html.haml
+++ b/app/views/tenants/_users_table.html.haml
@@ -4,4 +4,4 @@
= render :partial => 'shared/create_link', :locals => {:parent => tenant, :child_class => User}
- else
%p
- = link_to "Liste aller User.", tenant_users_path(tenant) \ No newline at end of file
+ = link_to t('users.index.page_title'), tenant_users_path(tenant)
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/_index_core.html.haml b/app/views/users/_index_core.html.haml
index 9d63afc..7038457 100644
--- a/app/views/users/_index_core.html.haml
+++ b/app/views/users/_index_core.html.haml
@@ -1,16 +1,20 @@
-- cache(['user_table_row_inner_td', I18n.locale, current_user, users.reorder(:updated_at).last, users.count, GsParameter.get('NUMBER_OF_SHOWN_ITEMS')]) do
+- cache(['user_table_row_inner_td', I18n.locale, current_user, users.reorder(:updated_at).last, users.first, users.last, GsParameter.get('NUMBER_OF_SHOWN_ITEMS')]) do
+
+ - if defined?(users.total_pages)
+ = will_paginate users, :renderer => BootstrapPagination::Rails, :previous_label => raw('<i class = "icon-chevron-left"></i>'), :next_label => raw('<i class = "icon-chevron-right"></i>')
+
%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
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 98f7cc6..697604a 100644
--- a/app/views/users/show.html.haml
+++ b/app/views/users/show.html.haml
@@ -43,13 +43,12 @@
%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
=link_to t("ringtones.show.page_title"), sip_account_ringtones_path(sip_account)
@@ -85,8 +84,14 @@
- 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}
- 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
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..cd87c31
--- /dev/null
+++ b/app/views/voicemail_accounts/_index_core.html.haml
@@ -0,0 +1,18 @@
+%table.table.table-striped
+ %tr
+ %th
+ %th= t('voicemail_accounts.index.name')
+ %th= t('voicemail_messages.index.page_title')
+
+
+ - for voicemail_account in voicemail_accounts
+ %tr
+ %td
+ - if voicemail_account.active
+ %i.icon-ok
+ - else
+ %i.icon-ban-circle
+ %td= voicemail_account.name
+ %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}
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..8c75c93
--- /dev/null
+++ b/app/views/voicemail_accounts/show.html.haml
@@ -0,0 +1,16 @@
+- content_for :title, t("voicemail_accounts.show.page_title")
+
+%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 }
diff --git a/app/views/voicemail_messages/_index_core.html.haml b/app/views/voicemail_messages/_index_core.html.haml
index 5e82761..f93365c 100644
--- a/app/views/voicemail_messages/_index_core.html.haml
+++ b/app/views/voicemail_messages/_index_core.html.haml
@@ -1,45 +1,77 @@
-= form_tag(destroy_multiple_sip_account_voicemail_messages_path(@sip_account), :method => :delete, :id => 'voicemail_message_form') do
- %header.entries-nav= render :partial => "voicemail_messages/navigation"
- .content
- %table.table.table-striped
-
- - for voicemail_message in voicemail_messages
- %tr.voicemail-messages-entry{: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
- .phone= voicemail_message.cid_number
- %td.status
- .duration= voicemail_message.display_duration
- %td
- - if ! voicemail_message.flags.blank?
- = 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
- %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
- - else
- = link_to t('voicemail_messages.index.actions.mark_read'), mark_read_sip_account_voicemail_message_path(@sip_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
+= render :partial => "voicemail_messages/navigation", :locals => {:type => @type}
+
+- 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
+ - 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("<i class = 'icon-download'></i> ") + 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("<i class = 'icon-envelope'></i> ") + t('voicemail_messages.index.actions.mark_unread'), mark_unread_voicemail_account_voicemail_message_path(@voicemail_account, voicemail_message), :method => :put
+ - else
+ = link_to raw("<i class = 'icon-bullhorn'></i> ") + 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("<i class = 'icon-bell'></i> ") + t('voicemail_messages.index.actions.call'), call_voicemail_account_voicemail_message_path(@voicemail_account, voicemail_message), :method => :put, :class => 'btn btn-mini'
- %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")
+ - if can? :destroy, voicemail_message
+ = link_to raw("<i class = 'icon-trash icon-white'></i> ") + 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..225801c 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
+%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
+ = will_paginate @voicemail_messages, :renderer => BootstrapPagination::Rails, :previous_label => raw('<i class = "icon-chevron-left"></i>'), :next_label => raw('<i class = "icon-chevron-right"></i>'), :class => nil
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/_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..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
- = 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')
+.inputs
+ = 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')
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..9173fe6
--- /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= 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}
diff --git a/app/views/voicemail_settings/edit.html.haml b/app/views/voicemail_settings/edit.html.haml
index 56e5765..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"
+= render "edit_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..277874e 100644
--- a/app/views/voicemail_settings/show.html.haml
+++ b/app/views/voicemail_settings/show.html.haml
@@ -1,26 +1,16 @@
- 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.name') + ":"
+ = @voicemail_setting.name
%p
- %strong= t('voicemail_settings.show.name_path') + ":"
- = File.basename(@voicemail_setting.name_path.to_s)
-
+ %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