summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/views/call_histories/_index_core.html.haml2
-rw-r--r--app/views/phones/show.html.haml2
-rw-r--r--app/views/shared/_index_view_edit_destroy_part.html.haml4
-rw-r--r--app/views/shared/_show_edit_destroy_part.html.haml4
-rw-r--r--app/views/sip_accounts/_index_core.html.haml19
-rw-r--r--app/views/tenants/_admin_area.html.haml18
-rw-r--r--app/views/tenants/_form_core.html.haml3
-rw-r--r--app/views/users/show.html.haml18
8 files changed, 40 insertions, 30 deletions
diff --git a/app/views/call_histories/_index_core.html.haml b/app/views/call_histories/_index_core.html.haml
index 07e0ee4..4ebcad0 100644
--- a/app/views/call_histories/_index_core.html.haml
+++ b/app/views/call_histories/_index_core.html.haml
@@ -66,6 +66,6 @@
%td
- if can? :destroy, call_history
/ = link_to t('call_histories.index.actions.destroy'), sip_account_call_history_path(@sip_account, call_history), :method => :delete
- %a.btn.btn-mini.btn-danger{"data-confirm" => t("#{call_history.class.name.underscore.pluralize}.actions.confirm_detroy"), "data-method" => "delete", :href => sip_account_call_history_path(@sip_account, call_history), :rel => "nofollow"}
+ %a.btn.btn-mini.btn-danger{"data-confirm" => t("#{call_history.class.name.underscore.pluralize}.actions.confirm_destroy"), "data-method" => "delete", :href => sip_account_call_history_path(@sip_account, call_history), :rel => "nofollow"}
%i.icon-trash.icon-white
=t('call_histories.index.actions.destroy')
diff --git a/app/views/phones/show.html.haml b/app/views/phones/show.html.haml
index 97cb1a8..b34bdcd 100644
--- a/app/views/phones/show.html.haml
+++ b/app/views/phones/show.html.haml
@@ -73,7 +73,7 @@
.row
.span12
%h2= t("phones.sip_accounts.title")
- - if @phone.phone_sip_accounts.count > 0
+ - if @phone.phone_sip_accounts.any?
= 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/shared/_index_view_edit_destroy_part.html.haml b/app/views/shared/_index_view_edit_destroy_part.html.haml
index 3618d63..8e119fe 100644
--- a/app/views/shared/_index_view_edit_destroy_part.html.haml
+++ b/app/views/shared/_index_view_edit_destroy_part.html.haml
@@ -14,7 +14,7 @@
=t("#{child.class.name.underscore.pluralize}.index.actions.edit")
- if can? :destroy, child
- %a.btn.btn-small.btn-danger{"data-confirm" => t("#{child.class.name.underscore.pluralize}.index.actions.confirm_detroy"), "data-method" => "delete", :href => method( :"#{parent.class.name.underscore}_#{child.class.name.underscore}_path" ).(parent, child), :rel => "nofollow"}
+ %a.btn.btn-small.btn-danger{"data-confirm" => t("#{child.class.name.underscore.pluralize}.index.actions.confirm_destroy"), "data-method" => "delete", :href => method( :"#{parent.class.name.underscore}_#{child.class.name.underscore}_path" ).(parent, child), :rel => "nofollow"}
%i.icon-remove.icon-white
%span.hidden-phone
=t("#{child.class.name.underscore.pluralize}.index.actions.destroy")
@@ -35,7 +35,7 @@
=t("#{child.class.name.underscore.pluralize}.index.actions.edit")
- if can? :destroy, child
- %a.btn.btn-small.btn-danger{"data-confirm" => t("#{child.class.name.underscore.pluralize}.index.actions.confirm_detroy"), "data-method" => "delete", :href => method( :"#{child.class.name.underscore}_path" ).(child), :rel => "nofollow"}
+ %a.btn.btn-small.btn-danger{"data-confirm" => t("#{child.class.name.underscore.pluralize}.index.actions.confirm_destroy"), "data-method" => "delete", :href => method( :"#{child.class.name.underscore}_path" ).(child), :rel => "nofollow"}
%i.icon-trash.icon-white
%span.hidden-phone
=t("#{child.class.name.underscore.pluralize}.index.actions.destroy") \ 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
index f715075..a1e8490 100644
--- a/app/views/shared/_show_edit_destroy_part.html.haml
+++ b/app/views/shared/_show_edit_destroy_part.html.haml
@@ -5,7 +5,7 @@
%i.icon-edit.icon-white
=t("#{child.class.name.underscore.pluralize}.index.actions.edit")
- if can? :destroy, child
- %a.btn.btn-small.btn-danger{"data-confirm" => t("#{child.class.name.underscore.pluralize}.index.actions.confirm_detroy"), "data-method" => "delete", :href => method( :"#{parent.class.name.underscore}_#{child.class.name.underscore}_path" ).(parent, child), :rel => "nofollow"}
+ %a.btn.btn-small.btn-danger{"data-confirm" => t("#{child.class.name.underscore.pluralize}.index.actions.confirm_destroy"), "data-method" => "delete", :href => method( :"#{parent.class.name.underscore}_#{child.class.name.underscore}_path" ).(parent, child), :rel => "nofollow"}
%i.icon-trash.icon-white
=t("#{child.class.name.underscore.pluralize}.index.actions.destroy")
@@ -15,6 +15,6 @@
%i.icon-edit.icon-white
=t("#{child.class.name.underscore.pluralize}.index.actions.edit")
- if can? :destroy, child
- %a.btn.btn-small.btn-danger{"data-confirm" => t("#{child.class.name.underscore.pluralize}.index.actions.confirm_detroy"), "data-method" => "delete", :href => method( :"#{child.class.name.underscore}_path" ).(child), :rel => "nofollow"}
+ %a.btn.btn-small.btn-danger{"data-confirm" => t("#{child.class.name.underscore.pluralize}.index.actions.confirm_destroy"), "data-method" => "delete", :href => method( :"#{child.class.name.underscore}_path" ).(child), :rel => "nofollow"}
%i.icon-trash.icon-white
=t("#{child.class.name.underscore.pluralize}.index.actions.destroy") \ No newline at end of file
diff --git a/app/views/sip_accounts/_index_core.html.haml b/app/views/sip_accounts/_index_core.html.haml
index e94db83..bc1555f 100644
--- a/app/views/sip_accounts/_index_core.html.haml
+++ b/app/views/sip_accounts/_index_core.html.haml
@@ -8,9 +8,10 @@
%th
%span.hidden-phone
= t('sip_accounts.index.phone_numbers')
- %th
- %span.hidden-phone
- = t('phones.name')
+ - if sip_accounts.map{ |sip_account| sip_account.phone_sip_accounts.any? }.include?(true)
+ %th
+ %span.hidden-phone
+ = t('phones.name')
%tbody
- for sip_account in sip_accounts
@@ -26,9 +27,9 @@
%td
- if sip_account.phone_numbers.count > 0
= render 'phone_numbers/listing', :phone_numbers => sip_account.phone_numbers.order(:number)
-
- %td
- %span.hidden-phone
- - 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
+ - if sip_accounts.map{ |sip_account| sip_account.phone_sip_accounts.any? }.include?(true)
+ %td
+ %span.hidden-phone
+ - 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}
diff --git a/app/views/tenants/_admin_area.html.haml b/app/views/tenants/_admin_area.html.haml
index 369a8ce..92614c8 100644
--- a/app/views/tenants/_admin_area.html.haml
+++ b/app/views/tenants/_admin_area.html.haml
@@ -1,19 +1,21 @@
.row
.span12
- = render :partial => 'tenants/users_table', :locals => {:tenant => tenant}
- = render :partial => 'tenants/user_groups_table', :locals => {:tenant => tenant}
-
= render :partial => 'tenants/table_of_sip_accounts', :locals => {:tenant => tenant}
- = render :partial => 'tenants/table_of_phones', :locals => {:tenant => tenant}
+ - if SipAccount.any?
+ = render :partial => 'tenants/table_of_phones', :locals => {:tenant => tenant}
- = render :partial => 'tenants/table_of_conferences', :locals => {:tenant => tenant}
- = render :partial => 'tenants/table_of_callthroughs', :locals => {:tenant => tenant}
- = render :partial => 'tenants/table_of_hunt_groups', :locals => {:tenant => tenant}
- = render :partial => 'tenants/table_of_automatic_call_distributors', :locals => {:tenant => tenant}
+ - if SipAccount.any? || Gateway.any?
+ = render :partial => 'tenants/table_of_conferences', :locals => {:tenant => tenant}
+ = render :partial => 'tenants/table_of_callthroughs', :locals => {:tenant => tenant}
+ = 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}
+
.well
%h2 Gemeinschaft Konfiguration
= render :partial => 'tenants/gs_parameter_table', :locals => {:tenant => tenant}
diff --git a/app/views/tenants/_form_core.html.haml b/app/views/tenants/_form_core.html.haml
index e0b173d..8f6e08f 100644
--- a/app/views/tenants/_form_core.html.haml
+++ b/app/views/tenants/_form_core.html.haml
@@ -1,3 +1,4 @@
.inputs
= f.input :name, :label => t('tenants.form.name.label'), :hint => conditional_hint('tenants.form.name.hint'), :autofocus => true
- = f.input :description, :label => t('tenants.form.description.label'), :hint => conditional_hint('tenants.form.description.hint')
+ - if !@tenant.new_record?
+ = f.input :description, :label => t('tenants.form.description.label'), :hint => conditional_hint('tenants.form.description.hint')
diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml
index 4c39fd1..f38a4a1 100644
--- a/app/views/users/show.html.haml
+++ b/app/views/users/show.html.haml
@@ -4,12 +4,18 @@
.span3
- cache(['user_show_aside', I18n.locale, @user, @user.sip_accounts, @user.conferences]) do
= image_tag @user.image_url(:small).to_s, :class => 'img-rounded' 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
+ %table{:class => 'table table-striped'}
+ %tbody
+ %tr
+ %td
+ %strong= t('users.show.user_name') + ":"
+ %td
+ = @user.user_name
+ %tr
+ %td
+ %strong= t('users.show.email') + ":"
+ %td
+ = @user.email
%p.controls
= render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @tenant, :child => @user }