From 525aaf6dcb5bafe5a949a078dee6abb24d87e2a5 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Thu, 13 Jun 2013 11:21:07 +0200 Subject: display tenant and user sip_accounts combined --- app/views/sip_accounts/_index_core.html.haml | 5 +++++ app/views/sip_accounts/index.html.haml | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'app/views/sip_accounts') diff --git a/app/views/sip_accounts/_index_core.html.haml b/app/views/sip_accounts/_index_core.html.haml index d91a3ef..be1f4cb 100644 --- a/app/views/sip_accounts/_index_core.html.haml +++ b/app/views/sip_accounts/_index_core.html.haml @@ -5,6 +5,8 @@ %table.table.table-striped %thead %tr + - if defined?(show_sip_accountable) && show_sip_accountable + %th= sortable :sip_accountable_id, t('sip_accounts.index.sip_accountable') %th %span.hidden-phone = t('sip_accounts.index.online') @@ -20,6 +22,9 @@ %tbody - for sip_account in sip_accounts %tr{:class => (sip_account.registration ? '' : 'warning')} + - if defined?(show_sip_accountable) && show_sip_accountable + %td + = sip_account.sip_accountable %td - if sip_account.registration %i.icon-ok diff --git a/app/views/sip_accounts/index.html.haml b/app/views/sip_accounts/index.html.haml index fbdba48..114943e 100644 --- a/app/views/sip_accounts/index.html.haml +++ b/app/views/sip_accounts/index.html.haml @@ -1,6 +1,6 @@ - content_for :title, t("sip_accounts.index.page_title") - if @sip_accounts.count > 0 - = render "index_core", :sip_accounts => @sip_accounts + = render "index_core", :sip_accounts => @sip_accounts, :show_sip_accountable => (@parent.class == Tenant) = render :partial => 'shared/create_link', :locals => {:parent => @parent, :child_class => SipAccount} \ No newline at end of file -- cgit v1.2.3