summaryrefslogtreecommitdiff
path: root/app/views/sip_accounts
diff options
context:
space:
mode:
authorPeter Kozak <spag@golwen.net>2013-03-08 05:50:02 -0500
committerPeter Kozak <spag@golwen.net>2013-03-08 05:50:02 -0500
commit4d7d5ad238990582d6c90a25272f2141ea9a3b28 (patch)
tree135c475c7b0b78a8a4f78e47c97040202fbc9d1d /app/views/sip_accounts
parent7149ddd968787eca9d05feea315d4fa3774fe54e (diff)
toggle action added to acd_agents
Diffstat (limited to 'app/views/sip_accounts')
-rw-r--r--app/views/sip_accounts/show.html.haml7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/views/sip_accounts/show.html.haml b/app/views/sip_accounts/show.html.haml
index 365aea8..9f84c92 100644
--- a/app/views/sip_accounts/show.html.haml
+++ b/app/views/sip_accounts/show.html.haml
@@ -99,3 +99,10 @@
- if @sip_account.calls.count > 0
%h2= t("calls.index.page_title")
= render "calls/index_core", :calls => @sip_account.calls, :parent => @sip_account
+
+- if (can?(:read, AcdAgent) && @sip_account.acd_agents.count > 0) || can?(:create, @sip_account.acd_agents.build)
+ %h2= t('acd_agents.index.page_title')
+ - if @sip_account.acd_agents.count > 0
+ = render "acd_agents/index_core", :acd_agents => @sip_account.acd_agents
+ %br
+ = render :partial => 'shared/create_link', :locals => { :parent => @sip_account, :child_class => AcdAgent }