summaryrefslogtreecommitdiff
path: root/app/views/tenants
diff options
context:
space:
mode:
authorPeter Kozak <spag@golwen.net>2013-06-13 11:21:32 +0200
committerPeter Kozak <spag@golwen.net>2013-06-13 11:21:32 +0200
commit23b112aee1979033c58735b1a028cd92210cec09 (patch)
treeb13248aa95387603620e5403ccc6c5da00c09100 /app/views/tenants
parent525aaf6dcb5bafe5a949a078dee6abb24d87e2a5 (diff)
display tenant and user phones combined
Diffstat (limited to 'app/views/tenants')
-rw-r--r--app/views/tenants/_table_of_phones.html.haml7
1 files changed, 4 insertions, 3 deletions
diff --git a/app/views/tenants/_table_of_phones.html.haml b/app/views/tenants/_table_of_phones.html.haml
index 820afc7..9736ece 100644
--- a/app/views/tenants/_table_of_phones.html.haml
+++ b/app/views/tenants/_table_of_phones.html.haml
@@ -1,9 +1,10 @@
-- cache(['tenant_show_table_of_phones', I18n.locale, tenant, tenant.phones.count, tenant.phones.reorder(:updated_at).last]) do
+- phones = @tenant.tenant_user_phones
+- cache(['tenant_show_table_of_phones', I18n.locale, tenant, phones.count, phones.reorder(:updated_at).last]) do
-# Phones
-#
%h2= t('phones.index.page_title')
- - if @tenant.phones.count <= GsParameter.get('NUMBER_OF_SHOWN_ITEMS')
- = render "phones/index_core", :phones => tenant.phones
+ - if phones.count <= GsParameter.get('NUMBER_OF_SHOWN_ITEMS')
+ = render "phones/index_core", :phones => phones, :show_phoneable => true
= render :partial => 'shared/create_link', :locals => {:parent => tenant, :child_class => Phone}
- else
%p