whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@apache.org
Subject [whimsy] 01/02: hypertext links
Date Mon, 15 May 2017 13:11:11 GMT
This is an automated email from the ASF dual-hosted git repository.

rubys pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git

commit 052366f7383156b974d46d74236aa2ceecf1776b
Author: Sam Ruby <rubys@intertwingly.net>
AuthorDate: Mon May 15 08:36:26 2017 -0400

    hypertext links
---
 www/site.cgi | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/www/site.cgi b/www/site.cgi
index daf0092..0f4aef5 100755
--- a/www/site.cgi
+++ b/www/site.cgi
@@ -121,7 +121,15 @@ _html do
               cls = label(analysis, links, col, project)
               _tr do
                 _td col.capitalize
-                _td links[col], class: cls
+
+                if links[col] =~ /^https?:/
+                  _td class: cls do
+                    _a links[col], href: links[col]
+                  end
+                else
+                  _td links[col], class: cls
+                end
+
                 _td do
                   if cls == 'label-warning'
                     _ '(Expected to match the regular expression: '
@@ -153,7 +161,14 @@ _html do
                 _td do 
                   _a links['display_name'], href: links['uri']
                 end
-                _td links[col]
+
+                if links[col] =~ /^https?:/
+                  _td do
+                    _a links[col], href: links[col]
+                  end
+                else
+                  _td links[col]
+                end
               end
             end
           end

-- 
To stop receiving notification emails like this one, please contact
"commits@whimsical.apache.org" <commits@whimsical.apache.org>.

Mime
View raw message