diff options
Diffstat (limited to 'app/views/tenants/_table_of_phones.html.haml')
-rw-r--r-- | app/views/tenants/_table_of_phones.html.haml | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/app/views/tenants/_table_of_phones.html.haml b/app/views/tenants/_table_of_phones.html.haml index e87191d..9736ece 100644 --- a/app/views/tenants/_table_of_phones.html.haml +++ b/app/views/tenants/_table_of_phones.html.haml @@ -1,7 +1,11 @@ -- 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.any? - = render "phones/index_core", :phones => tenant.phones - = render :partial => 'shared/create_link', :locals => {:parent => tenant, :child_class => Phone} + - 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 + = link_to t('phones.index.page_title'), tenant_phones_path(tenant) |