summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-27 11:18:53 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-27 11:18:53 +0100
commite758cec9a842e75abe0a26312c4d7d3e8530b84a (patch)
treece734d2e3869bf7b7f758227a23a9dec539273d1 /app/views
parent361a226ac8167b2c6a552960155e89ecb344ec0c (diff)
Provide a link to the phone's WebGUI which includes the http user and
password.
Diffstat (limited to 'app/views')
-rw-r--r--app/views/phones/show.html.haml6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/views/phones/show.html.haml b/app/views/phones/show.html.haml
index f56ae65..86ac380 100644
--- a/app/views/phones/show.html.haml
+++ b/app/views/phones/show.html.haml
@@ -49,7 +49,10 @@
%a{:href => '#', :rel => "tooltip", :title => t('phones.tool_tips.missing_ip_address'), :'data-trigger' => 'hover'}
= '-'
- else
- = @phone.ip_address
+ - if current_user.admin?
+ = link_to @phone.ip_address, "http://#{@phone.http_user}:#{@phone.http_password}@#{@phone.ip_address}"
+ - else
+ = @phone.ip_address
- if current_user.admin? && (!@phone.http_user.blank? || !@phone.http_password.blank?)
%tr
@@ -64,7 +67,6 @@
%td
= @phone.http_password
-
= render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @phone.phoneable, :child => @phone }