summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorspag <spag@golwen.net>2013-01-24 15:37:24 +0100
committerspag <spag@golwen.net>2013-01-24 15:37:24 +0100
commit99270421d02b3ac77bf111bbde62a2ef80f8e114 (patch)
tree6ddb8328729e53dcc7a605040cd7aece622d0e5a /app/views
parent5f5ea1d06686ec5cd31cf8b9db177191fa7e66fd (diff)
parent2d6ebf19e5cea45dd714f92a64b1b81e1200a811 (diff)
Merge branch 'develop' of github.com:amooma/GS5 into develop
Diffstat (limited to 'app/views')
-rw-r--r--app/views/gemeinschaft_setups/new.de.html.haml20
-rw-r--r--app/views/gemeinschaft_setups/new.html.haml22
-rw-r--r--app/views/gs_parameters/_index_core.html.haml12
-rw-r--r--app/views/gs_parameters/show.html.haml46
-rw-r--r--app/views/layouts/_navbar.html.haml13
-rw-r--r--app/views/page/help.de.html.haml (renamed from app/views/page/beginners_intro.de.html.haml)0
-rw-r--r--app/views/page/help.html.haml (renamed from app/views/page/beginners_intro.html.haml)0
-rw-r--r--app/views/shared/_header.de.html.haml41
-rw-r--r--app/views/shared/_header.html.haml41
-rw-r--r--app/views/sip_accounts/_form_core.html.haml8
-rw-r--r--app/views/tenants/_admin_area.html.haml4
-rw-r--r--app/views/user_groups/_index_core.html.haml4
-rw-r--r--app/views/users/_form_core.html.haml3
13 files changed, 82 insertions, 132 deletions
diff --git a/app/views/gemeinschaft_setups/new.de.html.haml b/app/views/gemeinschaft_setups/new.de.html.haml
index 3d9b173..cf1f207 100644
--- a/app/views/gemeinschaft_setups/new.de.html.haml
+++ b/app/views/gemeinschaft_setups/new.de.html.haml
@@ -5,23 +5,25 @@
= f.error_notification
%h2 Admin-Konto
- %p
- Dieser erste Benutzer des Systems hat automatisch Admin-Rechte.
= f.simple_fields_for :user, @user do |u|
= render "users/form_core", :f => u
- %h2 SIP-Domain
- %p In den meisten Fällen sollten Sie den gleichen Wert für SIP-Realm und SIP-Domain benutzen. Wenn Sie mit diesen Begriffen nichts anfangen können, dann geben Sie hier bitte die IP-Adresse dieses Servers ein.
-
- = f.simple_fields_for :sip_domain, @sip_domain do |s|
- = render "sip_domains/form_core", :f => s
-
- %h2 Allgemeine Informationen
+ %h2 Konfiguration der Telefonanlage
= f.association :country, :label => t('gemeinschaft_setups.form.country_id.label'), :hint => conditional_hint('gemeinschaft_setups.form.country_id.hint'), :include_blank => false
= f.association :language, :label => t('gemeinschaft_setups.form.language_id.label'), :hint => conditional_hint('gemeinschaft_setups.form.language_id.hint'), :include_blank => false
= f.input :default_area_code, :label => t('gemeinschaft_setups.form.default_area_code.label'), :hint => conditional_hint('gemeinschaft_setups.form.default_area_code.hint')
+ = f.input :default_company_name, :label => t('gemeinschaft_setups.form.default_company_name.label'), :hint => conditional_hint('gemeinschaft_setups.form.default_company_name.hint')
+
+ = f.input :default_system_email, :label => t('gemeinschaft_setups.form.default_system_email.label'), :hint => conditional_hint('gemeinschaft_setups.form.default_system_email.hint')
+
+ %h3 SIP-Domain
+ %p In den meisten Fällen sollten Sie den gleichen Wert für SIP-Realm und SIP-Domain benutzen. Wenn Sie mit diesen Begriffen nichts anfangen können, dann geben Sie hier bitte die IP-Adresse dieses Servers ein.
+
+ = f.simple_fields_for :sip_domain, @sip_domain do |s|
+ = render "sip_domains/form_core", :f => s
+
.actions
= f.button :submit, conditional_t('gemeinschaft_setups.form.submit') \ No newline at end of file
diff --git a/app/views/gemeinschaft_setups/new.html.haml b/app/views/gemeinschaft_setups/new.html.haml
index ff9c812..5e2434e 100644
--- a/app/views/gemeinschaft_setups/new.html.haml
+++ b/app/views/gemeinschaft_setups/new.html.haml
@@ -4,24 +4,26 @@
= simple_form_for(@gemeinschaft_setup) do |f|
= f.error_notification
- %h3 Admin user account
- %p
- This is the first user of this system who has admin rights by default.
+ %h2 Admin user account
= f.simple_fields_for :user, @user do |u|
= render "users/form_core", :f => u
- %h3 SIP domain
- %p You should use the same value for the SIP realm as for the SIP domain to ensure compatibility with different phone models. In case you have no clue what we are talking about: Just enter the IP address of this server.
-
- = f.simple_fields_for :sip_domain, @sip_domain do |s|
- = render "sip_domains/form_core", :f => s
-
- %h3 General information
+ %h2 Configuration of this PBX
= f.association :country, :label => t('gemeinschaft_setups.form.country_id.label'), :hint => conditional_hint('gemeinschaft_setups.form.country_id.hint'), :include_blank => false
= f.association :language, :label => t('gemeinschaft_setups.form.language_id.label'), :hint => conditional_hint('gemeinschaft_setups.form.language_id.hint'), :include_blank => false
= f.input :default_area_code, :label => t('gemeinschaft_setups.form.default_area_code.label'), :hint => conditional_hint('gemeinschaft_setups.form.default_area_code.hint')
+ = f.input :default_company_name, :label => t('gemeinschaft_setups.form.default_company_name.label'), :hint => conditional_hint('gemeinschaft_setups.form.default_company_name.hint')
+
+ = f.input :default_system_email, :label => t('gemeinschaft_setups.form.default_system_email.label'), :hint => conditional_hint('gemeinschaft_setups.form.default_system_email.hint')
+
+ %h3 SIP-Domain
+ %p You should use the same value for the SIP realm as for the SIP domain to ensure compatibility with different phone models. In case you have no clue what we are talking about: Just enter the IP address of this server.
+
+ = f.simple_fields_for :sip_domain, @sip_domain do |s|
+ = render "sip_domains/form_core", :f => s
+
.actions
= f.button :submit, conditional_t('gemeinschaft_setups.form.submit') \ No newline at end of file
diff --git a/app/views/gs_parameters/_index_core.html.haml b/app/views/gs_parameters/_index_core.html.haml
index 9628feb..11d60db 100644
--- a/app/views/gs_parameters/_index_core.html.haml
+++ b/app/views/gs_parameters/_index_core.html.haml
@@ -10,8 +10,16 @@
- for gs_parameter in gs_parameters
- cache(['gs_parameters_table_single_row', gs_parameter]) do
%tr
- %td= gs_parameter.name
+ %td
+ %span.hidden-phone
+ = truncate(gs_parameter.name, :length => GsParameter.get('DESKTOP_MAX_STRING_LENGTH'))
+ %span.visible-phone
+ = truncate(gs_parameter.name, :length => GsParameter.get('MOBILE_MAX_STRING_LENGTH'))
- if !@sections
%td= gs_parameter.section
- %td= truncate(gs_parameter.value, :length => 50)
+ %td
+ %span.hidden-phone
+ = truncate(gs_parameter.value, :length => GsParameter.get('DESKTOP_MAX_STRING_LENGTH'))
+ %span.visible-phone
+ = truncate(gs_parameter.value, :length => GsParameter.get('MOBILE_MAX_STRING_LENGTH'))
=render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => gs_parameter} \ No newline at end of file
diff --git a/app/views/gs_parameters/show.html.haml b/app/views/gs_parameters/show.html.haml
index 795d09c..d04949b 100644
--- a/app/views/gs_parameters/show.html.haml
+++ b/app/views/gs_parameters/show.html.haml
@@ -1,20 +1,32 @@
-- cache(@gs_parameter) do
- - content_for :title, t("gs_parameters.show.page_title")
+- content_for :title, t("gs_parameters.show.page_title")
- %p
- %strong= t('gs_parameters.show.name') + ":"
- = @gs_parameter.name
- %p
- %strong= t('gs_parameters.show.section') + ":"
- = @gs_parameter.section
- %p
- %strong= t('gs_parameters.show.value') + ":"
- = @gs_parameter.value
- %p
- %strong= t('gs_parameters.show.class_type') + ":"
- = @gs_parameter.class_type
- %p
- %strong= t('gs_parameters.show.description') + ":"
- = @gs_parameter.description
+- cache(@gs_parameter) do
+ %table{:class => 'table table-striped'}
+ %tbody
+ %tr
+ %td
+ %strong= t('gs_parameters.show.name') + ":"
+ %td
+ = @gs_parameter.name
+ %tr
+ %td
+ %strong= t('gs_parameters.show.section') + ":"
+ %td
+ = @gs_parameter.section
+ %tr
+ %td
+ %strong= t('gs_parameters.show.value') + ":"
+ %td
+ = @gs_parameter.value
+ %tr
+ %td
+ %strong= t('gs_parameters.show.class_type') + ":"
+ %td
+ = @gs_parameter.class_type
+ %tr
+ %td
+ %strong= t('gs_parameters.show.description') + ":"
+ %td
+ = @gs_parameter.description
= render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @gs_parameter } \ No newline at end of file
diff --git a/app/views/layouts/_navbar.html.haml b/app/views/layouts/_navbar.html.haml
index 7ef6523..c2d9946 100644
--- a/app/views/layouts/_navbar.html.haml
+++ b/app/views/layouts/_navbar.html.haml
@@ -9,9 +9,16 @@
%span.icon-bar
%span.icon-bar
- - if current_user && current_user.sip_accounts.any?
- .nav-collapse.collapse
- %ul.nav
+ .nav-collapse.collapse
+ %ul.nav
+ - if current_user && GemeinschaftSetup.any? && current_user.admin?
+ - if current_page?(page_help_path)
+ %li.active
+ =link_to 'Admin-Doku', page_help_path
+ - else
+ %li
+ =link_to 'Admin-Doku', page_help_path
+ - if current_user && current_user.sip_accounts.any?
%li
%a{:href => sip_account_call_histories_path(current_user.sip_accounts.first)}
%i.icon-list-alt.icon-white
diff --git a/app/views/page/beginners_intro.de.html.haml b/app/views/page/help.de.html.haml
index 5eef135..5eef135 100644
--- a/app/views/page/beginners_intro.de.html.haml
+++ b/app/views/page/help.de.html.haml
diff --git a/app/views/page/beginners_intro.html.haml b/app/views/page/help.html.haml
index dadd99f..dadd99f 100644
--- a/app/views/page/beginners_intro.html.haml
+++ b/app/views/page/help.html.haml
diff --git a/app/views/shared/_header.de.html.haml b/app/views/shared/_header.de.html.haml
deleted file mode 100644
index 10ad2a0..0000000
--- a/app/views/shared/_header.de.html.haml
+++ /dev/null
@@ -1,41 +0,0 @@
-%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
- or
- = link_to "Anmelden", log_in_path
diff --git a/app/views/shared/_header.html.haml b/app/views/shared/_header.html.haml
deleted file mode 100644
index 377d8e0..0000000
--- a/app/views/shared/_header.html.haml
+++ /dev/null
@@ -1,41 +0,0 @@
-%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/sip_accounts/_form_core.html.haml b/app/views/sip_accounts/_form_core.html.haml
index 495ae84..1b96d27 100644
--- a/app/views/sip_accounts/_form_core.html.haml
+++ b/app/views/sip_accounts/_form_core.html.haml
@@ -1,7 +1,11 @@
.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'), :autofocus => true
+ - if @sip_account && @sip_account.new_record?
+ = f.hidden_field :auth_name
+ = f.hidden_field :password
+ - else
+ = f.input :auth_name, :as => :string, :label => t('sip_accounts.form.auth_name.label'), :hint => conditional_hint('sip_accounts.form.auth_name.hint')
+ = f.input :password, :as => :string, :label => t('sip_accounts.form.password.label'), :hint => conditional_hint('sip_accounts.form.password.hint')
= f.input :voicemail_pin, :as => :string, :label => t('sip_accounts.form.voicemail_pin.label'), :hint => conditional_hint('sip_accounts.form.voicemail_pin.hint')
= f.input :call_waiting, :label => t('sip_accounts.form.call_waiting.label'), :hint => conditional_hint('sip_accounts.form.call_waiting.hint')
= f.input :clir, :label => t('sip_accounts.form.clir.label'), :hint => conditional_hint('sip_accounts.form.clir.hint')
diff --git a/app/views/tenants/_admin_area.html.haml b/app/views/tenants/_admin_area.html.haml
index 92614c8..28a8273 100644
--- a/app/views/tenants/_admin_area.html.haml
+++ b/app/views/tenants/_admin_area.html.haml
@@ -11,11 +11,11 @@
= render :partial => 'tenants/table_of_hunt_groups', :locals => {:tenant => tenant}
= render :partial => 'tenants/table_of_automatic_call_distributors', :locals => {:tenant => tenant}
- = render :partial => 'tenants/table_of_phone_books', :locals => {:tenant => tenant}
-
= render :partial => 'tenants/users_table', :locals => {:tenant => tenant}
= render :partial => 'tenants/user_groups_table', :locals => {:tenant => tenant}
+ = render :partial => 'tenants/table_of_phone_books', :locals => {:tenant => tenant}
+
.well
%h2 Gemeinschaft Konfiguration
= render :partial => 'tenants/gs_parameter_table', :locals => {:tenant => tenant}
diff --git a/app/views/user_groups/_index_core.html.haml b/app/views/user_groups/_index_core.html.haml
index c481a18..aa1497e 100644
--- a/app/views/user_groups/_index_core.html.haml
+++ b/app/views/user_groups/_index_core.html.haml
@@ -29,9 +29,5 @@
- else
%td
=render 'users/listing', :users => user_group.users
- - if user_group.users.any?
- %br
- - if (user_group.tenant.user_ids - user_group.user_ids).any?
- = 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/users/_form_core.html.haml b/app/views/users/_form_core.html.haml
index 24b15f5..980976d 100644
--- a/app/views/users/_form_core.html.haml
+++ b/app/views/users/_form_core.html.haml
@@ -2,7 +2,8 @@
- 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_buttons
= 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')
+ - if User.any?
+ = 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')