From b80bd744ad873f6fc43018bc4bfb90677de167bd Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Mon, 17 Dec 2012 12:01:45 +0100 Subject: Start of GS5. --- app/views/access_authorizations/_form.html.haml | 7 + .../access_authorizations/_form_core.html.haml | 11 ++ .../access_authorizations/_index_core.html.haml | 21 +++ app/views/access_authorizations/edit.html.haml | 3 + app/views/access_authorizations/index.html.haml | 6 + app/views/access_authorizations/new.html.haml | 3 + app/views/access_authorizations/show.html.haml | 22 +++ app/views/acd_agents/_form.html.haml | 7 + app/views/acd_agents/_form_core.html.haml | 7 + app/views/acd_agents/_index_core.html.haml | 18 ++ app/views/acd_agents/_listing.html.haml | 8 + app/views/acd_agents/edit.html.haml | 3 + app/views/acd_agents/index.html.haml | 6 + app/views/acd_agents/new.html.haml | 3 + app/views/acd_agents/show.html.haml | 28 +++ app/views/acd_callers/_index_core.html.haml | 21 +++ app/views/acd_callers/index.html.haml | 6 + app/views/acd_callers/show.html.haml | 25 +++ app/views/addresses/_form.html.haml | 7 + app/views/addresses/_form_core.html.haml | 9 + app/views/addresses/_index_core.html.haml | 23 +++ app/views/addresses/edit.html.haml | 9 + app/views/addresses/index.html.haml | 6 + app/views/addresses/new.html.haml | 3 + app/views/addresses/show.html.haml | 28 +++ app/views/api/rows/_form.html.erb | 21 +++ app/views/api/rows/edit.html.erb | 3 + app/views/api/rows/index.html.erb | 29 +++ app/views/api/rows/new.html.erb | 3 + app/views/api/rows/show.html.erb | 56 ++++++ .../automatic_call_distributors/_form.html.haml | 8 + .../_form_core.html.haml | 16 ++ .../_index_core.html.haml | 39 +++++ .../automatic_call_distributors/edit.html.haml | 3 + .../automatic_call_distributors/index.html.haml | 6 + .../automatic_call_distributors/new.html.haml | 3 + .../automatic_call_distributors/show.html.haml | 59 +++++++ app/views/call_forwards/_form.html.haml | 7 + app/views/call_forwards/_form_core.html.haml | 15 ++ app/views/call_forwards/_index_core.html.haml | 31 ++++ app/views/call_forwards/edit.html.haml | 3 + app/views/call_forwards/index.html.haml | 6 + app/views/call_forwards/new.html.haml | 3 + app/views/call_forwards/show.html.haml | 33 ++++ app/views/call_histories/_index_core.html.haml | 65 +++++++ app/views/call_histories/_navigation.html.haml | 11 ++ app/views/call_histories/index.html.haml | 6 + app/views/calls/_index_core.html.haml | 9 + app/views/calls/index.html.haml | 6 + app/views/callthroughs/_form.html.haml | 7 + app/views/callthroughs/_form_core.html.haml | 24 +++ app/views/callthroughs/_index_core.html.haml | 17 ++ app/views/callthroughs/edit.html.haml | 3 + app/views/callthroughs/index.html.haml | 6 + app/views/callthroughs/new.html.haml | 3 + app/views/callthroughs/show.html.haml | 27 +++ app/views/conference_invitees/_form.html.haml | 7 + app/views/conference_invitees/_form_core.html.haml | 7 + .../conference_invitees/_index_core.html.haml | 17 ++ app/views/conference_invitees/edit.html.haml | 3 + app/views/conference_invitees/index.html.haml | 6 + app/views/conference_invitees/new.html.haml | 3 + app/views/conference_invitees/show.html.haml | 20 +++ app/views/conferences/_form.html.haml | 7 + app/views/conferences/_form_core.html.haml | 11 ++ app/views/conferences/_index_core.html.haml | 53 ++++++ app/views/conferences/edit.html.haml | 3 + app/views/conferences/index.html.haml | 6 + app/views/conferences/new.html.haml | 3 + app/views/conferences/show.html.haml | 43 +++++ app/views/config_polycom/_call_history.xml.haml | 18 ++ .../config_polycom/_call_history_menu.xml.haml | 13 ++ app/views/config_polycom/_phone_book.xml.haml | 18 ++ app/views/config_polycom/config_files.xml.builder | 12 ++ app/views/config_polycom/idle_screen.xml.haml | 7 + app/views/config_polycom/settings.xml.erb | 8 + .../config_polycom/settings_directory.xml.haml | 16 ++ app/views/config_siemens/_menu_list.xml.haml | 33 ++++ app/views/config_siemens/clean-up.xml.erb | 5 + app/views/config_siemens/index.xml.erb | 5 + app/views/config_siemens/write.xml.erb | 10 ++ .../config_snom/_snom_phone_directory.xml.haml | 19 ++ app/views/config_snom/_snom_phone_input.xml.haml | 19 ++ app/views/config_snom/_snom_phone_menu.xml.haml | 17 ++ app/views/config_snom/_snom_phone_text.xml.haml | 16 ++ app/views/config_snom/call_history.xml.haml | 2 + app/views/config_snom/idle_screen.xml.haml | 33 ++++ app/views/config_snom/log_in.xml.haml | 3 + app/views/config_snom/show.xml.haml | 151 ++++++++++++++++ app/views/config_snom/state_settings.xml.haml | 49 ++++++ app/views/config_snom/switch_protocol.xml.builder | 18 ++ app/views/fax_accounts/_form.html.haml | 7 + app/views/fax_accounts/_form_core.html.haml | 11 ++ app/views/fax_accounts/_index_core.html.haml | 35 ++++ app/views/fax_accounts/edit.html.haml | 3 + app/views/fax_accounts/index.html.haml | 6 + app/views/fax_accounts/new.html.haml | 3 + app/views/fax_accounts/show.html.haml | 21 +++ app/views/fax_documents/_form.html.haml | 7 + app/views/fax_documents/_form_core.html.haml | 7 + app/views/fax_documents/_index_core.html.haml | 33 ++++ app/views/fax_documents/edit.html.haml | 9 + app/views/fax_documents/index.html.haml | 5 + app/views/fax_documents/new.html.haml | 3 + app/views/fax_documents/show.html.haml | 36 ++++ .../_index_core.html.haml | 12 ++ .../freeswitch_voicemail_msgs/index.html.haml | 3 + app/views/gemeinschaft_setups/new.de.html.haml | 25 +++ app/views/gemeinschaft_setups/new.html.haml | 25 +++ .../gs_cluster_sync_log_entries/_form.html.haml | 7 + .../_form_core.html.haml | 6 + .../_index_core.html.haml | 17 ++ .../gs_cluster_sync_log_entries/edit.html.haml | 3 + .../gs_cluster_sync_log_entries/index.html.haml | 6 + .../gs_cluster_sync_log_entries/new.html.haml | 3 + .../gs_cluster_sync_log_entries/show.html.haml | 19 ++ app/views/gs_nodes/_form.html.haml | 7 + app/views/gs_nodes/_form_core.html.haml | 7 + app/views/gs_nodes/_index_core.html.haml | 19 ++ app/views/gs_nodes/edit.html.haml | 3 + app/views/gs_nodes/index.html.haml | 6 + app/views/gs_nodes/new.html.haml | 3 + app/views/gs_nodes/show.html.haml | 22 +++ app/views/gs_nodes/sync.xml.haml | 88 ++++++++++ app/views/gui_functions/_form.html.haml | 7 + app/views/gui_functions/_form_core.html.haml | 10 ++ app/views/gui_functions/_index_core.html.haml | 26 +++ app/views/gui_functions/edit.html.haml | 3 + app/views/gui_functions/index.html.haml | 6 + app/views/gui_functions/new.html.haml | 3 + app/views/gui_functions/show.html.haml | 18 ++ app/views/hunt_group_members/_form.html.haml | 7 + app/views/hunt_group_members/_form_core.html.haml | 4 + app/views/hunt_group_members/_index_core.html.haml | 20 +++ app/views/hunt_group_members/_listing.html.haml | 8 + app/views/hunt_group_members/edit.html.haml | 3 + app/views/hunt_group_members/index.html.haml | 6 + app/views/hunt_group_members/new.html.haml | 3 + app/views/hunt_group_members/show.html.haml | 19 ++ app/views/hunt_groups/_form.html.haml | 7 + app/views/hunt_groups/_form_core.html.haml | 4 + app/views/hunt_groups/_index_core.html.haml | 34 ++++ app/views/hunt_groups/edit.html.haml | 3 + app/views/hunt_groups/index.html.haml | 6 + app/views/hunt_groups/new.html.haml | 3 + app/views/hunt_groups/show.html.haml | 26 +++ app/views/layouts/application.html.haml | 46 +++++ app/views/manufacturers/_form.html.haml | 7 + app/views/manufacturers/_form_core.html.haml | 4 + app/views/manufacturers/_index_core.html.haml | 18 ++ app/views/manufacturers/edit.html.haml | 3 + app/views/manufacturers/index.html.haml | 5 + app/views/manufacturers/new.html.haml | 3 + app/views/manufacturers/show.html.haml | 18 ++ app/views/notifications/new_fax.text.erb | 8 + app/views/notifications/new_password.text.erb | 3 + app/views/notifications/new_pin.text.erb | 7 + app/views/notifications/new_voicemail.text.erb | 9 + app/views/page/conference.html.haml | 80 +++++++++ app/views/page/index.de.html.haml | 16 ++ app/views/page/index.html.haml | 16 ++ app/views/phone_book_entries/_form.html.haml | 7 + app/views/phone_book_entries/_form_core.html.haml | 27 +++ .../phone_book_entries/_index_core.de.html.haml | 36 ++++ app/views/phone_book_entries/_index_core.html.haml | 36 ++++ app/views/phone_book_entries/_navigation.html.haml | 8 + app/views/phone_book_entries/edit.html.haml | 9 + app/views/phone_book_entries/index.html.haml | 19 ++ app/views/phone_book_entries/new.html.haml | 3 + app/views/phone_book_entries/show.html.haml | 146 ++++++++++++++++ .../phone_book_entries/show.html.haml.examlple | 194 +++++++++++++++++++++ app/views/phone_books/_form.html.haml | 7 + app/views/phone_books/_form_core.html.haml | 3 + app/views/phone_books/_index_core.html.haml | 16 ++ app/views/phone_books/edit.html.haml | 3 + app/views/phone_books/index.html.haml | 6 + app/views/phone_books/new.html.haml | 3 + app/views/phone_books/show.html.haml | 13 ++ app/views/phone_models/_form.html.haml | 7 + app/views/phone_models/_form_core.html.haml | 4 + app/views/phone_models/_index_core.html.haml | 19 ++ app/views/phone_models/edit.html.haml | 3 + app/views/phone_models/index.html.haml | 6 + app/views/phone_models/new.html.haml | 3 + app/views/phone_models/show.html.haml | 18 ++ app/views/phone_number_ranges/_form.html.haml | 7 + app/views/phone_number_ranges/_form_core.html.haml | 3 + .../phone_number_ranges/_index_core.html.haml | 21 +++ app/views/phone_number_ranges/edit.html.haml | 3 + app/views/phone_number_ranges/index.html.haml | 6 + app/views/phone_number_ranges/new.html.haml | 3 + app/views/phone_number_ranges/show.html.haml | 18 ++ app/views/phone_numbers/_form.html.haml | 7 + app/views/phone_numbers/_form_core.html.haml | 10 ++ app/views/phone_numbers/_index_core.html.haml | 13 ++ app/views/phone_numbers/_listing.html.haml | 8 + app/views/phone_numbers/edit.html.haml | 3 + app/views/phone_numbers/index.html.haml | 6 + app/views/phone_numbers/new.html.haml | 3 + app/views/phone_numbers/show.html.haml | 27 +++ app/views/phone_sip_accounts/_form.html.haml | 7 + app/views/phone_sip_accounts/_form_core.html.haml | 2 + app/views/phone_sip_accounts/_index_core.html.haml | 13 ++ app/views/phone_sip_accounts/index.html.haml | 6 + app/views/phone_sip_accounts/new.html.haml | 3 + app/views/phone_sip_accounts/show.html.haml | 13 ++ app/views/phones/_form.html.haml | 7 + app/views/phones/_form_core.html.haml | 8 + app/views/phones/_index_core.html.haml | 15 ++ app/views/phones/edit.html.haml | 3 + app/views/phones/index.html.haml | 6 + app/views/phones/new.html.haml | 3 + app/views/phones/show.html.haml | 31 ++++ app/views/ringtones/_form.html.haml | 7 + app/views/ringtones/_form_core.html.haml | 3 + app/views/ringtones/_index_core.html.haml | 11 ++ app/views/ringtones/edit.html.haml | 3 + app/views/ringtones/index.html.haml | 6 + app/views/ringtones/new.html.haml | 3 + app/views/ringtones/show.html.haml | 12 ++ app/views/sessions/new.html.haml | 8 + app/views/shared/_create_link.html.haml | 11 ++ app/views/shared/_flash.html.haml | 19 ++ app/views/shared/_header.de.html.haml | 41 +++++ app/views/shared/_header.html.haml | 41 +++++ .../shared/_index_view_edit_destroy_part.html.haml | 29 +++ app/views/shared/_show_edit_destroy_part.html.haml | 16 ++ app/views/shared/_system_message.html.haml | 10 ++ app/views/sip_accounts/_form.html.haml | 7 + app/views/sip_accounts/_form_core.html.haml | 12 ++ app/views/sip_accounts/_index_core.html.haml | 28 +++ app/views/sip_accounts/edit.html.haml | 3 + app/views/sip_accounts/index.html.haml | 6 + app/views/sip_accounts/new.html.haml | 3 + app/views/sip_accounts/show.html.haml | 50 ++++++ app/views/sip_domains/_form.html.haml | 7 + app/views/sip_domains/_form_core.html.haml | 3 + app/views/sip_domains/_index_core.html.haml | 11 ++ app/views/sip_domains/edit.html.haml | 3 + app/views/sip_domains/index.html.haml | 6 + app/views/sip_domains/new.html.haml | 3 + app/views/sip_domains/show.html.haml | 10 ++ app/views/softkeys/_form.html.haml | 7 + app/views/softkeys/_form_core.html.haml | 12 ++ app/views/softkeys/_index_core.html.haml | 14 ++ app/views/softkeys/edit.html.haml | 3 + app/views/softkeys/index.html.haml | 6 + app/views/softkeys/new.html.haml | 3 + app/views/softkeys/show.html.haml | 7 + app/views/system_messages/_form.html.haml | 7 + app/views/system_messages/_form_core.html.haml | 2 + app/views/system_messages/_index_core.html.haml | 11 ++ app/views/system_messages/index.html.haml | 3 + app/views/system_messages/new.html.haml | 3 + app/views/system_messages/show.html.haml | 8 + app/views/tenants/_admin_area.de.html.haml | 118 +++++++++++++ app/views/tenants/_admin_area.html.haml | 116 ++++++++++++ app/views/tenants/_form.html.haml | 24 +++ app/views/tenants/_form_core.html.haml | 3 + app/views/tenants/_index_core.html.haml | 17 ++ app/views/tenants/edit.html.haml | 3 + app/views/tenants/index.html.haml | 6 + app/views/tenants/new.html.haml | 3 + app/views/tenants/show.html.haml | 14 ++ app/views/user_group_memberships/_form.html.haml | 7 + .../user_group_memberships/_form_core.html.haml | 2 + .../user_group_memberships/_index_core.html.haml | 13 ++ app/views/user_group_memberships/edit.html.haml | 3 + app/views/user_group_memberships/index.html.haml | 7 + app/views/user_group_memberships/new.html.haml | 3 + app/views/user_group_memberships/show.html.haml | 7 + app/views/user_groups/_form.html.haml | 7 + app/views/user_groups/_form_core.html.haml | 3 + app/views/user_groups/_index_core.html.haml | 24 +++ app/views/user_groups/edit.html.haml | 3 + app/views/user_groups/index.html.haml | 6 + app/views/user_groups/new.html.haml | 3 + app/views/user_groups/show.html.haml | 20 +++ app/views/users/_form.html.haml | 16 ++ app/views/users/_form_core.html.haml | 27 +++ app/views/users/_index_core.html.haml | 18 ++ app/views/users/_listing.html.haml | 8 + app/views/users/edit.html.haml | 3 + app/views/users/index.html.haml | 6 + app/views/users/new.html.haml | 3 + app/views/users/show.html.haml | 96 ++++++++++ app/views/voicemail_messages/_index_core.html.haml | 44 +++++ app/views/voicemail_messages/_navigation.html.haml | 9 + app/views/voicemail_messages/index.html.haml | 6 + app/views/voicemail_settings/_form.html.haml | 7 + app/views/voicemail_settings/_form_core.html.haml | 11 ++ app/views/voicemail_settings/edit.html.haml | 3 + app/views/voicemail_settings/show.html.haml | 26 +++ app/views/whitelists/_form.html.haml | 7 + app/views/whitelists/_form_core.html.haml | 8 + app/views/whitelists/_index_core.html.haml | 15 ++ app/views/whitelists/edit.html.haml | 3 + app/views/whitelists/index.html.haml | 6 + app/views/whitelists/new.html.haml | 3 + app/views/whitelists/show.html.haml | 7 + 300 files changed, 4468 insertions(+) create mode 100644 app/views/access_authorizations/_form.html.haml create mode 100644 app/views/access_authorizations/_form_core.html.haml create mode 100644 app/views/access_authorizations/_index_core.html.haml create mode 100644 app/views/access_authorizations/edit.html.haml create mode 100644 app/views/access_authorizations/index.html.haml create mode 100644 app/views/access_authorizations/new.html.haml create mode 100644 app/views/access_authorizations/show.html.haml create mode 100644 app/views/acd_agents/_form.html.haml create mode 100644 app/views/acd_agents/_form_core.html.haml create mode 100644 app/views/acd_agents/_index_core.html.haml create mode 100644 app/views/acd_agents/_listing.html.haml create mode 100644 app/views/acd_agents/edit.html.haml create mode 100644 app/views/acd_agents/index.html.haml create mode 100644 app/views/acd_agents/new.html.haml create mode 100644 app/views/acd_agents/show.html.haml create mode 100644 app/views/acd_callers/_index_core.html.haml create mode 100644 app/views/acd_callers/index.html.haml create mode 100644 app/views/acd_callers/show.html.haml create mode 100644 app/views/addresses/_form.html.haml create mode 100644 app/views/addresses/_form_core.html.haml create mode 100644 app/views/addresses/_index_core.html.haml create mode 100644 app/views/addresses/edit.html.haml create mode 100644 app/views/addresses/index.html.haml create mode 100644 app/views/addresses/new.html.haml create mode 100644 app/views/addresses/show.html.haml create mode 100644 app/views/api/rows/_form.html.erb create mode 100644 app/views/api/rows/edit.html.erb create mode 100644 app/views/api/rows/index.html.erb create mode 100644 app/views/api/rows/new.html.erb create mode 100644 app/views/api/rows/show.html.erb create mode 100644 app/views/automatic_call_distributors/_form.html.haml create mode 100644 app/views/automatic_call_distributors/_form_core.html.haml create mode 100644 app/views/automatic_call_distributors/_index_core.html.haml create mode 100644 app/views/automatic_call_distributors/edit.html.haml create mode 100644 app/views/automatic_call_distributors/index.html.haml create mode 100644 app/views/automatic_call_distributors/new.html.haml create mode 100644 app/views/automatic_call_distributors/show.html.haml create mode 100644 app/views/call_forwards/_form.html.haml create mode 100644 app/views/call_forwards/_form_core.html.haml create mode 100644 app/views/call_forwards/_index_core.html.haml create mode 100644 app/views/call_forwards/edit.html.haml create mode 100644 app/views/call_forwards/index.html.haml create mode 100644 app/views/call_forwards/new.html.haml create mode 100644 app/views/call_forwards/show.html.haml create mode 100644 app/views/call_histories/_index_core.html.haml create mode 100644 app/views/call_histories/_navigation.html.haml create mode 100644 app/views/call_histories/index.html.haml create mode 100644 app/views/calls/_index_core.html.haml create mode 100644 app/views/calls/index.html.haml create mode 100644 app/views/callthroughs/_form.html.haml create mode 100644 app/views/callthroughs/_form_core.html.haml create mode 100644 app/views/callthroughs/_index_core.html.haml create mode 100644 app/views/callthroughs/edit.html.haml create mode 100644 app/views/callthroughs/index.html.haml create mode 100644 app/views/callthroughs/new.html.haml create mode 100644 app/views/callthroughs/show.html.haml create mode 100644 app/views/conference_invitees/_form.html.haml create mode 100644 app/views/conference_invitees/_form_core.html.haml create mode 100644 app/views/conference_invitees/_index_core.html.haml create mode 100644 app/views/conference_invitees/edit.html.haml create mode 100644 app/views/conference_invitees/index.html.haml create mode 100644 app/views/conference_invitees/new.html.haml create mode 100644 app/views/conference_invitees/show.html.haml create mode 100644 app/views/conferences/_form.html.haml create mode 100644 app/views/conferences/_form_core.html.haml create mode 100644 app/views/conferences/_index_core.html.haml create mode 100644 app/views/conferences/edit.html.haml create mode 100644 app/views/conferences/index.html.haml create mode 100644 app/views/conferences/new.html.haml create mode 100644 app/views/conferences/show.html.haml create mode 100644 app/views/config_polycom/_call_history.xml.haml create mode 100644 app/views/config_polycom/_call_history_menu.xml.haml create mode 100644 app/views/config_polycom/_phone_book.xml.haml create mode 100644 app/views/config_polycom/config_files.xml.builder create mode 100644 app/views/config_polycom/idle_screen.xml.haml create mode 100644 app/views/config_polycom/settings.xml.erb create mode 100644 app/views/config_polycom/settings_directory.xml.haml create mode 100644 app/views/config_siemens/_menu_list.xml.haml create mode 100644 app/views/config_siemens/clean-up.xml.erb create mode 100644 app/views/config_siemens/index.xml.erb create mode 100644 app/views/config_siemens/write.xml.erb create mode 100644 app/views/config_snom/_snom_phone_directory.xml.haml create mode 100644 app/views/config_snom/_snom_phone_input.xml.haml create mode 100644 app/views/config_snom/_snom_phone_menu.xml.haml create mode 100644 app/views/config_snom/_snom_phone_text.xml.haml create mode 100644 app/views/config_snom/call_history.xml.haml create mode 100644 app/views/config_snom/idle_screen.xml.haml create mode 100644 app/views/config_snom/log_in.xml.haml create mode 100644 app/views/config_snom/show.xml.haml create mode 100644 app/views/config_snom/state_settings.xml.haml create mode 100644 app/views/config_snom/switch_protocol.xml.builder create mode 100644 app/views/fax_accounts/_form.html.haml create mode 100644 app/views/fax_accounts/_form_core.html.haml create mode 100644 app/views/fax_accounts/_index_core.html.haml create mode 100644 app/views/fax_accounts/edit.html.haml create mode 100644 app/views/fax_accounts/index.html.haml create mode 100644 app/views/fax_accounts/new.html.haml create mode 100644 app/views/fax_accounts/show.html.haml create mode 100644 app/views/fax_documents/_form.html.haml create mode 100644 app/views/fax_documents/_form_core.html.haml create mode 100644 app/views/fax_documents/_index_core.html.haml create mode 100644 app/views/fax_documents/edit.html.haml create mode 100644 app/views/fax_documents/index.html.haml create mode 100644 app/views/fax_documents/new.html.haml create mode 100644 app/views/fax_documents/show.html.haml create mode 100644 app/views/freeswitch_voicemail_msgs/_index_core.html.haml create mode 100644 app/views/freeswitch_voicemail_msgs/index.html.haml create mode 100644 app/views/gemeinschaft_setups/new.de.html.haml create mode 100644 app/views/gemeinschaft_setups/new.html.haml create mode 100644 app/views/gs_cluster_sync_log_entries/_form.html.haml create mode 100644 app/views/gs_cluster_sync_log_entries/_form_core.html.haml create mode 100644 app/views/gs_cluster_sync_log_entries/_index_core.html.haml create mode 100644 app/views/gs_cluster_sync_log_entries/edit.html.haml create mode 100644 app/views/gs_cluster_sync_log_entries/index.html.haml create mode 100644 app/views/gs_cluster_sync_log_entries/new.html.haml create mode 100644 app/views/gs_cluster_sync_log_entries/show.html.haml create mode 100644 app/views/gs_nodes/_form.html.haml create mode 100644 app/views/gs_nodes/_form_core.html.haml create mode 100644 app/views/gs_nodes/_index_core.html.haml create mode 100644 app/views/gs_nodes/edit.html.haml create mode 100644 app/views/gs_nodes/index.html.haml create mode 100644 app/views/gs_nodes/new.html.haml create mode 100644 app/views/gs_nodes/show.html.haml create mode 100644 app/views/gs_nodes/sync.xml.haml create mode 100644 app/views/gui_functions/_form.html.haml create mode 100644 app/views/gui_functions/_form_core.html.haml create mode 100644 app/views/gui_functions/_index_core.html.haml create mode 100644 app/views/gui_functions/edit.html.haml create mode 100644 app/views/gui_functions/index.html.haml create mode 100644 app/views/gui_functions/new.html.haml create mode 100644 app/views/gui_functions/show.html.haml create mode 100644 app/views/hunt_group_members/_form.html.haml create mode 100644 app/views/hunt_group_members/_form_core.html.haml create mode 100644 app/views/hunt_group_members/_index_core.html.haml create mode 100644 app/views/hunt_group_members/_listing.html.haml create mode 100644 app/views/hunt_group_members/edit.html.haml create mode 100644 app/views/hunt_group_members/index.html.haml create mode 100644 app/views/hunt_group_members/new.html.haml create mode 100644 app/views/hunt_group_members/show.html.haml create mode 100644 app/views/hunt_groups/_form.html.haml create mode 100644 app/views/hunt_groups/_form_core.html.haml create mode 100644 app/views/hunt_groups/_index_core.html.haml create mode 100644 app/views/hunt_groups/edit.html.haml create mode 100644 app/views/hunt_groups/index.html.haml create mode 100644 app/views/hunt_groups/new.html.haml create mode 100644 app/views/hunt_groups/show.html.haml create mode 100644 app/views/layouts/application.html.haml create mode 100644 app/views/manufacturers/_form.html.haml create mode 100644 app/views/manufacturers/_form_core.html.haml create mode 100644 app/views/manufacturers/_index_core.html.haml create mode 100644 app/views/manufacturers/edit.html.haml create mode 100644 app/views/manufacturers/index.html.haml create mode 100644 app/views/manufacturers/new.html.haml create mode 100644 app/views/manufacturers/show.html.haml create mode 100644 app/views/notifications/new_fax.text.erb create mode 100644 app/views/notifications/new_password.text.erb create mode 100644 app/views/notifications/new_pin.text.erb create mode 100644 app/views/notifications/new_voicemail.text.erb create mode 100644 app/views/page/conference.html.haml create mode 100644 app/views/page/index.de.html.haml create mode 100644 app/views/page/index.html.haml create mode 100644 app/views/phone_book_entries/_form.html.haml create mode 100644 app/views/phone_book_entries/_form_core.html.haml create mode 100644 app/views/phone_book_entries/_index_core.de.html.haml create mode 100644 app/views/phone_book_entries/_index_core.html.haml create mode 100644 app/views/phone_book_entries/_navigation.html.haml create mode 100644 app/views/phone_book_entries/edit.html.haml create mode 100644 app/views/phone_book_entries/index.html.haml create mode 100644 app/views/phone_book_entries/new.html.haml create mode 100644 app/views/phone_book_entries/show.html.haml create mode 100644 app/views/phone_book_entries/show.html.haml.examlple create mode 100644 app/views/phone_books/_form.html.haml create mode 100644 app/views/phone_books/_form_core.html.haml create mode 100644 app/views/phone_books/_index_core.html.haml create mode 100644 app/views/phone_books/edit.html.haml create mode 100644 app/views/phone_books/index.html.haml create mode 100644 app/views/phone_books/new.html.haml create mode 100644 app/views/phone_books/show.html.haml create mode 100644 app/views/phone_models/_form.html.haml create mode 100644 app/views/phone_models/_form_core.html.haml create mode 100644 app/views/phone_models/_index_core.html.haml create mode 100644 app/views/phone_models/edit.html.haml create mode 100644 app/views/phone_models/index.html.haml create mode 100644 app/views/phone_models/new.html.haml create mode 100644 app/views/phone_models/show.html.haml create mode 100644 app/views/phone_number_ranges/_form.html.haml create mode 100644 app/views/phone_number_ranges/_form_core.html.haml create mode 100644 app/views/phone_number_ranges/_index_core.html.haml create mode 100644 app/views/phone_number_ranges/edit.html.haml create mode 100644 app/views/phone_number_ranges/index.html.haml create mode 100644 app/views/phone_number_ranges/new.html.haml create mode 100644 app/views/phone_number_ranges/show.html.haml create mode 100644 app/views/phone_numbers/_form.html.haml create mode 100644 app/views/phone_numbers/_form_core.html.haml create mode 100644 app/views/phone_numbers/_index_core.html.haml create mode 100644 app/views/phone_numbers/_listing.html.haml create mode 100644 app/views/phone_numbers/edit.html.haml create mode 100644 app/views/phone_numbers/index.html.haml create mode 100644 app/views/phone_numbers/new.html.haml create mode 100644 app/views/phone_numbers/show.html.haml create mode 100644 app/views/phone_sip_accounts/_form.html.haml create mode 100644 app/views/phone_sip_accounts/_form_core.html.haml create mode 100644 app/views/phone_sip_accounts/_index_core.html.haml create mode 100644 app/views/phone_sip_accounts/index.html.haml create mode 100644 app/views/phone_sip_accounts/new.html.haml create mode 100644 app/views/phone_sip_accounts/show.html.haml create mode 100644 app/views/phones/_form.html.haml create mode 100644 app/views/phones/_form_core.html.haml create mode 100644 app/views/phones/_index_core.html.haml create mode 100644 app/views/phones/edit.html.haml create mode 100644 app/views/phones/index.html.haml create mode 100644 app/views/phones/new.html.haml create mode 100644 app/views/phones/show.html.haml create mode 100644 app/views/ringtones/_form.html.haml create mode 100644 app/views/ringtones/_form_core.html.haml create mode 100644 app/views/ringtones/_index_core.html.haml create mode 100644 app/views/ringtones/edit.html.haml create mode 100644 app/views/ringtones/index.html.haml create mode 100644 app/views/ringtones/new.html.haml create mode 100644 app/views/ringtones/show.html.haml create mode 100644 app/views/sessions/new.html.haml create mode 100644 app/views/shared/_create_link.html.haml create mode 100644 app/views/shared/_flash.html.haml create mode 100644 app/views/shared/_header.de.html.haml create mode 100644 app/views/shared/_header.html.haml create mode 100644 app/views/shared/_index_view_edit_destroy_part.html.haml create mode 100644 app/views/shared/_show_edit_destroy_part.html.haml create mode 100644 app/views/shared/_system_message.html.haml create mode 100644 app/views/sip_accounts/_form.html.haml create mode 100644 app/views/sip_accounts/_form_core.html.haml create mode 100644 app/views/sip_accounts/_index_core.html.haml create mode 100644 app/views/sip_accounts/edit.html.haml create mode 100644 app/views/sip_accounts/index.html.haml create mode 100644 app/views/sip_accounts/new.html.haml create mode 100644 app/views/sip_accounts/show.html.haml create mode 100644 app/views/sip_domains/_form.html.haml create mode 100644 app/views/sip_domains/_form_core.html.haml create mode 100644 app/views/sip_domains/_index_core.html.haml create mode 100644 app/views/sip_domains/edit.html.haml create mode 100644 app/views/sip_domains/index.html.haml create mode 100644 app/views/sip_domains/new.html.haml create mode 100644 app/views/sip_domains/show.html.haml create mode 100644 app/views/softkeys/_form.html.haml create mode 100644 app/views/softkeys/_form_core.html.haml create mode 100644 app/views/softkeys/_index_core.html.haml create mode 100644 app/views/softkeys/edit.html.haml create mode 100644 app/views/softkeys/index.html.haml create mode 100644 app/views/softkeys/new.html.haml create mode 100644 app/views/softkeys/show.html.haml create mode 100644 app/views/system_messages/_form.html.haml create mode 100644 app/views/system_messages/_form_core.html.haml create mode 100644 app/views/system_messages/_index_core.html.haml create mode 100644 app/views/system_messages/index.html.haml create mode 100644 app/views/system_messages/new.html.haml create mode 100644 app/views/system_messages/show.html.haml create mode 100644 app/views/tenants/_admin_area.de.html.haml create mode 100644 app/views/tenants/_admin_area.html.haml create mode 100644 app/views/tenants/_form.html.haml create mode 100644 app/views/tenants/_form_core.html.haml create mode 100644 app/views/tenants/_index_core.html.haml create mode 100644 app/views/tenants/edit.html.haml create mode 100644 app/views/tenants/index.html.haml create mode 100644 app/views/tenants/new.html.haml create mode 100644 app/views/tenants/show.html.haml create mode 100644 app/views/user_group_memberships/_form.html.haml create mode 100644 app/views/user_group_memberships/_form_core.html.haml create mode 100644 app/views/user_group_memberships/_index_core.html.haml create mode 100644 app/views/user_group_memberships/edit.html.haml create mode 100644 app/views/user_group_memberships/index.html.haml create mode 100644 app/views/user_group_memberships/new.html.haml create mode 100644 app/views/user_group_memberships/show.html.haml create mode 100644 app/views/user_groups/_form.html.haml create mode 100644 app/views/user_groups/_form_core.html.haml create mode 100644 app/views/user_groups/_index_core.html.haml create mode 100644 app/views/user_groups/edit.html.haml create mode 100644 app/views/user_groups/index.html.haml create mode 100644 app/views/user_groups/new.html.haml create mode 100644 app/views/user_groups/show.html.haml create mode 100644 app/views/users/_form.html.haml create mode 100644 app/views/users/_form_core.html.haml create mode 100644 app/views/users/_index_core.html.haml create mode 100644 app/views/users/_listing.html.haml create mode 100644 app/views/users/edit.html.haml create mode 100644 app/views/users/index.html.haml create mode 100644 app/views/users/new.html.haml create mode 100644 app/views/users/show.html.haml create mode 100644 app/views/voicemail_messages/_index_core.html.haml create mode 100644 app/views/voicemail_messages/_navigation.html.haml create mode 100644 app/views/voicemail_messages/index.html.haml create mode 100644 app/views/voicemail_settings/_form.html.haml create mode 100644 app/views/voicemail_settings/_form_core.html.haml create mode 100644 app/views/voicemail_settings/edit.html.haml create mode 100644 app/views/voicemail_settings/show.html.haml create mode 100644 app/views/whitelists/_form.html.haml create mode 100644 app/views/whitelists/_form_core.html.haml create mode 100644 app/views/whitelists/_index_core.html.haml create mode 100644 app/views/whitelists/edit.html.haml create mode 100644 app/views/whitelists/index.html.haml create mode 100644 app/views/whitelists/new.html.haml create mode 100644 app/views/whitelists/show.html.haml (limited to 'app/views') 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 %> + +
+ <%= 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 %> +
+ +
+ <%= f.button :submit %> +
+<% 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 @@ +

