summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2012-12-17 12:01:45 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2012-12-17 12:01:45 +0100
commitb80bd744ad873f6fc43018bc4bfb90677de167bd (patch)
tree072c4b0e33d442528555b82c415f5e7a1712b2b0 /app/views
parent3e706c2025ecc5523e81ad649639ef2ff75e7bac (diff)
Start of GS5.
Diffstat (limited to 'app/views')
-rw-r--r--app/views/access_authorizations/_form.html.haml7
-rw-r--r--app/views/access_authorizations/_form_core.html.haml11
-rw-r--r--app/views/access_authorizations/_index_core.html.haml21
-rw-r--r--app/views/access_authorizations/edit.html.haml3
-rw-r--r--app/views/access_authorizations/index.html.haml6
-rw-r--r--app/views/access_authorizations/new.html.haml3
-rw-r--r--app/views/access_authorizations/show.html.haml22
-rw-r--r--app/views/acd_agents/_form.html.haml7
-rw-r--r--app/views/acd_agents/_form_core.html.haml7
-rw-r--r--app/views/acd_agents/_index_core.html.haml18
-rw-r--r--app/views/acd_agents/_listing.html.haml8
-rw-r--r--app/views/acd_agents/edit.html.haml3
-rw-r--r--app/views/acd_agents/index.html.haml6
-rw-r--r--app/views/acd_agents/new.html.haml3
-rw-r--r--app/views/acd_agents/show.html.haml28
-rw-r--r--app/views/acd_callers/_index_core.html.haml21
-rw-r--r--app/views/acd_callers/index.html.haml6
-rw-r--r--app/views/acd_callers/show.html.haml25
-rw-r--r--app/views/addresses/_form.html.haml7
-rw-r--r--app/views/addresses/_form_core.html.haml9
-rw-r--r--app/views/addresses/_index_core.html.haml23
-rw-r--r--app/views/addresses/edit.html.haml9
-rw-r--r--app/views/addresses/index.html.haml6
-rw-r--r--app/views/addresses/new.html.haml3
-rw-r--r--app/views/addresses/show.html.haml28
-rw-r--r--app/views/api/rows/_form.html.erb21
-rw-r--r--app/views/api/rows/edit.html.erb3
-rw-r--r--app/views/api/rows/index.html.erb29
-rw-r--r--app/views/api/rows/new.html.erb3
-rw-r--r--app/views/api/rows/show.html.erb56
-rw-r--r--app/views/automatic_call_distributors/_form.html.haml8
-rw-r--r--app/views/automatic_call_distributors/_form_core.html.haml16
-rw-r--r--app/views/automatic_call_distributors/_index_core.html.haml39
-rw-r--r--app/views/automatic_call_distributors/edit.html.haml3
-rw-r--r--app/views/automatic_call_distributors/index.html.haml6
-rw-r--r--app/views/automatic_call_distributors/new.html.haml3
-rw-r--r--app/views/automatic_call_distributors/show.html.haml59
-rw-r--r--app/views/call_forwards/_form.html.haml7
-rw-r--r--app/views/call_forwards/_form_core.html.haml15
-rw-r--r--app/views/call_forwards/_index_core.html.haml31
-rw-r--r--app/views/call_forwards/edit.html.haml3
-rw-r--r--app/views/call_forwards/index.html.haml6
-rw-r--r--app/views/call_forwards/new.html.haml3
-rw-r--r--app/views/call_forwards/show.html.haml33
-rw-r--r--app/views/call_histories/_index_core.html.haml65
-rw-r--r--app/views/call_histories/_navigation.html.haml11
-rw-r--r--app/views/call_histories/index.html.haml6
-rw-r--r--app/views/calls/_index_core.html.haml9
-rw-r--r--app/views/calls/index.html.haml6
-rw-r--r--app/views/callthroughs/_form.html.haml7
-rw-r--r--app/views/callthroughs/_form_core.html.haml24
-rw-r--r--app/views/callthroughs/_index_core.html.haml17
-rw-r--r--app/views/callthroughs/edit.html.haml3
-rw-r--r--app/views/callthroughs/index.html.haml6
-rw-r--r--app/views/callthroughs/new.html.haml3
-rw-r--r--app/views/callthroughs/show.html.haml27
-rw-r--r--app/views/conference_invitees/_form.html.haml7
-rw-r--r--app/views/conference_invitees/_form_core.html.haml7
-rw-r--r--app/views/conference_invitees/_index_core.html.haml17
-rw-r--r--app/views/conference_invitees/edit.html.haml3
-rw-r--r--app/views/conference_invitees/index.html.haml6
-rw-r--r--app/views/conference_invitees/new.html.haml3
-rw-r--r--app/views/conference_invitees/show.html.haml20
-rw-r--r--app/views/conferences/_form.html.haml7
-rw-r--r--app/views/conferences/_form_core.html.haml11
-rw-r--r--app/views/conferences/_index_core.html.haml53
-rw-r--r--app/views/conferences/edit.html.haml3
-rw-r--r--app/views/conferences/index.html.haml6
-rw-r--r--app/views/conferences/new.html.haml3
-rw-r--r--app/views/conferences/show.html.haml43
-rw-r--r--app/views/config_polycom/_call_history.xml.haml18
-rw-r--r--app/views/config_polycom/_call_history_menu.xml.haml13
-rw-r--r--app/views/config_polycom/_phone_book.xml.haml18
-rw-r--r--app/views/config_polycom/config_files.xml.builder12
-rw-r--r--app/views/config_polycom/idle_screen.xml.haml7
-rw-r--r--app/views/config_polycom/settings.xml.erb8
-rw-r--r--app/views/config_polycom/settings_directory.xml.haml16
-rw-r--r--app/views/config_siemens/_menu_list.xml.haml33
-rw-r--r--app/views/config_siemens/clean-up.xml.erb5
-rw-r--r--app/views/config_siemens/index.xml.erb5
-rw-r--r--app/views/config_siemens/write.xml.erb10
-rw-r--r--app/views/config_snom/_snom_phone_directory.xml.haml19
-rw-r--r--app/views/config_snom/_snom_phone_input.xml.haml19
-rw-r--r--app/views/config_snom/_snom_phone_menu.xml.haml17
-rw-r--r--app/views/config_snom/_snom_phone_text.xml.haml16
-rw-r--r--app/views/config_snom/call_history.xml.haml2
-rw-r--r--app/views/config_snom/idle_screen.xml.haml33
-rw-r--r--app/views/config_snom/log_in.xml.haml3
-rw-r--r--app/views/config_snom/show.xml.haml151
-rw-r--r--app/views/config_snom/state_settings.xml.haml49
-rw-r--r--app/views/config_snom/switch_protocol.xml.builder18
-rw-r--r--app/views/fax_accounts/_form.html.haml7
-rw-r--r--app/views/fax_accounts/_form_core.html.haml11
-rw-r--r--app/views/fax_accounts/_index_core.html.haml35
-rw-r--r--app/views/fax_accounts/edit.html.haml3
-rw-r--r--app/views/fax_accounts/index.html.haml6
-rw-r--r--app/views/fax_accounts/new.html.haml3
-rw-r--r--app/views/fax_accounts/show.html.haml21
-rw-r--r--app/views/fax_documents/_form.html.haml7
-rw-r--r--app/views/fax_documents/_form_core.html.haml7
-rw-r--r--app/views/fax_documents/_index_core.html.haml33
-rw-r--r--app/views/fax_documents/edit.html.haml9
-rw-r--r--app/views/fax_documents/index.html.haml5
-rw-r--r--app/views/fax_documents/new.html.haml3
-rw-r--r--app/views/fax_documents/show.html.haml36
-rw-r--r--app/views/freeswitch_voicemail_msgs/_index_core.html.haml12
-rw-r--r--app/views/freeswitch_voicemail_msgs/index.html.haml3
-rw-r--r--app/views/gemeinschaft_setups/new.de.html.haml25
-rw-r--r--app/views/gemeinschaft_setups/new.html.haml25
-rw-r--r--app/views/gs_cluster_sync_log_entries/_form.html.haml7
-rw-r--r--app/views/gs_cluster_sync_log_entries/_form_core.html.haml6
-rw-r--r--app/views/gs_cluster_sync_log_entries/_index_core.html.haml17
-rw-r--r--app/views/gs_cluster_sync_log_entries/edit.html.haml3
-rw-r--r--app/views/gs_cluster_sync_log_entries/index.html.haml6
-rw-r--r--app/views/gs_cluster_sync_log_entries/new.html.haml3
-rw-r--r--app/views/gs_cluster_sync_log_entries/show.html.haml19
-rw-r--r--app/views/gs_nodes/_form.html.haml7
-rw-r--r--app/views/gs_nodes/_form_core.html.haml7
-rw-r--r--app/views/gs_nodes/_index_core.html.haml19
-rw-r--r--app/views/gs_nodes/edit.html.haml3
-rw-r--r--app/views/gs_nodes/index.html.haml6
-rw-r--r--app/views/gs_nodes/new.html.haml3
-rw-r--r--app/views/gs_nodes/show.html.haml22
-rw-r--r--app/views/gs_nodes/sync.xml.haml88
-rw-r--r--app/views/gui_functions/_form.html.haml7
-rw-r--r--app/views/gui_functions/_form_core.html.haml10
-rw-r--r--app/views/gui_functions/_index_core.html.haml26
-rw-r--r--app/views/gui_functions/edit.html.haml3
-rw-r--r--app/views/gui_functions/index.html.haml6
-rw-r--r--app/views/gui_functions/new.html.haml3
-rw-r--r--app/views/gui_functions/show.html.haml18
-rw-r--r--app/views/hunt_group_members/_form.html.haml7
-rw-r--r--app/views/hunt_group_members/_form_core.html.haml4
-rw-r--r--app/views/hunt_group_members/_index_core.html.haml20
-rw-r--r--app/views/hunt_group_members/_listing.html.haml8
-rw-r--r--app/views/hunt_group_members/edit.html.haml3
-rw-r--r--app/views/hunt_group_members/index.html.haml6
-rw-r--r--app/views/hunt_group_members/new.html.haml3
-rw-r--r--app/views/hunt_group_members/show.html.haml19
-rw-r--r--app/views/hunt_groups/_form.html.haml7
-rw-r--r--app/views/hunt_groups/_form_core.html.haml4
-rw-r--r--app/views/hunt_groups/_index_core.html.haml34
-rw-r--r--app/views/hunt_groups/edit.html.haml3
-rw-r--r--app/views/hunt_groups/index.html.haml6
-rw-r--r--app/views/hunt_groups/new.html.haml3
-rw-r--r--app/views/hunt_groups/show.html.haml26
-rw-r--r--app/views/layouts/application.html.haml46
-rw-r--r--app/views/manufacturers/_form.html.haml7
-rw-r--r--app/views/manufacturers/_form_core.html.haml4
-rw-r--r--app/views/manufacturers/_index_core.html.haml18
-rw-r--r--app/views/manufacturers/edit.html.haml3
-rw-r--r--app/views/manufacturers/index.html.haml5
-rw-r--r--app/views/manufacturers/new.html.haml3
-rw-r--r--app/views/manufacturers/show.html.haml18
-rw-r--r--app/views/notifications/new_fax.text.erb8
-rw-r--r--app/views/notifications/new_password.text.erb3
-rw-r--r--app/views/notifications/new_pin.text.erb7
-rw-r--r--app/views/notifications/new_voicemail.text.erb9
-rw-r--r--app/views/page/conference.html.haml80
-rw-r--r--app/views/page/index.de.html.haml16
-rw-r--r--app/views/page/index.html.haml16
-rw-r--r--app/views/phone_book_entries/_form.html.haml7
-rw-r--r--app/views/phone_book_entries/_form_core.html.haml27
-rw-r--r--app/views/phone_book_entries/_index_core.de.html.haml36
-rw-r--r--app/views/phone_book_entries/_index_core.html.haml36
-rw-r--r--app/views/phone_book_entries/_navigation.html.haml8
-rw-r--r--app/views/phone_book_entries/edit.html.haml9
-rw-r--r--app/views/phone_book_entries/index.html.haml19
-rw-r--r--app/views/phone_book_entries/new.html.haml3
-rw-r--r--app/views/phone_book_entries/show.html.haml146
-rw-r--r--app/views/phone_book_entries/show.html.haml.examlple194
-rw-r--r--app/views/phone_books/_form.html.haml7
-rw-r--r--app/views/phone_books/_form_core.html.haml3
-rw-r--r--app/views/phone_books/_index_core.html.haml16
-rw-r--r--app/views/phone_books/edit.html.haml3
-rw-r--r--app/views/phone_books/index.html.haml6
-rw-r--r--app/views/phone_books/new.html.haml3
-rw-r--r--app/views/phone_books/show.html.haml13
-rw-r--r--app/views/phone_models/_form.html.haml7
-rw-r--r--app/views/phone_models/_form_core.html.haml4
-rw-r--r--app/views/phone_models/_index_core.html.haml19
-rw-r--r--app/views/phone_models/edit.html.haml3
-rw-r--r--app/views/phone_models/index.html.haml6
-rw-r--r--app/views/phone_models/new.html.haml3
-rw-r--r--app/views/phone_models/show.html.haml18
-rw-r--r--app/views/phone_number_ranges/_form.html.haml7
-rw-r--r--app/views/phone_number_ranges/_form_core.html.haml3
-rw-r--r--app/views/phone_number_ranges/_index_core.html.haml21
-rw-r--r--app/views/phone_number_ranges/edit.html.haml3
-rw-r--r--app/views/phone_number_ranges/index.html.haml6
-rw-r--r--app/views/phone_number_ranges/new.html.haml3
-rw-r--r--app/views/phone_number_ranges/show.html.haml18
-rw-r--r--app/views/phone_numbers/_form.html.haml7
-rw-r--r--app/views/phone_numbers/_form_core.html.haml10
-rw-r--r--app/views/phone_numbers/_index_core.html.haml13
-rw-r--r--app/views/phone_numbers/_listing.html.haml8
-rw-r--r--app/views/phone_numbers/edit.html.haml3
-rw-r--r--app/views/phone_numbers/index.html.haml6
-rw-r--r--app/views/phone_numbers/new.html.haml3
-rw-r--r--app/views/phone_numbers/show.html.haml27
-rw-r--r--app/views/phone_sip_accounts/_form.html.haml7
-rw-r--r--app/views/phone_sip_accounts/_form_core.html.haml2
-rw-r--r--app/views/phone_sip_accounts/_index_core.html.haml13
-rw-r--r--app/views/phone_sip_accounts/index.html.haml6
-rw-r--r--app/views/phone_sip_accounts/new.html.haml3
-rw-r--r--app/views/phone_sip_accounts/show.html.haml13
-rw-r--r--app/views/phones/_form.html.haml7
-rw-r--r--app/views/phones/_form_core.html.haml8
-rw-r--r--app/views/phones/_index_core.html.haml15
-rw-r--r--app/views/phones/edit.html.haml3
-rw-r--r--app/views/phones/index.html.haml6
-rw-r--r--app/views/phones/new.html.haml3
-rw-r--r--app/views/phones/show.html.haml31
-rw-r--r--app/views/ringtones/_form.html.haml7
-rw-r--r--app/views/ringtones/_form_core.html.haml3
-rw-r--r--app/views/ringtones/_index_core.html.haml11
-rw-r--r--app/views/ringtones/edit.html.haml3
-rw-r--r--app/views/ringtones/index.html.haml6
-rw-r--r--app/views/ringtones/new.html.haml3
-rw-r--r--app/views/ringtones/show.html.haml12
-rw-r--r--app/views/sessions/new.html.haml8
-rw-r--r--app/views/shared/_create_link.html.haml11
-rw-r--r--app/views/shared/_flash.html.haml19
-rw-r--r--app/views/shared/_header.de.html.haml41
-rw-r--r--app/views/shared/_header.html.haml41
-rw-r--r--app/views/shared/_index_view_edit_destroy_part.html.haml29
-rw-r--r--app/views/shared/_show_edit_destroy_part.html.haml16
-rw-r--r--app/views/shared/_system_message.html.haml10
-rw-r--r--app/views/sip_accounts/_form.html.haml7
-rw-r--r--app/views/sip_accounts/_form_core.html.haml12
-rw-r--r--app/views/sip_accounts/_index_core.html.haml28
-rw-r--r--app/views/sip_accounts/edit.html.haml3
-rw-r--r--app/views/sip_accounts/index.html.haml6
-rw-r--r--app/views/sip_accounts/new.html.haml3
-rw-r--r--app/views/sip_accounts/show.html.haml50
-rw-r--r--app/views/sip_domains/_form.html.haml7
-rw-r--r--app/views/sip_domains/_form_core.html.haml3
-rw-r--r--app/views/sip_domains/_index_core.html.haml11
-rw-r--r--app/views/sip_domains/edit.html.haml3
-rw-r--r--app/views/sip_domains/index.html.haml6
-rw-r--r--app/views/sip_domains/new.html.haml3
-rw-r--r--app/views/sip_domains/show.html.haml10
-rw-r--r--app/views/softkeys/_form.html.haml7
-rw-r--r--app/views/softkeys/_form_core.html.haml12
-rw-r--r--app/views/softkeys/_index_core.html.haml14
-rw-r--r--app/views/softkeys/edit.html.haml3
-rw-r--r--app/views/softkeys/index.html.haml6
-rw-r--r--app/views/softkeys/new.html.haml3
-rw-r--r--app/views/softkeys/show.html.haml7
-rw-r--r--app/views/system_messages/_form.html.haml7
-rw-r--r--app/views/system_messages/_form_core.html.haml2
-rw-r--r--app/views/system_messages/_index_core.html.haml11
-rw-r--r--app/views/system_messages/index.html.haml3
-rw-r--r--app/views/system_messages/new.html.haml3
-rw-r--r--app/views/system_messages/show.html.haml8
-rw-r--r--app/views/tenants/_admin_area.de.html.haml118
-rw-r--r--app/views/tenants/_admin_area.html.haml116
-rw-r--r--app/views/tenants/_form.html.haml24
-rw-r--r--app/views/tenants/_form_core.html.haml3
-rw-r--r--app/views/tenants/_index_core.html.haml17
-rw-r--r--app/views/tenants/edit.html.haml3
-rw-r--r--app/views/tenants/index.html.haml6
-rw-r--r--app/views/tenants/new.html.haml3
-rw-r--r--app/views/tenants/show.html.haml14
-rw-r--r--app/views/user_group_memberships/_form.html.haml7
-rw-r--r--app/views/user_group_memberships/_form_core.html.haml2
-rw-r--r--app/views/user_group_memberships/_index_core.html.haml13
-rw-r--r--app/views/user_group_memberships/edit.html.haml3
-rw-r--r--app/views/user_group_memberships/index.html.haml7
-rw-r--r--app/views/user_group_memberships/new.html.haml3
-rw-r--r--app/views/user_group_memberships/show.html.haml7
-rw-r--r--app/views/user_groups/_form.html.haml7
-rw-r--r--app/views/user_groups/_form_core.html.haml3
-rw-r--r--app/views/user_groups/_index_core.html.haml24
-rw-r--r--app/views/user_groups/edit.html.haml3
-rw-r--r--app/views/user_groups/index.html.haml6
-rw-r--r--app/views/user_groups/new.html.haml3
-rw-r--r--app/views/user_groups/show.html.haml20
-rw-r--r--app/views/users/_form.html.haml16
-rw-r--r--app/views/users/_form_core.html.haml27
-rw-r--r--app/views/users/_index_core.html.haml18
-rw-r--r--app/views/users/_listing.html.haml8
-rw-r--r--app/views/users/edit.html.haml3
-rw-r--r--app/views/users/index.html.haml6
-rw-r--r--app/views/users/new.html.haml3
-rw-r--r--app/views/users/show.html.haml96
-rw-r--r--app/views/voicemail_messages/_index_core.html.haml44
-rw-r--r--app/views/voicemail_messages/_navigation.html.haml9
-rw-r--r--app/views/voicemail_messages/index.html.haml6
-rw-r--r--app/views/voicemail_settings/_form.html.haml7
-rw-r--r--app/views/voicemail_settings/_form_core.html.haml11
-rw-r--r--app/views/voicemail_settings/edit.html.haml3
-rw-r--r--app/views/voicemail_settings/show.html.haml26
-rw-r--r--app/views/whitelists/_form.html.haml7
-rw-r--r--app/views/whitelists/_form_core.html.haml8
-rw-r--r--app/views/whitelists/_index_core.html.haml15
-rw-r--r--app/views/whitelists/edit.html.haml3
-rw-r--r--app/views/whitelists/index.html.haml6
-rw-r--r--app/views/whitelists/new.html.haml3
-rw-r--r--app/views/whitelists/show.html.haml7
300 files changed, 4468 insertions, 0 deletions
diff --git a/app/views/access_authorizations/_form.html.haml b/app/views/access_authorizations/_form.html.haml
new file mode 100644
index 0000000..fa417d9
--- /dev/null
+++ b/app/views/access_authorizations/_form.html.haml
@@ -0,0 +1,7 @@
+= simple_form_for([@parent, @access_authorization]) do |f|
+ = f.error_notification
+
+ = render "form_core", :f => f
+
+ .actions
+ = f.button :submit, conditional_t('access_authorizations.form.submit') \ No newline at end of file
diff --git a/app/views/access_authorizations/_form_core.html.haml b/app/views/access_authorizations/_form_core.html.haml
new file mode 100644
index 0000000..10530d7
--- /dev/null
+++ b/app/views/access_authorizations/_form_core.html.haml
@@ -0,0 +1,11 @@
+.inputs
+ = f.input :name, :label => t('access_authorizations.form.name.label'), :hint => conditional_hint('access_authorizations.form.name.hint')
+ = f.input :login, :label => t('access_authorizations.form.login.label'), :hint => conditional_hint('access_authorizations.form.login.hint')
+ = f.input :pin, :label => t('access_authorizations.form.pin.label'), :hint => conditional_hint('access_authorizations.form.pin.hint')
+ - if SipAccount.count < 50
+ = f.association :sip_account, :label => t('callthroughs.form.sip_account.label'), :hint => conditional_hint('callthroughs.form.sip_account.hint')
+ - else
+ = f.input :sip_account_id, :label => t('callthroughs.form.sip_account_id.label'), :hint => conditional_hint('callthroughs.form.sip_account_id.hint')
+
+ = f.simple_fields_for :phone_numbers do |phone_number|
+ = render "phone_numbers/form_core", :f => phone_number \ No newline at end of file
diff --git a/app/views/access_authorizations/_index_core.html.haml b/app/views/access_authorizations/_index_core.html.haml
new file mode 100644
index 0000000..083b16b
--- /dev/null
+++ b/app/views/access_authorizations/_index_core.html.haml
@@ -0,0 +1,21 @@
+%table
+ %tr
+ %th= t('access_authorizations.index.name')
+ %th= t('access_authorizations.index.login')
+ %th= t('access_authorizations.index.pin')
+ %th= t('callthroughs.index.phone_numbers')
+
+ - reset_cycle
+ - for access_authorization in access_authorizations
+ - show_path_method = method( :"#{access_authorization.access_authorizationable.class.name.underscore}_access_authorization_path" )
+ - edit_path_method = method( :"edit_#{access_authorization.access_authorizationable.class.name.underscore}_access_authorization_path" )
+ %tr{:class => cycle('odd', 'even')}
+ %td= access_authorization.name
+ %td= access_authorization.login
+ %td= access_authorization.pin
+ %td
+ =render 'phone_numbers/listing', :phone_numbers => access_authorization.phone_numbers
+ - if access_authorization.phone_numbers.count > 0
+ %br
+ = link_to t('phone_numbers.index.actions.create'), new_access_authorization_phone_number_path(access_authorization)
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => access_authorization.access_authorizationable, :child => access_authorization} \ No newline at end of file
diff --git a/app/views/access_authorizations/edit.html.haml b/app/views/access_authorizations/edit.html.haml
new file mode 100644
index 0000000..414f094
--- /dev/null
+++ b/app/views/access_authorizations/edit.html.haml
@@ -0,0 +1,3 @@
+- title t("access_authorizations.edit.page_title")
+
+= render "form"
diff --git a/app/views/access_authorizations/index.html.haml b/app/views/access_authorizations/index.html.haml
new file mode 100644
index 0000000..05b27db
--- /dev/null
+++ b/app/views/access_authorizations/index.html.haml
@@ -0,0 +1,6 @@
+- title t("access_authorizations.index.page_title")
+
+- if @access_authorizations.count > 0
+ = render "index_core", :access_authorizations => @access_authorizations
+
+= render :partial => 'shared/create_link', :locals => {:parent => @parent, :child_class => AccessAuthorization} \ No newline at end of file
diff --git a/app/views/access_authorizations/new.html.haml b/app/views/access_authorizations/new.html.haml
new file mode 100644
index 0000000..0bbf16c
--- /dev/null
+++ b/app/views/access_authorizations/new.html.haml
@@ -0,0 +1,3 @@
+- title t("access_authorizations.new.page_title")
+
+= render "form"
diff --git a/app/views/access_authorizations/show.html.haml b/app/views/access_authorizations/show.html.haml
new file mode 100644
index 0000000..17d1d9b
--- /dev/null
+++ b/app/views/access_authorizations/show.html.haml
@@ -0,0 +1,22 @@
+- title t("access_authorizations.show.page_title")
+
+%p
+ %strong= t('access_authorizations.show.name') + ":"
+ = @access_authorization.name
+%p
+ %strong= t('access_authorizations.show.login') + ":"
+ = @access_authorization.login
+%p
+ %strong= t('access_authorizations.show.pin') + ":"
+ = @access_authorization.pin
+%p
+ %strong= t('access_authorizations.show.sip_account_id') + ":"
+ = @access_authorization.sip_account || t('access_authorizations.none')
+
+= render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @parent, :child => @access_authorization }
+
+%h2= t('callthroughs.form.phone_numbers.label')
+- if @access_authorization.phone_numbers.count > 0
+ = render 'phone_numbers/index_core', :phone_numbers => @access_authorization.phone_numbers
+ %br
+= render :partial => 'shared/create_link', :locals => {:parent => @access_authorization, :child_class => PhoneNumber} \ No newline at end of file
diff --git a/app/views/acd_agents/_form.html.haml b/app/views/acd_agents/_form.html.haml
new file mode 100644
index 0000000..3b78bac
--- /dev/null
+++ b/app/views/acd_agents/_form.html.haml
@@ -0,0 +1,7 @@
+= simple_form_for([@automatic_call_distributor, @acd_agent]) do |f|
+ = f.error_notification
+
+ = render "form_core", :f => f
+
+ .actions
+ = f.button :submit, conditional_t('acd_agents.form.submit') \ No newline at end of file
diff --git a/app/views/acd_agents/_form_core.html.haml b/app/views/acd_agents/_form_core.html.haml
new file mode 100644
index 0000000..ab4657c
--- /dev/null
+++ b/app/views/acd_agents/_form_core.html.haml
@@ -0,0 +1,7 @@
+.inputs
+ = f.input :name, :label => t('acd_agents.form.name.label'), :hint => conditional_hint('acd_agents.form.name.hint')
+ = f.input :status, :label => t('acd_agents.form.status.label'), :hint => conditional_hint('acd_agents.form.status.hint'), :include_blank => false, :collection => AcdAgent::STATUSES
+ = f.input :last_call, :label => t('acd_agents.form.last_call.label'), :hint => conditional_hint('acd_agents.form.last_call.hint')
+ = f.input :calls_answered, :label => t('acd_agents.form.calls_answered.label'), :hint => conditional_hint('acd_agents.form.calls_answered.hint')
+ = f.input :destination_type, :label => t('acd_agents.form.destination_type.label'), :hint => conditional_hint('acd_agents.form.destination_type.hint'), :include_blank => false, :collection => AcdAgent::DESTINATION_TYPES
+ = f.input :destination_id, :label => t('acd_agents.form.destination_id.label'), :hint => conditional_hint('acd_agents.form.destination_id.hint')
diff --git a/app/views/acd_agents/_index_core.html.haml b/app/views/acd_agents/_index_core.html.haml
new file mode 100644
index 0000000..7cb1aae
--- /dev/null
+++ b/app/views/acd_agents/_index_core.html.haml
@@ -0,0 +1,18 @@
+%table
+ %tr
+ %th= t('acd_agents.index.name')
+ %th= t('acd_agents.index.status')
+ %th= t('acd_agents.index.last_call')
+ %th= t('acd_agents.index.calls_answered')
+ %th= t('acd_agents.index.destination')
+
+ - reset_cycle
+ - for acd_agent in acd_agents
+ %tr{:class => cycle('odd', 'even')}
+ %td= acd_agent.name
+ %td= acd_agent.status
+ %td= acd_agent.last_call
+ %td= acd_agent.calls_answered
+ %td= acd_agent.destination
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => acd_agent.automatic_call_distributor, :child => acd_agent}
+ \ No newline at end of file
diff --git a/app/views/acd_agents/_listing.html.haml b/app/views/acd_agents/_listing.html.haml
new file mode 100644
index 0000000..0495ec2
--- /dev/null
+++ b/app/views/acd_agents/_listing.html.haml
@@ -0,0 +1,8 @@
+- amount_of_acd_agents = acd_agents.count
+- if amount_of_acd_agents > 0
+ - if amount_of_acd_agents < 30
+ = acd_agents.map{|acd_agent| acd_agent}.join(', ')
+ - else
+ = acd_agents.limit(15).map{|acd_agent| acd_agent}.join(', ') + ', '
+ = '[...]'
+ = acd_agents.offset(amount_of_acd_agents - 15).map{|acd_agent| acd_agent}.join(', ') \ No newline at end of file
diff --git a/app/views/acd_agents/edit.html.haml b/app/views/acd_agents/edit.html.haml
new file mode 100644
index 0000000..8ab14b8
--- /dev/null
+++ b/app/views/acd_agents/edit.html.haml
@@ -0,0 +1,3 @@
+- title t("acd_agents.edit.page_title")
+
+= render "form" \ No newline at end of file
diff --git a/app/views/acd_agents/index.html.haml b/app/views/acd_agents/index.html.haml
new file mode 100644
index 0000000..d586dcf
--- /dev/null
+++ b/app/views/acd_agents/index.html.haml
@@ -0,0 +1,6 @@
+- title t("acd_agents.index.page_title")
+
+- if @acd_agents && @acd_agents.count > 0
+ = render "index_core", :acd_agents => @acd_agents
+
+= render :partial => 'shared/create_link', :locals => {:parent => @automatic_call_distributor, :child_class => AcdAgent}
diff --git a/app/views/acd_agents/new.html.haml b/app/views/acd_agents/new.html.haml
new file mode 100644
index 0000000..546136b
--- /dev/null
+++ b/app/views/acd_agents/new.html.haml
@@ -0,0 +1,3 @@
+- title t("acd_agents.new.page_title")
+
+= render "form" \ No newline at end of file
diff --git a/app/views/acd_agents/show.html.haml b/app/views/acd_agents/show.html.haml
new file mode 100644
index 0000000..97881f6
--- /dev/null
+++ b/app/views/acd_agents/show.html.haml
@@ -0,0 +1,28 @@
+- title t("acd_agents.show.page_title")
+
+%p
+ %strong= t('acd_agents.show.uuid') + ":"
+ = @acd_agent.uuid
+%p
+ %strong= t('acd_agents.show.name') + ":"
+ = @acd_agent.name
+%p
+ %strong= t('acd_agents.show.status') + ":"
+ = @acd_agent.status
+%p
+ %strong= t('acd_agents.show.automatic_call_distributor_id') + ":"
+ = @acd_agent.automatic_call_distributor_id
+%p
+ %strong= t('acd_agents.show.last_call') + ":"
+ = @acd_agent.last_call
+%p
+ %strong= t('acd_agents.show.calls_answered') + ":"
+ = @acd_agent.calls_answered
+%p
+ %strong= t('acd_agents.show.destination_type') + ":"
+ = @acd_agent.destination_type
+%p
+ %strong= t('acd_agents.show.destination_id') + ":"
+ = @acd_agent.destination_id
+
+= render :partial => 'shared/show_edit_destroy_part', :locals => {:parent => @automatic_call_distributor, :child => @acd_agent } \ No newline at end of file
diff --git a/app/views/acd_callers/_index_core.html.haml b/app/views/acd_callers/_index_core.html.haml
new file mode 100644
index 0000000..958b3ff
--- /dev/null
+++ b/app/views/acd_callers/_index_core.html.haml
@@ -0,0 +1,21 @@
+%table
+ %tr
+ %th= t('acd_callers.index.channel_uuid')
+ %th= t('acd_callers.index.automatic_call_distributor_id')
+ %th= t('acd_callers.index.status')
+ %th= t('acd_callers.index.enter_time')
+ %th= t('acd_callers.index.agent_answer_time')
+ %th= t('acd_callers.index.callback_number')
+ %th= t('acd_callers.index.callback_attempts')
+
+ - reset_cycle
+ - for acd_caller in acd_callers
+ %tr{:class => cycle('odd', 'even')}
+ %td= acd_caller.channel_uuid
+ %td= acd_caller.automatic_call_distributor_id
+ %td= acd_caller.status
+ %td= acd_caller.enter_time
+ %td= acd_caller.agent_answer_time
+ %td= acd_caller.callback_number
+ %td= acd_caller.callback_attempts
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => acd_caller} \ No newline at end of file
diff --git a/app/views/acd_callers/index.html.haml b/app/views/acd_callers/index.html.haml
new file mode 100644
index 0000000..70439ed
--- /dev/null
+++ b/app/views/acd_callers/index.html.haml
@@ -0,0 +1,6 @@
+- title t("acd_callers.index.page_title")
+
+- if @acd_callers && @acd_callers.count > 0
+ = render "index_core", :acd_callers => @acd_callers
+
+= render :partial => 'shared/create_link', :locals => {:child_class => AcdCaller} \ No newline at end of file
diff --git a/app/views/acd_callers/show.html.haml b/app/views/acd_callers/show.html.haml
new file mode 100644
index 0000000..0ce8345
--- /dev/null
+++ b/app/views/acd_callers/show.html.haml
@@ -0,0 +1,25 @@
+- title t("acd_callers.show.page_title")
+
+%p
+ %strong= t('acd_callers.show.channel_uuid') + ":"
+ = @acd_caller.channel_uuid
+%p
+ %strong= t('acd_callers.show.automatic_call_distributor_id') + ":"
+ = @acd_caller.automatic_call_distributor_id
+%p
+ %strong= t('acd_callers.show.status') + ":"
+ = @acd_caller.status
+%p
+ %strong= t('acd_callers.show.enter_time') + ":"
+ = @acd_caller.enter_time
+%p
+ %strong= t('acd_callers.show.agent_answer_time') + ":"
+ = @acd_caller.agent_answer_time
+%p
+ %strong= t('acd_callers.show.callback_number') + ":"
+ = @acd_caller.callback_number
+%p
+ %strong= t('acd_callers.show.callback_attempts') + ":"
+ = @acd_caller.callback_attempts
+
+= render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @acd_caller } \ No newline at end of file
diff --git a/app/views/addresses/_form.html.haml b/app/views/addresses/_form.html.haml
new file mode 100644
index 0000000..eff9930
--- /dev/null
+++ b/app/views/addresses/_form.html.haml
@@ -0,0 +1,7 @@
+= simple_form_for(@address) do |f|
+ = f.error_notification
+
+ = render "form_core", :f => f
+
+ .actions
+ = f.button :submit, conditional_t('addresses.form.submit') \ No newline at end of file
diff --git a/app/views/addresses/_form_core.html.haml b/app/views/addresses/_form_core.html.haml
new file mode 100644
index 0000000..f01ac1c
--- /dev/null
+++ b/app/views/addresses/_form_core.html.haml
@@ -0,0 +1,9 @@
+.inputs
+ = f.input :phone_book_entry_id, :label => t('addresses.form.phone_book_entry_id.label'), :hint => conditional_hint('addresses.form.phone_book_entry_id.hint')
+ = f.input :line1, :label => t('addresses.form.line1.label'), :hint => conditional_hint('addresses.form.line1.hint')
+ = f.input :line2, :label => t('addresses.form.line2.label'), :hint => conditional_hint('addresses.form.line2.hint')
+ = f.input :street, :label => t('addresses.form.street.label'), :hint => conditional_hint('addresses.form.street.hint')
+ = f.input :zip_code, :label => t('addresses.form.zip_code.label'), :hint => conditional_hint('addresses.form.zip_code.hint')
+ = f.input :city, :label => t('addresses.form.city.label'), :hint => conditional_hint('addresses.form.city.hint')
+ = f.input :country_id, :label => t('addresses.form.country_id.label'), :hint => conditional_hint('addresses.form.country_id.hint')
+ = f.input :position, :label => t('addresses.form.position.label'), :hint => conditional_hint('addresses.form.position.hint')
diff --git a/app/views/addresses/_index_core.html.haml b/app/views/addresses/_index_core.html.haml
new file mode 100644
index 0000000..2050ded
--- /dev/null
+++ b/app/views/addresses/_index_core.html.haml
@@ -0,0 +1,23 @@
+%table
+ %tr
+ %th= t('addresses.index.phone_book_entry_id')
+ %th= t('addresses.index.line1')
+ %th= t('addresses.index.line2')
+ %th= t('addresses.index.street')
+ %th= t('addresses.index.zip_code')
+ %th= t('addresses.index.city')
+ %th= t('addresses.index.country_id')
+ %th= t('addresses.index.position')
+
+ - reset_cycle
+ - for address in addresses
+ %tr{:class => cycle('odd', 'even')}
+ %td= address.phone_book_entry_id
+ %td= address.line1
+ %td= address.line2
+ %td= address.street
+ %td= address.zip_code
+ %td= address.city
+ %td= address.country_id
+ %td= address.position
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => address.phone_book_entry, :child => address} \ No newline at end of file
diff --git a/app/views/addresses/edit.html.haml b/app/views/addresses/edit.html.haml
new file mode 100644
index 0000000..3d85ae6
--- /dev/null
+++ b/app/views/addresses/edit.html.haml
@@ -0,0 +1,9 @@
+- title t("addresses.edit.page_title")
+
+= render "form"
+
+%p
+ - if can? :edit, @address
+ = link_to t('addresses.edit.actions.edit'), @address
+ |
+ = link_to t('addresses.edit.actions.view_all'), addresses_path
diff --git a/app/views/addresses/index.html.haml b/app/views/addresses/index.html.haml
new file mode 100644
index 0000000..ecebc65
--- /dev/null
+++ b/app/views/addresses/index.html.haml
@@ -0,0 +1,6 @@
+- title t("addresses.index.page_title")
+
+- if @addresses.count > 0
+ = render "index_core", :addresses => @addresses
+
+= render :partial => 'shared/create_link', :locals => {:child_class => Address} \ No newline at end of file
diff --git a/app/views/addresses/new.html.haml b/app/views/addresses/new.html.haml
new file mode 100644
index 0000000..280de55
--- /dev/null
+++ b/app/views/addresses/new.html.haml
@@ -0,0 +1,3 @@
+- title t("addresses.new.page_title")
+
+= render "form"
diff --git a/app/views/addresses/show.html.haml b/app/views/addresses/show.html.haml
new file mode 100644
index 0000000..211d020
--- /dev/null
+++ b/app/views/addresses/show.html.haml
@@ -0,0 +1,28 @@
+- title t("addresses.show.page_title")
+
+%p
+ %strong= t('addresses.show.phone_book_entry_id') + ":"
+ = @address.phone_book_entry_id
+%p
+ %strong= t('addresses.show.line1') + ":"
+ = @address.line1
+%p
+ %strong= t('addresses.show.line2') + ":"
+ = @address.line2
+%p
+ %strong= t('addresses.show.street') + ":"
+ = @address.street
+%p
+ %strong= t('addresses.show.zip_code') + ":"
+ = @address.zip_code
+%p
+ %strong= t('addresses.show.city') + ":"
+ = @address.city
+%p
+ %strong= t('addresses.show.country_id') + ":"
+ = @address.country_id
+%p
+ %strong= t('addresses.show.position') + ":"
+ = @address.position
+
+= render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @address } \ No newline at end of file
diff --git a/app/views/api/rows/_form.html.erb b/app/views/api/rows/_form.html.erb
new file mode 100644
index 0000000..465b105
--- /dev/null
+++ b/app/views/api/rows/_form.html.erb
@@ -0,0 +1,21 @@
+<%= simple_form_for(@row) do |f| %>
+ <%= f.error_notification %>
+
+ <div class="inputs">
+ <%= f.input :user_name %>
+ <%= f.input :last_name %>
+ <%= f.input :middle_name %>
+ <%= f.input :first_name %>
+ <%= f.input :office_phone_number %>
+ <%= f.input :internal_extension %>
+ <%= f.input :mobile_phone_number %>
+ <%= f.input :fax_phone_number %>
+ <%= f.input :email %>
+ <%= f.input :pin %>
+ <%= f.input :photo_file_name %>
+ </div>
+
+ <div class="actions">
+ <%= f.button :submit %>
+ </div>
+<% end %>
diff --git a/app/views/api/rows/edit.html.erb b/app/views/api/rows/edit.html.erb
new file mode 100644
index 0000000..bce5694
--- /dev/null
+++ b/app/views/api/rows/edit.html.erb
@@ -0,0 +1,3 @@
+<h1>Editing row</h1>
+
+<%= render 'form' %> \ No newline at end of file
diff --git a/app/views/api/rows/index.html.erb b/app/views/api/rows/index.html.erb
new file mode 100644
index 0000000..d65e059
--- /dev/null
+++ b/app/views/api/rows/index.html.erb
@@ -0,0 +1,29 @@
+<h1>Listing rows</h1>
+
+<table>
+ <tr>
+ <th>ID</th>
+ <th>User name</th>
+ <th>Last name</th>
+ <th>First name</th>
+ <th>Internal extension</th>
+ <th>Office phone number</th>
+ <th>Fax phone number</th>
+ <th>Email</th>
+ <th>Pin</th>
+ </tr>
+
+<% @rows.each do |row| %>
+ <tr class='<%= cycle('odd', 'even') %>'>
+ <td><%= row.id %></td>
+ <td><%= link_to row.user_name, tenant_user_path(row.user.current_tenant, row.user) %></td>
+ <td><%= row.last_name %></td>
+ <td><%= row.first_name %></td>
+ <td><%= row.internal_extension %></td>
+ <td><%= row.office_phone_number %></td>
+ <td><%= row.fax_phone_number %></td>
+ <td><%= row.email %></td>
+ <td><%= row.pin %></td>
+ </tr>
+<% end %>
+</table> \ No newline at end of file
diff --git a/app/views/api/rows/new.html.erb b/app/views/api/rows/new.html.erb
new file mode 100644
index 0000000..fccd964
--- /dev/null
+++ b/app/views/api/rows/new.html.erb
@@ -0,0 +1,3 @@
+<h1>New row</h1>
+
+<%= render 'form' %> \ No newline at end of file
diff --git a/app/views/api/rows/show.html.erb b/app/views/api/rows/show.html.erb
new file mode 100644
index 0000000..aad60b5
--- /dev/null
+++ b/app/views/api/rows/show.html.erb
@@ -0,0 +1,56 @@
+<p id="notice"><%= notice %></p>
+
+<p>
+ <b>User name:</b>
+ <%= @row.user_name %>
+</p>
+
+<p>
+ <b>Last name:</b>
+ <%= @row.last_name %>
+</p>
+
+<p>
+ <b>Middle name:</b>
+ <%= @row.middle_name %>
+</p>
+
+<p>
+ <b>First name:</b>
+ <%= @row.first_name %>
+</p>
+
+<p>
+ <b>Office phone number:</b>
+ <%= @row.office_phone_number %>
+</p>
+
+<p>
+ <b>Internal extension:</b>
+ <%= @row.internal_extension %>
+</p>
+
+<p>
+ <b>Mobile phone number:</b>
+ <%= @row.mobile_phone_number %>
+</p>
+
+<p>
+ <b>Fax phone number:</b>
+ <%= @row.fax_phone_number %>
+</p>
+
+<p>
+ <b>Email:</b>
+ <%= @row.email %>
+</p>
+
+<p>
+ <b>Pin:</b>
+ <%= @row.pin %>
+</p>
+
+<p>
+ <b>Photo file name:</b>
+ <%= @row.photo_file_name %>
+</p> \ No newline at end of file
diff --git a/app/views/automatic_call_distributors/_form.html.haml b/app/views/automatic_call_distributors/_form.html.haml
new file mode 100644
index 0000000..fcf133c
--- /dev/null
+++ b/app/views/automatic_call_distributors/_form.html.haml
@@ -0,0 +1,8 @@
+= simple_form_for([@parent, @automatic_call_distributor]) do |f|
+ = f.error_notification
+
+ = render "form_core", :f => f, :join_on => @join_on, :leave_on => @leave_on, :strategies => @strategies
+
+
+ .actions
+ = f.button :submit, conditional_t('automatic_call_distributors.form.submit') \ No newline at end of file
diff --git a/app/views/automatic_call_distributors/_form_core.html.haml b/app/views/automatic_call_distributors/_form_core.html.haml
new file mode 100644
index 0000000..77a38a6
--- /dev/null
+++ b/app/views/automatic_call_distributors/_form_core.html.haml
@@ -0,0 +1,16 @@
+.inputs
+ = f.input :name, :label => t('automatic_call_distributors.form.name.label'), :hint => conditional_hint('automatic_call_distributors.form.name.hint')
+ = f.input :strategy, :label => t('automatic_call_distributors.form.strategy.label'), :hint => conditional_hint('automatic_call_distributors.form.strategy.hint'), :include_blank => false, :as => :select, :collection => strategies
+ = f.input :max_callers, :label => t('automatic_call_distributors.form.max_callers.label'), :hint => conditional_hint('automatic_call_distributors.form.max_callers.hint')
+ = f.input :agent_timeout, :label => t('automatic_call_distributors.form.agent_timeout.label'), :hint => conditional_hint('automatic_call_distributors.form.agent_timeout.hint')
+ = f.input :retry_timeout, :label => t('automatic_call_distributors.form.retry_timeout.label'), :hint => conditional_hint('automatic_call_distributors.form.retry_timeout.hint')
+ = f.input :join, :label => t('automatic_call_distributors.form.join.label'), :hint => conditional_hint('automatic_call_distributors.form.join.hint'), :include_blank => false, :as => :select, :collection => join_on
+ = f.input :leave, :label => t('automatic_call_distributors.form.leave.label'), :hint => conditional_hint('automatic_call_distributors.form.leave.hint'), :include_blank => false, :as => :select, :collection => leave_on
+
+ = f.input :announce_position, :label => t('automatic_call_distributors.form.announce_position.label'), :hint => conditional_hint('automatic_call_distributors.announce_position.hint'), :collection => [[t('automatic_call_distributors.announce_position.on_change_only'), 0],[t('automatic_call_distributors.announce_position.never'), nil],[t('automatic_call_distributors.announce_position.every_x_seconds', :x_seconds => 30), 30],[t('automatic_call_distributors.announce_position.every_x_seconds', :x_seconds => 60), 60], [t('automatic_call_distributors.announce_position.every_x_seconds', :x_seconds => 120), 120], [t('automatic_call_distributors.announce_position.every_x_seconds', :x_seconds => 300), 300], [t('automatic_call_distributors.announce_position.every_x_seconds', :x_seconds => 600), 600]], :include_blank => false
+
+ = f.input :announce_call_agents, :label => t('automatic_call_distributors.form.announce_call_agents.label'), :hint => conditional_hint('automatic_call_distributors.form.announce_call_agents.hint')
+ = f.input :greeting, :label => t('automatic_call_distributors.form.greeting.label'), :hint => conditional_hint('automatic_call_distributors.form.greeting.hint')
+ = f.input :goodbye, :label => t('automatic_call_distributors.form.goodbye.label'), :hint => conditional_hint('automatic_call_distributors.form.goodbye.hint')
+ = f.input :music, :label => t('automatic_call_distributors.form.music.label'), :hint => conditional_hint('automatic_call_distributors.form.music.hint')
+ \ No newline at end of file
diff --git a/app/views/automatic_call_distributors/_index_core.html.haml b/app/views/automatic_call_distributors/_index_core.html.haml
new file mode 100644
index 0000000..c31a648
--- /dev/null
+++ b/app/views/automatic_call_distributors/_index_core.html.haml
@@ -0,0 +1,39 @@
+%table
+ %tr
+ %th= t('automatic_call_distributors.index.name')
+ %th= t('automatic_call_distributors.index.strategy')
+ %th= t('automatic_call_distributors.index.max_callers')
+ %th= t('automatic_call_distributors.index.agent_timeout')
+ %th= t('automatic_call_distributors.index.retry_timeout')
+ %th= t('automatic_call_distributors.index.join')
+ %th= t('automatic_call_distributors.index.leave')
+ %th= t('automatic_call_distributors.index.phone_numbers')
+ %th= t('automatic_call_distributors.index.acd_agents')
+
+ - reset_cycle
+ - for automatic_call_distributor in automatic_call_distributors
+ %tr{:class => cycle('odd', 'even')}
+ %td= automatic_call_distributor.name
+ %td= t("automatic_call_distributors.strategies.#{automatic_call_distributor.strategy}")
+ %td= automatic_call_distributor.max_callers
+ %td= automatic_call_distributor.agent_timeout
+ %td= automatic_call_distributor.retry_timeout
+ %td= t("automatic_call_distributors.join_on.#{automatic_call_distributor.join}")
+ %td= t("automatic_call_distributors.leave_on.#{automatic_call_distributor.leave}")
+
+ %td
+ - if automatic_call_distributor.phone_numbers.count > 0
+ = render 'phone_numbers/listing', :phone_numbers => automatic_call_distributor.phone_numbers
+ %br
+ = render :partial => 'shared/create_link', :locals => {:parent => automatic_call_distributor, :child_class => PhoneNumber, :short_link => true}
+
+ %td
+ - if automatic_call_distributor.acd_agents.count > 3
+ = link_to automatic_call_distributor.acd_agents.count, automatic_call_distributor_acd_agents_path(automatic_call_distributor)
+ %br
+ - elsif automatic_call_distributor.acd_agents.count > 0
+ = render 'acd_agents/listing', :acd_agents => automatic_call_distributor.acd_agents
+ %br
+ = render :partial => 'shared/create_link', :locals => {:parent => automatic_call_distributor, :child_class => AcdAgent, :short_link => true}
+
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => automatic_call_distributor.automatic_call_distributorable, :child => automatic_call_distributor} \ No newline at end of file
diff --git a/app/views/automatic_call_distributors/edit.html.haml b/app/views/automatic_call_distributors/edit.html.haml
new file mode 100644
index 0000000..28cba74
--- /dev/null
+++ b/app/views/automatic_call_distributors/edit.html.haml
@@ -0,0 +1,3 @@
+- title t("automatic_call_distributors.edit.page_title")
+
+= render "form" \ No newline at end of file
diff --git a/app/views/automatic_call_distributors/index.html.haml b/app/views/automatic_call_distributors/index.html.haml
new file mode 100644
index 0000000..f3f8b2b
--- /dev/null
+++ b/app/views/automatic_call_distributors/index.html.haml
@@ -0,0 +1,6 @@
+- title t("automatic_call_distributors.index.page_title")
+
+- if @automatic_call_distributors && @automatic_call_distributors.count > 0
+ = render "index_core", :automatic_call_distributors => @automatic_call_distributors
+
+= render :partial => 'shared/create_link', :locals => {:parent => @parent, :child_class => AutomaticCallDistributor}
diff --git a/app/views/automatic_call_distributors/new.html.haml b/app/views/automatic_call_distributors/new.html.haml
new file mode 100644
index 0000000..96a2d93
--- /dev/null
+++ b/app/views/automatic_call_distributors/new.html.haml
@@ -0,0 +1,3 @@
+- title t("automatic_call_distributors.new.page_title")
+
+= render "form" \ No newline at end of file
diff --git a/app/views/automatic_call_distributors/show.html.haml b/app/views/automatic_call_distributors/show.html.haml
new file mode 100644
index 0000000..e5bf785
--- /dev/null
+++ b/app/views/automatic_call_distributors/show.html.haml
@@ -0,0 +1,59 @@
+- title t("automatic_call_distributors.show.page_title")
+
+%table
+ %tr
+ %th= t('automatic_call_distributors.show.uuid') + ":"
+ %td= @automatic_call_distributor.uuid
+ %tr
+ %th= t('automatic_call_distributors.show.name') + ":"
+ %td= @automatic_call_distributor.name
+ %tr
+ %th= t('automatic_call_distributors.show.strategy') + ":"
+ %td= t("automatic_call_distributors.strategies.#{@automatic_call_distributor.strategy}")
+ %tr
+ %th= t('automatic_call_distributors.show.max_callers') + ":"
+ %td= @automatic_call_distributor.max_callers
+ %tr
+ %th= t('automatic_call_distributors.show.agent_timeout') + ":"
+ %td= @automatic_call_distributor.agent_timeout
+ %tr
+ %th= t('automatic_call_distributors.show.retry_timeout') + ":"
+ %td= @automatic_call_distributor.retry_timeout
+ %tr
+ %th= t('automatic_call_distributors.show.join') + ":"
+ %td= t("automatic_call_distributors.join_on.#{@automatic_call_distributor.join}")
+ %tr
+ %th= t('automatic_call_distributors.show.leave') + ":"
+ %td= t("automatic_call_distributors.leave_on.#{@automatic_call_distributor.leave}")
+
+ %tr
+ %th= t('automatic_call_distributors.show.announce_position') + ":"
+ %td= @automatic_call_distributor.announce_position
+
+ %tr
+ %th= t('automatic_call_distributors.show.announce_call_agents') + ":"
+ %td= @automatic_call_distributor.announce_call_agents
+
+ %tr
+ %th= t('automatic_call_distributors.show.greeting') + ":"
+ %td= @automatic_call_distributor.greeting
+
+ %tr
+ %th= t('automatic_call_distributors.show.goodbye') + ":"
+ %td= @automatic_call_distributor.goodbye
+
+ %tr
+ %th= t('automatic_call_distributors.show.music') + ":"
+ %td= @automatic_call_distributor.music
+
+= render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @automatic_call_distributor.automatic_call_distributorable, :child => @automatic_call_distributor }
+
+- if can?( :index, @automatic_call_distributor.phone_numbers )
+ %h3= t('automatic_call_distributors.index.phone_numbers')
+ = render 'phone_numbers/index_core', :phone_numbers => @automatic_call_distributor.phone_numbers
+ = render :partial => 'shared/create_link', :locals => {:parent => @automatic_call_distributor, :child_class => PhoneNumber, :short_link => true}
+
+- if can?( :index, @automatic_call_distributor.acd_agents )
+ %h3= t('automatic_call_distributors.index.acd_agents')
+ = render 'acd_agents/index_core', :acd_agents => @automatic_call_distributor.acd_agents
+ = render :partial => 'shared/create_link', :locals => {:parent => @automatic_call_distributor, :child_class => AcdAgent, :short_link => true}
diff --git a/app/views/call_forwards/_form.html.haml b/app/views/call_forwards/_form.html.haml
new file mode 100644
index 0000000..7310af3
--- /dev/null
+++ b/app/views/call_forwards/_form.html.haml
@@ -0,0 +1,7 @@
+= simple_form_for([ @phone_number, @call_forward ]) do |f|
+ = f.error_notification
+
+ = render "form_core", :f => f
+
+ .actions
+ = f.button :submit, conditional_t('call_forwards.form.submit') \ No newline at end of file
diff --git a/app/views/call_forwards/_form_core.html.haml b/app/views/call_forwards/_form_core.html.haml
new file mode 100644
index 0000000..3dadb68
--- /dev/null
+++ b/app/views/call_forwards/_form_core.html.haml
@@ -0,0 +1,15 @@
+.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_id.label'), :hint => conditional_hint('call_forwards.form.call_forward_case_id.hint'), :include_blank => false
+ = 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')
+
+
+ = f.input :source, :label => t('call_forwards.form.source.label'), :hint => conditional_hint('call_forwards.form.source.hint')
+ - if GuiFunction.display?('depth_field_in_call_forward_form', current_user)
+ = f.input :depth, :collection => 1..MAX_CALL_FORWARD_DEPTH, :label => t('call_forwards.form.depth.label'), :hint => conditional_hint('call_forwards.form.depth.hint')
+ - else
+ = f.hidden_field :depth
+ = f.input :active, :label => t('call_forwards.form.active.label'), :hint => conditional_hint('call_forwards.form.active.hint')
diff --git a/app/views/call_forwards/_index_core.html.haml b/app/views/call_forwards/_index_core.html.haml
new file mode 100644
index 0000000..7733855
--- /dev/null
+++ b/app/views/call_forwards/_index_core.html.haml
@@ -0,0 +1,31 @@
+%table
+ %tr
+ - if !@phone_number
+ %th= t('call_forwards.index.phone_number_id')
+ %th= t('call_forwards.index.call_forward_case_id')
+ %th= t('call_forwards.index.timeout')
+ %th= t('call_forwards.index.destination')
+ %th= t('call_forwards.index.source')
+ - if GuiFunction.display?('depth_field_value_in_index_table', current_user)
+ %th= t('call_forwards.index.depth')
+ %th= t('call_forwards.index.active')
+
+ - reset_cycle
+ - for call_forward in call_forwards
+ %tr{:class => cycle('odd', 'even')}
+ - if !@phone_number
+ %td= call_forward.phone_number
+ %td= t("call_forward_cases.#{call_forward.call_forward_case.value}")
+ %td= call_forward.timeout
+ %td
+ = call_forward.destination
+ - if call_forward.call_forwardable_type
+ %br
+ = call_forward.call_forwardable_type
+ - if call_forward.call_forwardable
+ = ": #{call_forward.call_forwardable}"
+ %td= call_forward.source
+ - if GuiFunction.display?('depth_field_value_in_index_table', current_user)
+ %td= call_forward.depth
+ %td= call_forward.active
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => call_forward.phone_number, :child => call_forward} \ No newline at end of file
diff --git a/app/views/call_forwards/edit.html.haml b/app/views/call_forwards/edit.html.haml
new file mode 100644
index 0000000..5fa9dcd
--- /dev/null
+++ b/app/views/call_forwards/edit.html.haml
@@ -0,0 +1,3 @@
+- title t("call_forwards.edit.page_title", :resource => " for phone number #{@phone_number}" )
+
+= render "form" \ No newline at end of file
diff --git a/app/views/call_forwards/index.html.haml b/app/views/call_forwards/index.html.haml
new file mode 100644
index 0000000..93d64f2
--- /dev/null
+++ b/app/views/call_forwards/index.html.haml
@@ -0,0 +1,6 @@
+- title t("call_forwards.index.page_title")
+
+- if @call_forwards.count > 0
+ = render "index_core", :call_forwards => @call_forwards
+
+= render :partial => 'shared/create_link', :locals => {:parent => @phone_number, :child_class => CallForward} \ No newline at end of file
diff --git a/app/views/call_forwards/new.html.haml b/app/views/call_forwards/new.html.haml
new file mode 100644
index 0000000..960a9e6
--- /dev/null
+++ b/app/views/call_forwards/new.html.haml
@@ -0,0 +1,3 @@
+- title t("call_forwards.new.page_title")
+
+= render "form"
diff --git a/app/views/call_forwards/show.html.haml b/app/views/call_forwards/show.html.haml
new file mode 100644
index 0000000..6d1a0c6
--- /dev/null
+++ b/app/views/call_forwards/show.html.haml
@@ -0,0 +1,33 @@
+- title t("call_forwards.show.page_title")
+
+%p
+ %strong= t('call_forwards.show.phone_number_id') + ":"
+ = @call_forward.phone_number
+%p
+ %strong= t('call_forwards.show.call_forward_case_id') + ":"
+ = t("call_forward_cases.#{@call_forward.call_forward_case.value}")
+%p
+ %strong= t('call_forwards.show.timeout') + ":"
+ = @call_forward.timeout
+%p
+ %strong= t('call_forwards.show.destination') + ":"
+ = @call_forward.destination
+- if @call_forward.call_forwardable_type == 'HuntGroup' && @call_forward.call_forwardable.class == HuntGroup
+ %p
+ %strong= t('call_forwards.show.hunt_group') + ":"
+ = @call_forward.call_forwardable
+- if @call_forward.call_forwardable_type == 'Voicemail'
+ %p
+ %strong= t('call_forwards.show.to_voicemail') + ":"
+ = 'active'
+%p
+ %strong= t('call_forwards.show.source') + ":"
+ = @call_forward.source
+%p
+ %strong= t('call_forwards.show.depth') + ":"
+ = @call_forward.depth
+%p
+ %strong= t('call_forwards.show.active') + ":"
+ = @call_forward.active
+
+= render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @phone_number, :child => @call_forward } \ No newline at end of file
diff --git a/app/views/call_histories/_index_core.html.haml b/app/views/call_histories/_index_core.html.haml
new file mode 100644
index 0000000..2d7658a
--- /dev/null
+++ b/app/views/call_histories/_index_core.html.haml
@@ -0,0 +1,65 @@
+= form_tag(destroy_multiple_sip_account_call_histories_path(@sip_account), :method => :delete, :id => 'call_history_form') do
+ %header.entries-nav= render :partial => "call_histories/navigation"
+ .content
+ %table
+ - reset_cycle
+ - for call_history in call_histories
+ - phone_number = call_history.display_number
+ - voicemail_message = call_history.voicemail_message
+ - if phone_number
+ - phone_book_entry = call_history.phone_book_entry_by_number(phone_number)
+ %tr.call-history-entry{:class => cycle('odd', 'even')}
+ %td.select_box= check_box_tag("selected_ids[]", call_history.id, false, :id => "select_item_#{call_history.id}", :class => 'select_item')
+ %td.thumbnail
+ - image = call_history.display_image(:small, phone_book_entry)
+ - if image
+ = image_tag(image, :itemprop => 'image')
+ %td.time
+ - if voicemail_message
+ .voicemail-message
+ %a{:href => sip_account_voicemail_messages_path(@sip_account, :anchor => "message_#{voicemail_message.id}")}
+ = image_tag('icons/gs_envelope_16x.png', :class => 'display')
+ = call_history.display_call_date(t("call_histories.index.date_format"), t("call_histories.index.date_today_format"))
+ - elsif call_history.entry_type == '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
+ - elsif call_history.entry_type == 'dialed'
+ .call-placed= call_history.display_call_date(t("call_histories.index.date_format"), t("call_histories.index.date_today_format"))
+ - elsif call_history.entry_type == 'received'
+ .call-received= call_history.display_call_date(t("call_histories.index.date_format"), t("call_histories.index.date_today_format"))
+ - elsif call_history.entry_type == '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.user
+ - 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= phone_number
+ %td.status
+ - if call_history.display_duration
+ .duration= call_history.display_duration
+ - else
+ .disposition= t("call_histories.call_results.#{call_history.result}")
+ %td.actions
+ - if @sip_account.registration && can?(:call, call_history)
+ = link_to t('call_histories.index.actions.call'), call_sip_account_call_history_path(@sip_account, call_history), :method => :put
+ %td.actions
+ - if can? :destroy, call_history
+ = link_to t('call_histories.index.actions.destroy'), sip_account_call_history_path(@sip_account, call_history), :method => :delete
+
+ %footer.entries-nav= render :partial => "call_histories/navigation"
+ = image_submit_tag('icons/cross-16x.png', :confirm => t("call_histories.index.actions.confirm_selected"))
+ = t("call_histories.index.actions.destroy_multiple")
diff --git a/app/views/call_histories/_navigation.html.haml b/app/views/call_histories/_navigation.html.haml
new file mode 100644
index 0000000..a1999d9
--- /dev/null
+++ b/app/views/call_histories/_navigation.html.haml
@@ -0,0 +1,11 @@
+%nav
+ %ol.abc
+ %li
+ %a{ :href => "?type=" }= t("call_histories.index.navigation.all", :calls => @calls_count)
+ %a{ :href => "?type=missed" }= t("call_histories.index.navigation.missed", :calls => @calls_missed_count)
+ %a{ :href => "?type=received" }= t("call_histories.index.navigation.received", :calls => @calls_received_count)
+ %a{ :href => "?type=dialed" }= t("call_histories.index.navigation.dialed", :calls => @calls_dialed_count)
+ %a{ :href => "?type=forwarded" }= t("call_histories.index.navigation.forwarded", :calls => @calls_forwarded_count)
+
+.pagination
+ = will_paginate @call_histories
diff --git a/app/views/call_histories/index.html.haml b/app/views/call_histories/index.html.haml
new file mode 100644
index 0000000..adf6838
--- /dev/null
+++ b/app/views/call_histories/index.html.haml
@@ -0,0 +1,6 @@
+- if @type
+ - title t("call_histories.index.page_title_#{@type}")
+- else
+ - title t("call_histories.index.page_title")
+
+= render "index_core", :call_histories => @call_histories
diff --git a/app/views/calls/_index_core.html.haml b/app/views/calls/_index_core.html.haml
new file mode 100644
index 0000000..ddd0650
--- /dev/null
+++ b/app/views/calls/_index_core.html.haml
@@ -0,0 +1,9 @@
+%table
+ %tr
+ %th= t('calls.index.uuid')
+
+ - reset_cycle
+ - for call in @calls
+ %tr{:class => cycle('odd', 'even')}
+ %td
+ = call.uuid
diff --git a/app/views/calls/index.html.haml b/app/views/calls/index.html.haml
new file mode 100644
index 0000000..4ea60a6
--- /dev/null
+++ b/app/views/calls/index.html.haml
@@ -0,0 +1,6 @@
+- title t("calls.index.page_title")
+
+- if @calls.count > 0
+ = render "index_core", :calls => @calls
+
+= render :partial => 'shared/create_link', :locals => {:parent => @parent, :child_class => Call} \ No newline at end of file
diff --git a/app/views/callthroughs/_form.html.haml b/app/views/callthroughs/_form.html.haml
new file mode 100644
index 0000000..99f92d0
--- /dev/null
+++ b/app/views/callthroughs/_form.html.haml
@@ -0,0 +1,7 @@
+= simple_form_for([@tenant, @callthrough]) do |f|
+ = f.error_notification
+
+ = render "form_core", :f => f
+
+ .actions
+ = f.button :submit, conditional_t('callthroughs.form.submit')
diff --git a/app/views/callthroughs/_form_core.html.haml b/app/views/callthroughs/_form_core.html.haml
new file mode 100644
index 0000000..1f137d9
--- /dev/null
+++ b/app/views/callthroughs/_form_core.html.haml
@@ -0,0 +1,24 @@
+.inputs
+ = f.input :name, :label => t('callthroughs.form.name.label'), :hint => conditional_hint('callthroughs.form.name.hint')
+
+ %h2= t('callthroughs.form.phone_numbers.label')
+ - if !t('callthroughs.form.phone_numbers.hint').blank?
+ %p= t('callthroughs.form.phone_numbers.hint')
+ = f.simple_fields_for :phone_numbers do |phone_number|
+ = render "phone_numbers/form_core", :f => phone_number
+ %p
+
+ - if @callthrough && @callthrough.access_authorizations.size > 0
+ %h2= t('callthroughs.form.access_authorizations.label')
+ - if !t('callthroughs.form.access_authorizations.hint').blank?
+ %p= t('callthroughs.form.access_authorizations.hint')
+ = f.simple_fields_for :access_authorizations do |access_authorization|
+ = render "access_authorizations/form_core", :f => access_authorization
+
+ - if CALLTHROUGH_HAS_WHITELISTS == true
+ - if @callthrough && @callthrough.whitelists.size > 0
+ %h2= t('callthroughs.form.whitelists.label')
+ - if !t('callthroughs.form.whitelists.hint').blank?
+ %p= t('callthroughs.form.whitelists.hint')
+ = f.simple_fields_for :whitelists do |whitelist|
+ = render "whitelists/form_core", :f => whitelist
diff --git a/app/views/callthroughs/_index_core.html.haml b/app/views/callthroughs/_index_core.html.haml
new file mode 100644
index 0000000..f1802d4
--- /dev/null
+++ b/app/views/callthroughs/_index_core.html.haml
@@ -0,0 +1,17 @@
+%table
+ %tr
+ %th= t('callthroughs.index.name')
+ %th= t('callthroughs.index.phone_numbers')
+ %th= t('callthroughs.index.access_authorized_phone_numbers')
+ - if CALLTHROUGH_HAS_WHITELISTS == true
+ %th= t('callthroughs.index.whitelist_phone_numbers')
+
+ - reset_cycle
+ - for callthrough in callthroughs
+ %tr{:class => cycle('odd', 'even')}
+ %td= callthrough.name
+ %td=render 'phone_numbers/listing', :phone_numbers => callthrough.phone_numbers
+ %td=render 'phone_numbers/listing', :phone_numbers => callthrough.access_authorization_phone_numbers
+ - if CALLTHROUGH_HAS_WHITELISTS == true
+ %td=render 'phone_numbers/listing', :phone_numbers => callthrough.whitelisted_phone_numbers
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => callthrough.tenant, :child => callthrough} \ No newline at end of file
diff --git a/app/views/callthroughs/edit.html.haml b/app/views/callthroughs/edit.html.haml
new file mode 100644
index 0000000..44fe17e
--- /dev/null
+++ b/app/views/callthroughs/edit.html.haml
@@ -0,0 +1,3 @@
+- title t("callthroughs.edit.page_title")
+
+= render "form" \ No newline at end of file
diff --git a/app/views/callthroughs/index.html.haml b/app/views/callthroughs/index.html.haml
new file mode 100644
index 0000000..c595351
--- /dev/null
+++ b/app/views/callthroughs/index.html.haml
@@ -0,0 +1,6 @@
+- title t("callthroughs.index.page_title")
+
+- if @callthroughs.count > 0
+ = render "index_core", :callthroughs => @callthroughs
+
+= render :partial => 'shared/create_link', :locals => {:parent => @parent, :child_class => Callthrough} \ No newline at end of file
diff --git a/app/views/callthroughs/new.html.haml b/app/views/callthroughs/new.html.haml
new file mode 100644
index 0000000..ff47c1c
--- /dev/null
+++ b/app/views/callthroughs/new.html.haml
@@ -0,0 +1,3 @@
+- title t("callthroughs.new.page_title")
+
+= render "form"
diff --git a/app/views/callthroughs/show.html.haml b/app/views/callthroughs/show.html.haml
new file mode 100644
index 0000000..55bd6eb
--- /dev/null
+++ b/app/views/callthroughs/show.html.haml
@@ -0,0 +1,27 @@
+- title t("callthroughs.show.page_title")
+
+%p
+ %strong= t('callthroughs.show.name') + ":"
+ = @callthrough.name
+
+= render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @callthrough.tenant, :child => @callthrough }
+
+
+%h2= t('callthroughs.form.phone_numbers.label')
+- if @callthrough.phone_numbers.count > 0
+ = render 'phone_numbers/index_core', :phone_numbers => @callthrough.phone_numbers
+ %br
+= render :partial => 'shared/create_link', :locals => {:parent => @callthrough, :child_class => PhoneNumber}
+
+%h2= t('callthroughs.form.access_authorizations.label')
+- if @callthrough.access_authorizations.count > 0
+ = render 'access_authorizations/index_core', :access_authorizations => @callthrough.access_authorizations
+ %br
+= render :partial => 'shared/create_link', :locals => {:parent => @callthrough, :child_class => AccessAuthorization}
+
+- if CALLTHROUGH_HAS_WHITELISTS == true
+ %h2= t('callthroughs.form.whitelists.label')
+ - if @callthrough.whitelisted_phone_numbers.count > 0
+ = render 'whitelists/index_core', :whitelists => @callthrough.whitelists
+ %br
+ = render :partial => 'shared/create_link', :locals => {:parent => @callthrough, :child_class => Whitelist} \ No newline at end of file
diff --git a/app/views/conference_invitees/_form.html.haml b/app/views/conference_invitees/_form.html.haml
new file mode 100644
index 0000000..400580d
--- /dev/null
+++ b/app/views/conference_invitees/_form.html.haml
@@ -0,0 +1,7 @@
+= simple_form_for([@conference, @conference_invitee]) do |f|
+ = f.error_notification
+
+ = render "form_core", :f => f
+
+ .actions
+ = f.button :submit, conditional_t('conference_invitees.form.submit') \ No newline at end of file
diff --git a/app/views/conference_invitees/_form_core.html.haml b/app/views/conference_invitees/_form_core.html.haml
new file mode 100644
index 0000000..3cac18d
--- /dev/null
+++ b/app/views/conference_invitees/_form_core.html.haml
@@ -0,0 +1,7 @@
+.inputs
+ = f.simple_fields_for :phone_number, @phone_number do |p|
+ = p.input :number, :label => t('phone_numbers.form.number.label'), :hint => conditional_hint('phone_numbers.form.number.hint')
+
+ = f.input :pin, :label => t('conference_invitees.form.pin.label'), :hint => conditional_hint('conference_invitees.form.pin.hint')
+ = f.input :speaker, :label => t('conference_invitees.form.speaker.label'), :hint => conditional_hint('conference_invitees.form.speaker.hint')
+ = f.input :moderator, :label => t('conference_invitees.form.moderator.label'), :hint => conditional_hint('conference_invitees.form.moderator.hint')
diff --git a/app/views/conference_invitees/_index_core.html.haml b/app/views/conference_invitees/_index_core.html.haml
new file mode 100644
index 0000000..f84af7d
--- /dev/null
+++ b/app/views/conference_invitees/_index_core.html.haml
@@ -0,0 +1,17 @@
+%table
+ %tr
+ %th= t('conference_invitees.index.phone_book_entry_id')
+ %th= t('conference_invitees.index.phone_number')
+ %th= t('conference_invitees.index.pin')
+ %th= t('conference_invitees.index.speaker')
+ %th= t('conference_invitees.index.moderator')
+
+ - reset_cycle
+ - for conference_invitee in conference_invitees
+ %tr{:class => cycle('odd', 'even')}
+ %td= conference_invitee.phone_book_entry || '-'
+ %td= conference_invitee.phone_number
+ %td= conference_invitee.pin
+ %td= conference_invitee.speaker
+ %td= conference_invitee.moderator
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => conference_invitee.conference, :child => conference_invitee} \ No newline at end of file
diff --git a/app/views/conference_invitees/edit.html.haml b/app/views/conference_invitees/edit.html.haml
new file mode 100644
index 0000000..ce90bbe
--- /dev/null
+++ b/app/views/conference_invitees/edit.html.haml
@@ -0,0 +1,3 @@
+- title t("conference_invitees.edit.page_title")
+
+= render "form" \ No newline at end of file
diff --git a/app/views/conference_invitees/index.html.haml b/app/views/conference_invitees/index.html.haml
new file mode 100644
index 0000000..2a0c26c
--- /dev/null
+++ b/app/views/conference_invitees/index.html.haml
@@ -0,0 +1,6 @@
+- title t("conference_invitees.index.page_title")
+
+- if @conference_invitees.count > 0
+ = render "index_core", :conference_invitees => @conference_invitees
+
+= render :partial => 'shared/create_link', :locals => {:parent => @conference, :child_class => ConferenceInvitee} \ No newline at end of file
diff --git a/app/views/conference_invitees/new.html.haml b/app/views/conference_invitees/new.html.haml
new file mode 100644
index 0000000..780494e
--- /dev/null
+++ b/app/views/conference_invitees/new.html.haml
@@ -0,0 +1,3 @@
+- title t("conference_invitees.new.page_title")
+
+= render "form"
diff --git a/app/views/conference_invitees/show.html.haml b/app/views/conference_invitees/show.html.haml
new file mode 100644
index 0000000..57c5627
--- /dev/null
+++ b/app/views/conference_invitees/show.html.haml
@@ -0,0 +1,20 @@
+- title t("conference_invitees.show.page_title")
+
+%p
+ %strong= t('conference_invitees.show.conference_id') + ":"
+ = @conference_invitee.conference
+- if @conference_invitee.phone_book_entry_id
+ %p
+ %strong= t('conference_invitees.show.phone_book_entry_id') + ":"
+ = @conference_invitee.phone_book_entry
+%p
+ %strong= t('conference_invitees.show.pin') + ":"
+ = @conference_invitee.pin
+%p
+ %strong= t('conference_invitees.show.speaker') + ":"
+ = @conference_invitee.speaker
+%p
+ %strong= t('conference_invitees.show.moderator') + ":"
+ = @conference_invitee.moderator
+
+= render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @conference_invitee.conference, :child => @conference_invitee } \ No newline at end of file
diff --git a/app/views/conferences/_form.html.haml b/app/views/conferences/_form.html.haml
new file mode 100644
index 0000000..4bee1a4
--- /dev/null
+++ b/app/views/conferences/_form.html.haml
@@ -0,0 +1,7 @@
+= simple_form_for([ @parent, @conference ]) do |f|
+ = f.error_notification
+
+ = render "form_core", :f => f
+
+ .actions
+ = f.button :submit, conditional_t('conferences.form.submit') \ No newline at end of file
diff --git a/app/views/conferences/_form_core.html.haml b/app/views/conferences/_form_core.html.haml
new file mode 100644
index 0000000..04754de
--- /dev/null
+++ b/app/views/conferences/_form_core.html.haml
@@ -0,0 +1,11 @@
+.inputs
+ = f.input :name, :label => t('conferences.form.name.label'), :hint => conditional_hint('conferences.form.name.hint'), :autofocus => true
+ - if !f.object.start.nil?
+ = f.input :start, :label => t('conferences.form.start.label'), :hint => conditional_hint('conferences.form.start.hint'), :include_blank => true, :start_year => Time.now.year, :end_year => Time.now.year + 2
+ = f.input :end, :label => t('conferences.form.end.label'), :hint => conditional_hint('conferences.form.end.hint'), :include_blank => true, :start_year => Time.now.year, :end_year => Time.now.year + 2
+ = f.input :description, :label => t('conferences.form.description.label'), :hint => conditional_hint('conferences.form.description.hint')
+ = f.input :pin, :label => t('conferences.form.pin.label'), :hint => conditional_hint('conferences.form.pin.hint')
+ = f.input :max_members, :collection => 1..MAXIMUM_NUMBER_OF_PEOPLE_IN_A_CONFERENCE, :include_blank => false, :label => t('conferences.form.max_members.label'), :hint => conditional_hint('conferences.form.max_members.hint')
+ = f.input :open_for_anybody, :label => t('conferences.form.open_for_anybody.label'), :hint => conditional_hint('conferences.form.open_for_anybody.hint')
+ = f.input :announce_new_member_by_name, :label => t('conferences.form.announce_new_member_by_name.label'), :hint => conditional_hint('conferences.form.announce_new_member_by_name.hint')
+ = f.input :announce_left_member_by_name, :label => t('conferences.form.announce_left_member_by_name.label'), :hint => conditional_hint('conferences.form.announce_left_member_by_name.hint') \ No newline at end of file
diff --git a/app/views/conferences/_index_core.html.haml b/app/views/conferences/_index_core.html.haml
new file mode 100644
index 0000000..4073e83
--- /dev/null
+++ b/app/views/conferences/_index_core.html.haml
@@ -0,0 +1,53 @@
+%table
+ %tr
+ %th= t('conferences.index.name')
+ - if !conferences.respond_to?('where') || conferences.where(:start => nil).where(:end => nil).count != conferences.count
+ %th= t('conferences.index.start')
+ %th= t('conferences.index.end')
+ %th= t('conferences.index.phone_numbers')
+ - if !conferences.respond_to?('where') || conferences.where(:pin => '').count != conferences.count
+ %th= t('conferences.index.pin')
+ %th= t('conferences.index.max_members')
+ %th= t('conferences.index.number_of_invitees')
+ %th= t('conferences.index.flags')
+
+ - reset_cycle
+ - for conference in conferences
+ - parent = conference.conferenceable
+ %tr{:class => cycle('odd', 'even')}
+ %td= conference.name
+ - if !conferences.respond_to?('where') || conferences.where(:start => nil).where(:end => nil).count != conferences.count
+ %td
+ - if conference.start
+ = l conference.start, :format => :long
+ - else
+ = '-'
+ %td
+ - if conference.end
+ = l conference.end, :format => :long
+ - else
+ = '-'
+ %td
+ - if conference.phone_numbers.count > 0
+ = render 'phone_numbers/listing', :phone_numbers => conference.phone_numbers.order(:number)
+ %br
+ = render :partial => 'shared/create_link', :locals => {:parent => conference, :child_class => PhoneNumber, :short_link => true}
+
+ - if !conferences.respond_to?('where') || conferences.where(:pin => '').count != conferences.count
+ %td
+ - if !conference.pin.blank?
+ = conference.pin
+ - else
+ = '-'
+ %td= conference.max_members
+ %td= conference.conference_invitees.count
+ %td
+ %ul
+ - if conference.open_for_anybody
+ %li= t('conferences.index.open_for_anybody')
+ - if conference.announce_new_member_by_name
+ %li= t('conferences.index.announce_new_member_by_name')
+ - if conference.announce_left_member_by_name
+ %li= t('conferences.index.announce_left_member_by_name')
+
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => parent, :child => conference} \ No newline at end of file
diff --git a/app/views/conferences/edit.html.haml b/app/views/conferences/edit.html.haml
new file mode 100644
index 0000000..bc190e7
--- /dev/null
+++ b/app/views/conferences/edit.html.haml
@@ -0,0 +1,3 @@
+- title t("conferences.edit.page_title")
+
+= render "form"
diff --git a/app/views/conferences/index.html.haml b/app/views/conferences/index.html.haml
new file mode 100644
index 0000000..0324acd
--- /dev/null
+++ b/app/views/conferences/index.html.haml
@@ -0,0 +1,6 @@
+- title t("conferences.index.page_title")
+
+- if @conferences.count > 0
+ = render "index_core", :conferences => @conferences
+
+= render :partial => 'shared/create_link', :locals => {:parent => @parent, :child_class => Conference} \ No newline at end of file
diff --git a/app/views/conferences/new.html.haml b/app/views/conferences/new.html.haml
new file mode 100644
index 0000000..102f6a9
--- /dev/null
+++ b/app/views/conferences/new.html.haml
@@ -0,0 +1,3 @@
+- title t("conferences.new.page_title")
+
+= render "form"
diff --git a/app/views/conferences/show.html.haml b/app/views/conferences/show.html.haml
new file mode 100644
index 0000000..10ebaed
--- /dev/null
+++ b/app/views/conferences/show.html.haml
@@ -0,0 +1,43 @@
+- title t("conferences.show.page_title")
+
+%p
+ %strong= t('conferences.show.name') + ":"
+ = @conference.name
+- if @conference.start
+ %p
+ %strong= t('conferences.show.start') + ":"
+ = @conference.start
+ %p
+ %strong= t('conferences.show.end') + ":"
+ = @conference.end
+- if !@conference.description.blank?
+ %p
+ %strong= t('conferences.show.description') + ":"
+ = @conference.description
+- if !@conference.pin.blank?
+ %p
+ %strong= t('conferences.show.pin') + ":"
+ = @conference.pin
+%p
+ %strong= t('conferences.show.open_for_anybody') + ":"
+ = @conference.open_for_anybody
+%p
+ %strong= t('conferences.show.announce_new_member_by_name') + ":"
+ = @conference.announce_new_member_by_name
+%p
+ %strong= t('conferences.show.announce_left_member_by_name') + ":"
+ = @conference.announce_left_member_by_name
+
+= render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @parent, :child => @conference }
+
+%h2= t('phone_numbers.index.page_title')
+- if @phone_numbers.count > 0
+ = render "phone_numbers/index_core", :phone_numbers => @phone_numbers
+
+= render :partial => 'shared/create_link', :locals => {:parent => @conference, :child_class => PhoneNumber}
+
+%h2= t("conference_invitees.index.page_title")
+- if @conference.conference_invitees.count > 0
+ = render "conference_invitees/index_core", :conference_invitees => @conference.conference_invitees
+
+= render :partial => 'shared/create_link', :locals => {:parent => @conference, :child_class => ConferenceInvitee} \ No newline at end of file
diff --git a/app/views/config_polycom/_call_history.xml.haml b/app/views/config_polycom/_call_history.xml.haml
new file mode 100644
index 0000000..7d23edd
--- /dev/null
+++ b/app/views/config_polycom/_call_history.xml.haml
@@ -0,0 +1,18 @@
+!!! XML
+%html
+ %head
+ %title= @phone_xml_object[:title]
+ %body
+ %table{ :border => 0 }
+ %tbody
+ - @phone_xml_object[:entries].each do |entry|
+ %tr
+ %td= entry[:date]
+ %td= entry[:text]
+ %td
+ %a{:href => entry[:url]}= entry[:number]
+
+ %softkey{ :index => 1, :label => 'Home', :action => 'SoftKey:Home' }
+ %softkey{ :index => 2, :label => 'Refresh', :action => 'SoftKey:Refresh' }
+ %softkey{ :index => 4, :label => 'Exit', :action => 'SoftKey:Exit' }
+ %softkey{ :index => 3, :label => 'Back', :action => 'SoftKey:Back' }
diff --git a/app/views/config_polycom/_call_history_menu.xml.haml b/app/views/config_polycom/_call_history_menu.xml.haml
new file mode 100644
index 0000000..6e56f37
--- /dev/null
+++ b/app/views/config_polycom/_call_history_menu.xml.haml
@@ -0,0 +1,13 @@
+!!! XML
+%html
+ %head
+ %title= @phone_xml_object[:title]
+ %body
+ - @phone_xml_object[:entries].each do |entry|
+ %br
+ %a{ :href => entry[:url]}= entry[:text]
+
+ %softkey{ :index => 1, :label => 'Home', :action => 'SoftKey:Home' }
+ %softkey{ :index => 2, :label => 'Refresh', :action => 'SoftKey:Refresh' }
+ %softkey{ :index => 4, :label => 'Exit', :action => 'SoftKey:Exit' }
+ %softkey{ :index => 3, :label => 'Back', :action => 'SoftKey:Back' }
diff --git a/app/views/config_polycom/_phone_book.xml.haml b/app/views/config_polycom/_phone_book.xml.haml
new file mode 100644
index 0000000..1066695
--- /dev/null
+++ b/app/views/config_polycom/_phone_book.xml.haml
@@ -0,0 +1,18 @@
+!!! XML
+%html
+ %head
+ %title= @phone_xml_object[:title]
+ %body
+ %table{ :border => 0 }
+ %tbody
+ - @phone_xml_object[:entries].each do |entry|
+ %tr
+ %td= entry[:text]
+ %td
+ = "#{entry[:type][0]}: "
+ %a{:href => entry[:url]}= entry[:number]
+
+ %softkey{ :index => 1, :label => 'Home', :action => 'SoftKey:Home' }
+ %softkey{ :index => 2, :label => 'Refresh', :action => 'SoftKey:Refresh' }
+ %softkey{ :index => 4, :label => 'Exit', :action => 'SoftKey:Exit' }
+ %softkey{ :index => 3, :label => 'Back', :action => 'SoftKey:Back' }
diff --git a/app/views/config_polycom/config_files.xml.builder b/app/views/config_polycom/config_files.xml.builder
new file mode 100644
index 0000000..50819ff
--- /dev/null
+++ b/app/views/config_polycom/config_files.xml.builder
@@ -0,0 +1,12 @@
+xml.instruct!
+
+xml.tag!('APPLICATION',
+ 'APP_FILE_PATH' => 'sip.ld',
+ 'CONFIG_FILES' => "settings-#{@mac_address}.cfg",
+ 'MISC_FILES' => '',
+ 'LOG_FILE_DIRECTORY' => '',
+ 'OVERRIDES_DIRECTORY' => '',
+ 'CONTACTS_DIRECTORY' => '',
+ 'LICENSE_DIRECTORY' => '',
+ 'USER_PROFILES_DIRECTORY' => '',
+ 'CALL_LISTS_DIRECTORY' => '')
diff --git a/app/views/config_polycom/idle_screen.xml.haml b/app/views/config_polycom/idle_screen.xml.haml
new file mode 100644
index 0000000..fa52c4f
--- /dev/null
+++ b/app/views/config_polycom/idle_screen.xml.haml
@@ -0,0 +1,7 @@
+!!! XML
+%html
+ %head
+ %title= @sip_account.caller_name
+ %body
+ - @sip_account.phone_numbers.each do |number|
+ %br= number.number
diff --git a/app/views/config_polycom/settings.xml.erb b/app/views/config_polycom/settings.xml.erb
new file mode 100644
index 0000000..ea9d325
--- /dev/null
+++ b/app/views/config_polycom/settings.xml.erb
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<PHONE_CONFIG>
+ <ALL
+ <% @settings.each do |key, value| %>
+ <%= key %>="<%= value %>"
+ <% end %>
+ />
+</PHONE_CONFIG>
diff --git a/app/views/config_polycom/settings_directory.xml.haml b/app/views/config_polycom/settings_directory.xml.haml
new file mode 100644
index 0000000..107f991
--- /dev/null
+++ b/app/views/config_polycom/settings_directory.xml.haml
@@ -0,0 +1,16 @@
+!!! XML
+%directory
+ %item_list
+ %item
+ %ln= 'Directory'
+ %ct= '!directory'
+ %sd= 38
+ %item
+ %ln= 'Call History'
+ %ct= '!callhistory'
+ %sd= 39
+ %item
+ %ln= 'Applications'
+ %ct= '!applications'
+ %sd= 40
+
diff --git a/app/views/config_siemens/_menu_list.xml.haml b/app/views/config_siemens/_menu_list.xml.haml
new file mode 100644
index 0000000..70bfc43
--- /dev/null
+++ b/app/views/config_siemens/_menu_list.xml.haml
@@ -0,0 +1,33 @@
+!!! XML
+%IppPhone
+ %IppDisplay
+ %IppScreen{:ID => '1', :HiddenCount => (@phone_xml_object[:hidden] ? @phone_xml_object[:hidden].length : '0'), :CommandCount => (@phone_xml_object[:commands] ? @phone_xml_object[:commands].length : '0')}
+ - if @phone_xml_object[:make_call]
+ %IppAction{:Type => 'MAKECALL'}
+ %Number= @phone_xml_object[:make_call]
+ - if @phone_xml_object[:led] != nil
+ %IppAction{:Type => (@phone_xml_object[:led] ? 'TURNLEDON' : 'TURNLEDOFF')}
+ %IppKey{:Keypad => 'YES', :SendKeys => 'YES', :BufferKeys => 'NO', :BufferLength => '0', :TermKey => '', :UrlKey => 'key'}
+ - if @phone_xml_object[:entries]
+ %IppList{:Type => 'IMPLICIT', :Count => @phone_xml_object[:entries].length, :Columns => @phone_xml_object[:columns]}
+ - if @phone_xml_object[:title]
+ %Title= @phone_xml_object[:title]
+ %Url= @phone_xml_object[:url]
+ - @phone_xml_object[:entries].each_with_index do |entry, index|
+ %Option{:ID => index+1, :Selected => (entry[:selected] ? 'TRUE' : 'FALSE'), :Key => (entry[:key] ? entry[:key] : 'item'), :Value => entry[:value]}
+ - if entry[:image]
+ %Image= entry[:image]
+ %OptionText= entry[:text].to_s
+ - if entry[:text_center]
+ %OptionText= entry[:text_center].to_s
+ - if entry[:text_right]
+ %OptionText= entry[:text_right].to_s
+ - if @phone_xml_object[:hidden]
+ - @phone_xml_object[:hidden].each do |key, value|
+ %IppHidden{:Type => 'VALUE', :Key => key}
+ %Value= value
+ - if @phone_xml_object[:commands]
+ - @phone_xml_object[:commands].each_with_index do |command, index|
+ %IppCommand{:Type => command[:type], :DisplayOn => command[:display], :Priority => index, :Key => command[:key], :Value => command[:value], :DisplayOn => command[:display_on], :Select => command[:select], :Default => command[:default], :Auto => command[:auto]}
+ %Label= command[:label]
+ %Screen= "1"
diff --git a/app/views/config_siemens/clean-up.xml.erb b/app/views/config_siemens/clean-up.xml.erb
new file mode 100644
index 0000000..e1cbf93
--- /dev/null
+++ b/app/views/config_siemens/clean-up.xml.erb
@@ -0,0 +1,5 @@
+<DlsMessage xsi:schemaLocation="http://www.siemens.com/DLS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.siemens.com/DLS">
+ <Message nonce="<%=@my_nonce%>">
+ <Action>CleanUp</Action>
+ </Message>
+</DlsMessage> \ No newline at end of file
diff --git a/app/views/config_siemens/index.xml.erb b/app/views/config_siemens/index.xml.erb
new file mode 100644
index 0000000..0c60b1f
--- /dev/null
+++ b/app/views/config_siemens/index.xml.erb
@@ -0,0 +1,5 @@
+<DlsMessage xsi:schemaLocation="http://www.siemens.com/DLS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.siemens.com/DLS">
+ <Message nonce="<%=@my_nonce%>">
+ <Action>ReadAllItems</Action>
+ </Message>
+</DlsMessage> \ No newline at end of file
diff --git a/app/views/config_siemens/write.xml.erb b/app/views/config_siemens/write.xml.erb
new file mode 100644
index 0000000..ee9e32e
--- /dev/null
+++ b/app/views/config_siemens/write.xml.erb
@@ -0,0 +1,10 @@
+<DlsMessage xsi:schemaLocation="http://www.siemens.com/DLS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.siemens.com/DLS">
+ <Message nonce="<%=@my_nonce%>">
+ <Action>WriteItems</Action>
+ <ItemList>
+ <% @new_settings.each do |setting| %>
+ <Item name="<%=setting[0]%>" <% if ! setting[1].nil? %>index="<%=setting[1]%>"<%end%>><%=setting[2]%></Item>
+ <% end %>
+ </ItemList>
+ </Message>
+</DlsMessage> \ No newline at end of file
diff --git a/app/views/config_snom/_snom_phone_directory.xml.haml b/app/views/config_snom/_snom_phone_directory.xml.haml
new file mode 100644
index 0000000..698f2e5
--- /dev/null
+++ b/app/views/config_snom/_snom_phone_directory.xml.haml
@@ -0,0 +1,19 @@
+!!! XML
+%SnomIPPhoneDirectory{:speedselect => 'off'}
+ %Title= @phone_xml_object[:title]
+ %Prompt= @phone_xml_object[:prompt]
+ - @phone_xml_object[:entries].each do |entry|
+ %DirectoryEntry{:sel => entry[:selected].to_s}
+ %Name= entry[:text]
+ %Telephone= entry[:number]
+
+ - if @phone_xml_object[:softkeys]
+ - @phone_xml_object[:softkeys].each do |softkey|
+ %SoftKeyItem
+ %Name= softkey[:name]
+ - if ! softkey[:label].blank?
+ %Label= softkey[:label]
+ - if ! softkey[:url].blank?
+ %URL= softkey[:url]
+ - if ! softkey[:softkey].blank?
+ %URL= softkey[:softkey]
diff --git a/app/views/config_snom/_snom_phone_input.xml.haml b/app/views/config_snom/_snom_phone_input.xml.haml
new file mode 100644
index 0000000..6038282
--- /dev/null
+++ b/app/views/config_snom/_snom_phone_input.xml.haml
@@ -0,0 +1,19 @@
+!!! XML
+%SnomIPPhoneInput
+ %Title= @phone_xml_object[:title]
+ %Prompt= @phone_xml_object[:prompt]
+ %URL= @phone_xml_object[:url]
+ %InputItem
+ %DisplayName= @phone_xml_object[:display_name]
+ %QueryStringParam= @phone_xml_object[:query_string_param]
+ %DefaultValue= @phone_xml_object[:default_value]
+ %InputFlags= @phone_xml_object[:input_flags]
+ - if @phone_xml_object[:softkeys]
+ - @phone_xml_object[:softkeys].each do |softkey|
+ %SoftKeyItem
+ %Name= softkey[:name]
+ %Label= softkey[:label]
+ - if ! softkey[:url].blank?
+ %URL= softkey[:url]
+ - if ! softkey[:softkey].blank?
+ %URL= softkey[:softkey]
diff --git a/app/views/config_snom/_snom_phone_menu.xml.haml b/app/views/config_snom/_snom_phone_menu.xml.haml
new file mode 100644
index 0000000..de016c0
--- /dev/null
+++ b/app/views/config_snom/_snom_phone_menu.xml.haml
@@ -0,0 +1,17 @@
+!!! XML
+%SnomIPPhoneMenu{:speedselect => 'off'}
+ %Title= @phone_xml_object[:title]
+ - @phone_xml_object[:entries].each do |entry|
+ %MenuItem{:sel => entry[:selected].to_s}
+ %Name= entry[:text]
+ %URL= entry[:url]
+
+ - if @phone_xml_object[:softkeys]
+ - @phone_xml_object[:softkeys].each do |softkey|
+ %SoftKeyItem
+ %Name= softkey[:name]
+ %Label= softkey[:label]
+ - if ! softkey[:url].blank?
+ %URL= softkey[:url]
+ - if ! softkey[:softkey].blank?
+ %URL= softkey[:softkey]
diff --git a/app/views/config_snom/_snom_phone_text.xml.haml b/app/views/config_snom/_snom_phone_text.xml.haml
new file mode 100644
index 0000000..6c3773c
--- /dev/null
+++ b/app/views/config_snom/_snom_phone_text.xml.haml
@@ -0,0 +1,16 @@
+!!! XML
+%SnomIPPhoneText
+ %Title= @phone_xml_object[:title]
+ %Prompt= @phone_xml_object[:prompt]
+ %Text= @phone_xml_object[:text]
+ - if @phone_xml_object[:softkeys]
+ - @phone_xml_object[:softkeys].each do |softkey|
+ %SoftKeyItem
+ %Name= softkey[:name]
+ %Label= softkey[:label]
+ - if ! softkey[:url].blank?
+ %URL= softkey[:url]
+ - if ! softkey[:softkey].blank?
+ %URL= softkey[:softkey]
+ -if @phone_xml_object[:fetch_url]
+ %fetch{:mil => @phone_xml_object[:fetch_mil]}= @phone_xml_object[:fetch_url]
diff --git a/app/views/config_snom/call_history.xml.haml b/app/views/config_snom/call_history.xml.haml
new file mode 100644
index 0000000..00f9990
--- /dev/null
+++ b/app/views/config_snom/call_history.xml.haml
@@ -0,0 +1,2 @@
+!!! XML
+= render @phone_xml_object[:name]
diff --git a/app/views/config_snom/idle_screen.xml.haml b/app/views/config_snom/idle_screen.xml.haml
new file mode 100644
index 0000000..9476c44
--- /dev/null
+++ b/app/views/config_snom/idle_screen.xml.haml
@@ -0,0 +1,33 @@
+!!! XML
+%screen_description
+ - if @phone_xml_object[:image]
+ %Image
+ %Data{:encoding => 'base64'}= @phone_xml_object[:image][:data]
+ %LocationX= @phone_xml_object[:image][:location_x]
+ %LocationY= @phone_xml_object[:image][:location_y]
+ %Invert= @phone_xml_object[:image][:invert]
+ - if @phone_xml_object[:clock]
+ %Clock
+ %LocationX= @phone_xml_object[:clock][:location_x]
+ %LocationY= @phone_xml_object[:clock][:location_y]
+ - if @phone_xml_object[:digital_clock]
+ %DigitalClock
+ %LocationX= @phone_xml_object[:digital_clock][:location_x]
+ %LocationY= @phone_xml_object[:digital_clock][:location_y]
+ - if @phone_xml_object[:date]
+ %Date
+ %LocationX= @phone_xml_object[:date][:location_x]
+ %LocationY= @phone_xml_object[:date][:location_y]
+ - if @phone_xml_object[:line]
+ %Line
+ %Account
+ %LocationX= @phone_xml_object[:line][:location_x]
+ %LocationY= @phone_xml_object[:line][:location_y]
+ - if @phone_xml_object[:status]
+ %Status
+ %LocationX= @phone_xml_object[:status][:location_x]
+ %LocationY= @phone_xml_object[:status][:location_y]
+ - if @phone_xml_object[:softkeys]
+ %Softkeys
+ %LocationX= @phone_xml_object[:softkeys][:location_x]
+ %LocationY= @phone_xml_object[:softkeys][:location_y]
diff --git a/app/views/config_snom/log_in.xml.haml b/app/views/config_snom/log_in.xml.haml
new file mode 100644
index 0000000..1f45d93
--- /dev/null
+++ b/app/views/config_snom/log_in.xml.haml
@@ -0,0 +1,3 @@
+!!! XML
+= render @phone_xml_object[:name]
+
diff --git a/app/views/config_snom/show.xml.haml b/app/views/config_snom/show.xml.haml
new file mode 100644
index 0000000..d9953c5
--- /dev/null
+++ b/app/views/config_snom/show.xml.haml
@@ -0,0 +1,151 @@
+!!! XML
+%settings
+ %phone-settings
+ %auto_reboot_on_setting_change{:perm => 'RW'}= 'off'
+ - if !@phone_settings[:setting_server].blank?
+ %setting_server{:perm => 'RW'}= @phone_settings[:setting_server]
+ %web_language{:perm => 'RW'}= 'English'
+ %language{:perm => 'RW'}= @phone_settings[:language]
+ %timezone{:perm => 'RW'}= 'GER+1'
+ %date_us_format{:perm => 'RW'}= 'off'
+ %time_24_format{:perm => 'RW'}= 'on'
+ %reset_settings{:perm => 'RW'}= ''
+ %update_policy{:perm => 'RW'}= 'settings_only'
+ %settings_refresh_timer{:perm => 'RW'}= '0'
+ %firmware_status{:perm => 'RW'}= ''
+ %webserver_type{:perm => 'R'}= 'http_https'
+ %http_scheme{:perm => 'RW'}= 'off'
+ %http_port{:perm => 'R'}= '80'
+ %https_port{:perm => 'R'}= '443'
+ %http_user{:perm => 'R'}= @phone_settings[:http_user]
+ %http_pass{:perm => 'R'}= @phone_settings[:http_pass]
+ %admin_mode_password{:perm => 'R'}= @phone_settings[:admin_mode_password]
+ %tone_scheme{:perm => 'RW'}= @phone_settings[:tone_scheme]
+ %keytones{:perm => 'RW'}= 'off'
+ %dtmf_speaker_phone{:perm => 'RW'}= 'off'
+ %disable_redirection_menu{:perm => 'R'}= 'on'
+ %retry_after_failed_register{:perm => 'RW'}= '70'
+ %encode_display_name{:perm => 'R'}= 'on'
+ %dtmf_payload_type{:perm => 'RW'}= '101'
+ %ignore_security_warning{:perm => 'R'}= 'on'
+ %call_completion{:perm => 'RW'}= 'on'
+ %block_url_dialing{:perm => 'RW'}= 'on'
+ %redirect_ringing{:perm => 'RW'}= 'on'
+ %goto_virtual_keys_state_on_activity{:perm => 'RW'}= 'off'
+ %goto_monitor_state_on_line_activity{:perm => 'RW'}= 'on'
+ %ringer_animation{:perm => 'RW'}= 'on'
+ %display_method{:perm => 'RW'}= 'display_name_number'
+ %callpickup_dialoginfo{:perm => 'RW'}= 'on'
+ %show_local_line{:perm => 'RW'}= 'off'
+ %mwi_notification{:perm => 'RW'}= 'silent'
+ %mwi_dialtone{:perm => 'RW'}= 'normal'
+ %prefer_saved_over_received_photo{:perm => 'RW'}= 'off'
+ %no_dnd{:perm => 'RW'}= 'on'
+ %logon_wizard{:perm => 'RW'}= 'off'
+ %disable_deflection{:perm => 'RW'}= 'off'
+ %csta_control{:perm => 'RW'}= 'on'
+ %save_latest_callrecords_to_flash{:perm => 'RW'}= 'off'
+ %use_proxy_number_guessing{:perm => 'RW'}= 'off'
+ %guess_number{:perm => 'RW'}= 'off'
+ %guess_start_length{:perm => 'RW'}= '3'
+ %ieee8021x_eap_md5_username{:perm => 'RW'}= PROVISIONING_IEEE8021X_EAP_USERNAME
+ %ieee8021x_eap_md5_password{:perm => 'RW'}= PROVISIONING_IEEE8021X_EAP_PASSWORD
+
+ - 0.upto(9) do |ringer_idx|
+ %internal_ringer_text{:idx => ringer_idx, :perm => 'RW'}= "Ringer#{(ringer_idx+1)}"
+ %internal_ringer_file{:idx => ringer_idx, :perm => 'RW'}= "Ringer#{(ringer_idx+1)}"
+
+ %internal_ringer_text{:idx => 10, :perm => 'RW'}= "Ringer0"
+ %internal_ringer_file{:idx => 10, :perm => 'RW'}= "Silent"
+
+ %gui_fkey1{:perm => 'R'}= 'none'
+ %gui_fkey2{:perm => 'R'}= 'none'
+ %gui_fkey3{:perm => 'R'}= 'none'
+ %gui_fkey4{:perm => 'R'}= 'none'
+
+ %dkey_menu{:perm => 'RW'}= @dkeys[:menu]
+ %dkey_retrieve{:perm => 'RW'}= @dkeys[:retrieve]
+ %dkey_conf{:perm => 'RW'}= @dkeys[:conf]
+ %dkey_redial{:perm => 'RW'}= @dkeys[:redial]
+ %dkey_directory{:perm => 'RW'}= @dkeys[:directory]
+
+ %idle_ok_key_action{:perm => 'RW'}= @dkeys[:idle_ok]
+ %idle_cancel_key_action{:perm => 'RW'}= @dkeys[:idle_cancel]
+ %idle_up_key_action{:perm => 'RW'}= @dkeys[:idle_up]
+ %idle_down_key_action{:perm => 'RW'}= @dkeys[:idle_down]
+ %idle_left_key_action{:perm => 'RW'}= @dkeys[:idle_left]
+ %idle_right_key_action{:perm => 'RW'}= @dkeys[:idle_right]
+
+ != "\<!-- 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]} --\>"
+ %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]
+ %user_host{:idx => index, :perm => 'R'}= sip_account[:host]
+ %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_mailbox{:idx => index, :perm => 'R'}= sip_account[:mailbox]
+ %user_expiry{:idx => index, :perm => 'R'}= ''
+ %user_server_type{:idx => index, :perm => 'R'}= 'default'
+ %user_send_local_name{:idx => index, :perm => 'RW'}= 'on'
+ %user_dtmf_info{:idx => index, :perm => 'RW'}= 'off'
+ %user_dp_exp{:idx => index, :perm => 'RW'}= ''
+ %user_dp_str{:idx => index, :perm => 'RW'}= ''
+ %user_dp{:idx => index, :perm => 'RW'}= ''
+ %user_q{:idx => index, :perm => 'RW'}= '1.0'
+ %user_failover_identity{:idx => index, :perm => 'RW'}= 'none'
+ %user_full_sdp_answer{:idx => index, :perm => 'RW'}= 'on'
+ %user_dynamic_payload{:idx => index, :perm => 'RW'}= 'on'
+ %user_g726_packing_order{:idx => index, :perm => 'R'}= 'on'
+ %user_srtp{:idx => index, :perm => 'RW'}= 'off'
+ %user_savp{:idx => index, :perm => 'RW'}= 'off'
+ %codec_size{:idx => index, :perm => 'RW'}= '20'
+ %codec1_name{:idx => index, :perm => 'RW'}= "0"
+ %codec2_name{:idx => index, :perm => 'RW'}= "8"
+ %codec3_name{:idx => index, :perm => 'RW'}= "3"
+ %codec4_name{:idx => index, :perm => 'RW'}= "9"
+ %codec5_name{:idx => index, :perm => 'RW'}= "2"
+ %codec6_name{:idx => index, :perm => 'RW'}= "18"
+ %codec7_name{:idx => index, :perm => 'RW'}= "4"
+ %record_missed_calls{:idx => index, :perm => 'RW'}= 'on'
+ %record_received_calls{:idx => index, :perm => 'RW'}= 'off'
+ %record_missed_calls_cwi_off{:idx => index, :perm => 'RW'}= 'off'
+ %record_dialed_calls{:idx => index, :perm => 'RW'}= 'off'
+
+ / all sip accounts done
+
+ %functionKeys
+ - @softkeys.each_with_index do |softkey, index|
+ - if softkey[:data]
+ %fkey{:idx => index, :context => (softkey[:context] ? softkey[:context].to_s : 'active'), :label => softkey[:label], :perm => 'RW'}= softkey[:data]
+ - elsif softkey[:general_type]
+ %fkey{:idx => index, :context => (softkey[:context] ? softkey[:context].to_s : 'active'), :label => softkey[:label], :perm => 'RW'}
+ %general{:type => softkey[:general_type]}
+ %default_state{:name => 'initial'}
+ %appearance
+ %line_info_layer
+ %line_format{:line => '0'}= '$state $type'
+ %line_format{:line => '1'}= '$continue $name'
+ - if softkey[:subscription]
+ %subscription{:type => 'dialog', :to => softkey[:subscription][:to], :for => softkey[:subscription][:for]}
+ %NotifyParsingRules{:type => 'applies'}
+ %level1{:translates_to => 'OK'}= "/dialog-info[@entity=\"sip:#{softkey[:subscription][:to]}\"]"
+ %NotifyParsingRules{:type => 'state'}
+ %level1{:translates_to => 'available'}= '/dialog-info/dialog/state[.="terminated"]'
+ %level2{:translates_to => 'ringing'}= '/dialog-info/dialog/state[.="early"]'
+ %level3{:translates_to => 'active'}= '/dialog-info/dialog/state[.="confirmed"]'
+ %level4{:fetch_content => 'true'}= '/dialog-info/dialog/state'
+ %default{:translates_to => 'unknown'}
+ - if softkey[:actions]
+ %action
+ - softkey[:actions].each do |action|
+ - if action[:type] == :url
+ %url{:target => action[:target], :when => action[:when]}
+
+ %uploads
+ - if @state_settings_url
+ %file{:url => @state_settings_url, :type => "gui_xml_state_settings"}
diff --git a/app/views/config_snom/state_settings.xml.haml b/app/views/config_snom/state_settings.xml.haml
new file mode 100644
index 0000000..ac0e872
--- /dev/null
+++ b/app/views/config_snom/state_settings.xml.haml
@@ -0,0 +1,49 @@
+!!! XML
+%SnomIPPhoneMenu{:state => 'relevant', :title => "Gemeinschaft #{GEMEINSCHAFT_VERSION}"}
+ %MenuItem{:name => '$(lang:menu100_phone_book)'}
+ %URL= "#{@base_url}/#{@sip_account_ids.first}/phone_book.xml"
+ %Menu{:name => '$(lang:menu100_call_lists)'}
+ %MenuItem{:name => '$(lang:list_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)'}
+ - @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)'}
+ - @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)'}
+ %Action= 'active_line'
+
+ - if @enable_login
+ %MenuItem{:name => 'Log in'}
+ %URL= "#{@base_url}/log_in.xml"
+ - if @enable_logout
+ %MenuItem{:name => 'Log out'}
+ %URL= "#{@base_url}/log_out.xml"
+
+ %Menu{:name => '$(lang:preferences_settings)'}
+ %MenuItem{:name => '$(lang:menu_gen_contrast)'}
+ %Action= 'contrast'
+ %MenuItem{:name => '$(lang:use_backlight)'}
+ %Action= 'use_backlight'
+ %MenuItem{:name => '$(lang:use_backlight) $(lang:backlight_when_active)'}
+ %Action= 'backlight_active'
+ %MenuItem{:name => '$(lang:use_backlight) $(lang:backlight_when_idle)'}
+ %Action= 'backlight_idle'
+ %MenuItem{:name => '$(lang:menu_equalizer)'}
+ %Action= 'equalizer'
+ %Menu{:name => '$(lang:maintenance_settings)'}
+ %MenuItem{:name => '$(lang:system_information_menu)'}
+ %Action= 'sysinfo'
+ %MenuItem{:name => '$(lang:sel100_reboot)'}
+ %Action= 'reboot'
+ %If{:condition => '$(set:admin_mode)'}
+ %MenuItem{:name => '$(lang:reset_settings)'}
+ %Action= 'reset_settings'
+ %If{:condition => '$(update_available)'}
+ %MenuItem{:name => '$(lang:update_header)'}
+ %Action= 'software_update' \ No newline at end of file
diff --git a/app/views/config_snom/switch_protocol.xml.builder b/app/views/config_snom/switch_protocol.xml.builder
new file mode 100644
index 0000000..cd71486
--- /dev/null
+++ b/app/views/config_snom/switch_protocol.xml.builder
@@ -0,0 +1,18 @@
+xml.instruct! # <?xml version="1.0" encoding="UTF-8"?>
+
+xml.settings {
+ xml.tag!( 'phone-settings' ) {
+ xml.auto_reboot_on_setting_change( 'on', :perm => 'RW' )
+ xml.settings_refresh_timer( '60', :perm => 'RW' )
+ xml.reset_settings( 'main net stack user fkey speeddial phonebook', :perm => 'RW' )
+ #xml.dhcp( 'off', :perm => 'RW' )
+ #xml.ip_adr( @ip_address, :perm => 'RW' )
+ xml.setting_server( @prov_url, :perm => 'RW' )
+ }
+}
+
+
+# Local Variables:
+# mode: ruby
+# End:
+
diff --git a/app/views/fax_accounts/_form.html.haml b/app/views/fax_accounts/_form.html.haml
new file mode 100644
index 0000000..0a5a4c0
--- /dev/null
+++ b/app/views/fax_accounts/_form.html.haml
@@ -0,0 +1,7 @@
+= simple_form_for([ @parent, @fax_account ]) do |f|
+ = f.error_notification
+
+ = render "form_core", :f => f
+
+ .actions
+ = f.button :submit, conditional_t('fax_accounts.form.submit') \ No newline at end of file
diff --git a/app/views/fax_accounts/_form_core.html.haml b/app/views/fax_accounts/_form_core.html.haml
new file mode 100644
index 0000000..8153e5f
--- /dev/null
+++ b/app/views/fax_accounts/_form_core.html.haml
@@ -0,0 +1,11 @@
+.inputs
+ = f.input :name, :label => t('fax_accounts.form.name.label'), :hint => conditional_hint('fax_accounts.form.name.hint')
+ = f.input :station_id, :label => t('fax_accounts.form.station_id.label'), :hint => conditional_hint('fax_accounts.form.station_id.hint')
+ = f.input :retries, :label => t('fax_accounts.form.retries.label'), :hint => conditional_hint('fax_accounts.form.retries.hint')
+ = f.input :email, :label => t('fax_accounts.form.email.label'), :hint => conditional_hint('fax_accounts.form.email.hint')
+
+ = f.input :days_till_auto_delete, :label => t('fax_accounts.form.days_till_auto_delete.label'), :hint => conditional_hint('fax_accounts.form.days_till_auto_delete.hint')
+
+ %h2= t('phone_numbers.name')
+ = f.simple_fields_for :phone_numbers, @fax_account.phone_numbers do |phone_number|
+ = render "phone_numbers/form_core", :f => phone_number
diff --git a/app/views/fax_accounts/_index_core.html.haml b/app/views/fax_accounts/_index_core.html.haml
new file mode 100644
index 0000000..50dc2eb
--- /dev/null
+++ b/app/views/fax_accounts/_index_core.html.haml
@@ -0,0 +1,35 @@
+%table
+ %tr
+ %th= t('fax_accounts.index.name')
+ %th
+ = t('fax_accounts.index.phone_numbers')
+ %br
+ = t('fax_accounts.index.station_id')
+ %th
+ = t('fax_accounts.index.received')
+ = '/'
+ = t('fax_accounts.index.sent')
+ %br
+ %small
+ = t('fax_accounts.index.last_update')
+
+ - reset_cycle
+ - for fax_account in fax_accounts
+ %tr{:class => cycle('odd', 'even')}
+ %td= truncate(fax_account.name, :length => 15)
+ %td
+ =render 'phone_numbers/listing', :phone_numbers => fax_account.phone_numbers.order(:number)
+ %br
+ = truncate(fax_account.station_id, :length => 20)
+ %td
+ = link_to fax_account.fax_documents.inbound.count, fax_account_fax_documents_path(fax_account, :anchor => "fax_document_#{fax_account.fax_documents.inbound.first.try(:id)}")
+ = '/'
+ = link_to fax_account.fax_documents.outbound.count, fax_account_fax_documents_path(fax_account, :anchor => "fax_document_#{fax_account.fax_documents.outbound.first.try(:id)}")
+ - if fax_account.fax_documents.count > 0
+ %br
+ %small
+ = time_ago_in_words(fax_account.fax_documents.order(:updated_at).last.updated_at)
+ %td
+ - if can?(:new, FaxDocument, :fax_account_id => fax_account.id)
+ = link_to t('fax_accounts.index.send_a_fax'), new_fax_account_fax_document_path(fax_account)
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => fax_account.fax_accountable, :child => fax_account} \ No newline at end of file
diff --git a/app/views/fax_accounts/edit.html.haml b/app/views/fax_accounts/edit.html.haml
new file mode 100644
index 0000000..86f664d
--- /dev/null
+++ b/app/views/fax_accounts/edit.html.haml
@@ -0,0 +1,3 @@
+- title t("fax_accounts.edit.page_title")
+
+= render "form"
diff --git a/app/views/fax_accounts/index.html.haml b/app/views/fax_accounts/index.html.haml
new file mode 100644
index 0000000..309a10d
--- /dev/null
+++ b/app/views/fax_accounts/index.html.haml
@@ -0,0 +1,6 @@
+- title t("fax_accounts.index.page_title")
+
+- if @fax_accounts.count > 0
+ = render "index_core", {:fax_accounts => @fax_accounts, :fax_accountable => @parent}
+
+= render :partial => 'shared/create_link', :locals => {:parent => @parent, :child_class => FaxAccount} \ No newline at end of file
diff --git a/app/views/fax_accounts/new.html.haml b/app/views/fax_accounts/new.html.haml
new file mode 100644
index 0000000..9a67100
--- /dev/null
+++ b/app/views/fax_accounts/new.html.haml
@@ -0,0 +1,3 @@
+- title t("fax_accounts.new.page_title")
+
+= render "form"
diff --git a/app/views/fax_accounts/show.html.haml b/app/views/fax_accounts/show.html.haml
new file mode 100644
index 0000000..95fb7b2
--- /dev/null
+++ b/app/views/fax_accounts/show.html.haml
@@ -0,0 +1,21 @@
+- title t("fax_accounts.show.page_title")
+
+%p
+ %strong= t('fax_accounts.show.name') + ":"
+ = @fax_account.name
+%p
+ %strong= t('fax_accounts.show.email') + ":"
+ = @fax_account.email
+%p
+ %strong= t('fax_accounts.show.days_till_auto_delete') + ":"
+ = @fax_account.days_till_auto_delete
+
+= render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @parent, :child => @fax_account }
+
+= render :partial => 'shared/create_link', :locals => { :parent => @fax_account, :child_class => FaxDocument }
+
+%h2= t('phone_numbers.index.page_title')
+- if @fax_account.phone_numbers.count > 0
+ = render "phone_numbers/index_core", :phone_numbers => @fax_account.phone_numbers
+ %br
+= render :partial => 'shared/create_link', :locals => { :parent => @fax_account, :child_class => PhoneNumber } \ No newline at end of file
diff --git a/app/views/fax_documents/_form.html.haml b/app/views/fax_documents/_form.html.haml
new file mode 100644
index 0000000..e240371
--- /dev/null
+++ b/app/views/fax_documents/_form.html.haml
@@ -0,0 +1,7 @@
+= simple_form_for([@fax_account,@fax_document]) do |f|
+ = f.error_notification
+
+ = render "form_core", :f => f
+
+ .actions
+ = f.button :submit, conditional_t('fax_documents.form.submit') \ No newline at end of file
diff --git a/app/views/fax_documents/_form_core.html.haml b/app/views/fax_documents/_form_core.html.haml
new file mode 100644
index 0000000..2a53cd5
--- /dev/null
+++ b/app/views/fax_documents/_form_core.html.haml
@@ -0,0 +1,7 @@
+.inputs
+ = f.input :document, :label => t('fax_documents.form.document.label'), :hint => conditional_hint('fax_documents.form.document.hint')
+ = f.association :fax_resolution, :label => t('fax_documents.form.fax_resolution.label'), :hint => conditional_hint('fax_documents.form.fax_resolution.hint'), :include_blank => false
+
+ = f.simple_fields_for :destination_phone_number, @phone_number do |u|
+ = render "phone_numbers/form_core", :f => u
+
diff --git a/app/views/fax_documents/_index_core.html.haml b/app/views/fax_documents/_index_core.html.haml
new file mode 100644
index 0000000..4e15509
--- /dev/null
+++ b/app/views/fax_documents/_index_core.html.haml
@@ -0,0 +1,33 @@
+%table
+ %tr
+ %th= t('fax_documents.index.sent_at')
+ %th= t('fax_documents.index.state')
+ %th= t('fax_documents.index.result')
+ %th
+ = t('fax_documents.index.phone_number')
+ %br
+ = t('fax_documents.index.remote_station_id')
+ %th= t('fax_documents.index.thumbnails')
+
+ - reset_cycle
+ - for fax_document in fax_documents
+ %tr{:class => cycle('odd', 'even'), :id => "fax_document_#{fax_document.id}"}
+ - if fax_document.sent_at
+ %td= "#{fax_document.inbound ? '&#8680;' : '&#8678;'} #{fax_document.sent_at}".html_safe
+ %td= t("fax_documents.states.#{fax_document.state}")
+ %td= t("fax_documents.result_codes.code_#{fax_document.result_code}") + " (#{fax_document.result_code})"
+ - else
+ %td{ :colspan => 3 }= t("fax_documents.states.#{fax_document.state}")
+ %td
+ - if fax_document.inbound
+ = "#{fax_document.caller_id_number} #{fax_document.caller_id_name}"
+ - else
+ = fax_document.destination_phone_number
+ %br
+ = fax_document.remote_station_id
+ %td
+ - fax_document.fax_thumbnails.limit(5).each do |fax_thumbnail|
+ =image_tag fax_thumbnail.thumbnail_url(:mini), :class => 'FaxThumbnail', :alt => "Thumbnail of page \##{fax_thumbnail.position}"
+ - if can?(:show, fax_document) && !fax_document.document.blank? && File.readable?(fax_document.document.path)
+ = link_to t('fax_documents.index.actions.download'), fax_account_fax_document_path(@fax_account, fax_document, :format => :pdf), :method => :get
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => fax_document.fax_account, :child => fax_document}
diff --git a/app/views/fax_documents/edit.html.haml b/app/views/fax_documents/edit.html.haml
new file mode 100644
index 0000000..5da92c6
--- /dev/null
+++ b/app/views/fax_documents/edit.html.haml
@@ -0,0 +1,9 @@
+- title t("fax_documents.edit.page_title")
+
+= render "form"
+
+%p
+ - if can? :edit, @fax_document
+ = link_to t('fax_documents.edit.actions.edit'), @fax_document
+ |
+ = link_to t('fax_documents.edit.actions.view_all'), fax_documents_path
diff --git a/app/views/fax_documents/index.html.haml b/app/views/fax_documents/index.html.haml
new file mode 100644
index 0000000..11199dd
--- /dev/null
+++ b/app/views/fax_documents/index.html.haml
@@ -0,0 +1,5 @@
+- title t("fax_documents.index.page_title")
+
+= render "index_core", :fax_documents => @fax_documents
+
+= render :partial => 'shared/create_link', :locals => {:parent => @fax_account, :child_class => FaxDocument} \ No newline at end of file
diff --git a/app/views/fax_documents/new.html.haml b/app/views/fax_documents/new.html.haml
new file mode 100644
index 0000000..be02860
--- /dev/null
+++ b/app/views/fax_documents/new.html.haml
@@ -0,0 +1,3 @@
+- title t("fax_documents.new.page_title")
+
+= render "form"
diff --git a/app/views/fax_documents/show.html.haml b/app/views/fax_documents/show.html.haml
new file mode 100644
index 0000000..4703e1d
--- /dev/null
+++ b/app/views/fax_documents/show.html.haml
@@ -0,0 +1,36 @@
+- title t("fax_documents.show.page_title")
+- child = @fax_document
+- parent = @fax_document.fax_account
+
+%p
+ %strong= t('fax_documents.index.state') + ":"
+ = t("fax_documents.states.#{@fax_document.state}")
+
+%p
+ %strong= t('fax_documents.index.result_code') + ":"
+ = @fax_document.result_code
+
+%p
+ %strong= t('fax_documents.index.result_text') + ":"
+ = t("fax_documents.result_codes.code_#{@fax_document.result_code}")
+
+%p
+ %strong= t('fax_documents.show.document_transferred_pages') + ":"
+ = @fax_document.document_transferred_pages
+%p
+ %strong= t('fax_documents.show.remote_station_id') + ":"
+ = @fax_document.remote_station_id
+%p
+ %strong= t('fax_documents.show.fax_resolution') + ":"
+ = @fax_document.fax_resolution
+
+- if @fax_document.fax_thumbnails.count > 0
+ - i = @fax_document.fax_thumbnails.count
+ - i = 10 if i > 10
+ - @fax_document.fax_thumbnails.limit(i).each do |fax_thumbnail|
+ =image_tag fax_thumbnail.thumbnail_url(:medium), :class => 'FaxThumbnail', :alt => "Thumbnail of page \##{fax_thumbnail.position}"
+
+- if @fax_document.document.path
+ = link_to t("fax_documents.index.actions.download_pdf"), "#{request.protocol}#{request.host_with_port}#{request.fullpath.split("?")[0]}.pdf"
+
+= render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @fax_document.fax_account, :child => @fax_document }
diff --git a/app/views/freeswitch_voicemail_msgs/_index_core.html.haml b/app/views/freeswitch_voicemail_msgs/_index_core.html.haml
new file mode 100644
index 0000000..58d9944
--- /dev/null
+++ b/app/views/freeswitch_voicemail_msgs/_index_core.html.haml
@@ -0,0 +1,12 @@
+%table
+ %tr
+ %th= t('freeswitch_voicemail_msgs.index.created_epoch')
+ %th= t('freeswitch_voicemail_msgs.index.message_len')
+ %th= t('freeswitch_voicemail_msgs.index.file_path')
+
+ - reset_cycle
+ - for freeswitch_voicemail_msg in freeswitch_voicemail_msgs
+ %tr{:class => cycle('odd', 'even')}
+ %td= freeswitch_voicemail_msg.created_epoch
+ %td= freeswitch_voicemail_msg.message_len
+ %td= freeswitch_voicemail_msg.file_path \ No newline at end of file
diff --git a/app/views/freeswitch_voicemail_msgs/index.html.haml b/app/views/freeswitch_voicemail_msgs/index.html.haml
new file mode 100644
index 0000000..5083c6f
--- /dev/null
+++ b/app/views/freeswitch_voicemail_msgs/index.html.haml
@@ -0,0 +1,3 @@
+- title t("freeswitch_voicemail_msgs.index.page_title")
+
+= render "index_core", :freeswitch_voicemail_msgs => @freeswitch_voicemail_msgs \ No newline at end of file
diff --git a/app/views/gemeinschaft_setups/new.de.html.haml b/app/views/gemeinschaft_setups/new.de.html.haml
new file mode 100644
index 0000000..5e79115
--- /dev/null
+++ b/app/views/gemeinschaft_setups/new.de.html.haml
@@ -0,0 +1,25 @@
+- title "Konfiguration einer Gemeinschaft #{GEMEINSCHAFT_VERSION} Installation"
+
+= simple_form_for(@gemeinschaft_setup) do |f|
+ = f.error_notification
+
+ %h2 Admin-Konto
+ %p
+ Dieser erste Benutzer des Systems hat automatisch Admin-Rechte.
+
+ = f.simple_fields_for :user, @user do |u|
+ = render "users/form_core", :f => u
+
+ %h2 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.
+
+ = f.simple_fields_for :sip_domain, @sip_domain do |s|
+ = render "sip_domains/form_core", :f => s
+
+ %h2 Allgemeine Informationen
+
+ = f.association :country, :label => t('gemeinschaft_setups.form.country_id.label'), :hint => conditional_hint('gemeinschaft_setups.form.country_id.hint'), :include_blank => false
+ = f.association :language, :label => t('gemeinschaft_setups.form.language_id.label'), :hint => conditional_hint('gemeinschaft_setups.form.language_id.hint'), :include_blank => false
+
+ .actions
+ = f.button :submit, conditional_t('gemeinschaft_setups.form.submit') \ No newline at end of file
diff --git a/app/views/gemeinschaft_setups/new.html.haml b/app/views/gemeinschaft_setups/new.html.haml
new file mode 100644
index 0000000..f5f0e81
--- /dev/null
+++ b/app/views/gemeinschaft_setups/new.html.haml
@@ -0,0 +1,25 @@
+- title "Configure a new Gemeinschaft #{GEMEINSCHAFT_VERSION} server"
+
+= simple_form_for(@gemeinschaft_setup) do |f|
+ = f.error_notification
+
+ %h3 Admin user account
+ %p
+ This is the first user of this system who has admin rights by default.
+
+ = f.simple_fields_for :user, @user do |u|
+ = render "users/form_core", :f => u
+
+ %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.
+
+ = f.simple_fields_for :sip_domain, @sip_domain do |s|
+ = render "sip_domains/form_core", :f => s
+
+ %h3 General information
+
+ = f.association :country, :label => t('gemeinschaft_setups.form.country_id.label'), :hint => conditional_hint('gemeinschaft_setups.form.country_id.hint'), :include_blank => false
+ = f.association :language, :label => t('gemeinschaft_setups.form.language_id.label'), :hint => conditional_hint('gemeinschaft_setups.form.language_id.hint'), :include_blank => false
+
+ .actions
+ = f.button :submit, conditional_t('gemeinschaft_setups.form.submit') \ No newline at end of file
diff --git a/app/views/gs_cluster_sync_log_entries/_form.html.haml b/app/views/gs_cluster_sync_log_entries/_form.html.haml
new file mode 100644
index 0000000..2c47d88
--- /dev/null
+++ b/app/views/gs_cluster_sync_log_entries/_form.html.haml
@@ -0,0 +1,7 @@
+= simple_form_for(@gs_cluster_sync_log_entry) do |f|
+ = f.error_notification
+
+ = render "form_core", :f => f
+
+ .actions
+ = f.button :submit, conditional_t('gs_cluster_sync_log_entries.form.submit') \ No newline at end of file
diff --git a/app/views/gs_cluster_sync_log_entries/_form_core.html.haml b/app/views/gs_cluster_sync_log_entries/_form_core.html.haml
new file mode 100644
index 0000000..50b4630
--- /dev/null
+++ b/app/views/gs_cluster_sync_log_entries/_form_core.html.haml
@@ -0,0 +1,6 @@
+.inputs
+ = f.input :gs_node_id, :label => t('gs_cluster_sync_log_entries.form.gs_node_id.label'), :hint => conditional_hint('gs_cluster_sync_log_entries.form.gs_node_id.hint')
+ = f.input :class_name, :label => t('gs_cluster_sync_log_entries.form.class_name.label'), :hint => conditional_hint('gs_cluster_sync_log_entries.form.class_name.hint')
+ = f.input :action, :label => t('gs_cluster_sync_log_entries.form.action.label'), :hint => conditional_hint('gs_cluster_sync_log_entries.form.action.hint')
+ = f.input :content, :label => t('gs_cluster_sync_log_entries.form.content.label'), :hint => conditional_hint('gs_cluster_sync_log_entries.form.content.hint')
+ = f.input :status, :label => t('gs_cluster_sync_log_entries.form.status.label'), :hint => conditional_hint('gs_cluster_sync_log_entries.form.status.hint')
diff --git a/app/views/gs_cluster_sync_log_entries/_index_core.html.haml b/app/views/gs_cluster_sync_log_entries/_index_core.html.haml
new file mode 100644
index 0000000..05cbda8
--- /dev/null
+++ b/app/views/gs_cluster_sync_log_entries/_index_core.html.haml
@@ -0,0 +1,17 @@
+%table
+ %tr
+ %th= t('gs_cluster_sync_log_entries.index.gs_node_id')
+ %th= t('gs_cluster_sync_log_entries.index.class_name')
+ %th= t('gs_cluster_sync_log_entries.index.action')
+ %th= t('gs_cluster_sync_log_entries.index.content')
+ %th= t('gs_cluster_sync_log_entries.index.status')
+
+ - reset_cycle
+ - for gs_cluster_sync_log_entry in gs_cluster_sync_log_entries
+ %tr{:class => cycle('odd', 'even')}
+ %td= gs_cluster_sync_log_entry.gs_node_id
+ %td= gs_cluster_sync_log_entry.class_name
+ %td= gs_cluster_sync_log_entry.action
+ %td= gs_cluster_sync_log_entry.content
+ %td= gs_cluster_sync_log_entry.status
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => gs_cluster_sync_log_entry} \ No newline at end of file
diff --git a/app/views/gs_cluster_sync_log_entries/edit.html.haml b/app/views/gs_cluster_sync_log_entries/edit.html.haml
new file mode 100644
index 0000000..b0c65f3
--- /dev/null
+++ b/app/views/gs_cluster_sync_log_entries/edit.html.haml
@@ -0,0 +1,3 @@
+- title t("gs_cluster_sync_log_entries.edit.page_title")
+
+= render "form" \ No newline at end of file
diff --git a/app/views/gs_cluster_sync_log_entries/index.html.haml b/app/views/gs_cluster_sync_log_entries/index.html.haml
new file mode 100644
index 0000000..68be7e0
--- /dev/null
+++ b/app/views/gs_cluster_sync_log_entries/index.html.haml
@@ -0,0 +1,6 @@
+- title t("gs_cluster_sync_log_entries.index.page_title")
+
+- if @gs_cluster_sync_log_entries && @gs_cluster_sync_log_entries.count > 0
+ = render "index_core", :gs_cluster_sync_log_entries => @gs_cluster_sync_log_entries
+
+= render :partial => 'shared/create_link', :locals => {:child_class => GsClusterSyncLogEntry} \ No newline at end of file
diff --git a/app/views/gs_cluster_sync_log_entries/new.html.haml b/app/views/gs_cluster_sync_log_entries/new.html.haml
new file mode 100644
index 0000000..01b795c
--- /dev/null
+++ b/app/views/gs_cluster_sync_log_entries/new.html.haml
@@ -0,0 +1,3 @@
+- title t("gs_cluster_sync_log_entries.new.page_title")
+
+= render "form" \ No newline at end of file
diff --git a/app/views/gs_cluster_sync_log_entries/show.html.haml b/app/views/gs_cluster_sync_log_entries/show.html.haml
new file mode 100644
index 0000000..733576d
--- /dev/null
+++ b/app/views/gs_cluster_sync_log_entries/show.html.haml
@@ -0,0 +1,19 @@
+- title t("gs_cluster_sync_log_entries.show.page_title")
+
+%p
+ %strong= t('gs_cluster_sync_log_entries.show.gs_node_id') + ":"
+ = @gs_cluster_sync_log_entry.gs_node_id
+%p
+ %strong= t('gs_cluster_sync_log_entries.show.class_name') + ":"
+ = @gs_cluster_sync_log_entry.class_name
+%p
+ %strong= t('gs_cluster_sync_log_entries.show.action') + ":"
+ = @gs_cluster_sync_log_entry.action
+%p
+ %strong= t('gs_cluster_sync_log_entries.show.content') + ":"
+ = @gs_cluster_sync_log_entry.content
+%p
+ %strong= t('gs_cluster_sync_log_entries.show.status') + ":"
+ = @gs_cluster_sync_log_entry.status
+
+= render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @gs_cluster_sync_log_entry } \ No newline at end of file
diff --git a/app/views/gs_nodes/_form.html.haml b/app/views/gs_nodes/_form.html.haml
new file mode 100644
index 0000000..28a4e5d
--- /dev/null
+++ b/app/views/gs_nodes/_form.html.haml
@@ -0,0 +1,7 @@
+= simple_form_for(@gs_node) do |f|
+ = f.error_notification
+
+ = render "form_core", :f => f
+
+ .actions
+ = f.button :submit, conditional_t('gs_nodes.form.submit') \ No newline at end of file
diff --git a/app/views/gs_nodes/_form_core.html.haml b/app/views/gs_nodes/_form_core.html.haml
new file mode 100644
index 0000000..2355e52
--- /dev/null
+++ b/app/views/gs_nodes/_form_core.html.haml
@@ -0,0 +1,7 @@
+.inputs
+ = f.input :name, :label => t('gs_nodes.form.name.label'), :hint => conditional_hint('gs_nodes.form.name.hint')
+ = f.input :ip_address, :label => t('gs_nodes.form.ip_address.label'), :hint => conditional_hint('gs_nodes.form.ip_address.hint')
+ = f.input :site, :label => t('gs_nodes.form.site.label'), :hint => conditional_hint('gs_nodes.form.site.hint')
+ = f.input :element_name, :label => t('gs_nodes.form.element_name.label'), :hint => conditional_hint('gs_nodes.form.element_name.hint')
+ = f.input :push_updates_to, :label => t('gs_nodes.form.push_updates_to.label'), :hint => conditional_hint('gs_nodes.form.push_updates_to.hint')
+ = f.input :accepts_updates_from, :label => t('gs_nodes.form.accepts_updates_from.label'), :hint => conditional_hint('gs_nodes.form.accepts_updates_from.hint')
diff --git a/app/views/gs_nodes/_index_core.html.haml b/app/views/gs_nodes/_index_core.html.haml
new file mode 100644
index 0000000..72633e1
--- /dev/null
+++ b/app/views/gs_nodes/_index_core.html.haml
@@ -0,0 +1,19 @@
+%table
+ %tr
+ %th= t('gs_nodes.index.name')
+ %th= t('gs_nodes.index.ip_address')
+ %th= t('gs_nodes.index.site')
+ %th= t('gs_nodes.index.element_name')
+ %th= t('gs_nodes.index.push_updates_to')
+ %th= t('gs_nodes.index.accepts_updates_from')
+
+ - reset_cycle
+ - for gs_node in gs_nodes
+ %tr{:class => cycle('odd', 'even')}
+ %td= gs_node.name
+ %td= gs_node.ip_address
+ %td= gs_node.site
+ %td= gs_node.element_name
+ %td= gs_node.push_updates_to
+ %td= gs_node.accepts_updates_from
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => gs_node} \ No newline at end of file
diff --git a/app/views/gs_nodes/edit.html.haml b/app/views/gs_nodes/edit.html.haml
new file mode 100644
index 0000000..c025b05
--- /dev/null
+++ b/app/views/gs_nodes/edit.html.haml
@@ -0,0 +1,3 @@
+- title t("gs_nodes.edit.page_title")
+
+= render "form" \ No newline at end of file
diff --git a/app/views/gs_nodes/index.html.haml b/app/views/gs_nodes/index.html.haml
new file mode 100644
index 0000000..4670cef
--- /dev/null
+++ b/app/views/gs_nodes/index.html.haml
@@ -0,0 +1,6 @@
+- title t("gs_nodes.index.page_title")
+
+- if @gs_nodes && @gs_nodes.count > 0
+ = render "index_core", :gs_nodes => @gs_nodes
+
+= render :partial => 'shared/create_link', :locals => {:child_class => GsNode} \ No newline at end of file
diff --git a/app/views/gs_nodes/new.html.haml b/app/views/gs_nodes/new.html.haml
new file mode 100644
index 0000000..230ce33
--- /dev/null
+++ b/app/views/gs_nodes/new.html.haml
@@ -0,0 +1,3 @@
+- title t("gs_nodes.new.page_title")
+
+= render "form" \ No newline at end of file
diff --git a/app/views/gs_nodes/show.html.haml b/app/views/gs_nodes/show.html.haml
new file mode 100644
index 0000000..ca70a50
--- /dev/null
+++ b/app/views/gs_nodes/show.html.haml
@@ -0,0 +1,22 @@
+- title t("gs_nodes.show.page_title")
+
+%p
+ %strong= t('gs_nodes.show.name') + ":"
+ = @gs_node.name
+%p
+ %strong= t('gs_nodes.show.ip_address') + ":"
+ = @gs_node.ip_address
+%p
+ %strong= t('gs_nodes.show.site') + ":"
+ = @gs_node.site
+%p
+ %strong= t('gs_nodes.show.element_name') + ":"
+ = @gs_node.element_name
+%p
+ %strong= t('gs_nodes.show.push_updates_to') + ":"
+ = @gs_node.push_updates_to
+%p
+ %strong= t('gs_nodes.show.accepts_updates_from') + ":"
+ = @gs_node.accepts_updates_from
+
+= render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @gs_node } \ No newline at end of file
diff --git a/app/views/gs_nodes/sync.xml.haml b/app/views/gs_nodes/sync.xml.haml
new file mode 100644
index 0000000..0f097f8
--- /dev/null
+++ b/app/views/gs_nodes/sync.xml.haml
@@ -0,0 +1,88 @@
+!!! XML
+%gemeinschaft_sync{ :date => Time.now, :newer_as => @newer_as, :class => @request_class }
+ %node{ :id => @node.id, :ip_address => @node.ip_address, :name => @node.name }
+
+ - if !@tenants.blank?
+ %tenants
+ - @tenants.each do |tenant|
+ %tenant{ :name => tenant.name }
+
+ - if !@user_groups.blank?
+ %user_groups
+ - @user_groups.each do |user_group|
+ %user_group{ :name => user_group.name, :description => user_group.description, :position => user_group.position, :tenant => user_group.tenant.try(:name), :created_at => user_group.created_at, :updated_at => user_group.updated_at }
+
+ - if !@users.blank?
+ %users
+ - @users.each do |user|
+ %user{ :user_name => user.user_name, :first_name => user.first_name, :middle_name => user.middle_name, :last_name => user.last_name, :password_digest => user.password_digest, :pin_salt => user.pin_salt, :pin_hash => user.pin_hash, :male => user.male.to_s, :send_voicemail_as_email_attachment => user.send_voicemail_as_email_attachment.to_s, :uuid => user.uuid, :language => user.language.try(:code), :importer_checksum => user.importer_checksum, :email => user.email, :created_at => user.created_at, :updated_at => user.updated_at, :current_tenant => user.current_tenant.try(:name), :gs_node => user.gs_node.try(:name) }
+
+ - if !@user_group_memberships.blank?
+ %user_group_memberships
+ - @user_group_memberships.each do |membership|
+ %user_group_membership{ :user_group => membership.user_group.try(:name), :user_uuid => membership.user.try(:uuid), :state => membership.state, :created_at => membership.created_at, :updated_at => membership.updated_at }
+
+ - if !@sip_accounts.blank?
+ %sip_accounts
+ - @sip_accounts.each do |sip_account|
+ %sip_account{ :sip_accountable_type => sip_account.sip_accountable_type, :sip_accountable_uuid => sip_account.sip_accountable.try(:uuid), :uuid => sip_account.uuid, :auth_name => sip_account.auth_name, :caller_name => sip_account.caller_name, :password => sip_account.password, :voicemail_pin => sip_account.voicemail_pin, :created_at => sip_account.created_at, :updated_at => sip_account.updated_at, :tenant => sip_account.tenant.try(:name), :sip_domain => sip_account.sip_domain.try(:host), :call_waiting => sip_account.call_waiting.to_s, :clir => sip_account.clir.to_s, :clip_no_screening => sip_account.clip_no_screening, :clip => sip_account.clip.to_s, :description => sip_account.description, :callforward_rules_act_per_sip_account => sip_account.callforward_rules_act_per_sip_account.to_s, :hotdeskable => sip_account.hotdeskable.to_s, :gs_node => sip_account.gs_node.try(:name) }
+
+ - if !@conferences.blank?
+ %conferences
+ - @conferences.each do |conference|
+ %conference{ :uuid => conference.uuid, :name => conference.name, :start => conference.start, :end => conference.end, :conferenceable_type => conference.conferenceable_type, :conferenceable_uuid => conference.conferenceable.try(:uuid), :description => conference.description, :pin => conference.pin, :state => conference.state, :open_for_anybody => conference.open_for_anybody.to_s, :max_members => conference.max_members, :announce_new_member_by_name => conference.announce_new_member_by_name.to_s, :announce_left_member_by_name => conference.announce_left_member_by_name.to_s, :created_at => conference.created_at, :updated_at => conference.updated_at }
+
+ - if !@fax_accounts.blank?
+ %fax_accounts
+ - @fax_accounts.each do |fax_account|
+ %fax_account{ :uuid => fax_account.uuid, :name => fax_account.name, :email => fax_account.email, :tenant => fax_account.tenant.try(:name), :fax_accountable_type => fax_account.fax_accountable_type, :fax_accountable_uuid => fax_account.fax_accountable.try(:uuid), :station_id => fax_account.station_id, :days_till_auto_delete => fax_account.days_till_auto_delete, :retries => fax_account.retries, :created_at => fax_account.created_at, :updated_at => fax_account.updated_at }
+
+ - if !@phone_books.blank?
+ %phone_books
+ - @phone_books.each do |phone_book|
+ %phone_book{ :uuid => phone_book.uuid, :name => phone_book.name, :description => phone_book.description, :state => phone_book.state, :phone_bookable_type => phone_book.phone_bookable_type, :phone_bookable_uuid => phone_book.phone_bookable.try(:uuid), :created_at => phone_book.created_at, :updated_at => phone_book.updated_at }
+
+ - if !@phone_book_entries.blank?
+ %phone_book_entries
+ - @phone_book_entries.each do |phone_book_entry|
+ %phone_book_entry{ :uuid => phone_book_entry.uuid, :phone_book_uuid => phone_book_entry.phone_book.try(:uuid), :created_at => phone_book_entry.created_at, :updated_at => phone_book_entry.updated_at, :first_name => phone_book_entry.first_name, :middle_name => phone_book_entry.middle_name, :last_name => phone_book_entry.last_name, :title => phone_book_entry.title, :nickname => phone_book_entry.nickname, :organization => phone_book_entry.organization, :is_organization => phone_book_entry.is_organization.to_s, :department => phone_book_entry.department, :job_title => phone_book_entry.job_title, :is_male => phone_book_entry.is_male.to_s, :birthday => phone_book_entry.birthday, :birth_name => phone_book_entry.birth_name, :state => phone_book_entry.state, :description => phone_book_entry.description, :position => phone_book_entry.position, :homepage_personal => phone_book_entry.homepage_personal, :homepage_organization => phone_book_entry.homepage_organization, :twitter_account => phone_book_entry.twitter_account, :facebook_account => phone_book_entry.facebook_account, :google_plus_account => phone_book_entry.google_plus_account, :xing_account => phone_book_entry.xing_account, :linkedin_account => phone_book_entry.linkedin_account, :mobileme_account => phone_book_entry.mobileme_account, :created_at => phone_book_entry.created_at, :updated_at => phone_book_entry.updated_at, :first_name_phonetic => phone_book_entry.first_name_phonetic, :last_name_phonetic => phone_book_entry.last_name_phonetic, :organization_phonetic => phone_book_entry.organization_phonetic }
+
+ - if !@phone_numbers.blank?
+ %phone_numbers
+ - @phone_numbers.each do |phone_number|
+ %phone_number{ :uuid => phone_number.uuid, :name => phone_number.name, :number => phone_number.number, :phone_numberable_type => phone_number.phone_numberable_type, :phone_numberable_uuid => phone_number.phone_numberable.try(:uuid), :position => phone_number.position, :gs_node => phone_number.gs_node.try(:name), :created_at => phone_number.created_at, :updated_at => phone_number.updated_at }
+
+ - if !@call_forwards.blank?
+ %call_forwards
+ - @call_forwards.each do |call_forward|
+ %call_forward{ :uuid => call_forward.uuid, :service => call_forward.call_forward_case.try(:value), :timeout => call_forward.timeout, :destination => call_forward.destination, :source => call_forward.source, :active => call_forward.active.to_s, :created_at => call_forward.created_at, :updated_at => call_forward.updated_at, :phone_number_uuid => call_forward.phone_number.try(:uuid), :depth => call_forward.depth, :call_forwardable_type => call_forward.call_forwardable_type, :call_forwardable_uuid => call_forward.call_forwardable.try(:uuid), :position => call_forward.position}
+
+ - if !@softkeys.blank?
+ %softkeys
+ - @softkeys.each do |softkey|
+ %softkey{ :uuid => softkey.uuid, :function => softkey.softkey_function.try(:name), :number => softkey.number, :label => softkey.label, :position => softkey.position, :created_at => softkey.created_at, :updated_at => softkey.updated_at, :sip_account_uuid => softkey.sip_account.try(:uuid), :call_forward_uuid => softkey.call_forward.try(:uuid) }
+
+ - if !@ringtones.blank?
+ %ringtones
+ - @ringtones.each do |ringtone|
+ %ringtone{ :bellcore_id => ringtone.bellcore_id, :ringtoneable_type => ringtone.ringtoneable_type, :ringtoneable_uuid => ringtone.ringtoneable.try(:uuid), :created_at => ringtone.created_at, :updated_at => ringtone.updated_at }
+
+ - if !@conference_invitees.blank?
+ %conference_invitees
+ - @conference_invitees.each do |conference_invitee|
+ %conference_invitee{ :uuid => conference_invitee.uuid, :conference_uuid => conference_invitee.conference.try(:uuid), :phone_number_uuid => conference_invitee.phone_number.try(:uuid), :pin => conference_invitee.pin, :speaker => conference_invitee.speaker.to_s, :moderator => conference_invitee.moderator.to_s, :phone_book_entry_uuid => conference_invitee.phone_book_entry.try(:uuid), :created_at => conference_invitee.created_at, :updated_at => conference_invitee.updated_at }
+
+ - if !@fax_documents.blank?
+ %fax_documents
+ - @fax_documents.each do |fax_document|
+ %fax_document{ :inbound => fax_document.inbound.to_s, :state => fax_document.state, :transmission_time => fax_document.transmission_time, :sent_at => fax_document.sent_at, :document_total_pages => fax_document.document_total_pages, :document_transferred_pages => fax_document.document_transferred_pages, :ecm_requested => fax_document.ecm_requested.to_s, :ecm_used => fax_document.ecm_used.to_s, :image_resolution => fax_document.image_resolution, :image_size => fax_document.image_size, :local_station_id => fax_document.local_station_id, :result_code => fax_document.result_code, :remote_station_id => fax_document.remote_station_id, :success => fax_document.success.to_s, :transfer_rate => fax_document.transfer_rate, :document => fax_document.document, :created_at => fax_document.created_at, :updated_at => fax_document.updated_at, :fax_account_uuid => fax_document.fax_account.try(:uuid), :caller_id_number => fax_document.caller_id_number, :caller_id_name => fax_document.caller_id_name, :retry_counter => fax_document.retry_counter, :tiff => fax_document.tiff, :fax_resolution => fax_document.fax_resolution.try(:resolution_value), :document => fax_document.document.to_s,:uuid => fax_document.uuid }
+
+ - if !@call_histories.blank?
+ %call_histories
+ - @call_histories.each do |call_history|
+ %call_history{ :call_historyable_type => call_history.call_historyable_type, :call_historyable_uuid => call_history.call_historyable_uuid, :entry_type => call_history.entry_type, :caller_account_type => call_history.caller_account_type, :caller_account_uuid => call_history.caller_account_uuid, :caller_id_number => call_history.caller_id_number, :caller_id_name => call_history.caller_id_name, :caller_channel_uuid => call_history.caller_channel_uuid, :callee_account_type => call_history.callee_account_type, :callee_account_uuid => call_history.callee_account_uuid, :callee_id_number => call_history.callee_id_number, :callee_id_name => call_history.callee_id_name, :auth_account_type => call_history.auth_account_type, :auth_account_uuid => call_history.auth_account_uuid, :forwarding_service => call_history.forwarding_service, :destination_number => call_history.destination_number, :start_stamp => call_history.start_stamp, :duration => call_history.duration, :result => call_history.result, :read_flag => call_history.read_flag.to_s, :returned_flag => call_history.returned_flag.to_s, :created_at => call_history.created_at, :updated_at => call_history.updated_at }
+
+ - if !@deleted_items.blank?
+ %deleted_items
+ - @deleted_items.each do |deleted_item|
+ %deleted_item{ :class_name => deleted_item['class_name'], :uuid => deleted_item['uuid'] }
diff --git a/app/views/gui_functions/_form.html.haml b/app/views/gui_functions/_form.html.haml
new file mode 100644
index 0000000..0b2a201
--- /dev/null
+++ b/app/views/gui_functions/_form.html.haml
@@ -0,0 +1,7 @@
+= simple_form_for(@gui_function) do |f|
+ = f.error_notification
+
+ = render "form_core", :f => f
+
+ .actions
+ = f.button :submit, conditional_t('gui_functions.form.submit') \ No newline at end of file
diff --git a/app/views/gui_functions/_form_core.html.haml b/app/views/gui_functions/_form_core.html.haml
new file mode 100644
index 0000000..c2d6cd7
--- /dev/null
+++ b/app/views/gui_functions/_form_core.html.haml
@@ -0,0 +1,10 @@
+.inputs
+ = f.input :category, :label => t('gui_functions.form.category.label'), :hint => conditional_hint('gui_functions.form.category.hint')
+ = f.input :name, :label => t('gui_functions.form.name.label'), :hint => conditional_hint('gui_functions.form.name.hint')
+ = f.input :description, :label => t('gui_functions.form.description.label'), :hint => conditional_hint('gui_functions.form.description.hint')
+
+ - counter = 0
+ = f.fields_for :gui_function_memberships do |gui_function_membership|
+ = gui_function_membership.hidden_field :user_group_id
+ = gui_function_membership.input :activated, :label => @user_groups[counter], :hint => conditional_hint('gui_functions.form.activated.hint')
+ - counter = counter + 1 \ No newline at end of file
diff --git a/app/views/gui_functions/_index_core.html.haml b/app/views/gui_functions/_index_core.html.haml
new file mode 100644
index 0000000..093a0d7
--- /dev/null
+++ b/app/views/gui_functions/_index_core.html.haml
@@ -0,0 +1,26 @@
+%table
+ %tr
+ %th= t('gui_functions.index.category')
+ %th= t('gui_functions.index.name')
+ - @user_groups.each do |user_group|
+ %th= user_group
+
+ - reset_cycle
+ - for gui_function in gui_functions
+ %tr{:class => cycle('odd', 'even')}
+ %td= gui_function.category
+ %td
+ = gui_function.name
+ - if !gui_function.description.blank?
+ %br
+ %i= gui_function.description
+ - @user_groups.each do |user_group|
+ - if gui_function.gui_function_memberships.find_by_user_group_id(user_group.id)
+ - if gui_function.gui_function_memberships.find_by_user_group_id(user_group.id).activated == true
+ %td= 'x'
+ - else
+ %td= ''
+ - else
+ %td= 'x'
+
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => gui_function} \ No newline at end of file
diff --git a/app/views/gui_functions/edit.html.haml b/app/views/gui_functions/edit.html.haml
new file mode 100644
index 0000000..f43b5bc
--- /dev/null
+++ b/app/views/gui_functions/edit.html.haml
@@ -0,0 +1,3 @@
+- title t("gui_functions.edit.page_title")
+
+= render "form" \ No newline at end of file
diff --git a/app/views/gui_functions/index.html.haml b/app/views/gui_functions/index.html.haml
new file mode 100644
index 0000000..ef909f0
--- /dev/null
+++ b/app/views/gui_functions/index.html.haml
@@ -0,0 +1,6 @@
+- title t("gui_functions.index.page_title")
+
+- if @gui_functions && @gui_functions.count > 0
+ = render "index_core", :gui_functions => @gui_functions
+
+= render :partial => 'shared/create_link', :locals => {:child_class => GuiFunction} \ No newline at end of file
diff --git a/app/views/gui_functions/new.html.haml b/app/views/gui_functions/new.html.haml
new file mode 100644
index 0000000..6c57e9c
--- /dev/null
+++ b/app/views/gui_functions/new.html.haml
@@ -0,0 +1,3 @@
+- title t("gui_functions.new.page_title")
+
+= render "form" \ No newline at end of file
diff --git a/app/views/gui_functions/show.html.haml b/app/views/gui_functions/show.html.haml
new file mode 100644
index 0000000..0fc2dd9
--- /dev/null
+++ b/app/views/gui_functions/show.html.haml
@@ -0,0 +1,18 @@
+- title t("gui_functions.show.page_title")
+
+%p
+ %strong= t('gui_functions.show.name') + ":"
+ = @gui_function.name
+%p
+ %strong= t('gui_functions.show.description') + ":"
+ = @gui_function.description
+
+- @user_groups.each do |user_group|
+ %p
+ %strong= "#{user_group}:"
+ - if @gui_function.gui_function_memberships.where(:user_group_id => user_group.id, :activated => true).count > 0
+ = 'x'
+ - else
+ = 'not activated'
+
+= render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @gui_function } \ No newline at end of file
diff --git a/app/views/hunt_group_members/_form.html.haml b/app/views/hunt_group_members/_form.html.haml
new file mode 100644
index 0000000..1ab7850
--- /dev/null
+++ b/app/views/hunt_group_members/_form.html.haml
@@ -0,0 +1,7 @@
+= simple_form_for([@hunt_group, @hunt_group_member]) do |f|
+ = f.error_notification
+
+ = render "form_core", :f => f
+
+ .actions
+ = f.button :submit, conditional_t('hunt_group_members.form.submit') \ No newline at end of file
diff --git a/app/views/hunt_group_members/_form_core.html.haml b/app/views/hunt_group_members/_form_core.html.haml
new file mode 100644
index 0000000..2f03fce
--- /dev/null
+++ b/app/views/hunt_group_members/_form_core.html.haml
@@ -0,0 +1,4 @@
+.inputs
+ = f.input :name, :label => t('hunt_group_members.form.name.label'), :hint => conditional_hint('hunt_group_members.form.name.hint')
+ = f.input :active, :label => t('hunt_group_members.form.active.label'), :hint => conditional_hint('hunt_group_members.form.active.hint')
+ = f.input :can_switch_status_itself, :label => t('hunt_group_members.form.can_switch_status_itself.label'), :hint => conditional_hint('hunt_group_members.form.can_switch_status_itself.hint')
diff --git a/app/views/hunt_group_members/_index_core.html.haml b/app/views/hunt_group_members/_index_core.html.haml
new file mode 100644
index 0000000..46b64c8
--- /dev/null
+++ b/app/views/hunt_group_members/_index_core.html.haml
@@ -0,0 +1,20 @@
+%table
+ %tr
+ %th= t('hunt_group_members.index.name')
+ %th= t('hunt_group_members.index.active')
+ %th= t('hunt_group_members.index.can_switch_status_itself')
+ %th= t('hunt_group_members.index.phone_numbers')
+
+ - reset_cycle
+ - for hunt_group_member in hunt_group_members
+ %tr{:class => cycle('odd', 'even')}
+ %td= hunt_group_member.name
+ %td= hunt_group_member.active
+ %td= hunt_group_member.can_switch_status_itself
+ %td
+ - if hunt_group_member.phone_numbers.count > 0
+ =render 'phone_numbers/listing', :phone_numbers => hunt_group_member.phone_numbers
+ %br
+ = render :partial => 'shared/create_link', :locals => {:parent => hunt_group_member, :child_class => PhoneNumber, :short_link => true}
+
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => hunt_group_member.hunt_group, :child => hunt_group_member} \ No newline at end of file
diff --git a/app/views/hunt_group_members/_listing.html.haml b/app/views/hunt_group_members/_listing.html.haml
new file mode 100644
index 0000000..b31fd22
--- /dev/null
+++ b/app/views/hunt_group_members/_listing.html.haml
@@ -0,0 +1,8 @@
+- amount_of_hunt_group_members = hunt_group_members.count
+- if amount_of_hunt_group_members > 0
+ - if amount_of_hunt_group_members < 30
+ = hunt_group_members.map{|hunt_group_member| hunt_group_member}.join(', ')
+ - else
+ = hunt_group_members.limit(15).map{|hunt_group_member| hunt_group_member}.join(', ') + ', '
+ = '[...]'
+ = hunt_group_members.offset(amount_of_hunt_group_members - 15).map{|hunt_group_member| hunt_group_member}.join(', ') \ No newline at end of file
diff --git a/app/views/hunt_group_members/edit.html.haml b/app/views/hunt_group_members/edit.html.haml
new file mode 100644
index 0000000..93d7b0a
--- /dev/null
+++ b/app/views/hunt_group_members/edit.html.haml
@@ -0,0 +1,3 @@
+- title t("hunt_group_members.edit.page_title")
+
+= render "form"
diff --git a/app/views/hunt_group_members/index.html.haml b/app/views/hunt_group_members/index.html.haml
new file mode 100644
index 0000000..99dc929
--- /dev/null
+++ b/app/views/hunt_group_members/index.html.haml
@@ -0,0 +1,6 @@
+- title t("hunt_group_members.index.page_title")
+
+- if @hunt_group_members.count > 0
+ = render "index_core", :hunt_group_members => @hunt_group_members
+
+= render :partial => 'shared/create_link', :locals => {:parent => @hunt_group, :child_class => HuntGroupMember} \ No newline at end of file
diff --git a/app/views/hunt_group_members/new.html.haml b/app/views/hunt_group_members/new.html.haml
new file mode 100644
index 0000000..99f52ad
--- /dev/null
+++ b/app/views/hunt_group_members/new.html.haml
@@ -0,0 +1,3 @@
+- title t("hunt_group_members.new.page_title")
+
+= render "form"
diff --git a/app/views/hunt_group_members/show.html.haml b/app/views/hunt_group_members/show.html.haml
new file mode 100644
index 0000000..80123b8
--- /dev/null
+++ b/app/views/hunt_group_members/show.html.haml
@@ -0,0 +1,19 @@
+- title t("hunt_group_members.show.page_title")
+
+%p
+ %strong= t('hunt_group_members.show.name') + ":"
+ = @hunt_group_member.name
+%p
+ %strong= t('hunt_group_members.show.active') + ":"
+ = @hunt_group_member.active
+%p
+ %strong= t('hunt_group_members.show.can_switch_status_itself') + ":"
+ = @hunt_group_member.can_switch_status_itself
+
+= render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @hunt_group, :child => @hunt_group_member }
+
+%h2= t('hunt_group_members.form.phone_numbers.label')
+- if @hunt_group_member.phone_numbers.count > 0
+ = render 'phone_numbers/index_core', :phone_numbers => @hunt_group_member.phone_numbers
+ %br
+= render :partial => 'shared/create_link', :locals => {:parent => @hunt_group_member, :child_class => PhoneNumber} \ No newline at end of file
diff --git a/app/views/hunt_groups/_form.html.haml b/app/views/hunt_groups/_form.html.haml
new file mode 100644
index 0000000..bc2663b
--- /dev/null
+++ b/app/views/hunt_groups/_form.html.haml
@@ -0,0 +1,7 @@
+= simple_form_for([@tenant, @hunt_group]) do |f|
+ = f.error_notification
+
+ = render "form_core", :f => f
+
+ .actions
+ = f.button :submit, conditional_t('hunt_groups.form.submit') \ No newline at end of file
diff --git a/app/views/hunt_groups/_form_core.html.haml b/app/views/hunt_groups/_form_core.html.haml
new file mode 100644
index 0000000..10a0111
--- /dev/null
+++ b/app/views/hunt_groups/_form_core.html.haml
@@ -0,0 +1,4 @@
+.inputs
+ = f.input :name, :label => t('hunt_groups.form.name.label'), :hint => conditional_hint('hunt_groups.form.name.hint')
+ = f.input :strategy, :as => :select, :label => t('hunt_groups.form.strategy.label'), :hint => conditional_hint('hunt_groups.form.strategy.hint'), :include_blank => false, :collection => HUNT_GROUP_STRATEGIES.map {|x| [I18n.t('hunt_groups.strategies.' + x), x] }
+ = f.input :seconds_between_jumps, :collection => VALID_SECONDS_BETWEEN_JUMPS_VALUES, :label => t('hunt_groups.form.seconds_between_jumps.label'), :hint => conditional_hint('hunt_groups.form.seconds_between_jumps.hint') \ No newline at end of file
diff --git a/app/views/hunt_groups/_index_core.html.haml b/app/views/hunt_groups/_index_core.html.haml
new file mode 100644
index 0000000..3000e97
--- /dev/null
+++ b/app/views/hunt_groups/_index_core.html.haml
@@ -0,0 +1,34 @@
+- show_seconds = hunt_groups.map{|x| ! x.seconds_between_jumps.nil? }.include?(true)
+
+%table
+ %tr
+ %th= t('hunt_groups.index.name')
+ %th= t('hunt_groups.index.strategy')
+ - if show_seconds
+ %th= t('hunt_groups.index.seconds_between_jumps')
+ %th= t('hunt_groups.index.phone_numbers')
+ %th= t('hunt_groups.index.hunt_group_members')
+
+ - reset_cycle
+ - for hunt_group in hunt_groups
+ %tr{:class => cycle('odd', 'even')}
+ %td= hunt_group.name
+ %td= t("hunt_groups.strategies.#{hunt_group.strategy}")
+ - if show_seconds
+ %td= hunt_group.seconds_between_jumps
+ %td
+ - if hunt_group.phone_numbers.count > 0
+ =render 'phone_numbers/listing', :phone_numbers => hunt_group.phone_numbers
+ %br
+ = render :partial => 'shared/create_link', :locals => {:parent => hunt_group, :child_class => PhoneNumber, :short_link => true}
+
+ %td
+ - if hunt_group.hunt_group_members.count > 3
+ = link_to hunt_group.hunt_group_members.count, hunt_group_hunt_group_members_path(hunt_group)
+ %br
+ - elsif hunt_group.hunt_group_members.count > 0
+ =render 'hunt_group_members/listing', :hunt_group_members => hunt_group.hunt_group_members
+ %br
+ = render :partial => 'shared/create_link', :locals => {:parent => hunt_group, :child_class => HuntGroupMember, :short_link => true}
+
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => hunt_group.tenant, :child => hunt_group} \ No newline at end of file
diff --git a/app/views/hunt_groups/edit.html.haml b/app/views/hunt_groups/edit.html.haml
new file mode 100644
index 0000000..f2ef998
--- /dev/null
+++ b/app/views/hunt_groups/edit.html.haml
@@ -0,0 +1,3 @@
+- title t("hunt_groups.edit.page_title")
+
+= render "form"
diff --git a/app/views/hunt_groups/index.html.haml b/app/views/hunt_groups/index.html.haml
new file mode 100644
index 0000000..62bc2aa
--- /dev/null
+++ b/app/views/hunt_groups/index.html.haml
@@ -0,0 +1,6 @@
+- title t("hunt_groups.index.page_title")
+
+- if @hunt_groups.count > 0
+ = render "index_core", :hunt_groups => @hunt_groups
+
+= render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => HuntGroup} \ No newline at end of file
diff --git a/app/views/hunt_groups/new.html.haml b/app/views/hunt_groups/new.html.haml
new file mode 100644
index 0000000..a40e579
--- /dev/null
+++ b/app/views/hunt_groups/new.html.haml
@@ -0,0 +1,3 @@
+- title t("hunt_groups.new.page_title")
+
+= render "form"
diff --git a/app/views/hunt_groups/show.html.haml b/app/views/hunt_groups/show.html.haml
new file mode 100644
index 0000000..009af50
--- /dev/null
+++ b/app/views/hunt_groups/show.html.haml
@@ -0,0 +1,26 @@
+- title t("hunt_groups.show.page_title")
+
+%p
+ %strong= t('hunt_groups.show.name') + ":"
+ = @hunt_group.name
+%p
+ %strong= t('hunt_groups.show.strategy') + ":"
+ = t("hunt_groups.strategies.#{@hunt_group.strategy}")
+- if @hunt_group.seconds_between_jumps
+ %p
+ %strong= t('hunt_groups.show.seconds_between_jumps') + ":"
+ = @hunt_group.seconds_between_jumps
+
+= render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @tenant, :child => @hunt_group }
+
+%h2= t('hunt_groups.form.phone_numbers.label')
+- if @hunt_group.phone_numbers.count > 0
+ = render 'phone_numbers/index_core', :phone_numbers => @hunt_group.phone_numbers
+ %br
+= render :partial => 'shared/create_link', :locals => {:parent => @hunt_group, :child_class => PhoneNumber}
+
+%h2= t('hunt_groups.form.hunt_group_members.label')
+- if @hunt_group.hunt_group_members.count > 0
+ = render 'hunt_group_members/index_core', :hunt_group_members => @hunt_group.hunt_group_members
+ %br
+= render :partial => 'shared/create_link', :locals => {:parent => @hunt_group, :child_class => HuntGroupMember} \ No newline at end of file
diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml
new file mode 100644
index 0000000..f2aff0a
--- /dev/null
+++ b/app/views/layouts/application.html.haml
@@ -0,0 +1,46 @@
+!!! 5
+<!--[if lt IE 7]> <html lang="en" class="no-js ie6"> <![endif]-->
+<!--[if IE 7]> <html lang="en" class="no-js ie7"> <![endif]-->
+<!--[if IE 8]> <html lang="en" class="no-js ie8"> <![endif]-->
+<!--[if gt IE 8]><!-->
+%html.no-js{ :lang => "en" }
+ ~#OPTIMIZE Make html lang attribute reflect the actual language.
+ <!--<![endif]-->
+ %header
+ %meta{ :charset => "utf-8" }/
+ ~#OPTIMIZE "/" seems to be supposed to make an empty element tag, but it doesn't work. HAML bug?
+ %title
+ = content_for?(:title) ? yield(:title) : "Untitled"
+ %meta{ :name => "viewport", :content => "width=device-width, initial-scale=1.0" }/
+ = stylesheet_link_tag "application"
+ = javascript_include_tag "application"
+ = csrf_meta_tag
+ = yield(:head)
+
+ %body
+ #container
+ = render :partial => "shared/header"
+ = render :partial => "shared/system_message"
+ = render :partial => "shared/flash", :locals => { :flash => flash}
+
+ #content{:role => 'main'}
+ .light
+ %header.main
+ .breadcrumbs= render_breadcrumbs :separator => ' » '
+ - if show_title?
+ %h1= yield(:title)
+ = yield
+
+ %footer#main
+ %ul
+ - if GuiFunction.display?('amooma_commercial_support_link_in_footer', current_user)
+ %li
+ %a{:href => "http://www.amooma.de"} Kommerzieller Support und Consulting
+ - if GuiFunction.display?('gemeinschaft_mailinglist_link_in_footer', current_user)
+ %li
+ %a{:href => "https://groups.google.com/group/gs5-users/"} Kostenlose Mailingliste
+
+ .amooma-logo
+ %span brought to you by
+ %a{ :target => '_blank', :href => "http://www.amooma.de/" } Amooma
+
diff --git a/app/views/manufacturers/_form.html.haml b/app/views/manufacturers/_form.html.haml
new file mode 100644
index 0000000..d89c603
--- /dev/null
+++ b/app/views/manufacturers/_form.html.haml
@@ -0,0 +1,7 @@
+= simple_form_for(@manufacturer) do |f|
+ = f.error_notification
+
+ = render "form_core", :f => f
+
+ .actions
+ = f.button :submit, conditional_t('manufacturers.form.submit') \ No newline at end of file
diff --git a/app/views/manufacturers/_form_core.html.haml b/app/views/manufacturers/_form_core.html.haml
new file mode 100644
index 0000000..84b85c9
--- /dev/null
+++ b/app/views/manufacturers/_form_core.html.haml
@@ -0,0 +1,4 @@
+.inputs
+ = f.input :name, :label => t('manufacturers.form.name.label'), :hint => conditional_hint('manufacturers.form.name.hint')
+ = f.input :ieee_name, :label => t('manufacturers.form.ieee_name.label'), :hint => conditional_hint('manufacturers.form.ieee_name.hint')
+ = f.input :homepage_url, :label => t('manufacturers.form.homepage_url.label'), :hint => conditional_hint('manufacturers.form.homepage_url.hint')
diff --git a/app/views/manufacturers/_index_core.html.haml b/app/views/manufacturers/_index_core.html.haml
new file mode 100644
index 0000000..8937909
--- /dev/null
+++ b/app/views/manufacturers/_index_core.html.haml
@@ -0,0 +1,18 @@
+%table
+ %tr
+ %th= t('manufacturers.index.name')
+ %th= t('manufacturers.index.ieee_name')
+ %th= t('manufacturers.index.homepage_url')
+ %th= t('manufacturers.index.phone_models')
+
+ - reset_cycle
+ - for manufacturer in manufacturers
+ %tr{:class => cycle('odd', 'even')}
+ %td= manufacturer.name
+ %td= manufacturer.ieee_name
+ %td
+ - if manufacturer.homepage_url
+ =link_to manufacturer.homepage_url, manufacturer.homepage_url
+ %td
+ = manufacturer.phone_models.map{|x| x.to_s }.join(', ')
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => manufacturer} \ No newline at end of file
diff --git a/app/views/manufacturers/edit.html.haml b/app/views/manufacturers/edit.html.haml
new file mode 100644
index 0000000..61bcba0
--- /dev/null
+++ b/app/views/manufacturers/edit.html.haml
@@ -0,0 +1,3 @@
+- title t("manufacturers.edit.page_title")
+
+= render "form"
diff --git a/app/views/manufacturers/index.html.haml b/app/views/manufacturers/index.html.haml
new file mode 100644
index 0000000..43fecc6
--- /dev/null
+++ b/app/views/manufacturers/index.html.haml
@@ -0,0 +1,5 @@
+- title t("manufacturers.index.page_title")
+
+= render "index_core", :manufacturers => @manufacturers
+
+= render :partial => 'shared/create_link', :locals => {:child_class => Manufacturer} \ No newline at end of file
diff --git a/app/views/manufacturers/new.html.haml b/app/views/manufacturers/new.html.haml
new file mode 100644
index 0000000..4fb9dbf
--- /dev/null
+++ b/app/views/manufacturers/new.html.haml
@@ -0,0 +1,3 @@
+- title t("manufacturers.new.page_title")
+
+= render "form"
diff --git a/app/views/manufacturers/show.html.haml b/app/views/manufacturers/show.html.haml
new file mode 100644
index 0000000..1b8383b
--- /dev/null
+++ b/app/views/manufacturers/show.html.haml
@@ -0,0 +1,18 @@
+- title t("manufacturers.show.page_title")
+
+%p
+ %strong= t('manufacturers.show.name') + ":"
+ = @manufacturer.name
+%p
+ %strong= t('manufacturers.show.ieee_name') + ":"
+ = @manufacturer.ieee_name
+%p
+ %strong= t('manufacturers.show.homepage_url') + ":"
+ - if @manufacturer.homepage_url
+ =link_to @manufacturer.homepage_url, @manufacturer.homepage_url
+
+= render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @manufacturer }
+
+%h2=t("phone_models.index.page_title")
+
+=render 'phone_models/index_core', :phone_models => @manufacturer.phone_models \ No newline at end of file
diff --git a/app/views/notifications/new_fax.text.erb b/app/views/notifications/new_fax.text.erb
new file mode 100644
index 0000000..579cc18
--- /dev/null
+++ b/app/views/notifications/new_fax.text.erb
@@ -0,0 +1,8 @@
+Hello <%= @fax[:greeting] %>,
+
+You've just received a fax document on your Gemeinschaft account <%= @fax[:account_name] %>.
+
+ Caller: <%= @fax[:from] %>
+Remote Station: <%= @fax[:remote_station_id] %>
+ Local Station: <%= @fax[:local_station_id] %>
+Receiving Time: <%= @fax[:date] %>
diff --git a/app/views/notifications/new_password.text.erb b/app/views/notifications/new_password.text.erb
new file mode 100644
index 0000000..a865960
--- /dev/null
+++ b/app/views/notifications/new_password.text.erb
@@ -0,0 +1,3 @@
+Hello <%= @message[:greeting] %>,
+
+Your password has been reset to: <%= @password %>
diff --git a/app/views/notifications/new_pin.text.erb b/app/views/notifications/new_pin.text.erb
new file mode 100644
index 0000000..11cf17b
--- /dev/null
+++ b/app/views/notifications/new_pin.text.erb
@@ -0,0 +1,7 @@
+Hello <%= @pin[:greeting] %>,
+
+the PIN of one of your conference rooms has been changed.
+
+Conference: <%= @pin[:conference] %>
+ Numbers: <%= @pin[:phone_numbers] %>
+ New PIN: <%= @pin[:pin] %>
diff --git a/app/views/notifications/new_voicemail.text.erb b/app/views/notifications/new_voicemail.text.erb
new file mode 100644
index 0000000..adeabda
--- /dev/null
+++ b/app/views/notifications/new_voicemail.text.erb
@@ -0,0 +1,9 @@
+Hello <%= @voicemail[:greeting] %>,
+
+You've just received a voicemail on your Gemeinschaft account <%= @voicemail[:destination] %>.
+
+ From: <%= @voicemail[:from] %>
+ To: <%= @voicemail[:to] %>
+Receiving Time: <%= @voicemail[:date] %>
+Message length: <%= @voicemail[:duration] %>
+ File: <%= @voicemail[:file_name] %>
diff --git a/app/views/page/conference.html.haml b/app/views/page/conference.html.haml
new file mode 100644
index 0000000..061dfd1
--- /dev/null
+++ b/app/views/page/conference.html.haml
@@ -0,0 +1,80 @@
+- conf_call_topic = "The next big thing"
+- title "Conference Call \u2013 Topic: #{conf_call_topic}"
+
+
+%section.conference
+
+ %section.panel.speakers.first
+ %header
+ %h3 Speakers
+ ~# Naming this class message, since when you add or chat you're sending
+ ~# a message to the server.
+ %form.message
+ %input{:placeholder => '# '}
+ .actors
+ - 2.times do
+ .actor
+ .info
+ - user = current_user #FIXME
+ - avatar_url = user.image_url(:mini) || 'stubs/user-36x.jpg'
+ = image_tag avatar_url.to_s, :class => 'display', :alt => "[ ]"
+ %span.name Fake Stefan
+ %span.status Joined at 03:00
+ .voice-actions
+ %a.make.listener{ :href => '#', :title => "Make listener" } Make listener
+ %a.voice.unmuted{ :href => '#', :title => "Mute" } Mute
+ %a.remove{ :href => '#', :title => "Remove from conference" } Remove
+
+
+ %section.panel.listeners
+ %header
+ %h3 Listeners
+ ~# Naming this class message, since when you add or chat you're sending
+ ~# a message to the server.
+ %form.message
+ %input{:placeholder => '# '}
+ .actors
+ - 5.times do
+ .actor
+ .info
+ - user = current_user #FIXME
+ - avatar_url = user.image_url(:mini) || 'stubs/user-36x.jpg'
+ = image_tag avatar_url.to_s, :class => 'display', :alt => "[ ]"
+ %span.name Fake Stefan
+ %span.status Joined at 03:00
+ .voice-actions
+ %a.make.speaker{ :href => '#', :title => "Make speaker" } Make speaker
+ %a.voice.unmuted{ :href => '#', :title => "Mute" } Mute
+ %a.remove{ :href => '#', :title => "Remove from conference" } Remove
+
+
+ %section.panel.log.last
+ %header
+ %h3 Log
+ ~# Naming this class message, since when you add or chat you're sending
+ ~# a message to the server.
+ %form.message
+ %input{:placeholder => 'Write a Message...'}
+ .messages
+ %div
+ %span.name Mario:
+ %span.content Sorry for the Delay!
+ %div.status
+ %span.name 03:11:
+ %span.content Fake Stefan is now a Speaker.
+ %div.status
+ %span.name 03:10:
+ %span.content Stefan Wintermeyer Left.
+ %div
+ %span.name Stefan:
+ %span.content Hello World.
+ %div.status
+ %span.name 03:00:
+ %span.content Stefan Wintermeyer Joined.
+ %div
+ %span.name Herpiti Derp:
+ %span.content Cool Conference Room!
+ %div
+ %span.name Pamela:
+ %span.content I'm here to sing along.
+
diff --git a/app/views/page/index.de.html.haml b/app/views/page/index.de.html.haml
new file mode 100644
index 0000000..2928319
--- /dev/null
+++ b/app/views/page/index.de.html.haml
@@ -0,0 +1,16 @@
+- title "Gemeinschaft #{GEMEINSCHAFT_VERSION}"
+
+%div
+ %h3 Aktueller Mandant
+ - if current_user && current_user.current_tenant
+ %strong= current_user.current_tenant
+ - else
+ %strong= "(none)"
+
+%div
+ %h3 Aktuelle Gruppenzugehörigkeiten
+ %ul
+ - (current_user.try(:user_groups) || []).each do |group|
+ %li
+ %strong= "#{group.name}"
+ = "(aus Mandant: %s)" % group.tenant
diff --git a/app/views/page/index.html.haml b/app/views/page/index.html.haml
new file mode 100644
index 0000000..9621395
--- /dev/null
+++ b/app/views/page/index.html.haml
@@ -0,0 +1,16 @@
+- title "Gemeinschaft #{GEMEINSCHAFT_VERSION}"
+
+%div
+ %h3 Current tenant
+ - if current_user && current_user.current_tenant
+ %strong= current_user.current_tenant
+ - else
+ %strong= "(none)"
+
+%div
+ %h3 Current user groups
+ %ul
+ - (current_user.try(:user_groups) || []).each do |group|
+ %li
+ %strong= "#{group.name}"
+ = "(from tenant: %s)" % group.tenant
diff --git a/app/views/phone_book_entries/_form.html.haml b/app/views/phone_book_entries/_form.html.haml
new file mode 100644
index 0000000..c73d10a
--- /dev/null
+++ b/app/views/phone_book_entries/_form.html.haml
@@ -0,0 +1,7 @@
+= simple_form_for([@phone_book, @phone_book_entry]) do |f|
+ = f.error_notification
+
+ = render "form_core", :f => f
+
+ .actions
+ = f.button :submit, conditional_t('phone_book_entries.form.submit') \ No newline at end of file
diff --git a/app/views/phone_book_entries/_form_core.html.haml b/app/views/phone_book_entries/_form_core.html.haml
new file mode 100644
index 0000000..c05139e
--- /dev/null
+++ b/app/views/phone_book_entries/_form_core.html.haml
@@ -0,0 +1,27 @@
+.inputs
+ = f.input :is_male, :collection => [[true, t('phone_book_entries.form.gender.male')], [false, t('phone_book_entries.form.gender.female')]], :label_method => :last, :value_method => :first, :label => t('phone_book_entries.form.male.label'), :hint => conditional_hint('phone_book_entries.form.gender.hint'), :label => t('phone_book_entries.form.gender.label'), :as => :radio
+ = f.input :first_name, :label => t('phone_book_entries.form.first_name.label'), :hint => conditional_hint('phone_book_entries.form.first_name.hint')
+ = f.input :middle_name, :label => t('phone_book_entries.form.middle_name.label'), :hint => conditional_hint('phone_book_entries.form.middle_name.hint')
+ = f.input :last_name, :label => t('phone_book_entries.form.last_name.label'), :hint => conditional_hint('phone_book_entries.form.last_name.hint')
+ = f.input :birth_name, :label => t('phone_book_entries.form.birth_name.label'), :hint => conditional_hint('phone_book_entries.form.birth_name.hint')
+ = f.input :title, :label => t('phone_book_entries.form.title.label'), :hint => conditional_hint('phone_book_entries.form.title.hint')
+ = f.input :nickname, :label => t('phone_book_entries.form.nickname.label'), :hint => conditional_hint('phone_book_entries.form.nickname.hint')
+ = f.input :organization, :label => t('phone_book_entries.form.organization.label'), :hint => conditional_hint('phone_book_entries.form.organization.hint')
+ / = f.input :is_organization, :label => t('phone_book_entries.form.is_organization.label'), :hint => conditional_hint('phone_book_entries.form.is_organization.hint')
+ = f.input :department, :label => t('phone_book_entries.form.department.label'), :hint => conditional_hint('phone_book_entries.form.department.hint')
+ = f.input :job_title, :label => t('phone_book_entries.form.job_title.label'), :hint => conditional_hint('phone_book_entries.form.job_title.hint')
+
+ = f.input :birthday, :label => t('phone_book_entries.form.birthday.label'), :hint => conditional_hint('phone_book_entries.form.birthday.hint'), :start_year => Date.today.year - 100, :end_year => Date.today.year - 0, :order => [:day, :month, :year], :include_blank => true
+
+ = f.input :description, :label => t('phone_book_entries.form.description.label'), :hint => conditional_hint('phone_book_entries.form.description.hint')
+
+ = f.input :image, { :as => :file, :label => t('phone_book_entries.form.image.label'), :hint => conditional_hint('phone_book_entries.form.image.hint') }
+
+ = f.input :homepage_organization, :label => t('phone_book_entries.form.homepage_organization.label'), :hint => conditional_hint('phone_book_entries.form.homepage_organization.hint')
+ = f.input :homepage_personal, :label => t('phone_book_entries.form.homepage_personal.label'), :hint => conditional_hint('phone_book_entries.form.homepage_personal.hint')
+ / = f.input :twitter_account, :label => t('phone_book_entries.form.twitter_account.label'), :hint => conditional_hint('phone_book_entries.form.twitter_account.hint')
+ / = f.input :facebook_account, :label => t('phone_book_entries.form.facebook_account.label'), :hint => conditional_hint('phone_book_entries.form.facebook_account.hint')
+ / = f.input :google_plus_account, :label => t('phone_book_entries.form.google_plus_account.label'), :hint => conditional_hint('phone_book_entries.form.google_plus_account.hint')
+ / = f.input :xing_account, :label => t('phone_book_entries.form.xing_account.label'), :hint => conditional_hint('phone_book_entries.form.xing_account.hint')
+ / = f.input :linkedin_account, :label => t('phone_book_entries.form.linkedin_account.label'), :hint => conditional_hint('phone_book_entries.form.linkedin_account.hint')
+
diff --git a/app/views/phone_book_entries/_index_core.de.html.haml b/app/views/phone_book_entries/_index_core.de.html.haml
new file mode 100644
index 0000000..01be65f
--- /dev/null
+++ b/app/views/phone_book_entries/_index_core.de.html.haml
@@ -0,0 +1,36 @@
+~# To Look for the other fields, please look into Git History.
+%section.phone-book-entries
+ %header.entries-nav= render :partial => "phone_book_entries/navigation"
+ .content
+ - reset_cycle
+ %table
+ - for entry in phone_book_entries
+ ~# Dear IE7,
+ ~# Because of you we have to do this with a table.
+ ~# With Love,
+ ~# Mario.
+ %tr.phone-book-entry{:class => cycle('odd', 'even'), :"itemscope itemtype" => "http://schema.org/Person"}
+ %td.thumbnail
+ = image_tag(entry.image_url(:small).to_s, :itemprop => 'image')
+ %td.user
+ - if entry.is_organization == true
+ %a.name{:href=> phone_book_phone_book_entry_path(entry.phone_book, entry), :itemprop => "name"}= entry
+ - else
+ %a.name{:href=> phone_book_phone_book_entry_path(entry.phone_book, entry), :itemprop => "name"}= entry
+ %a.company{:href=> phone_book_phone_book_entry_path(entry.phone_book, entry), :itemprop => 'memberOf'}= entry.organization
+ %td.contact
+ - if @found_phone_numbers and @found_phone_numbers.where(:phone_numberable_id => entry.id)
+ %a.phone{:href=> phone_book_phone_book_entry_path(entry.phone_book, entry), :itemprop => 'telephone'}= @found_phone_numbers.where(:phone_numberable_id => entry.id).first
+ - elsif entry.phone_numbers.first
+ %a.phone{:href=> phone_book_phone_book_entry_path(entry.phone_book, entry), :itemprop => 'telephone'}= entry.phone_numbers.first
+ - if entry.phone_numbers.count > 1
+ %a.more{:href => phone_book_phone_book_entry_path(entry.phone_book, entry)}= t('phone_book_entries.index.more_numbers', :numbers => (entry.phone_numbers.count-1))
+ %td.extra
+ - if !entry.description.blank?
+ %strong Beschreibung:
+ %div= entry.description
+ - if can? :edit, entry
+ %td= link_to t('phone_book_entries.index.actions.edit'), edit_phone_book_phone_book_entry_path( entry.phone_book, entry )
+ - if can? :destroy, entry
+ %td= link_to t('phone_book_entries.index.actions.destroy'), [entry.phone_book, entry], :confirm => t('phone_book_entries.index.actions.confirm'), :method => :delete
+ %footer.entries-nav= render :partial => "phone_book_entries/navigation"
diff --git a/app/views/phone_book_entries/_index_core.html.haml b/app/views/phone_book_entries/_index_core.html.haml
new file mode 100644
index 0000000..d9cfe10
--- /dev/null
+++ b/app/views/phone_book_entries/_index_core.html.haml
@@ -0,0 +1,36 @@
+~# To Look for the other fields, please look into Git History.
+%section.phone-book-entries
+ %header.entries-nav= render :partial => "phone_book_entries/navigation"
+ .content
+ - reset_cycle
+ %table
+ - for entry in phone_book_entries
+ ~# Dear IE7,
+ ~# Because of you we have to do this with a table.
+ ~# With Love,
+ ~# Mario.
+ %tr.phone-book-entry{:class => cycle('odd', 'even'), :"itemscope itemtype" => "http://schema.org/Person"}
+ %td.thumbnail
+ = image_tag(entry.image_url(:small).to_s, :itemprop => 'image')
+ %td.user
+ - if entry.is_organization == true
+ %a.name{:href=> phone_book_phone_book_entry_path(entry.phone_book, entry), :itemprop => "name"}= entry
+ - else
+ %a.name{:href=> phone_book_phone_book_entry_path(entry.phone_book, entry), :itemprop => "name"}= entry
+ %a.company{:href=> phone_book_phone_book_entry_path(entry.phone_book, entry), :itemprop => 'memberOf'}= entry.organization
+ %td.contact
+ - if @found_phone_numbers and @found_phone_numbers.where(:phone_numberable_id => entry.id)
+ %a.phone{:href=> phone_book_phone_book_entry_path(entry.phone_book, entry), :itemprop => 'telephone'}= @found_phone_numbers.where(:phone_numberable_id => entry.id).first
+ - elsif entry.phone_numbers.first
+ %a.phone{:href=> phone_book_phone_book_entry_path(entry.phone_book, entry), :itemprop => 'telephone'}= entry.phone_numbers.first
+ - if entry.phone_numbers.count > 1
+ %a.more{:href => phone_book_phone_book_entry_path(entry.phone_book, entry)}= t('phone_book_entries.index.more_numbers', :numbers => (entry.phone_numbers.count-1))
+ %td.extra
+ - if !entry.description.blank?
+ %strong Description:
+ %div= entry.description
+ - if can? :edit, entry
+ %td= link_to t('phone_book_entries.index.actions.edit'), edit_phone_book_phone_book_entry_path( entry.phone_book, entry )
+ - if can? :destroy, entry
+ %td= link_to t('phone_book_entries.index.actions.destroy'), [entry.phone_book, entry], :confirm => t('phone_book_entries.index.actions.confirm'), :method => :delete
+ %footer.entries-nav= render :partial => "phone_book_entries/navigation"
diff --git a/app/views/phone_book_entries/_navigation.html.haml b/app/views/phone_book_entries/_navigation.html.haml
new file mode 100644
index 0000000..dd1e8a7
--- /dev/null
+++ b/app/views/phone_book_entries/_navigation.html.haml
@@ -0,0 +1,8 @@
+%nav
+ %ol.abc
+ - %w{# A B C D E F G H I J K L M N O P Q R S T U V W X Y Z}.each do |char|
+ %li
+ %a{ :href => "?name=#{char}" }= char
+
+.pagination
+ = will_paginate @phone_book_entries
diff --git a/app/views/phone_book_entries/edit.html.haml b/app/views/phone_book_entries/edit.html.haml
new file mode 100644
index 0000000..d4fad4d
--- /dev/null
+++ b/app/views/phone_book_entries/edit.html.haml
@@ -0,0 +1,9 @@
+- title t("phone_book_entries.edit.page_title")
+
+= render "form"
+
+%p
+ - if can? :edit, @phone_book_entry
+ = link_to t('phone_book_entries.edit.actions.edit'), @phone_book_entry
+ |
+ = link_to t('phone_book_entries.edit.actions.view_all'), phone_book_entries_path
diff --git a/app/views/phone_book_entries/index.html.haml b/app/views/phone_book_entries/index.html.haml
new file mode 100644
index 0000000..6a17eb9
--- /dev/null
+++ b/app/views/phone_book_entries/index.html.haml
@@ -0,0 +1,19 @@
+- title t("phone_book_entries.index.page_title")
+
+- if @phone_books
+ %p
+ = t('phone_book_entries.index.available_phone_books')
+ - @phone_books.each do |phone_book|
+ = link_to phone_book, phone_book
+ - if can?(:create, PhoneBookEntry, :phone_book_id => phone_book.id)
+ (
+ = link_to "#{t('phone_book_entries.index.create_new_phone_book_entry')}", new_phone_book_phone_book_entry_path(phone_book)
+ )
+ - if phone_book != @phone_books.last
+ \,
+
+- if @phone_book_entries.count > 0
+ = render "index_core", :phone_book_entries => @phone_book_entries
+
+- if @phone_book
+ = render :partial => 'shared/create_link', :locals => {:parent => @phone_book, :child_class => PhoneBookEntry} \ No newline at end of file
diff --git a/app/views/phone_book_entries/new.html.haml b/app/views/phone_book_entries/new.html.haml
new file mode 100644
index 0000000..d72d1a4
--- /dev/null
+++ b/app/views/phone_book_entries/new.html.haml
@@ -0,0 +1,3 @@
+- title t("phone_book_entries.new.page_title")
+
+= render "form"
diff --git a/app/views/phone_book_entries/show.html.haml b/app/views/phone_book_entries/show.html.haml
new file mode 100644
index 0000000..b6e8c6e
--- /dev/null
+++ b/app/views/phone_book_entries/show.html.haml
@@ -0,0 +1,146 @@
+- title nil
+
+%section.phone-book-entry
+ .content
+ %header
+ %h1.username
+ %a= @phone_book_entry
+ - if !@phone_book_entry.organization.blank?
+ .work
+ %a= @phone_book_entry.organization
+ - if !@phone_book_entry.department.blank?
+ \/
+ = @phone_book_entry.department
+ - if !@phone_book_entry.job_title.blank?
+ \/
+ = @phone_book_entry.job_title
+ .personal
+ - if !@phone_book_entry.nickname.blank?
+ %span.nickname
+ a.k.a
+ %strong= @phone_book_entry.nickname
+ - if @phone_book_entry.birthday
+ %span.birthday
+ = l(@phone_book_entry.birthday)
+ .tags
+ %a= l @phone_book_entry.created_at.utc.getlocal, :format => :short
+ ,
+ %a= l @phone_book_entry.updated_at.utc.getlocal, :format => :short
+ %section.activity
+ - if @user_log
+ %h2 User Log
+ - @user_log.each do |log_entry|
+ - if log_entry[:type] == 'voicemail'
+ .entry.voice-message
+ %span.motive
+ = log_entry[:text]
+ %span.timestamp
+ = log_entry[:timestamp]
+ - if log_entry[:type] == 'fax_document'
+ .entry.fax
+ %span.motive
+ = log_entry[:text]
+ %span.timestamp
+ = log_entry[:timestamp]
+ - if log_entry[:type] == 'call_placed'
+ .entry.phone
+ %span.motive
+ log_entry[:text]
+ %span.timestamp
+ = log_entry[:timestamp]
+ - elsif log_entry[:type] == 'call_received'
+ .entry.phone
+ %span.motive
+ = log_entry[:text]
+ %span.timestamp
+ = log_entry[:timestamp]
+ - elsif log_entry[:type] == 'call_missed'
+ .entry.phone-down
+ %span.motive
+ = log_entry[:text]
+ %span.timestamp
+ = log_entry[:timestamp]
+
+ .sidebar
+ = image_tag @phone_book_entry.image_url(:profile).to_s, :class => 'display'
+ %p.description
+ = @phone_book_entry.description
+ .widget.phones
+ - @phone_book_entry.phone_numbers.each do |phone_number|
+ - case phone_number.name
+ - when /fax/
+ .fax
+ %a= phone_number
+ %span= phone_number.name
+ - when /home/
+ .home
+ %a= phone_number
+ %span= phone_number.name
+ - when /mobile/
+ .cellphone
+ %a= phone_number
+ %span= phone_number.name
+ - when /office/
+ .office
+ %a= phone_number
+ %span= phone_number.name
+ - else
+ .phone
+ %a= phone_number
+ %span= phone_number.name
+ = link_to t('phone_book_entries.show.manage_phone_numbers'), phone_book_entry_phone_numbers_path(@phone_book_entry)
+
+ .widget.adresses
+ - @phone_book_entry.addresses.each do |address|
+ .home
+ %strong
+ - if !address.line1.blank?
+ = address.line1
+ %br
+ - if !address.line2.blank?
+ = address.line1
+ %br
+ - if !address.street.blank?
+ = address.street
+ %br
+ - if !address.city.blank?
+ = "#{address.city} #{address.zip_code}"
+ %br
+ - if !address.country.blank?
+ = address.country.to_s
+ %br
+ / %span Home
+ / .office
+ .widget.social
+ - if !@phone_book_entry.homepage_organization.blank?
+ .home
+ %a= @phone_book_entry.homepage_organization
+ %span www
+ - if !@phone_book_entry.homepage_personal.blank?
+ .home
+ %a= @phone_book_entry.homepage_personal
+ %span www
+ - if !@phone_book_entry.twitter_account.blank?
+ .twitter
+ %a= @phone_book_entry.twitter_account
+ %span Twitter
+ - if !@phone_book_entry.google_plus_account.blank?
+ .google_plus
+ %a= @phone_book_entry.google_plus_account
+ %span Google+
+ - if !@phone_book_entry.facebook_account.blank?
+ .facebook
+ %a= @phone_book_entry.facebook_account
+ %span Facebook
+ - if !@phone_book_entry.xing_account.blank?
+ .xing
+ %a= @phone_book_entry.xing_account
+ %span Xing
+ - if !@phone_book_entry.linkedin_account.blank?
+ .linkedin
+ %a= @phone_book_entry.linkedin_account
+ %span LinkedIn
+ - if !@phone_book_entry.mobileme_account.blank?
+ .mobileme
+ %a= @phone_book_entry.mobileme_account
+ %span MobileMe
diff --git a/app/views/phone_book_entries/show.html.haml.examlple b/app/views/phone_book_entries/show.html.haml.examlple
new file mode 100644
index 0000000..176ad04
--- /dev/null
+++ b/app/views/phone_book_entries/show.html.haml.examlple
@@ -0,0 +1,194 @@
+- title nil
+
+%section.phone-book-entry
+ .content
+ %header
+ %h1.username
+ %a= @phone_book_entry
+ - if !@phone_book_entry.organization.blank?
+ .work
+ %a= @phone_book_entry.organization
+ - if !@phone_book_entry.department.blank?
+ \/
+ = @phone_book_entry.department
+ - if !@phone_book_entry.job_title.blank?
+ \/
+ = @phone_book_entry.job_title
+ .personal
+ - if !@phone_book_entry.nickname.blank?
+ %span.nickname
+ a.k.a
+ %strong= @phone_book_entry.nickname
+ - if @phone_book_entry.birthday
+ %span.birthday
+ = l(@phone_book_entry.birthday)
+ .tags
+ %a Developer
+ ,
+ %a Worked With
+ ,
+ %a Friend
+ %section.activity
+ %h2 User Log
+ = form_tag '/entry-whatever' do
+ %textarea{ :placeholder => "Leave a comment ..." }
+ .comment
+ = image_tag @phone_book_entry.image_url(:mini).to_s, :class => 'display'
+ .info
+ %span.commenter Random User
+ %span.time at 10:00 of Today
+ .body
+ I'm really tired and I still have to pack part of my baggage...
+ - 3.times do
+ .entry.voice-message
+ %span.motive
+ Stefan Wintermeyer left you a voice message 4 minutes ago.
+ %span.timestamp
+ 10:30 03/11/2011
+ .entry.phone
+ %span.motive
+ Called Stefan Wintermeyer at
+ %a Work
+ with a duration of 5 minutes.
+ %span.timestamp
+ 10:30 03/11/2011
+ .comment
+ = image_tag @phone_book_entry.image_url(:mini).to_s, :class => 'display'
+ .info
+ %span.commenter Random User
+ %span.time at 10:00 of Today
+ .body
+ I'm really tired and I still have to pack part of my baggage...
+ .entry.fax
+ %span.motive
+ Stefan Wintermeyer sent you a fax with 3 pages.
+ %span.timestamp
+ 10:30 03/11/2011
+
+ .entry.phone-down
+ %span.motive
+ Missed call from Stephan Wintermeyer.
+ %span.timestamp
+ 10:30 03/11/2011
+
+ .sidebar
+ = image_tag @phone_book_entry.image_url(:profile).to_s, :class => 'display'
+ %p.description
+ = @phone_book_entry.description
+ .widget.phones
+ - @phone_book_entry.phone_numbers.each do |phone_number|
+ - case phone_number.name
+ - when /fax/
+ .fax
+ %a= phone_number
+ %span= phone_number.name
+ - when /home/
+ .home
+ %a= phone_number
+ %span= phone_number.name
+ - when /mobile/
+ .cellphone
+ %a= phone_number
+ %span= phone_number.name
+ - when /office/
+ .office
+ %a= phone_number
+ %span= phone_number.name
+ - else
+ .phone
+ %a= phone_number
+ %span= phone_number.name
+ = link_to t('phone_book_entries.show.manage_phone_numbers'), phone_book_entry_phone_numbers_path(@phone_book_entry)
+
+ .widget.adresses
+ - @phone_book_entry.addresses.each do |address|
+ .home
+ %strong
+ - if !address.line1.blank?
+ = address.line1
+ %br
+ - if !address.line2.blank?
+ = address.line1
+ %br
+ - if !address.street.blank?
+ = address.street
+ %br
+ - if !address.city.blank?
+ = "#{address.city} #{address.zip_code}"
+ %br
+ - if !address.country.blank?
+ = address.country.to_s
+ %br
+ / %span Home
+ / .office
+ .widget.social
+ - if !@phone_book_entry.homepage_organization.blank?
+ .home
+ %a= @phone_book_entry.homepage_organization
+ %span www
+ - if !@phone_book_entry.homepage_personal.blank?
+ .home
+ %a= @phone_book_entry.homepage_personal
+ %span www
+ - if !@phone_book_entry.twitter_account.blank?
+ .twitter
+ %a= @phone_book_entry.twitter_account
+ %span Twitter
+ - if !@phone_book_entry.google_plus_account.blank?
+ .google_plus
+ %a= @phone_book_entry.google_plus_account
+ %span Google+
+ - if !@phone_book_entry.facebook_account.blank?
+ .facebook
+ %a= @phone_book_entry.facebook_account
+ %span Facebook
+ - if !@phone_book_entry.xing_account.blank?
+ .xing
+ %a= @phone_book_entry.xing_account
+ %span Xing
+ - if !@phone_book_entry.linkedin_account.blank?
+ .linkedin
+ %a= @phone_book_entry.linkedin_account
+ %span LinkedIn
+ - if !@phone_book_entry.mobileme_account.blank?
+ .mobileme
+ %a= @phone_book_entry.mobileme_account
+ %span MobileMe
+
+/ = debug @phone_book_entry.attributes
+
+
+/ %p
+/ %strong= t('phone_book_entries.show.first_name') + ":"
+/ = @phone_book_entry.first_name
+/ %p
+/ %strong= t('phone_book_entries.show.middle_name') + ":"
+/ = @phone_book_entry.middle_name
+/ %p
+/ %strong= t('phone_book_entries.show.last_name') + ":"
+/ = @phone_book_entry.last_name
+/ %p
+/ %strong= t('phone_book_entries.show.title') + ":"
+/ = @phone_book_entry.title
+/ %p
+/ %strong= t('phone_book_entries.show.nickname') + ":"
+/ = @phone_book_entry.nickname
+/ %p
+/ %strong= t('phone_book_entries.show.organization') + ":"
+/ = @phone_book_entry.organization
+/ %p
+/ %strong= t('phone_book_entries.show.department') + ":"
+/ = @phone_book_entry.department
+/ %p
+/ %strong= t('phone_book_entries.show.job_title') + ":"
+/ = @phone_book_entry.job_title
+/
+/ %p
+/ = link_to t('phone_book_entries.show.actions.edit'), edit_phone_book_phone_book_entry_path( @phone_book_entry.phone_book, @phone_book_entry )
+/ |
+/ - if can? :destroy, @phone_book_entry
+/ = link_to t('phone_book_entries.show.actions.destroy'), phone_book_phone_book_entry_path( @phone_book_entry.phone_book, @phone_book_entry ), :confirm => t('phone_book_entries.show.actions.confirm'), :method => :delete
+/
+/ - if @phone_book_entry.phone_numbers.count > 0
+/ = render "phone_numbers/index_core", :phone_numbers => @phone_book_entry.phone_numbers
+/
diff --git a/app/views/phone_books/_form.html.haml b/app/views/phone_books/_form.html.haml
new file mode 100644
index 0000000..245426b
--- /dev/null
+++ b/app/views/phone_books/_form.html.haml
@@ -0,0 +1,7 @@
+= simple_form_for([ @parent, @phone_book ]) do |f|
+ = f.error_notification
+
+ = render "form_core", :f => f
+
+ .actions
+ = f.button :submit, conditional_t('phone_books.form.submit') \ No newline at end of file
diff --git a/app/views/phone_books/_form_core.html.haml b/app/views/phone_books/_form_core.html.haml
new file mode 100644
index 0000000..0e36c4d
--- /dev/null
+++ b/app/views/phone_books/_form_core.html.haml
@@ -0,0 +1,3 @@
+.inputs
+ = f.input :name, :label => t('phone_books.form.name.label'), :hint => conditional_hint('phone_books.form.name.hint'), :autofocus => true
+ = f.input :description, :label => t('phone_books.form.description.label'), :hint => conditional_hint('phone_books.form.description.hint')
diff --git a/app/views/phone_books/_index_core.html.haml b/app/views/phone_books/_index_core.html.haml
new file mode 100644
index 0000000..5f50675
--- /dev/null
+++ b/app/views/phone_books/_index_core.html.haml
@@ -0,0 +1,16 @@
+%table
+ %tr
+ %th= t('phone_books.index.name')
+ %th= t('phone_books.index.description')
+ %th= t('phone_books.index.count')
+
+ - reset_cycle
+ - for phone_book in phone_books
+ %tr{:class => cycle('odd', 'even')}
+ %td= phone_book.name
+ %td= phone_book.description
+ %td
+ = number_with_delimiter( phone_book.phone_book_entries.count )
+ = render :partial => 'shared/create_link', :locals => {:parent => phone_book, :child_class => PhoneBookEntry, :short_link => true}
+
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => phone_book.phone_bookable, :child => phone_book} \ No newline at end of file
diff --git a/app/views/phone_books/edit.html.haml b/app/views/phone_books/edit.html.haml
new file mode 100644
index 0000000..36c945b
--- /dev/null
+++ b/app/views/phone_books/edit.html.haml
@@ -0,0 +1,3 @@
+- title t("phone_books.edit.page_title", :resource => @phone_book)
+
+= render "form"
diff --git a/app/views/phone_books/index.html.haml b/app/views/phone_books/index.html.haml
new file mode 100644
index 0000000..52b4e9b
--- /dev/null
+++ b/app/views/phone_books/index.html.haml
@@ -0,0 +1,6 @@
+- title t("phone_books.index.page_title")
+
+- if @phone_books.count > 0
+ = render "index_core", :phone_books => @phone_books
+
+= render :partial => 'shared/create_link', :locals => {:parent => @parent, :child_class => PhoneBook} \ No newline at end of file
diff --git a/app/views/phone_books/new.html.haml b/app/views/phone_books/new.html.haml
new file mode 100644
index 0000000..e96ce1e
--- /dev/null
+++ b/app/views/phone_books/new.html.haml
@@ -0,0 +1,3 @@
+- title t("phone_books.new.page_title")
+
+= render "form" \ No newline at end of file
diff --git a/app/views/phone_books/show.html.haml b/app/views/phone_books/show.html.haml
new file mode 100644
index 0000000..047b15e
--- /dev/null
+++ b/app/views/phone_books/show.html.haml
@@ -0,0 +1,13 @@
+- title @phone_book
+- if ! @phone_book.description.blank?
+ %p
+ %strong= t('phone_books.show.description') + ":"
+ = @phone_book.description
+
+= render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @phone_book.phone_bookable, :child => @phone_book }
+
+%h2= t("phone_book_entries.index.page_title")
+- if @phone_book_entries.count > 0
+ = render "phone_book_entries/index_core", :phone_book_entries => @phone_book_entries
+
+= render :partial => 'shared/create_link', :locals => {:parent => @phone_book, :child_class => PhoneBookEntry} \ No newline at end of file
diff --git a/app/views/phone_models/_form.html.haml b/app/views/phone_models/_form.html.haml
new file mode 100644
index 0000000..45c176f
--- /dev/null
+++ b/app/views/phone_models/_form.html.haml
@@ -0,0 +1,7 @@
+= simple_form_for([ @manufacturer, @phone_model ]) do |f|
+ = f.error_notification
+
+ = render "form_core", :f => f
+
+ .actions
+ = f.button :submit, conditional_t('phone_models.form.submit') \ No newline at end of file
diff --git a/app/views/phone_models/_form_core.html.haml b/app/views/phone_models/_form_core.html.haml
new file mode 100644
index 0000000..b406d6e
--- /dev/null
+++ b/app/views/phone_models/_form_core.html.haml
@@ -0,0 +1,4 @@
+.inputs
+ = f.input :name, :label => t('phone_models.form.name.label'), :hint => conditional_hint('phone_models.form.name.hint')
+ = f.input :product_manual_homepage_url, :label => t('phone_models.form.product_manual_homepage_url.label'), :hint => conditional_hint('phone_models.form.product_manual_homepage_url.hint')
+ = f.input :product_homepage_url, :label => t('phone_models.form.product_homepage_url.label'), :hint => conditional_hint('phone_models.form.product_homepage_url.hint')
diff --git a/app/views/phone_models/_index_core.html.haml b/app/views/phone_models/_index_core.html.haml
new file mode 100644
index 0000000..b07eb68
--- /dev/null
+++ b/app/views/phone_models/_index_core.html.haml
@@ -0,0 +1,19 @@
+%table
+ %tr
+ %th= t('phone_models.index.name')
+ %th= t('phone_models.index.product_manual_homepage_url')
+ %th= t('phone_models.index.product_homepage_url')
+ %th= t('phone_models.index.number_of_phones')
+
+ - reset_cycle
+ - for phone_model in phone_models
+ %tr{:class => cycle('odd', 'even')}
+ %td= phone_model.name
+ %td
+ - if phone_model.product_manual_homepage_url
+ =link_to truncate(phone_model.product_manual_homepage_url, :length => 40), phone_model.product_manual_homepage_url
+ %td
+ - if phone_model.product_homepage_url
+ =link_to truncate(phone_model.product_homepage_url, :length => 40), phone_model.product_homepage_url
+ %td= phone_model.phones.count
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => phone_model, :parent => phone_model.manufacturer} \ No newline at end of file
diff --git a/app/views/phone_models/edit.html.haml b/app/views/phone_models/edit.html.haml
new file mode 100644
index 0000000..bf31ffc
--- /dev/null
+++ b/app/views/phone_models/edit.html.haml
@@ -0,0 +1,3 @@
+- title t("phone_models.edit.page_title")
+
+= render "form"
diff --git a/app/views/phone_models/index.html.haml b/app/views/phone_models/index.html.haml
new file mode 100644
index 0000000..90aa4ce
--- /dev/null
+++ b/app/views/phone_models/index.html.haml
@@ -0,0 +1,6 @@
+- title t("phone_models.index.page_title")
+
+- if @phone_models.count > 0
+ = render "index_core", :phone_models => @phone_models
+
+= render :partial => 'shared/create_link', :locals => {:parent => @manufacturer, :child_class => PhoneModel} \ No newline at end of file
diff --git a/app/views/phone_models/new.html.haml b/app/views/phone_models/new.html.haml
new file mode 100644
index 0000000..9e900d4
--- /dev/null
+++ b/app/views/phone_models/new.html.haml
@@ -0,0 +1,3 @@
+- title t("phone_models.new.page_title")
+
+= render "form"
diff --git a/app/views/phone_models/show.html.haml b/app/views/phone_models/show.html.haml
new file mode 100644
index 0000000..06fae4b
--- /dev/null
+++ b/app/views/phone_models/show.html.haml
@@ -0,0 +1,18 @@
+- title t("phone_models.show.page_title")
+
+%p
+ %strong= t('phone_models.show.name') + ":"
+ = @phone_model.name
+%p
+ %strong= t('phone_models.show.manufacturer_id') + ":"
+ = @phone_model.manufacturer
+%p
+ %strong= t('phone_models.show.product_manual_homepage_url') + ":"
+ - if @phone_model.product_manual_homepage_url
+ =link_to @phone_model.product_manual_homepage_url, @phone_model.product_manual_homepage_url
+%p
+ %strong= t('phone_models.show.product_homepage_url') + ":"
+ - if @phone_model.product_homepage_url
+ =link_to @phone_model.product_homepage_url, @phone_model.product_homepage_url
+
+= render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @manufacturer, :child => @phone_model } \ No newline at end of file
diff --git a/app/views/phone_number_ranges/_form.html.haml b/app/views/phone_number_ranges/_form.html.haml
new file mode 100644
index 0000000..a86d45b
--- /dev/null
+++ b/app/views/phone_number_ranges/_form.html.haml
@@ -0,0 +1,7 @@
+= simple_form_for([ @phone_number_range.phone_number_rangeable, @phone_number_range ]) do |f|
+ = f.error_notification
+
+ = render "form_core", :f => f
+
+ .actions
+ = f.button :submit, conditional_t('phone_number_ranges.form.submit') \ No newline at end of file
diff --git a/app/views/phone_number_ranges/_form_core.html.haml b/app/views/phone_number_ranges/_form_core.html.haml
new file mode 100644
index 0000000..f553f08
--- /dev/null
+++ b/app/views/phone_number_ranges/_form_core.html.haml
@@ -0,0 +1,3 @@
+.inputs
+ = f.input :name, :label => t('phone_number_ranges.form.name.label'), :hint => conditional_hint('phone_number_ranges.form.name.hint')
+ = f.input :description, :label => t('phone_number_ranges.form.description.label'), :hint => conditional_hint('phone_number_ranges.form.description.hint')
diff --git a/app/views/phone_number_ranges/_index_core.html.haml b/app/views/phone_number_ranges/_index_core.html.haml
new file mode 100644
index 0000000..24ea96d
--- /dev/null
+++ b/app/views/phone_number_ranges/_index_core.html.haml
@@ -0,0 +1,21 @@
+%table
+ %tr
+ %th= t('phone_number_ranges.index.name')
+ %th= t('phone_number_ranges.index.description')
+ %th= t('phone_number_ranges.index.numbers')
+ %th= t('phone_number_ranges.index.amount')
+
+ - reset_cycle
+ - for phone_number_range in phone_number_ranges
+ %tr{:class => cycle('odd', 'even')}
+ %td= t("phone_number_ranges.ranges.#{phone_number_range}.label")
+ %td= t("phone_number_ranges.ranges.#{phone_number_range}.description")
+ %td
+ - if phone_number_range.phone_numbers.count > 0
+ = render 'phone_numbers/listing', :phone_numbers => phone_number_range.phone_numbers.order(:number)
+ %br
+ = render :partial => 'shared/create_link', :locals => {:parent => phone_number_range, :child_class => PhoneNumber, :short_link => true}
+
+ %td= phone_number_range.phone_numbers.count
+ - if phone_number_range.phone_number_rangeable.class != Country
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => phone_number_range.phone_number_rangeable, :child => phone_number_range} \ No newline at end of file
diff --git a/app/views/phone_number_ranges/edit.html.haml b/app/views/phone_number_ranges/edit.html.haml
new file mode 100644
index 0000000..fbf6d12
--- /dev/null
+++ b/app/views/phone_number_ranges/edit.html.haml
@@ -0,0 +1,3 @@
+- title t("phone_number_ranges.edit.page_title", :resource => @phone_number_range)
+
+= render "form"
diff --git a/app/views/phone_number_ranges/index.html.haml b/app/views/phone_number_ranges/index.html.haml
new file mode 100644
index 0000000..56cf137
--- /dev/null
+++ b/app/views/phone_number_ranges/index.html.haml
@@ -0,0 +1,6 @@
+- title t("phone_number_ranges.index.page_title")
+
+- if @phone_number_ranges.count > 0
+ = render "index_core", :phone_number_ranges => @phone_number_ranges
+
+= render :partial => 'shared/create_link', :locals => {:child_class => PhoneNumberRange} \ No newline at end of file
diff --git a/app/views/phone_number_ranges/new.html.haml b/app/views/phone_number_ranges/new.html.haml
new file mode 100644
index 0000000..d26b34d
--- /dev/null
+++ b/app/views/phone_number_ranges/new.html.haml
@@ -0,0 +1,3 @@
+- title t("phone_number_ranges.new.page_title")
+
+= render "form"
diff --git a/app/views/phone_number_ranges/show.html.haml b/app/views/phone_number_ranges/show.html.haml
new file mode 100644
index 0000000..64df556
--- /dev/null
+++ b/app/views/phone_number_ranges/show.html.haml
@@ -0,0 +1,18 @@
+- title t("phone_number_ranges.show.page_title")
+
+%p
+ %strong= t('phone_number_ranges.show.name') + ":"
+ = t("phone_number_ranges.ranges.#{@phone_number_range}.label")
+%p
+ %strong= t('phone_number_ranges.show.description') + ":"
+ = @phone_number_range.description
+
+= render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @phone_number_range.phone_number_rangeable, :child => @phone_number_range }
+
+%h2= t("phone_number_ranges.show.phone_numbers")
+
+- if @phone_number_range.try(:phone_numbers).try(:count).to_i > 0
+ = render "phone_numbers/index_core", :phone_numbers => @phone_number_range.phone_numbers.order(:number)
+
+%p
+ = render :partial => 'shared/create_link', :locals => {:parent => @phone_number_range, :child_class => PhoneNumber} \ No newline at end of file
diff --git a/app/views/phone_numbers/_form.html.haml b/app/views/phone_numbers/_form.html.haml
new file mode 100644
index 0000000..2812e21
--- /dev/null
+++ b/app/views/phone_numbers/_form.html.haml
@@ -0,0 +1,7 @@
+= simple_form_for([ @parent, @phone_number ]) do |f|
+ = f.error_notification
+
+ = render "form_core", :f => f
+
+ .actions
+ = f.button :submit, conditional_t('phone_numbers.form.submit')
diff --git a/app/views/phone_numbers/_form_core.html.haml b/app/views/phone_numbers/_form_core.html.haml
new file mode 100644
index 0000000..add3039
--- /dev/null
+++ b/app/views/phone_numbers/_form_core.html.haml
@@ -0,0 +1,10 @@
+.inputs
+
+ - if @phone_book_entry
+ = f.input :name, :collection => ['Office', 'Home', 'Mobile', 'Fax'], :include_blank => false, :label => t('phone_numbers.form.name.label'), :hint => conditional_hint('phone_numbers.form.name.hint')
+ = f.input :number, :label => t('phone_numbers.form.number.label'), :hint => conditional_hint('phone_numbers.form.number.hint')
+ - else
+ - if @callthrough || @hunt_group_member || @access_authorization || @current_user.current_tenant.array_of_available_internal_extensions_and_dids.count == 0 || @current_user.current_tenant.array_of_available_internal_extensions_and_dids.count > 250
+ = f.input :number, :label => t('phone_numbers.form.number.label'), :hint => conditional_hint('phone_numbers.form.number.hint')
+ - else
+ = f.input :number, :collection => @current_user.current_tenant.array_of_available_internal_extensions_and_dids, :label => t('phone_numbers.form.number.label'), :hint => conditional_hint('phone_numbers.form.number.hint'), :include_blank => false
diff --git a/app/views/phone_numbers/_index_core.html.haml b/app/views/phone_numbers/_index_core.html.haml
new file mode 100644
index 0000000..06b27c8
--- /dev/null
+++ b/app/views/phone_numbers/_index_core.html.haml
@@ -0,0 +1,13 @@
+%table
+ %tr
+ - if phone_numbers.count > 1 && phone_numbers.first.phone_numberable_type == 'PhoneBookEntry'
+ %th= t('phone_numbers.index.name')
+ %th= t('phone_numbers.index.number')
+
+ - reset_cycle
+ - for phone_number in phone_numbers.order(:position)
+ %tr{:class => cycle('odd', 'even')}
+ - if phone_number.phone_numberable_type == 'PhoneBookEntry'
+ %td= phone_number.name
+ %td= phone_number
+ = render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => phone_number.phone_numberable, :child => phone_number}
diff --git a/app/views/phone_numbers/_listing.html.haml b/app/views/phone_numbers/_listing.html.haml
new file mode 100644
index 0000000..ca002c5
--- /dev/null
+++ b/app/views/phone_numbers/_listing.html.haml
@@ -0,0 +1,8 @@
+- amount_of_phone_numbers = phone_numbers.count
+- if amount_of_phone_numbers > 0
+ - if amount_of_phone_numbers < 110
+ = phone_numbers.map{|number| number}.join(', ')
+ - else
+ = phone_numbers.limit(30).map{|number| number}.join(', ') + ', '
+ = '[...]'
+ = phone_numbers.offset(amount_of_phone_numbers - 30).map{|number| number}.join(', ') \ No newline at end of file
diff --git a/app/views/phone_numbers/edit.html.haml b/app/views/phone_numbers/edit.html.haml
new file mode 100644
index 0000000..d238d3d
--- /dev/null
+++ b/app/views/phone_numbers/edit.html.haml
@@ -0,0 +1,3 @@
+- title t("phone_numbers.edit.page_title", :resource => "" )
+
+= render "form" \ No newline at end of file
diff --git a/app/views/phone_numbers/index.html.haml b/app/views/phone_numbers/index.html.haml
new file mode 100644
index 0000000..2161739
--- /dev/null
+++ b/app/views/phone_numbers/index.html.haml
@@ -0,0 +1,6 @@
+- title @parent
+
+- if @phone_numbers.count > 0
+ = render "index_core", :phone_numbers => @phone_numbers
+
+= render :partial => 'shared/create_link', :locals => {:parent => @parent, :child_class => PhoneNumber} \ No newline at end of file
diff --git a/app/views/phone_numbers/new.html.haml b/app/views/phone_numbers/new.html.haml
new file mode 100644
index 0000000..e91f4f4
--- /dev/null
+++ b/app/views/phone_numbers/new.html.haml
@@ -0,0 +1,3 @@
+- title t("phone_numbers.new.page_title")
+
+= render "form"
diff --git a/app/views/phone_numbers/show.html.haml b/app/views/phone_numbers/show.html.haml
new file mode 100644
index 0000000..30c48bc
--- /dev/null
+++ b/app/views/phone_numbers/show.html.haml
@@ -0,0 +1,27 @@
+- title t("phone_numbers.show.page_title")
+
+- if @phone_number.phone_numberable.class == PhoneBookEntry
+ %p
+ %strong= t('phone_numbers.show.name') + ":"
+ = @phone_number.name
+
+%p
+ %strong= t('phone_numbers.show.number') + ":"
+ = @phone_number.to_s
+
+- if @ringtoneable_classes.has_key?(@phone_number.phone_numberable.class.to_s)
+ %p
+ %strong= t('ringtones.name') + ':'
+ - if @phone_number.ringtones.count > 0
+ = link_to @phone_number.ringtones.first, phone_number_ringtone_path(@phone_number, @phone_number.ringtones.first)
+ - else
+ = link_to t('ringtones.set_a_ringtone'), new_phone_number_ringtone_path(@phone_number)
+
+= render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @phone_number.phone_numberable, :child => @phone_number }
+
+- if @forwardable_classes.has_key?(@phone_number.phone_numberable.class.to_s)
+ %h3= t("call_forwards.index.page_title")
+ - if @phone_number.call_forwards.length > 0
+ = render "call_forwards/index_core", :call_forwards => @phone_number.call_forwards
+
+ = render :partial => 'shared/create_link', :locals => {:parent => @phone_number, :child_class => CallForward} \ No newline at end of file
diff --git a/app/views/phone_sip_accounts/_form.html.haml b/app/views/phone_sip_accounts/_form.html.haml
new file mode 100644
index 0000000..c2558b8
--- /dev/null
+++ b/app/views/phone_sip_accounts/_form.html.haml
@@ -0,0 +1,7 @@
+= simple_form_for([@phone, @phone_sip_account]) do |f|
+ = f.error_notification
+
+ = render "form_core", :f => f
+
+ .actions
+ = f.button :submit, conditional_t('phone_sip_accounts.form.submit') \ No newline at end of file
diff --git a/app/views/phone_sip_accounts/_form_core.html.haml b/app/views/phone_sip_accounts/_form_core.html.haml
new file mode 100644
index 0000000..81f1121
--- /dev/null
+++ b/app/views/phone_sip_accounts/_form_core.html.haml
@@ -0,0 +1,2 @@
+.inputs
+ = f.association :sip_account, :collection => @available_sip_accounts, :label => t('phone_sip_accounts.form.sip_account_id.label'), :hint => conditional_hint('phone_sip_accounts.form.sip_account_id.hint'), :include_blank => false
diff --git a/app/views/phone_sip_accounts/_index_core.html.haml b/app/views/phone_sip_accounts/_index_core.html.haml
new file mode 100644
index 0000000..89afb2b
--- /dev/null
+++ b/app/views/phone_sip_accounts/_index_core.html.haml
@@ -0,0 +1,13 @@
+%table
+ %tr
+ %th= t('phone_sip_accounts.index.phone_id')
+ %th= t('phone_sip_accounts.index.sip_account_id')
+ %th= t('phone_sip_accounts.index.position')
+
+ - reset_cycle
+ - for phone_sip_account in phone_sip_accounts
+ %tr{:class => cycle('odd', 'even')}
+ %td= phone_sip_account.phone
+ %td= phone_sip_account.sip_account
+ %td= phone_sip_account.position
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => phone_sip_account.phone, :child => phone_sip_account} \ No newline at end of file
diff --git a/app/views/phone_sip_accounts/index.html.haml b/app/views/phone_sip_accounts/index.html.haml
new file mode 100644
index 0000000..a9e3f85
--- /dev/null
+++ b/app/views/phone_sip_accounts/index.html.haml
@@ -0,0 +1,6 @@
+- title t("phone_sip_accounts.index.page_title")
+
+- if @phone_sip_accounts.count > 0
+ =render "index_core", :phone_sip_accounts => @phone_sip_accounts
+
+= render :partial => 'shared/create_link', :locals => {:parent => @phone, :child_class => PhoneSipAccount} \ No newline at end of file
diff --git a/app/views/phone_sip_accounts/new.html.haml b/app/views/phone_sip_accounts/new.html.haml
new file mode 100644
index 0000000..bfe40b8
--- /dev/null
+++ b/app/views/phone_sip_accounts/new.html.haml
@@ -0,0 +1,3 @@
+- title t("phone_sip_accounts.new.page_title")
+
+= render "form"
diff --git a/app/views/phone_sip_accounts/show.html.haml b/app/views/phone_sip_accounts/show.html.haml
new file mode 100644
index 0000000..0dd5a9b
--- /dev/null
+++ b/app/views/phone_sip_accounts/show.html.haml
@@ -0,0 +1,13 @@
+- title t("phone_sip_accounts.show.page_title")
+
+%p
+ %strong= t('phone_sip_accounts.show.phone_id') + ":"
+ = @phone_sip_account.phone
+%p
+ %strong= t('phone_sip_accounts.show.sip_account_id') + ":"
+ = @phone_sip_account.sip_account
+%p
+ %strong= t('phone_sip_accounts.show.position') + ":"
+ = @phone_sip_account.position
+
+= render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @phone, :child => @phone_sip_account } \ No newline at end of file
diff --git a/app/views/phones/_form.html.haml b/app/views/phones/_form.html.haml
new file mode 100644
index 0000000..9bfa226
--- /dev/null
+++ b/app/views/phones/_form.html.haml
@@ -0,0 +1,7 @@
+= simple_form_for([ @phoneable, @phone ]) do |f|
+ = f.error_notification
+
+ = render "form_core", :f => f
+
+ .actions
+ = f.button :submit, conditional_t('phones.form.submit') \ No newline at end of file
diff --git a/app/views/phones/_form_core.html.haml b/app/views/phones/_form_core.html.haml
new file mode 100644
index 0000000..51ceff5
--- /dev/null
+++ b/app/views/phones/_form_core.html.haml
@@ -0,0 +1,8 @@
+.inputs
+ = f.input :mac_address, :label => t('phones.form.mac_address.label'), :hint => conditional_hint('phones.form.mac_address.hint')
+ = f.association :phone_model, :label => t('phones.form.phone_model_id.label'), :hint => conditional_hint('phones.form.phone_model_id.hint')
+ = f.input :hot_deskable, :label => t('phones.form.hot_deskable.label'), :hint => conditional_hint('phones.form.hot_deskable.hint')
+ - if defined? NIGHTLY_REBOOT_OF_PHONES && NIGHTLY_REBOOT_OF_PHONES == true
+ = f.input :nightly_reboot, :label => t('phones.form.nightly_reboot.label'), :hint => conditional_hint('phones.form.nightly_reboot.hint')
+ - if defined? PROVISIONING_KEY_LENGTH && PROVISIONING_KEY_LENGTH > 0
+ = f.input :provisioning_key_active, :label => t('phones.form.provisioning_key_active.label'), :hint => conditional_hint('phones.form.provisioning_key_active.hint')
diff --git a/app/views/phones/_index_core.html.haml b/app/views/phones/_index_core.html.haml
new file mode 100644
index 0000000..c442d7f
--- /dev/null
+++ b/app/views/phones/_index_core.html.haml
@@ -0,0 +1,15 @@
+%table
+ %tr
+ %th= t('phones.index.mac_address')
+ %th= t('phones.index.phone_model_id')
+ %th= t('phones.index.hot_deskable')
+ %th= t('phones.index.ip_address')
+
+ - reset_cycle
+ - for phone in phones
+ %tr{:class => cycle('odd', 'even')}
+ %td= phone.pretty_mac_address
+ %td= phone.phone_model
+ %td= phone.hot_deskable
+ %td= phone.ip_address
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => phone.phoneable, :child => phone} \ No newline at end of file
diff --git a/app/views/phones/edit.html.haml b/app/views/phones/edit.html.haml
new file mode 100644
index 0000000..cdbacac
--- /dev/null
+++ b/app/views/phones/edit.html.haml
@@ -0,0 +1,3 @@
+- title t("phones.edit.page_title", :resource => @phone.mac_address)
+
+= render "form"
diff --git a/app/views/phones/index.html.haml b/app/views/phones/index.html.haml
new file mode 100644
index 0000000..785adf9
--- /dev/null
+++ b/app/views/phones/index.html.haml
@@ -0,0 +1,6 @@
+- title t("phones.index.page_title")
+
+- if @phones.count > 0
+ = render "index_core", :phones => @phones
+
+= render :partial => 'shared/create_link', :locals => {:parent => @parent, :child_class => Phone} \ No newline at end of file
diff --git a/app/views/phones/new.html.haml b/app/views/phones/new.html.haml
new file mode 100644
index 0000000..61923cc
--- /dev/null
+++ b/app/views/phones/new.html.haml
@@ -0,0 +1,3 @@
+- title t("phones.new.page_title")
+
+= render "form"
diff --git a/app/views/phones/show.html.haml b/app/views/phones/show.html.haml
new file mode 100644
index 0000000..2664ffa
--- /dev/null
+++ b/app/views/phones/show.html.haml
@@ -0,0 +1,31 @@
+- title t("phones.show.page_title")
+
+%p
+ %strong= t('phones.show.mac_address') + ":"
+ = @phone.pretty_mac_address
+%p
+ %strong= t('phones.show.phone_model_id') + ":"
+ = @phone.phone_model
+%p
+ %strong= t('phones.show.hot_deskable') + ":"
+ = @phone.hot_deskable
+- if defined? NIGHTLY_REBOOT_OF_PHONES && NIGHTLY_REBOOT_OF_PHONES == true
+ %p
+ %strong= t('phones.show.nightly_reboot') + ":"
+ = @phone.nightly_reboot
+
+- if defined? PROVISIONING_KEY_LENGTH && PROVISIONING_KEY_LENGTH > 0
+ %p
+ %strong= t('phones.show.provisioning_key_active') + ":"
+ = @phone.provisioning_key_active
+%p
+ %strong= t('phones.show.ip_address') + ":"
+ = @phone.ip_address
+
+= render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @phone.phoneable, :child => @phone }
+
+%h2= t("phones.sip_accounts.title")
+- if @phone.phone_sip_accounts.count > 0
+ = render "phone_sip_accounts/index_core", :phone_sip_accounts => @phone.phone_sip_accounts
+
+= render :partial => 'shared/create_link', :locals => {:parent => @phone, :child_class => PhoneSipAccount}
diff --git a/app/views/ringtones/_form.html.haml b/app/views/ringtones/_form.html.haml
new file mode 100644
index 0000000..7dbfcb0
--- /dev/null
+++ b/app/views/ringtones/_form.html.haml
@@ -0,0 +1,7 @@
+= simple_form_for([@parent,@ringtone]) do |f|
+ = f.error_notification
+
+ = render "form_core", :f => f
+
+ .actions
+ = f.button :submit, conditional_t('ringtones.form.submit') \ No newline at end of file
diff --git a/app/views/ringtones/_form_core.html.haml b/app/views/ringtones/_form_core.html.haml
new file mode 100644
index 0000000..e44c950
--- /dev/null
+++ b/app/views/ringtones/_form_core.html.haml
@@ -0,0 +1,3 @@
+.inputs
+ / = f.input :audio, :label => t('ringtones.form.audio.label'), :hint => conditional_hint('ringtones.form.audio.hint')
+ = f.input :bellcore_id, :collection => 0..10, :label => t('ringtones.form.bellcore_id.label'), :hint => conditional_hint('ringtones.form.bellcore_id.hint'), :include_blank => true
diff --git a/app/views/ringtones/_index_core.html.haml b/app/views/ringtones/_index_core.html.haml
new file mode 100644
index 0000000..c39357a
--- /dev/null
+++ b/app/views/ringtones/_index_core.html.haml
@@ -0,0 +1,11 @@
+%table
+ %tr
+ %th= t('ringtones.index.audio')
+ %th= t('ringtones.index.bellcore_id')
+
+ - reset_cycle
+ - for ringtone in ringtones
+ %tr{:class => cycle('odd', 'even')}
+ %td= ringtone.audio
+ %td= ringtone.bellcore_id
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => ringtone.ringtoneable, :child => ringtone} \ No newline at end of file
diff --git a/app/views/ringtones/edit.html.haml b/app/views/ringtones/edit.html.haml
new file mode 100644
index 0000000..6779190
--- /dev/null
+++ b/app/views/ringtones/edit.html.haml
@@ -0,0 +1,3 @@
+- title t("ringtones.edit.page_title")
+
+= render "form"
diff --git a/app/views/ringtones/index.html.haml b/app/views/ringtones/index.html.haml
new file mode 100644
index 0000000..4da75fa
--- /dev/null
+++ b/app/views/ringtones/index.html.haml
@@ -0,0 +1,6 @@
+- title t("ringtones.index.page_title")
+
+- if @ringtones.count > 0
+ = render "index_core", :ringtones => @ringtones
+
+= render :partial => 'shared/create_link', :locals => {:parent => @parent, :child_class => Ringtone} \ No newline at end of file
diff --git a/app/views/ringtones/new.html.haml b/app/views/ringtones/new.html.haml
new file mode 100644
index 0000000..025f440
--- /dev/null
+++ b/app/views/ringtones/new.html.haml
@@ -0,0 +1,3 @@
+- title t("ringtones.new.page_title")
+
+= render "form"
diff --git a/app/views/ringtones/show.html.haml b/app/views/ringtones/show.html.haml
new file mode 100644
index 0000000..408b808
--- /dev/null
+++ b/app/views/ringtones/show.html.haml
@@ -0,0 +1,12 @@
+- title t("ringtones.show.page_title")
+
+- if 1 == 2
+ %p
+ %strong= t('ringtones.show.audio') + ":"
+ = @ringtone.audio
+
+%p
+ %strong= t('ringtones.show.bellcore_id') + ":"
+ = @ringtone.bellcore_id
+
+= render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @ringtone.ringtoneable, :child => @ringtone } \ No newline at end of file
diff --git a/app/views/sessions/new.html.haml b/app/views/sessions/new.html.haml
new file mode 100644
index 0000000..8ad77b1
--- /dev/null
+++ b/app/views/sessions/new.html.haml
@@ -0,0 +1,8 @@
+- title t("sessions.new.page_title")
+
+= simple_form_for :sessions, :url => sessions_path do |t|
+ = t.input :login_data, :label => t('sessions.form.email'), :autofocus => true
+ = t.input :password, :label => t('sessions.form.password'), :required => false
+ = t.input :reset_password, :label => t('sessions.form.reset_password'), :as => :boolean
+ .actions
+ = t.button :submit, :value => 'Login'
diff --git a/app/views/shared/_create_link.html.haml b/app/views/shared/_create_link.html.haml
new file mode 100644
index 0000000..103c82b
--- /dev/null
+++ b/app/views/shared/_create_link.html.haml
@@ -0,0 +1,11 @@
+- if !(defined? parent).nil? && !(defined? child_class).nil?
+ - if can? :create, parent.send(child_class.name.underscore.pluralize).build
+ %p
+ - if t("#{child_class.name.underscore.pluralize}.index.actions.create_for").include?('translation missing') || (!(defined? short_link).nil? && short_link == true)
+ = link_to t("#{child_class.name.underscore.pluralize}.index.actions.create"), method( :"new_#{parent.class.name.underscore}_#{child_class.name.underscore}_path" ).(parent)
+ - else
+ = link_to t("#{child_class.name.underscore.pluralize}.index.actions.create_for", :resource => parent.to_s), method( :"new_#{parent.class.name.underscore}_#{child_class.name.underscore}_path" ).(parent)
+- elsif !(defined? child_class).nil?
+ - if can? :create, child_class
+ %p
+ = link_to t("#{child_class.name.underscore.pluralize}.index.actions.create"), method( :"new_#{child_class.name.underscore}_path" ).() \ No newline at end of file
diff --git a/app/views/shared/_flash.html.haml b/app/views/shared/_flash.html.haml
new file mode 100644
index 0000000..320fd15
--- /dev/null
+++ b/app/views/shared/_flash.html.haml
@@ -0,0 +1,19 @@
+- flash.each do |type, msg|
+ .flash{:class => type}
+ .light
+ .sign= resolve_flash_sign(type)
+ .message= msg
+
+
+-# These are the available types:
+-#
+-# .flash.notice
+-# .light
+-# .sign i
+-# .message Lorem ipsum dolor sit amet, consectetur adipisicing eli.w
+-#
+-# .flash.warning
+-# .light
+-# .sign !
+-# .message Lorem ipsum dolor sit amet, consectetur adipisicing eli.w
+
diff --git a/app/views/shared/_header.de.html.haml b/app/views/shared/_header.de.html.haml
new file mode 100644
index 0000000..c6205ae
--- /dev/null
+++ b/app/views/shared/_header.de.html.haml
@@ -0,0 +1,41 @@
+%header#main
+ .light
+ %h1.gemeinschaft-logo
+ - if @current_user && @current_user.current_tenant
+ = link_to "Gemeinschaft", tenant_path(@current_user.current_tenant)
+ - else
+ = link_to "Gemeinschaft", root_url
+
+ - if current_user
+ = form_tag '/search' do
+ %div.search-box
+ - if GuiFunction.display?('search_field_in_top_navigation_bar', current_user)
+ %input.text{:value => 'Suchen ...', :name => 'q'}
+ %input{:type => 'submit', :value => ''}
+
+ / Adjustable Navigation.
+ - if current_user
+ - if navigation_items.size > 0
+ - navigation_items.each do |item|
+ - if GuiFunction.display?('navigation_items_in_top_navigation_bar', current_user)
+ %span
+ = link_to item[:title], item[:url]
+
+ - if current_user
+ .user-context
+ %a.user{:href => tenant_user_path(current_user.current_tenant.id, current_user.id)}
+ - if GuiFunction.display?('user_avatar_in_top_navigation_bar', current_user)
+ - if current_user.image? && current_user.image_url(:mini)
+ = image_tag current_user.image_url(:mini).to_s, :class => 'display'
+ - else
+ - if current_user.male?
+ = image_tag 'icons/user-male-16x.png', :class => 'display logged-out'
+ - else
+ = image_tag 'icons/user-female-16x.png', :class => 'display logged-out'
+ = current_user
+ = link_to( "[x]", log_out_path, :class => 'logout', :title => "Abmelden" ) # Temporary way of logging out.
+ - else
+ .user-context
+ = link_to "Registrieren", sign_up_path
+ oder
+ = link_to "Anmelden", log_in_path
diff --git a/app/views/shared/_header.html.haml b/app/views/shared/_header.html.haml
new file mode 100644
index 0000000..377d8e0
--- /dev/null
+++ b/app/views/shared/_header.html.haml
@@ -0,0 +1,41 @@
+%header#main
+ .light
+ %h1.gemeinschaft-logo
+ - if @current_user && @current_user.current_tenant
+ = link_to "Gemeinschaft", tenant_path(@current_user.current_tenant)
+ - else
+ = link_to "Gemeinschaft", root_url
+
+ - if current_user
+ = form_tag '/search' do
+ %div.search-box
+ - if GuiFunction.display?('search_field_in_top_navigation_bar', current_user)
+ %input.text{:value => 'Search ...', :name => 'q'}
+ %input{:type => 'submit', :value => ''}
+
+ / Adjustable Navigation.
+ - if current_user
+ - if navigation_items.size > 0
+ - navigation_items.each do |item|
+ - if GuiFunction.display?('navigation_items_in_top_navigation_bar', current_user)
+ %span
+ = link_to item[:title], item[:url]
+
+ - if current_user
+ .user-context
+ %a.user{:href => tenant_user_path(current_user.current_tenant.id, current_user.id)}
+ - if GuiFunction.display?('user_avatar_in_top_navigation_bar', current_user)
+ - if current_user.image? && current_user.image_url(:mini)
+ = image_tag current_user.image_url(:mini).to_s, :class => 'display'
+ - else
+ - if current_user.male?
+ = image_tag 'icons/user-male-16x.png', :class => 'display logged-out'
+ - else
+ = image_tag 'icons/user-female-16x.png', :class => 'display logged-out'
+ = current_user
+ = link_to( "[x]", log_out_path, :class => 'logout', :title => "Log out" ) # Temporary way of logging out.
+ - else
+ .user-context
+ = link_to "Sign up", sign_up_path
+ or
+ = link_to "Log in", log_in_path
diff --git a/app/views/shared/_index_view_edit_destroy_part.html.haml b/app/views/shared/_index_view_edit_destroy_part.html.haml
new file mode 100644
index 0000000..06ec904
--- /dev/null
+++ b/app/views/shared/_index_view_edit_destroy_part.html.haml
@@ -0,0 +1,29 @@
+- style = 'width:35px'
+
+- if !(defined? parent).nil? && !(defined? child).nil?
+ %td{ :style => style }
+ - if can? :show, child
+ = link_to t("#{child.class.name.underscore.pluralize}.index.actions.show"), method( :"#{parent.class.name.underscore}_#{child.class.name.underscore}_path" ).(parent, child)
+ %td{ :style => style }
+ - if can? :edit, child
+ = link_to t("#{child.class.name.underscore.pluralize}.index.actions.edit"), method( :"edit_#{parent.class.name.underscore}_#{child.class.name.underscore}_path" ).(parent, child)
+ %td{ :style => style }
+ - if can? :destroy, child
+ = link_to t("#{child.class.name.underscore.pluralize}.index.actions.destroy"), method( :"#{parent.class.name.underscore}_#{child.class.name.underscore}_path" ).(parent, child), :method => :delete
+ - if child.respond_to?(:move_up?) or child and child.respond_to?(:move_down?)
+ %td{ :style => style }
+ - if can? :move_down, child and child.respond_to?(:move_down?) and child.move_down?
+ = link_to '&#8681;'.html_safe, method( :"move_lower_#{parent.class.name.underscore}_#{child.class.name.underscore}_path" ).(parent, child), :method => :put
+ - if can? :move_up, child and child.respond_to?(:move_up?) and child.move_up?
+ = link_to '&#8679;'.html_safe, method( :"move_higher_#{parent.class.name.underscore}_#{child.class.name.underscore}_path" ).(parent, child), :method => :put
+
+- elsif !(defined? child).nil?
+ %td{ :style => style }
+ - if can? :show, child
+ = link_to t("#{child.class.name.underscore.pluralize}.index.actions.show"), method( :"#{child.class.name.underscore}_path" ).(child)
+ %td{ :style => style }
+ - if can? :edit, child
+ = link_to t("#{child.class.name.underscore.pluralize}.index.actions.edit"), method( :"edit_#{child.class.name.underscore}_path" ).(child)
+ %td{ :style => style }
+ - if can? :destroy, child
+ = link_to t("#{child.class.name.underscore.pluralize}.index.actions.destroy"), method( :"#{child.class.name.underscore}_path" ).(child), :method => :delete \ No newline at end of file
diff --git a/app/views/shared/_show_edit_destroy_part.html.haml b/app/views/shared/_show_edit_destroy_part.html.haml
new file mode 100644
index 0000000..aff18d1
--- /dev/null
+++ b/app/views/shared/_show_edit_destroy_part.html.haml
@@ -0,0 +1,16 @@
+%p
+ - if !(defined? parent).nil? && !(defined? child).nil?
+ - if can? :edit, child
+ = link_to t("#{child.class.name.underscore.pluralize}.show.actions.edit"), method( :"edit_#{parent.class.name.underscore}_#{child.class.name.underscore}_path" ).(parent, child)
+ - if can? :destroy, child
+ - if can? :edit, child
+ |
+ = link_to t("#{child.class.name.underscore.pluralize}.show.actions.destroy"), method( :"#{parent.class.name.underscore}_#{child.class.name.underscore}_path" ).(parent, child), :method => :delete
+
+ - elsif !(defined? child).nil?
+ - if can? :edit, child
+ = link_to t("#{child.class.name.underscore.pluralize}.show.actions.edit"), method( :"edit_#{child.class.name.underscore}_path" ).(child)
+ - if can? :destroy, child
+ - if can? :edit, child
+ |
+ = link_to t("#{child.class.name.underscore.pluralize}.show.actions.destroy"), method( :"#{child.class.name.underscore}_path" ).(child), :method => :delete \ No newline at end of file
diff --git a/app/views/shared/_system_message.html.haml b/app/views/shared/_system_message.html.haml
new file mode 100644
index 0000000..4aabb9c
--- /dev/null
+++ b/app/views/shared/_system_message.html.haml
@@ -0,0 +1,10 @@
+- if current_user
+ .flash.notice#system_message_display
+ .light
+ .sign i
+ .message#system_message This is the place to display incoming calls and other stuff.
+
+ = subscribe_to "/users/#{current_user.id}/system_messages"
+
+ :javascript
+ $('#system_message_display').hide() \ No newline at end of file
diff --git a/app/views/sip_accounts/_form.html.haml b/app/views/sip_accounts/_form.html.haml
new file mode 100644
index 0000000..f209bf4
--- /dev/null
+++ b/app/views/sip_accounts/_form.html.haml
@@ -0,0 +1,7 @@
+= simple_form_for([ @parent, @sip_account ]) do |f|
+ = f.error_notification
+
+ = render "form_core", :f => f
+
+ .actions
+ = f.button :submit, conditional_t('sip_accounts.form.submit') \ 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
new file mode 100644
index 0000000..dbd27fe
--- /dev/null
+++ b/app/views/sip_accounts/_form_core.html.haml
@@ -0,0 +1,12 @@
+.inputs
+ = 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 :caller_name, :as => :string, :label => t('sip_accounts.form.caller_name.label'), :hint => conditional_hint('sip_accounts.form.caller_name.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')
+ = 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')
+ - if CallForward.where(:phone_number_id => @sip_account.phone_number_ids).count == 0 || @sip_account.callforward_rules_act_per_sip_account == true
+ = f.input :callforward_rules_act_per_sip_account, :label => t('sip_accounts.form.callforward_rules_act_per_sip_account.label'), :hint => conditional_hint('sip_accounts.form.callforward_rules_act_per_sip_account.hint')
diff --git a/app/views/sip_accounts/_index_core.html.haml b/app/views/sip_accounts/_index_core.html.haml
new file mode 100644
index 0000000..7f8dcd2
--- /dev/null
+++ b/app/views/sip_accounts/_index_core.html.haml
@@ -0,0 +1,28 @@
+%table
+ %tr
+ %th= t('sip_accounts.index.online')
+ %th= t('sip_accounts.index.caller_name')
+ %th= t('sip_accounts.index.phone_numbers')
+ %th= t('phones.name')
+
+ - reset_cycle
+ - for sip_account in sip_accounts
+ %tr{:class => cycle('odd', 'even')}
+ %td
+ - if sip_account.registration
+ %img{:src => '/assets/icons/phone-down-green-32x.png'}
+ - else
+ %img{:src => '/assets/icons/phone-down-grey-32x.png'}
+ %td
+ = sip_account.caller_name
+ - phone_numbers = sip_account.phone_numbers
+ %td
+ - if sip_account.phone_numbers.count > 0
+ = render 'phone_numbers/listing', :phone_numbers => sip_account.phone_numbers.order(:number)
+ %br
+ = render :partial => 'shared/create_link', :locals => {:parent => sip_account, :child_class => PhoneNumber, :short_link => true}
+
+ %td
+ - sip_account.phones.each do |phone|
+ = link_to phone.to_s, method( :"#{phone.phoneable_type.underscore}_phone_path" ).( phone.phoneable_id, phone )
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => sip_account.sip_accountable, :child => sip_account} \ No newline at end of file
diff --git a/app/views/sip_accounts/edit.html.haml b/app/views/sip_accounts/edit.html.haml
new file mode 100644
index 0000000..c070ff7
--- /dev/null
+++ b/app/views/sip_accounts/edit.html.haml
@@ -0,0 +1,3 @@
+- title t("sip_accounts.edit.page_title")
+
+= render "form"
diff --git a/app/views/sip_accounts/index.html.haml b/app/views/sip_accounts/index.html.haml
new file mode 100644
index 0000000..1131770
--- /dev/null
+++ b/app/views/sip_accounts/index.html.haml
@@ -0,0 +1,6 @@
+- title t("sip_accounts.index.page_title")
+
+- if @sip_accounts.count > 0
+ = render "index_core", :sip_accounts => @sip_accounts
+
+= render :partial => 'shared/create_link', :locals => {:parent => @parent, :child_class => SipAccount} \ No newline at end of file
diff --git a/app/views/sip_accounts/new.html.haml b/app/views/sip_accounts/new.html.haml
new file mode 100644
index 0000000..9d44680
--- /dev/null
+++ b/app/views/sip_accounts/new.html.haml
@@ -0,0 +1,3 @@
+- title t("sip_accounts.new.page_title")
+
+= render "form"
diff --git a/app/views/sip_accounts/show.html.haml b/app/views/sip_accounts/show.html.haml
new file mode 100644
index 0000000..c6344cd
--- /dev/null
+++ b/app/views/sip_accounts/show.html.haml
@@ -0,0 +1,50 @@
+- title t("sip_accounts.show.page_title")
+
+%p
+ %strong= t('sip_accounts.show.auth_name') + ":"
+ = @sip_account.auth_name
+%p
+ %strong= t('sip_accounts.show.caller_name') + ":"
+ = @sip_account.caller_name
+%p
+ %strong= t('sip_accounts.show.password') + ":"
+ = @sip_account.password
+%p
+ %strong= t('sip_accounts.show.call_waiting') + ":"
+ = @sip_account.call_waiting
+%p
+ %strong= t('sip_accounts.show.clir') + ":"
+ = @sip_account.clir
+%p
+ %strong= t('sip_accounts.show.clip_no_screening') + ":"
+ = @sip_account.clip_no_screening
+%p
+ %strong= t('sip_accounts.show.hotdeskable') + ":"
+ = @sip_account.hotdeskable
+%p
+ %strong= t('sip_accounts.show.callforward_rules_act_per_sip_account') + ":"
+ = @sip_account.callforward_rules_act_per_sip_account
+- if @sip_account.registration.try(:network_ip) && @sip_account.registration.try(:network_port)
+ %p
+ %strong= t('sip_accounts.show.registration') + ":"
+ = "#{@sip_account.registration.network_ip}:#{@sip_account.registration.network_port}"
+- if @sip_account.registration.try(:expires)
+ %p
+ %strong= t('sip_accounts.show.expires') + ":"
+ = "#{@sip_account.registration.try(:expires) - Time.now.to_i} s"
+
+= render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @sip_account.sip_accountable, :child => @sip_account }
+
+- if @sip_account.phone_numbers.count > 0 || can?(:create, @sip_account.phone_numbers.build)
+ %h2= t('phone_numbers.index.page_title')
+ - if @sip_account.phone_numbers.count > 0
+ = render "phone_numbers/index_core", :phone_numbers => @sip_account.phone_numbers
+ %br
+ = render :partial => 'shared/create_link', :locals => { :parent => @sip_account, :child_class => PhoneNumber }
+
+- if @sip_account.softkeys.count > 0 || can?(:create, @sip_account.softkeys.build)
+ %h2= t("softkeys.index.page_title")
+ - if @sip_account.softkeys.count > 0
+ = render "softkeys/index_core", :softkeys => @sip_account.softkeys
+ %br
+ = render :partial => 'shared/create_link', :locals => { :parent => @sip_account, :child_class => Softkey } \ No newline at end of file
diff --git a/app/views/sip_domains/_form.html.haml b/app/views/sip_domains/_form.html.haml
new file mode 100644
index 0000000..2d662af
--- /dev/null
+++ b/app/views/sip_domains/_form.html.haml
@@ -0,0 +1,7 @@
+= simple_form_for(@sip_domain) do |f|
+ = f.error_notification
+
+ = render "form_core", :f => f
+
+ .actions
+ = f.button :submit, conditional_t('sip_domains.form.submit') \ No newline at end of file
diff --git a/app/views/sip_domains/_form_core.html.haml b/app/views/sip_domains/_form_core.html.haml
new file mode 100644
index 0000000..a7f024f
--- /dev/null
+++ b/app/views/sip_domains/_form_core.html.haml
@@ -0,0 +1,3 @@
+.inputs
+ = f.input :host, :label => t('sip_domains.form.host.label'), :hint => conditional_hint('sip_domains.form.host.hint')
+ = f.input :realm, :label => t('sip_domains.form.realm.label'), :hint => conditional_hint('sip_domains.form.realm.hint')
diff --git a/app/views/sip_domains/_index_core.html.haml b/app/views/sip_domains/_index_core.html.haml
new file mode 100644
index 0000000..37374f2
--- /dev/null
+++ b/app/views/sip_domains/_index_core.html.haml
@@ -0,0 +1,11 @@
+%table
+ %tr
+ %th= t('sip_domains.index.host')
+ %th= t('sip_domains.index.realm')
+
+ - reset_cycle
+ - for sip_domain in sip_domains
+ %tr{:class => cycle('odd', 'even')}
+ %td= sip_domain.host
+ %td= sip_domain.realm
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => sip_domain} \ No newline at end of file
diff --git a/app/views/sip_domains/edit.html.haml b/app/views/sip_domains/edit.html.haml
new file mode 100644
index 0000000..dcf8d6b
--- /dev/null
+++ b/app/views/sip_domains/edit.html.haml
@@ -0,0 +1,3 @@
+- title t("sip_domains.edit.page_title")
+
+= render "form"
diff --git a/app/views/sip_domains/index.html.haml b/app/views/sip_domains/index.html.haml
new file mode 100644
index 0000000..6de7f42
--- /dev/null
+++ b/app/views/sip_domains/index.html.haml
@@ -0,0 +1,6 @@
+- title t("sip_domains.index.page_title")
+
+- if @sip_domains.count > 0
+ = render "index_core", :sip_domains => @sip_domains
+
+= render :partial => 'shared/create_link', :locals => {:child_class => SipDomain} \ No newline at end of file
diff --git a/app/views/sip_domains/new.html.haml b/app/views/sip_domains/new.html.haml
new file mode 100644
index 0000000..12ff340
--- /dev/null
+++ b/app/views/sip_domains/new.html.haml
@@ -0,0 +1,3 @@
+- title t("sip_domains.new.page_title")
+
+= render "form"
diff --git a/app/views/sip_domains/show.html.haml b/app/views/sip_domains/show.html.haml
new file mode 100644
index 0000000..e136eaf
--- /dev/null
+++ b/app/views/sip_domains/show.html.haml
@@ -0,0 +1,10 @@
+- title t("sip_domains.show.page_title")
+
+%p
+ %strong= t('sip_domains.show.host') + ":"
+ = @sip_domain.host
+%p
+ %strong= t('sip_domains.show.realm') + ":"
+ = @sip_domain.realm
+
+= render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @sip_domain } \ No newline at end of file
diff --git a/app/views/softkeys/_form.html.haml b/app/views/softkeys/_form.html.haml
new file mode 100644
index 0000000..5b799b6
--- /dev/null
+++ b/app/views/softkeys/_form.html.haml
@@ -0,0 +1,7 @@
+= simple_form_for([@sip_account, @softkey]) do |f|
+ = f.error_notification
+
+ = render "form_core", :f => f
+
+ .actions
+ = f.button :submit, conditional_t('softkeys.form.submit') \ No newline at end of file
diff --git a/app/views/softkeys/_form_core.html.haml b/app/views/softkeys/_form_core.html.haml
new file mode 100644
index 0000000..b833aad
--- /dev/null
+++ b/app/views/softkeys/_form_core.html.haml
@@ -0,0 +1,12 @@
+%script{:type => "text/javascript"}
+ :plain
+ call_forwarding_function_name = "#{I18n.t('softkeys.functions.call_forwarding')}"
+ hold_function_name = "#{I18n.t('softkeys.functions.hold')}"
+ deactivated_function_name = "#{I18n.t('softkeys.functions.deactivated')}"
+
+.inputs
+ = f.input :softkey_function_id, :as => :select, :collection => @softkey_functions.map {|x| [I18n.t("softkeys.functions.#{x}"), x.id] }, :label => t('softkeys.form.function.label'), :hint => conditional_hint('softkeys.form.function.hint'), :include_blank => false
+ - if @available_call_forwards && @available_call_forwards.count > 0
+ = f.association :call_forward, :collection => @available_call_forwards, :label => t('softkeys.form.call_forward.label'), :hint => conditional_hint('softkeys.form.call_forward.hint'), :include_blank => false
+ = f.input :number, :label => t('softkeys.form.number.label'), :hint => conditional_hint('softkeys.form.number.hint')
+ = f.input :label, :label => t('softkeys.form.label.label'), :hint => conditional_hint('softkeys.form.label.hint')
diff --git a/app/views/softkeys/_index_core.html.haml b/app/views/softkeys/_index_core.html.haml
new file mode 100644
index 0000000..fd3dca8
--- /dev/null
+++ b/app/views/softkeys/_index_core.html.haml
@@ -0,0 +1,14 @@
+%table
+ %tr
+ %th= t('softkeys.index.function')
+ %th= t('softkeys.index.number')
+ %th= t('softkeys.index.label')
+
+ - reset_cycle
+ - for softkey in softkeys.order(:position)
+ %tr{:class => cycle('odd', 'even')}
+ %td
+ =softkey.to_s
+ %td= softkey.number
+ %td= softkey.label
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => softkey.sip_account, :child => softkey} \ No newline at end of file
diff --git a/app/views/softkeys/edit.html.haml b/app/views/softkeys/edit.html.haml
new file mode 100644
index 0000000..54d53fc
--- /dev/null
+++ b/app/views/softkeys/edit.html.haml
@@ -0,0 +1,3 @@
+- title t("softkeys.edit.page_title")
+
+= render "form" \ No newline at end of file
diff --git a/app/views/softkeys/index.html.haml b/app/views/softkeys/index.html.haml
new file mode 100644
index 0000000..8bdc00e
--- /dev/null
+++ b/app/views/softkeys/index.html.haml
@@ -0,0 +1,6 @@
+- title t("softkeys.index.page_title")
+
+- if @softkeys.count > 0
+ = render "index_core", :softkeys => @softkeys
+
+= render :partial => 'shared/create_link', :locals => {:parent => @sip_account, :child_class => Softkey} \ No newline at end of file
diff --git a/app/views/softkeys/new.html.haml b/app/views/softkeys/new.html.haml
new file mode 100644
index 0000000..593add6
--- /dev/null
+++ b/app/views/softkeys/new.html.haml
@@ -0,0 +1,3 @@
+- title t("softkeys.new.page_title")
+
+= render "form"
diff --git a/app/views/softkeys/show.html.haml b/app/views/softkeys/show.html.haml
new file mode 100644
index 0000000..9ab4333
--- /dev/null
+++ b/app/views/softkeys/show.html.haml
@@ -0,0 +1,7 @@
+- title t("softkeys.show.page_title")
+
+%p
+ %strong= t('softkeys.show.function') + ":"
+ =@softkey.to_s
+
+= render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @softkey.sip_account, :child => @softkey } \ No newline at end of file
diff --git a/app/views/system_messages/_form.html.haml b/app/views/system_messages/_form.html.haml
new file mode 100644
index 0000000..036ee00
--- /dev/null
+++ b/app/views/system_messages/_form.html.haml
@@ -0,0 +1,7 @@
+= simple_form_for([@user, @system_message]) do |f|
+ = f.error_notification
+
+ = render "form_core", :f => f
+
+ .actions
+ = f.button :submit, conditional_t('system_messages.form.submit') \ No newline at end of file
diff --git a/app/views/system_messages/_form_core.html.haml b/app/views/system_messages/_form_core.html.haml
new file mode 100644
index 0000000..a85db28
--- /dev/null
+++ b/app/views/system_messages/_form_core.html.haml
@@ -0,0 +1,2 @@
+.inputs
+ = f.input :content, :label => t('system_messages.form.content.label'), :hint => conditional_hint('system_messages.form.content.hint')
diff --git a/app/views/system_messages/_index_core.html.haml b/app/views/system_messages/_index_core.html.haml
new file mode 100644
index 0000000..157d964
--- /dev/null
+++ b/app/views/system_messages/_index_core.html.haml
@@ -0,0 +1,11 @@
+%table
+ %tr
+ %th= t('system_messages.index.created_at')
+ %th= t('system_messages.index.content')
+
+ - reset_cycle
+ - for system_message in system_messages
+ %tr{:class => cycle('odd', 'even')}
+ %td= system_message.created_at
+ %td= system_message.content
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => system_message} \ No newline at end of file
diff --git a/app/views/system_messages/index.html.haml b/app/views/system_messages/index.html.haml
new file mode 100644
index 0000000..da77e18
--- /dev/null
+++ b/app/views/system_messages/index.html.haml
@@ -0,0 +1,3 @@
+- title t("system_messages.index.page_title")
+
+= render "index_core", :system_messages => @system_messages \ No newline at end of file
diff --git a/app/views/system_messages/new.html.haml b/app/views/system_messages/new.html.haml
new file mode 100644
index 0000000..3afdb24
--- /dev/null
+++ b/app/views/system_messages/new.html.haml
@@ -0,0 +1,3 @@
+- title t("system_messages.new.page_title")
+
+= render "form"
diff --git a/app/views/system_messages/show.html.haml b/app/views/system_messages/show.html.haml
new file mode 100644
index 0000000..694e4c1
--- /dev/null
+++ b/app/views/system_messages/show.html.haml
@@ -0,0 +1,8 @@
+- title t("system_messages.show.page_title")
+
+%p
+ %strong= t('system_messages.show.created_at') + ":"
+ = @system_message.created_at
+%p
+ %strong= t('system_messages.show.content') + ":"
+ = @system_message.content
diff --git a/app/views/tenants/_admin_area.de.html.haml b/app/views/tenants/_admin_area.de.html.haml
new file mode 100644
index 0000000..b9b47d5
--- /dev/null
+++ b/app/views/tenants/_admin_area.de.html.haml
@@ -0,0 +1,118 @@
+%p
+ Sie sind Mitglied der
+ = link_to 'Admin Gruppe', tenant_user_group_path(@tenant, @tenant.user_groups.find_by_name('Admins'))
+ und haben deshalb besondere Rechte. Aber wie Peter Parker schon sagte: "With great power comes great responsibility."
+
+%p
+ Dieser Mandant hat
+ = link_to pluralize(@tenant.user_groups.count, 'user group'), tenant_user_groups_path(@tenant)
+ - if @tenant.user_groups.count < 5
+ = "(#{@tenant.user_groups.order(:name).map{|group| group.to_s }.join(', ')})"
+ die in Summe
+ = link_to pluralize(@tenant.users.count, 'user'), tenant_users_path(@tenant)
+ verwalten.
+ Das System kann
+ = PhoneModel.count
+ verschiedene Telefonmodelle von den folgenden Herstellern verwalten:
+ - Manufacturer.all.each do |manufacturer|
+ - if manufacturer != Manufacturer.last && manufacturer != Manufacturer.limit(Manufacturer.count - 1).last
+ = succeed ', ' do
+ =link_to manufacturer, manufacturer_path(manufacturer)
+ - elsif manufacturer == Manufacturer.limit(Manufacturer.count - 1).last
+ = succeed ' und ' do
+ =link_to manufacturer, manufacturer_path(manufacturer)
+ - else
+ = succeed '.' do
+ =link_to manufacturer, manufacturer_path(manufacturer)
+
+%h3 SIP-Konten und Telefone
+
+%table
+ %tr{:class => 'even'}
+ %th
+ %th
+ = @tenant
+ %th
+ Alle Benutzer von
+ = "\"#{@tenant}\""
+ %tr{:class => 'odd'}
+ %td
+ SIP-Konten
+ %td
+ = link_to @tenant.sip_accounts.count.to_s, tenant_sip_accounts_path(@tenant)
+ = render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => SipAccount}
+ %td= @tenant.users_sip_accounts.count.to_s
+ %tr{:class => 'even'}
+ %td
+ Telefone
+ %td
+ = link_to @tenant.phones.count.to_s, tenant_phones_path(@tenant)
+ = render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => Phone}
+ %td= @tenant.users_phones.count.to_s
+
+%h3 Allgemein
+
+%table
+ %tr{:class => 'even'}
+ %th
+ Funktion
+ %th
+ Anzahl
+ %th
+ %tr{:class => 'odd'}
+ %td
+ Callthrough
+ %td
+ = link_to @tenant.callthroughs.count.to_s, tenant_callthroughs_path(@tenant)
+ %td
+ = render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => Callthrough}
+ %tr{:class => 'even'}
+ %td
+ Konferenzen
+ %td
+ = link_to @tenant.conferences.count.to_s, tenant_conferences_path(@tenant)
+ %td
+ = render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => Conference}
+ %tr{:class => 'odd'}
+ %td
+ Rufgruppen
+ %td
+ = link_to @tenant.hunt_groups.count.to_s, tenant_hunt_groups_path(@tenant)
+ %td
+ = render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => HuntGroup}
+ %tr{:class => 'even'}
+ %td
+ Warteschleifen
+ %td
+ = link_to @tenant.automatic_call_distributors.count.to_s, tenant_automatic_call_distributors_path(@tenant)
+ %td
+ = render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => AutomaticCallDistributor}
+ %tr{:class => 'odd'}
+ %td
+ Oberflächen-Funktionen
+ %td
+ = link_to GuiFunction.count.to_s, gui_functions_path
+ %td
+
+-# Phone books
+-#
+- if GuiFunction.display?('show_phone_books_in_user_show_view', current_user)
+ - if can?( :index, PhoneBook )
+ %h2=t("phone_books.index.page_title")
+ = render "phone_books/index_core", :phone_books => @tenant.phone_books
+ = render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => PhoneBook}
+
+- if STRICT_INTERNAL_EXTENSION_HANDLING == true
+ %h3= t('phone_number_ranges.index.page_title')
+
+ - if @tenant.created_at > (Time.now - 15.minutes) && Delayed::Job.count > 0 && @tenant.phone_number_ranges.find_by_name(INTERNAL_EXTENSIONS).try(:phone_numbers).try(:count).to_i == 0
+ Der Mandant
+ = "\"#{@tenant}\""
+ wurde erst vor
+ = distance_of_time_in_words_to_now(@tenant.created_at)
+ erstellt. Es gibt immer noch nicht abgeschlossene
+ = pluralize(Delayed::Job.count, 'Hintergrundprozesse')
+ \. Bitte warten Sie noch ein paar Minuten und laden anschließend diese Seite erneut.
+ - else
+ =render 'phone_number_ranges/index_core', :phone_number_ranges => (@tenant.phone_number_ranges + @tenant.country.phone_number_ranges.where(:name => SERVICE_NUMBERS))
+ =render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => PhoneNumberRange}
diff --git a/app/views/tenants/_admin_area.html.haml b/app/views/tenants/_admin_area.html.haml
new file mode 100644
index 0000000..d648143
--- /dev/null
+++ b/app/views/tenants/_admin_area.html.haml
@@ -0,0 +1,116 @@
+%p
+ You belong to the
+ = link_to 'admin group', tenant_user_group_path(@tenant, @tenant.user_groups.find_by_name('Admins'))
+ and therefore have super powers. But always remember Peter Parker's: "With great power comes great responsibility."
+
+%p
+ = succeed '.' do
+ This tenant has
+ = link_to pluralize(@tenant.user_groups.count, 'user group'), tenant_user_groups_path(@tenant)
+ - if @tenant.user_groups.count < 5
+ = "(#{@tenant.user_groups.order(:name).map{|group| group.to_s }.join(', ')})"
+ which handle a total of
+ = link_to pluralize(@tenant.users.count, 'user'), tenant_users_path(@tenant)
+ This system can setup
+ = PhoneModel.count
+ different phone models from the manufacturers
+ - Manufacturer.all.each do |manufacturer|
+ - if manufacturer != Manufacturer.last && manufacturer != Manufacturer.limit(Manufacturer.count - 1).last
+ = succeed ', ' do
+ =link_to manufacturer, manufacturer_path(manufacturer)
+ - elsif manufacturer == Manufacturer.limit(Manufacturer.count - 1).last
+ = succeed ' and ' do
+ =link_to manufacturer, manufacturer_path(manufacturer)
+ - else
+ = succeed '.' do
+ =link_to manufacturer, manufacturer_path(manufacturer)
+
+%h3 SIP-Accounts and Phones
+
+%table
+ %tr{:class => 'even'}
+ %th
+ %th
+ = @tenant
+ %th
+ All users of
+ = "\"#{@tenant}\""
+ %tr{:class => 'odd'}
+ %td
+ SIP accounts
+ %td
+ = link_to @tenant.sip_accounts.count.to_s, tenant_sip_accounts_path(@tenant)
+ = render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => SipAccount}
+ %td= @tenant.users_sip_accounts.count.to_s
+ %tr{:class => 'even'}
+ %td
+ Phones
+ %td
+ = link_to @tenant.phones.count.to_s, tenant_phones_path(@tenant)
+ = render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => Phone}
+ %td= @tenant.users_phones.count.to_s
+
+%h3 Misc
+
+%table
+ %tr{:class => 'even'}
+ %th
+ Feature
+ %th
+ Counter
+ %th
+ %tr{:class => 'odd'}
+ %td
+ Callthroughs
+ %td
+ = link_to @tenant.callthroughs.count.to_s, tenant_callthroughs_path(@tenant)
+ %td
+ = render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => Callthrough}
+ %tr{:class => 'even'}
+ %td
+ Conferences
+ %td
+ = link_to @tenant.conferences.count.to_s, tenant_conferences_path(@tenant)
+ %td
+ = render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => Conference}
+ %tr{:class => 'odd'}
+ %td
+ Hunt groups
+ %td
+ = link_to @tenant.hunt_groups.count.to_s, tenant_hunt_groups_path(@tenant)
+ %td
+ = render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => HuntGroup}
+ %tr{:class => 'even'}
+ %td
+ ACDs
+ %td
+ = link_to @tenant.automatic_call_distributors.count.to_s, tenant_automatic_call_distributors_path(@tenant)
+ %td
+ = render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => AutomaticCallDistributor}
+ %tr{:class => 'odd'}
+ %td
+ GUI functions
+ %td
+ = link_to GuiFunction.count.to_s, gui_functions_path
+ %td
+
+-# Phone books
+-#
+- if GuiFunction.display?('show_phone_books_in_user_show_view', current_user)
+ - if can?( :index, PhoneBook )
+ %h2=t("phone_books.index.page_title")
+ = render "phone_books/index_core", :phone_books => @tenant.phone_books
+ = render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => PhoneBook}
+
+- if STRICT_INTERNAL_EXTENSION_HANDLING == true
+ %h3= t('phone_number_ranges.index.page_title')
+
+ - if @tenant.created_at > (Time.now - 15.minutes) && Delayed::Job.count > 0 && @tenant.phone_number_ranges.find_by_name(INTERNAL_EXTENSIONS).try(:phone_numbers).try(:count).to_i == 0
+ This tenant was created
+ = distance_of_time_in_words_to_now(@tenant.created_at)
+ ago. There are still
+ = pluralize(Delayed::Job.count, 'background job')
+ not finished. This can take a couple of minutes. Please reload this page later.
+ - else
+ =render 'phone_number_ranges/index_core', :phone_number_ranges => (@tenant.phone_number_ranges + @tenant.country.phone_number_ranges.where(:name => SERVICE_NUMBERS))
+ =render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => PhoneNumberRange}
diff --git a/app/views/tenants/_form.html.haml b/app/views/tenants/_form.html.haml
new file mode 100644
index 0000000..2ca8a69
--- /dev/null
+++ b/app/views/tenants/_form.html.haml
@@ -0,0 +1,24 @@
+= simple_form_for(@tenant) do |f|
+ = f.error_notification
+
+ = render "form_core", :f => f
+
+ = f.association :country, :label => t('tenants.form.country_id.label'), :hint => conditional_hint('tenants.form.country_id.hint'), :include_blank => false
+ = f.association :language, :label => t('tenants.form.language_id.label'), :hint => conditional_hint('tenants.form.language_id.hint'), :include_blank => false
+
+ = f.association :sip_domain, :label => t('tenants.form.sip_domain.label'), :hint => conditional_hint('tenants.form.sip_domain.hint'), :include_blank => false
+
+ = f.input :from_field_voicemail_email, :label => t('tenants.form.from_field_voicemail_email.label'), :hint => conditional_hint('tenants.form.from_field_voicemail_email.hint')
+ = f.input :from_field_pin_change_email, :label => t('tenants.form.from_field_pin_change_email.label'), :hint => conditional_hint('tenants.form.from_field_pin_change_email.hint')
+
+ - if STRICT_INTERNAL_EXTENSION_HANDLING == true || STRICT_DID_HANDLING == true
+ %h2= t('tenants.form.phone_numbers')
+ %p= t('tenants.form.intro')
+
+ - if STRICT_INTERNAL_EXTENSION_HANDLING == true
+ = f.input :internal_extension_ranges, :label => t('tenants.form.internal_extension_ranges.label'), :hint => conditional_hint('tenants.form.internal_extension_ranges.hint')
+ - if STRICT_DID_HANDLING == true
+ = f.input :did_list, :label => t('tenants.form.did_list.label'), :hint => conditional_hint('tenants.form.did_list.hint')
+
+ .actions
+ = f.button :submit, conditional_t('tenants.form.submit') \ No newline at end of file
diff --git a/app/views/tenants/_form_core.html.haml b/app/views/tenants/_form_core.html.haml
new file mode 100644
index 0000000..4eb2ccc
--- /dev/null
+++ b/app/views/tenants/_form_core.html.haml
@@ -0,0 +1,3 @@
+.inputs
+ = f.input :name, :label => t('tenants.form.name.label'), :hint => conditional_hint('tenants.form.name.hint')
+ = f.input :description, :label => t('tenants.form.description.label'), :hint => conditional_hint('tenants.form.description.hint')
diff --git a/app/views/tenants/_index_core.html.haml b/app/views/tenants/_index_core.html.haml
new file mode 100644
index 0000000..60afeee
--- /dev/null
+++ b/app/views/tenants/_index_core.html.haml
@@ -0,0 +1,17 @@
+%table
+ %tr
+ %th= t('tenants.index.name')
+ %th= t('tenants.index.description')
+
+ - reset_cycle
+ - for tenant in tenants
+ %tr{:class => cycle('odd', 'even')}
+ %td= tenant.name
+ %td= tenant.description
+ %td
+ - if current_user && current_user.current_tenant != tenant && current_user.tenants.include?(tenant)
+ = simple_form_for([current_user.current_tenant, current_user]) do |f|
+ = f.hidden_field :current_tenant_id, :value => tenant.id
+ .actions
+ = f.button :submit, conditional_t('tenants.switch_to_tenant')
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => tenant} \ No newline at end of file
diff --git a/app/views/tenants/edit.html.haml b/app/views/tenants/edit.html.haml
new file mode 100644
index 0000000..159f4fd
--- /dev/null
+++ b/app/views/tenants/edit.html.haml
@@ -0,0 +1,3 @@
+- title t("tenants.edit.page_title", :resource => @tenant )
+
+= render "form"
diff --git a/app/views/tenants/index.html.haml b/app/views/tenants/index.html.haml
new file mode 100644
index 0000000..1783825
--- /dev/null
+++ b/app/views/tenants/index.html.haml
@@ -0,0 +1,6 @@
+- title t("tenants.index.page_title")
+
+- if @tenants.count > 0
+ = render "index_core", :tenants => @tenants
+
+= render :partial => 'shared/create_link', :locals => {:child_class => Tenant} \ No newline at end of file
diff --git a/app/views/tenants/new.html.haml b/app/views/tenants/new.html.haml
new file mode 100644
index 0000000..dca3809
--- /dev/null
+++ b/app/views/tenants/new.html.haml
@@ -0,0 +1,3 @@
+- title t("tenants.new.page_title")
+
+= render "form"
diff --git a/app/views/tenants/show.html.haml b/app/views/tenants/show.html.haml
new file mode 100644
index 0000000..cb2b895
--- /dev/null
+++ b/app/views/tenants/show.html.haml
@@ -0,0 +1,14 @@
+- title t("tenants.show.page_title")
+
+%p
+ %strong= t('tenants.show.name') + ":"
+ = @tenant.name
+- if !@tenant.description.blank?
+ %p
+ %strong= t('tenants.show.description') + ":"
+ = @tenant.description
+
+= render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @tenant }
+
+- if @tenant.user_groups.where(:name => 'Admins').count > 0 && @tenant.user_groups.where(:name => 'Admins').first.users.include?(current_user)
+ = render 'admin_area' \ No newline at end of file
diff --git a/app/views/user_group_memberships/_form.html.haml b/app/views/user_group_memberships/_form.html.haml
new file mode 100644
index 0000000..3c0fee1
--- /dev/null
+++ b/app/views/user_group_memberships/_form.html.haml
@@ -0,0 +1,7 @@
+= simple_form_for([@user_group, @user_group_membership]) do |f|
+ = f.error_notification
+
+ = render "form_core", :f => f
+
+ .actions
+ = f.button :submit, conditional_t('user_group_memberships.form.submit') \ No newline at end of file
diff --git a/app/views/user_group_memberships/_form_core.html.haml b/app/views/user_group_memberships/_form_core.html.haml
new file mode 100644
index 0000000..e77427f
--- /dev/null
+++ b/app/views/user_group_memberships/_form_core.html.haml
@@ -0,0 +1,2 @@
+.inputs
+ = f.input :user_id, :label => t('hunt_groups.form.user.label'), :hint => conditional_hint('hunt_groups.form.user.hint'), :collection => @potential_users, :include_blank => false \ No newline at end of file
diff --git a/app/views/user_group_memberships/_index_core.html.haml b/app/views/user_group_memberships/_index_core.html.haml
new file mode 100644
index 0000000..3c3cebe
--- /dev/null
+++ b/app/views/user_group_memberships/_index_core.html.haml
@@ -0,0 +1,13 @@
+%table
+ %tr
+ %th= t('user_group_memberships.index.tenant')
+ %th= t('user_group_memberships.index.user_group')
+ %th= t('user_group_memberships.index.user')
+
+ - reset_cycle
+ - for user_group_membership in user_group_memberships
+ %tr{:class => cycle('odd', 'even')}
+ %td= user_group_membership.user_group.tenant
+ %td= user_group_membership.user_group
+ %td= user_group_membership.user
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => user_group_membership.user_group, :child => user_group_membership} \ No newline at end of file
diff --git a/app/views/user_group_memberships/edit.html.haml b/app/views/user_group_memberships/edit.html.haml
new file mode 100644
index 0000000..2080c87
--- /dev/null
+++ b/app/views/user_group_memberships/edit.html.haml
@@ -0,0 +1,3 @@
+- title t("user_group_memberships.edit.page_title", :resource => @user_group_membership)
+
+= render "form"
diff --git a/app/views/user_group_memberships/index.html.haml b/app/views/user_group_memberships/index.html.haml
new file mode 100644
index 0000000..1d7927b
--- /dev/null
+++ b/app/views/user_group_memberships/index.html.haml
@@ -0,0 +1,7 @@
+- title t("user_group_memberships.index.page_title")
+
+- if @user_group_memberships.count > 0
+ = render "index_core", :user_group_memberships => @user_group_memberships
+
+- if @potential_users_count > 0
+ = render :partial => 'shared/create_link', :locals => {:parent => @user_group, :child_class => UserGroupMembership} \ No newline at end of file
diff --git a/app/views/user_group_memberships/new.html.haml b/app/views/user_group_memberships/new.html.haml
new file mode 100644
index 0000000..9d59fdd
--- /dev/null
+++ b/app/views/user_group_memberships/new.html.haml
@@ -0,0 +1,3 @@
+- title t("user_group_memberships.new.page_title")
+
+= render "form"
diff --git a/app/views/user_group_memberships/show.html.haml b/app/views/user_group_memberships/show.html.haml
new file mode 100644
index 0000000..0e5cfab
--- /dev/null
+++ b/app/views/user_group_memberships/show.html.haml
@@ -0,0 +1,7 @@
+- title t("user_group_memberships.show.page_title")
+
+%p
+ %strong= t('user_group_memberships.show.user') + ":"
+ = @user_group_membership.user
+
+= render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @user_group, :child => @user_group_membership } \ No newline at end of file
diff --git a/app/views/user_groups/_form.html.haml b/app/views/user_groups/_form.html.haml
new file mode 100644
index 0000000..cbe3cc4
--- /dev/null
+++ b/app/views/user_groups/_form.html.haml
@@ -0,0 +1,7 @@
+= simple_form_for(@user_group) do |f|
+ = f.error_notification
+
+ = render "form_core", :f => f
+
+ .actions
+ = f.button :submit, conditional_t('user_groups.form.submit') \ No newline at end of file
diff --git a/app/views/user_groups/_form_core.html.haml b/app/views/user_groups/_form_core.html.haml
new file mode 100644
index 0000000..a45ba6f
--- /dev/null
+++ b/app/views/user_groups/_form_core.html.haml
@@ -0,0 +1,3 @@
+.inputs
+ = f.input :name, :label => t('user_groups.form.name.label'), :hint => conditional_hint('user_groups.form.name.hint')
+ = f.input :description, :label => t('user_groups.form.description.label'), :hint => conditional_hint('user_groups.form.description.hint')
diff --git a/app/views/user_groups/_index_core.html.haml b/app/views/user_groups/_index_core.html.haml
new file mode 100644
index 0000000..d2b6e88
--- /dev/null
+++ b/app/views/user_groups/_index_core.html.haml
@@ -0,0 +1,24 @@
+%table
+ %tr
+ %th= t('user_groups.index.name')
+ %th= t('user_groups.index.description')
+ - if @user
+ %th= t('user_groups.index.tenant_id')
+ - else
+ %th= t('user_groups.index.members')
+
+ - reset_cycle
+ - for user_group in user_groups
+ %tr{:class => cycle('odd', 'even')}
+ %td= user_group.name
+ %td= user_group.description
+ - if @user
+ %td= user_group.tenant
+ - else
+ %td
+ =render 'users/listing', :users => user_group.users
+ - if user_group.users.count > 1
+ %br
+ = render :partial => 'shared/create_link', :locals => {:parent => user_group, :child_class => UserGroupMembership}
+
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => user_group.tenant, :child => user_group}
diff --git a/app/views/user_groups/edit.html.haml b/app/views/user_groups/edit.html.haml
new file mode 100644
index 0000000..35514e0
--- /dev/null
+++ b/app/views/user_groups/edit.html.haml
@@ -0,0 +1,3 @@
+- title t("user_groups.edit.page_title", :resource => @user_group)
+
+= render "form"
diff --git a/app/views/user_groups/index.html.haml b/app/views/user_groups/index.html.haml
new file mode 100644
index 0000000..545b838
--- /dev/null
+++ b/app/views/user_groups/index.html.haml
@@ -0,0 +1,6 @@
+- title t("user_groups.index.page_title")
+
+- if @user_groups.count > 0
+ = render "index_core", :user_groups => @user_groups
+
+= render :partial => 'shared/create_link', :locals => {:parent => @parent, :child_class => UserGroup} \ No newline at end of file
diff --git a/app/views/user_groups/new.html.haml b/app/views/user_groups/new.html.haml
new file mode 100644
index 0000000..dfef18e
--- /dev/null
+++ b/app/views/user_groups/new.html.haml
@@ -0,0 +1,3 @@
+- title t("user_groups.new.page_title")
+
+= render "form"
diff --git a/app/views/user_groups/show.html.haml b/app/views/user_groups/show.html.haml
new file mode 100644
index 0000000..00bdeb7
--- /dev/null
+++ b/app/views/user_groups/show.html.haml
@@ -0,0 +1,20 @@
+- title t("user_groups.show.page_title")
+
+%p
+ %strong= t('user_groups.show.name') + ":"
+ = @user_group.name
+%p
+ %strong= t('user_groups.show.description') + ":"
+ = @user_group.description
+%p
+ %strong= t('user_groups.show.tenant_id') + ":"
+ = @user_group.tenant
+
+= render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @user_group.tenant, :child => @user_group }
+
+%h2=t("user_group_memberships.index.page_title")
+
+- if @user_group.user_group_memberships.count > 0
+ = render "user_group_memberships/index_core", :user_group_memberships => @user_group.user_group_memberships
+
+= render :partial => 'shared/create_link', :locals => {:parent => @user_group, :child_class => UserGroupMembership} \ No newline at end of file
diff --git a/app/views/users/_form.html.haml b/app/views/users/_form.html.haml
new file mode 100644
index 0000000..9a75677
--- /dev/null
+++ b/app/views/users/_form.html.haml
@@ -0,0 +1,16 @@
+- if @parent && @parent.class == Tenant
+ = simple_form_for([@parent, @user]) do |f|
+ = f.error_notification
+
+ = render "form_core", :f => f
+
+ .actions
+ = f.button :submit, conditional_t('users.form.submit')
+- else
+ = simple_form_for(@user) do |f|
+ = f.error_notification
+
+ = render "form_core", :f => f
+
+ .actions
+ = f.button :submit, conditional_t('users.form.submit')
diff --git a/app/views/users/_form_core.html.haml b/app/views/users/_form_core.html.haml
new file mode 100644
index 0000000..8e18d12
--- /dev/null
+++ b/app/views/users/_form_core.html.haml
@@ -0,0 +1,27 @@
+.inputs
+ - if GuiFunction.display?('name_data_fields_in_user_edit_form', current_user)
+ = f.input :male, :collection => [[true, t('users.form.gender.male')], [false, t('users.form.gender.female')]], :label_method => :last, :value_method => :first, :label => t('users.form.male.label'), :hint => conditional_hint('users.form.gender.hint'), :label => t('users.form.gender.label'), :as => :radio
+ = f.input :first_name, :label => t('users.form.first_name.label'), :hint => conditional_hint('users.form.first_name.hint'), :autofocus => true
+ = f.input :middle_name, :label => t('users.form.middle_name.label'), :hint => conditional_hint('users.form.middle_name.hint')
+ = f.input :last_name, :label => t('users.form.last_name.label'), :hint => conditional_hint('users.form.last_name.hint')
+ - if GuiFunction.display?('user_name_field_in_user_edit_form', current_user)
+ = f.input :user_name, :label => t('users.form.user_name.label'), :hint => conditional_hint('users.form.user_name.hint')
+ - if GuiFunction.display?('email_field_in_user_edit_form', current_user)
+ = f.input :email, :label => t('users.form.email.label'), :hint => conditional_hint('users.form.email.hint')
+
+ - if GuiFunction.display?('password_fields_in_user_edit_form', current_user)
+ = f.input :password, :label => t('users.form.password.label'), :hint => conditional_hint('users.form.password.hint'), :as => :password
+ = f.input :password_confirmation, :label => t('users.form.password_confirmation.label'), :hint => conditional_hint('users.form.password_confirmation.hint'), :as => :password
+
+ - if GuiFunction.display?('pin_fields_in_user_edit_form', current_user)
+ = f.input :new_pin, :label => t('users.form.new_pin.label'), :hint => conditional_hint('users.form.new_pin.hint'), :as => :password
+ = f.input :new_pin_confirmation, :label => t('users.form.new_pin_confirmation.label'), :hint => conditional_hint('users.form.new_pin_confirmation.hint'), :as => :password
+
+ = f.input :image, { :as => :file, :label => t('users.form.image.label'), :hint => conditional_hint('users.form.image.hint') }
+ - if @user && @user.image?
+ %p
+ =link_to 'Destroy avatar', tenant_user_destroy_avatar_path(@tenant, @user)
+
+ = f.input :language_id, :collection => Language.all, :label => t('users.form.language_id.label'), :hint => conditional_hint('users.form.language_id.hint'), :include_blank => false
+
+ /= f.input :send_voicemail_as_email_attachment, :label => t('users.form.send_voicemail_as_email_attachment.label'), :hint => conditional_hint('users.form.send_voicemail_as_email_attachment.hint')
diff --git a/app/views/users/_index_core.html.haml b/app/views/users/_index_core.html.haml
new file mode 100644
index 0000000..51c15de
--- /dev/null
+++ b/app/views/users/_index_core.html.haml
@@ -0,0 +1,18 @@
+%table
+ %tr
+ %th
+ %th= t('users.index.user_name')
+ %th= t('users.index.email')
+ %th= t('users.index.first_name')
+ %th= t('users.index.last_name')
+
+ - reset_cycle
+ - for user in users
+ %tr{:class => cycle('odd', 'even')}
+ %td
+ = image_tag user.image_url(:mini).to_s if user.image_url(:mini)
+ %td= user.user_name
+ %td= user.email
+ %td= user.first_name
+ %td= user.last_name
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => @tenant, :child => user} \ No newline at end of file
diff --git a/app/views/users/_listing.html.haml b/app/views/users/_listing.html.haml
new file mode 100644
index 0000000..0a97ad1
--- /dev/null
+++ b/app/views/users/_listing.html.haml
@@ -0,0 +1,8 @@
+- amount_of_users = users.count
+- if amount_of_users > 0
+ - if amount_of_users < 30
+ = users.map{|user| user}.join(', ')
+ - else
+ = users.limit(15).map{|user| user}.join(', ') + ', '
+ = '[...]'
+ = users.offset(amount_of_users - 15).map{|user| user}.join(', ') \ No newline at end of file
diff --git a/app/views/users/edit.html.haml b/app/views/users/edit.html.haml
new file mode 100644
index 0000000..96272f5
--- /dev/null
+++ b/app/views/users/edit.html.haml
@@ -0,0 +1,3 @@
+- title t("users.edit.page_title", :resource => @user)
+
+= render "form"
diff --git a/app/views/users/index.html.haml b/app/views/users/index.html.haml
new file mode 100644
index 0000000..892e035
--- /dev/null
+++ b/app/views/users/index.html.haml
@@ -0,0 +1,6 @@
+- title t("users.index.page_title")
+
+- if @users.count > 0
+ = render "index_core", :users => @users
+
+= render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => User} \ No newline at end of file
diff --git a/app/views/users/new.html.haml b/app/views/users/new.html.haml
new file mode 100644
index 0000000..a014611
--- /dev/null
+++ b/app/views/users/new.html.haml
@@ -0,0 +1,3 @@
+- title t("users.new.page_title")
+
+= render "form"
diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml
new file mode 100644
index 0000000..7730447
--- /dev/null
+++ b/app/views/users/show.html.haml
@@ -0,0 +1,96 @@
+- title "User: #{@user}"
+
+#user-show
+ %aside
+ = image_tag @user.image_url(:small).to_s, class: 'display' if @user.image? && @user.image_url(:small)
+ %p
+ %strong= t('users.show.user_name') + ":"
+ = @user.user_name
+ %p
+ %strong= t('users.show.email') + ":"
+ = @user.email
+
+ %p.controls
+ = render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @tenant, :child => @user }
+
+ - @user.sip_accounts.each do |sip_account|
+ - phone_number = sip_account.phone_numbers.order(:number).last
+ - if phone_number && !phone_number.number.blank? && phone_number.number[0] != '+'
+ %p
+ %strong= sip_account.phone_numbers.order(:number).last.number
+ %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)
+ %br
+ =link_to t("call_forwards.index.page_title"), phone_number_call_forwards_path(phone_number)
+ %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"), phone_number_ringtones_path(phone_number)
+
+ - if @user.conferences.any?
+ %p
+ %strong= t("conferences.index.page_title")
+ - @user.conferences.each do |conference|
+ %p
+ =link_to conference, edit_user_conference_path(@user, conference)
+
+
+ %section
+ -# Phone books
+ -#
+ - if GuiFunction.display?('show_phone_books_in_user_show_view', current_user)
+ - if can?( :index, PhoneBook )
+ %h2=t("phone_books.index.page_title")
+ = render "phone_books/index_core", :phone_books => @phone_books
+ = render :partial => 'shared/create_link', :locals => {:parent => @user, :child_class => PhoneBook}
+
+ -# User groups (only if the current user can edit or destroy them)
+ -#
+ - if @user.user_groups.map{ |x| can?( :edit, x ) || can?( :destroy, x ) }.include?(true)
+ - if can?( :index, UserGroup )
+ %h2=t("user_groups.index.page_title")
+ - if @user.user_groups.count > 0
+ = render "user_groups/index_core", :user_groups => @user.user_groups.where(:tenant_id => @tenant.id).order(:name)
+ = render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => UserGroup}
+
+ -# SIP accounts
+ -#
+ - if (can?( :index, SipAccount ) && @user.sip_accounts.count > 0 ) || can?( :create, SipAccount )
+ %h2= t('sip_accounts.index.page_title')
+ - if can?( :index, SipAccount ) && @user.sip_accounts.count > 0
+ = render "sip_accounts/index_core", :sip_accounts => @user.sip_accounts
+ = render :partial => 'shared/create_link', :locals => {:parent => @user, :child_class => SipAccount}
+
+ -# Phones
+ -#
+ - if (can?( :index, Phone, :phoneable => @user ) && @user.phones.count > 0 ) || can?( :create, Phone, :phoneable => @user )
+ %h2= t('phones.index.page_title')
+ - if can?( :index, Phone, :phoneable => @user ) && @user.phones.count > 0
+ = render "phones/index_core", :phones => @user.phones
+ = render :partial => 'shared/create_link', :locals => {:parent => @user, :child_class => Phone}
+
+ -# FaxAccount
+ -#
+ - if (can?( :index, FaxAccount ) && @user.fax_accounts.count > 0 ) || can?( :create, FaxAccount )
+ %h2= t('fax_accounts.index.page_title')
+ - if can?( :index, FaxAccount ) && @user.fax_accounts.count > 0
+ = render "fax_accounts/index_core", {:fax_accounts => @user.fax_accounts, :fax_accountable => @user}
+ = render :partial => 'shared/create_link', :locals => {:parent => @user, :child_class => FaxAccount}
+
+ -# Conferences
+ -#
+ - if (can?( :index, Conference ) && @user.conferences.count > 0 ) || can?( :create, Conference )
+ %h2= t('conferences.index.page_title')
+ - if can?( :index, Conference ) && @user.conferences.count > 0
+ = render "conferences/index_core", :conferences => @user.conferences
+ = render :partial => 'shared/create_link', :locals => {:parent => @user, :child_class => Conference}
+
+ -# Tenants
+ -#
+ - if can?( :index, Tenant ) && @user.tenants.count > 1
+ %h2=t("tenants.index.page_title")
+ = render "tenants/index_core", :tenants => @user.tenants \ No newline at end of file
diff --git a/app/views/voicemail_messages/_index_core.html.haml b/app/views/voicemail_messages/_index_core.html.haml
new file mode 100644
index 0000000..b8e47af
--- /dev/null
+++ b/app/views/voicemail_messages/_index_core.html.haml
@@ -0,0 +1,44 @@
+= 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
+ - reset_cycle
+ - for voicemail_message in voicemail_messages
+ %tr.voicemail-messages-entry{:class => cycle('odd', 'even'), :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.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.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.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
+
+ %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")
diff --git a/app/views/voicemail_messages/_navigation.html.haml b/app/views/voicemail_messages/_navigation.html.haml
new file mode 100644
index 0000000..2277bf2
--- /dev/null
+++ b/app/views/voicemail_messages/_navigation.html.haml
@@ -0,0 +1,9 @@
+%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)
+
+.pagination
+ = will_paginate @voicemail_messages
diff --git a/app/views/voicemail_messages/index.html.haml b/app/views/voicemail_messages/index.html.haml
new file mode 100644
index 0000000..53f8090
--- /dev/null
+++ b/app/views/voicemail_messages/index.html.haml
@@ -0,0 +1,6 @@
+- if @type
+ - title t("voicemail_messages.index.page_title_#{@type}")
+- else
+ - title t("voicemail_messages.index.page_title")
+
+= render "index_core", :voicemail_messages => @voicemail_messages
diff --git a/app/views/voicemail_settings/_form.html.haml b/app/views/voicemail_settings/_form.html.haml
new file mode 100644
index 0000000..6d5f845
--- /dev/null
+++ b/app/views/voicemail_settings/_form.html.haml
@@ -0,0 +1,7 @@
+= simple_form_for([@sip_account,@voicemail_setting]) do |f|
+ = f.error_notification
+
+ = render "form_core", :f => f
+
+ .actions
+ = f.button :submit, conditional_t('voicemail_settings.form.submit') \ No newline at end of file
diff --git a/app/views/voicemail_settings/_form_core.html.haml b/app/views/voicemail_settings/_form_core.html.haml
new file mode 100644
index 0000000..08bdfc2
--- /dev/null
+++ b/app/views/voicemail_settings/_form_core.html.haml
@@ -0,0 +1,11 @@
+.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')
diff --git a/app/views/voicemail_settings/edit.html.haml b/app/views/voicemail_settings/edit.html.haml
new file mode 100644
index 0000000..6bd7031
--- /dev/null
+++ b/app/views/voicemail_settings/edit.html.haml
@@ -0,0 +1,3 @@
+- title t("voicemail_settings.edit.page_title")
+
+= render "form"
diff --git a/app/views/voicemail_settings/show.html.haml b/app/views/voicemail_settings/show.html.haml
new file mode 100644
index 0000000..30e12d0
--- /dev/null
+++ b/app/views/voicemail_settings/show.html.haml
@@ -0,0 +1,26 @@
+- title t("voicemail_settings.show.page_title")
+
+%p
+ %strong= t('voicemail_settings.show.greeting_path') + ":"
+ = File.basename(@voicemail_setting.greeting_path.to_s)
+
+%p
+ %strong= t('voicemail_settings.show.name_path') + ":"
+ = File.basename(@voicemail_setting.name_path.to_s)
+
+%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')
+
+= link_to t('voicemail_settings.actions.edit'), edit_sip_account_voicemail_setting_path(@sip_account, @voicemail_setting)
diff --git a/app/views/whitelists/_form.html.haml b/app/views/whitelists/_form.html.haml
new file mode 100644
index 0000000..c7f787a
--- /dev/null
+++ b/app/views/whitelists/_form.html.haml
@@ -0,0 +1,7 @@
+= simple_form_for([@parent, @whitelist]) do |f|
+ = f.error_notification
+
+ = render "form_core", :f => f
+
+ .actions
+ = f.button :submit, conditional_t('whitelists.form.submit') \ No newline at end of file
diff --git a/app/views/whitelists/_form_core.html.haml b/app/views/whitelists/_form_core.html.haml
new file mode 100644
index 0000000..38f1487
--- /dev/null
+++ b/app/views/whitelists/_form_core.html.haml
@@ -0,0 +1,8 @@
+.inputs
+ = f.input :name, :label => t('whitelists.form.name.label'), :hint => conditional_hint('whitelists.form.name.hint')
+
+ %h3= t('whitelists.form.phone_numbers.label')
+ - if !t('whitelists.form.phone_numbers.hint').blank?
+ %p= t('whitelists.form.phone_numbers.hint')
+ = f.simple_fields_for :phone_numbers do |phone_number|
+ = render "phone_numbers/form_core", :f => phone_number
diff --git a/app/views/whitelists/_index_core.html.haml b/app/views/whitelists/_index_core.html.haml
new file mode 100644
index 0000000..b4c5b0c
--- /dev/null
+++ b/app/views/whitelists/_index_core.html.haml
@@ -0,0 +1,15 @@
+%table
+ %tr
+ %th= t('whitelists.index.name')
+ %th= t('whitelists.index.phone_numbers')
+
+ - reset_cycle
+ - for whitelist in whitelists
+ %tr{:class => cycle('odd', 'even')}
+ %td= whitelist.name || '-'
+ %td
+ = render 'phone_numbers/listing', :phone_numbers => whitelist.phone_numbers
+ %br
+ = render :partial => 'shared/create_link', :locals => {:parent => whitelist, :child_class => PhoneNumber, :short_link => true}
+
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => whitelist.whitelistable, :child => whitelist} \ No newline at end of file
diff --git a/app/views/whitelists/edit.html.haml b/app/views/whitelists/edit.html.haml
new file mode 100644
index 0000000..9f8af90
--- /dev/null
+++ b/app/views/whitelists/edit.html.haml
@@ -0,0 +1,3 @@
+- title t("whitelists.edit.page_title")
+
+= render "form"
diff --git a/app/views/whitelists/index.html.haml b/app/views/whitelists/index.html.haml
new file mode 100644
index 0000000..0873189
--- /dev/null
+++ b/app/views/whitelists/index.html.haml
@@ -0,0 +1,6 @@
+- title t("whitelists.index.page_title")
+
+- if @whitelists.count > 0
+ = render "index_core", :whitelists => @whitelists
+
+= render :partial => 'shared/create_link', :locals => {:parent => @parent, :child_class => Whitelist} \ No newline at end of file
diff --git a/app/views/whitelists/new.html.haml b/app/views/whitelists/new.html.haml
new file mode 100644
index 0000000..f1101ad
--- /dev/null
+++ b/app/views/whitelists/new.html.haml
@@ -0,0 +1,3 @@
+- title t("whitelists.new.page_title")
+
+= render "form"
diff --git a/app/views/whitelists/show.html.haml b/app/views/whitelists/show.html.haml
new file mode 100644
index 0000000..77652f9
--- /dev/null
+++ b/app/views/whitelists/show.html.haml
@@ -0,0 +1,7 @@
+- title t("whitelists.show.page_title")
+
+%p
+ %strong= t('whitelists.show.name') + ":"
+ = @whitelist.name
+
+= render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @parent, :child => @whitelist } \ No newline at end of file