diff options
author | Fabrice Bellingard <bellingard@gmail.com> | 2012-02-09 18:49:46 +0100 |
---|---|---|
committer | Fabrice Bellingard <bellingard@gmail.com> | 2012-02-09 18:49:46 +0100 |
commit | c3bc6982b7e165304e269d7b7ef309a05148be98 (patch) | |
tree | 740e9ba4be4ef053779167b20fd074d06b92c003 /plugins | |
parent | a7031c132203d183210e8bc5c73479ca0031fd13 (diff) | |
download | sonarqube-c3bc6982b7e165304e269d7b7ef309a05148be98.tar.gz sonarqube-c3bc6982b7e165304e269d7b7ef309a05148be98.zip |
SONAR-3014 Improve display of links not starting with 'http(s)'
Initial request:
=> The main project dashboard "Links" column provides a Developer
Connection link that browsers do not support
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/description.html.erb | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/description.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/description.html.erb index 758eb00d986..8152bde247f 100644 --- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/description.html.erb +++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/description.html.erb @@ -6,8 +6,8 @@ <table class="width100 marginbottom10"> <tbody> <tr> - <td><%= message('widget.description.key') -%>: </td> - <td id="resource_key"><%= @project.key -%></td> + <td width="25%"><%= message('widget.description.key') -%>: </td> + <td width="75%" id="resource_key"><%= @project.key -%></td> </tr> <% if @project.language %> <tr> @@ -35,7 +35,15 @@ <td valign="top"><%= message('widget.description.links') -%>: </td> <td id="resource_links"> <% @project.project_links.sort.each do |link| %> - <%= link_to(image_tag(link.icon, :alt => link.name), link.href , :popup => true, :class => 'nolink') -%> <%= link_to(h(link.name), link.href, :popup => true) -%><br/> + <div> + <%= link_to(image_tag(link.icon, :alt => link.name), link.href , :popup => true, :class => 'nolink') -%> + <% if link.href.starts_with?('http') %> + <%= link_to(h(link.name), link.href, :popup => true) -%> + <% else %> + <a href="#" onclick="$('link_<%= link.id -%>').toggle();return false;"><%= h(link.name) -%></a> + <div id="link_<%= link.id -%>" style="padding-left: 20px; display:none"><%= h(link.href) -%></div> + <% end %> + </div> <% end %> </td> </tr> |