diff options
author | Peter Kozak <spag@golwen.net> | 2013-06-11 11:18:43 +0200 |
---|---|---|
committer | Peter Kozak <spag@golwen.net> | 2013-06-11 11:18:43 +0200 |
commit | 6dc4eab14aad402d350e31aef2806b88bf457f84 (patch) | |
tree | c38345bf2b455903cce1ea68144ca0d9b2dbc9cd | |
parent | 4f2e71c9e6596515d5feded48e4ade495705d90c (diff) |
limit displayed phones
-rw-r--r-- | app/views/tenants/_table_of_phones.html.haml | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/app/views/tenants/_table_of_phones.html.haml b/app/views/tenants/_table_of_phones.html.haml index e87191d..820afc7 100644 --- a/app/views/tenants/_table_of_phones.html.haml +++ b/app/views/tenants/_table_of_phones.html.haml @@ -2,6 +2,9 @@ -# Phones -# %h2= t('phones.index.page_title') - - if tenant.phones.any? + - if @tenant.phones.count <= GsParameter.get('NUMBER_OF_SHOWN_ITEMS') = render "phones/index_core", :phones => tenant.phones - = render :partial => 'shared/create_link', :locals => {:parent => tenant, :child_class => Phone} + = render :partial => 'shared/create_link', :locals => {:parent => tenant, :child_class => Phone} + - else + %p + = link_to t('phones.index.page_title'), tenant_phones_path(tenant) |