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 2dda82b Simplify
2dda82b is described below
commit 2dda82ba91949df936108aa538e3f7924a826024
Author: Sebb <[email protected]>
AuthorDate: Fri Mar 8 08:49:22 2019 +0000
Simplify
---
www/roster/views/committees.html.rb | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/www/roster/views/committees.html.rb
b/www/roster/views/committees.html.rb
index d451e6f..92eb58a 100644
--- a/www/roster/views/committees.html.rb
+++ b/www/roster/views/committees.html.rb
@@ -39,14 +39,15 @@ _html do
prev_letter=nil
@committees.sort_by {|pmc| pmc.display_name.downcase}.each do |pmc|
letter = pmc.display_name.upcase[0]
- _tr_ do
+ if letter != prev_letter
+ options = {id: letter}
+ else
+ options = {}
+ end
+ prev_letter = letter
+ _tr_ options do
_td do
- if letter != prev_letter
- _a pmc.display_name, href: "committee/#{pmc.name}", id: letter
- else
- _a pmc.display_name, href: "committee/#{pmc.name}"
- end
- prev_letter = letter
+ _a pmc.display_name, href: "committee/#{pmc.name}"
end
_td do