From 53fcf258f5dd86c81d6b2d7d58857e45481605b9 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Tue, 11 Jun 2013 11:18:57 +0200 Subject: limit displayed sip_accounts --- app/views/tenants/_table_of_sip_accounts.html.haml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'app/views') diff --git a/app/views/tenants/_table_of_sip_accounts.html.haml b/app/views/tenants/_table_of_sip_accounts.html.haml index b2f2612..e0acbc2 100644 --- a/app/views/tenants/_table_of_sip_accounts.html.haml +++ b/app/views/tenants/_table_of_sip_accounts.html.haml @@ -19,6 +19,9 @@ -# SIP accounts -# %h2= t('sip_accounts.index.page_title') - - if tenant.sip_accounts.any? + - if @tenant.sip_accounts.count <= GsParameter.get('NUMBER_OF_SHOWN_ITEMS') = render "sip_accounts/index_core", :sip_accounts => tenant.sip_accounts - = render :partial => 'shared/create_link', :locals => {:parent => tenant, :child_class => SipAccount} + = render :partial => 'shared/create_link', :locals => {:parent => tenant, :child_class => SipAccount} + - else + %p + = link_to t('sip_accounts.index.page_title'), tenant_sip_accounts_path(tenant) -- cgit v1.2.3