diff options
author | Peter Kozak <spag@golwen.net> | 2013-03-14 04:01:17 -0400 |
---|---|---|
committer | Peter Kozak <spag@golwen.net> | 2013-03-14 04:01:17 -0400 |
commit | 7c5c0f972b6127335bc1f9b3141b8df0c5d35fbf (patch) | |
tree | abbc294784f0eccc03f52c076449beba5190867f /app/views/gateways/show.html.haml | |
parent | 9f51f0287bb523b62804a1bda6740c32d13e68b7 (diff) |
status record can be nil
Diffstat (limited to 'app/views/gateways/show.html.haml')
-rw-r--r-- | app/views/gateways/show.html.haml | 101 |
1 files changed, 51 insertions, 50 deletions
diff --git a/app/views/gateways/show.html.haml b/app/views/gateways/show.html.haml index f2e9ab8..19b1304 100644 --- a/app/views/gateways/show.html.haml +++ b/app/views/gateways/show.html.haml @@ -35,56 +35,57 @@ - if @gateway.technology.to_s == 'sip' - status = @gateway.status - %tr - %td - %strong= t('gateways.show.status') + ":" - %td - = "#{status['status']} (#{status['state']})" - %tr - %td - %strong= t('gateways.show.identifier') + ":" - %td - = status['name'] - %tr - %td - %strong= t('gateways.show.profile') + ":" - %td - = status['profile'] - %tr - %td - %strong= t('gateways.show.username') + ":" - %td - = status['username'] - %tr - %td - %strong= t('gateways.show.password') + ":" - %td - = status['password'] - %tr - %td - %strong= t('gateways.show.realm') + ":" - %td - = status['realm'] - %tr - %td - %strong= t('gateways.show.contact') + ":" - %td - = status['contact'] - %tr - %td - %strong= t('gateways.show.from') + ":" - %td - = status['from'] - %tr - %td - %strong= t('gateways.show.to') + ":" - %td - = status['to'] - %tr - %td - %strong= t('gateways.show.proxy') + ":" - %td - = status['proxy'] + - if !@gateway.status.blank? + %tr + %td + %strong= t('gateways.show.status') + ":" + %td + = "#{status['status']} (#{status['state']})" + %tr + %td + %strong= t('gateways.show.identifier') + ":" + %td + = status['name'] + %tr + %td + %strong= t('gateways.show.profile') + ":" + %td + = status['profile'] + %tr + %td + %strong= t('gateways.show.username') + ":" + %td + = status['username'] + %tr + %td + %strong= t('gateways.show.password') + ":" + %td + = status['password'] + %tr + %td + %strong= t('gateways.show.realm') + ":" + %td + = status['realm'] + %tr + %td + %strong= t('gateways.show.contact') + ":" + %td + = status['contact'] + %tr + %td + %strong= t('gateways.show.from') + ":" + %td + = status['from'] + %tr + %td + %strong= t('gateways.show.to') + ":" + %td + = status['to'] + %tr + %td + %strong= t('gateways.show.proxy') + ":" + %td + = status['proxy'] - registration = @gateway.inbound_register - if !registration.blank? %tr |