whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@apache.org
Subject [whimsy] branch master updated: make index sortable
Date Tue, 02 May 2017 12:37:29 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

The following commit(s) were added to refs/heads/master by this push:
       new  27ca25a   make index sortable
27ca25a is described below

commit 27ca25ac503752a30fe7985134c5ab542dc5213b
Author: Sam Ruby <rubys@intertwingly.net>
AuthorDate: Tue May 2 08:37:17 2017 -0400

    make index sortable
---
 www/site.cgi | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/www/site.cgi b/www/site.cgi
index 485b287..e452688 100755
--- a/www/site.cgi
+++ b/www/site.cgi
@@ -165,6 +165,12 @@ _html do
 	    end
 	  end
 
+          sort_order = {
+            'label-success' => 1,
+            'label-warning' => 2,
+            'label-danger'  => 3
+          }
+
 	  _tbody do
 	    sites.each do |n, links|
 	      _tr do
@@ -172,7 +178,8 @@ _html do
 		  _a "#{links['display_name']}", href: "project/#{n}"
 		end
 		cols.each do |c|
-		  _td '', class: label(analysis, links, c, n)
+		  cls = label(analysis, links, c, n)
+		  _td '', class: cls, data_sort_value: sort_order[cls]
 		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