Editing row

+ +<%= 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 @@ +

Listing rows

+ + + + + + + + + + + + + + +<% @rows.each do |row| %> + '> + + + + + + + + + + +<% end %> +
IDUser nameLast nameFirst nameInternal extensionOffice phone numberFax phone numberEmailPin
<%= row.id %><%= link_to row.user_name, tenant_user_path(row.user.current_tenant, row.user) %><%= row.last_name %><%= row.first_name %><%= row.internal_extension %><%= row.office_phone_number %><%= row.fax_phone_number %><%= row.email %><%= row.pin %>
\ 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 @@ +

New row

+ +<%= 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 @@ +

<%= notice %>

+ +

+ User name: + <%= @row.user_name %> +

+ +

+ Last name: + <%= @row.last_name %> +

+ +

+ Middle name: + <%= @row.middle_name %> +

+ +

+ First name: + <%= @row.first_name %> +

+ +

+ Office phone number: + <%= @row.office_phone_number %> +

+ +

+ Internal extension: + <%= @row.internal_extension %> +

+ +

+ Mobile phone number: + <%= @row.mobile_phone_number %> +

+ +

+ Fax phone number: + <%= @row.fax_phone_number %> +

+ +

+ Email: + <%= @row.email %> +

+ +

+ Pin: + <%= @row.pin %> +

+ +

+ Photo file name: + <%= @row.photo_file_name %> +

\ 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 @@ + + + + <%= key %>="<%= value %>" + <% end %> + /> + 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 @@ + + + CleanUp + + \ 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 @@ + + + ReadAllItems + + \ 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 @@ + + + WriteItems + + <% @new_settings.each do |setting| %> + index="<%=setting[1]%>"<%end%>><%=setting[2]%> + <% end %> + + + \ 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] + + != "\ + + + +%html.no-js{ :lang => "en" } + ~#OPTIMIZE Make html lang attribute reflect the actual language. + + %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 '⇩'.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 '⇧'.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 -- cgit v1.2.3