From e758cec9a842e75abe0a26312c4d7d3e8530b84a Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sun, 27 Jan 2013 11:18:53 +0100 Subject: Provide a link to the phone's WebGUI which includes the http user and password. --- app/views/phones/show.html.haml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'app/views/phones') 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 } -- cgit v1.2.3