summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'app/views')
-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
6 files changed, 26 insertions, 23 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}