whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [whimsy] branch master updated: Add alpha index
Date Fri, 08 Mar 2019 08:50:03 GMT
This is an automated email from the ASF dual-hosted git repository.

sebb 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 06a230e  Add alpha index
06a230e is described below

commit 06a230ecb8f624f6ed719396d9a6f1029571f575
Author: Sebb <sebb@apache.org>
AuthorDate: Fri Mar 8 08:50:02 2019 +0000

    Add alpha index
---
 www/roster/views/ppmcs.html.rb | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/www/roster/views/ppmcs.html.rb b/www/roster/views/ppmcs.html.rb
index 1db9a8e..ddda44a 100644
--- a/www/roster/views/ppmcs.html.rb
+++ b/www/roster/views/ppmcs.html.rb
@@ -16,6 +16,14 @@ _html do
       _p 'A listing of all Podling Project Management Committees (PPMCs) from the Apache
Incubator.'
       _p 'Click on column names to sort.'
 
+      _p do
+        _ 'Click on column names to sort.'
+        _{"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"}
+        "ABCDEFGHIJKLMNOPQRSTUVWXYZ".each_char do |c|
+          _a c, href: "ppmc/##{c}"
+        end
+      end
+
       _table.table.table_hover do
         _thead do
           _tr do
@@ -26,8 +34,16 @@ _html do
         end
 
         project_names = @projects.map {|project| project.name}
+        prev_letter=nil
         @ppmcs.sort_by {|ppmc| ppmc.display_name.downcase}.each do |ppmc|
-          _tr_ do
+          letter = ppmc.display_name.upcase[0]
+          if letter != prev_letter
+            options = {id: letter}
+          else
+            options = {}
+          end
+          prev_letter = letter
+          _tr_ options do
             _td do
               if project_names.include? ppmc.name
                 _a ppmc.display_name, href: "ppmc/#{ppmc.name}"


Mime
View raw message