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 c18bc71 Match name and aliases to find an entry
c18bc71 is described below
commit c18bc711c58968b43d57b2be05a03c35dc4e0d0b
Author: Sebb <[email protected]>
AuthorDate: Fri Mar 8 14:30:54 2019 +0000
Match name and aliases to find an entry
---
www/roster/views/podlings.html.rb | 27 +++++++++++++++++++++------
1 file changed, 21 insertions(+), 6 deletions(-)
diff --git a/www/roster/views/podlings.html.rb
b/www/roster/views/podlings.html.rb
index 524fe15..5ae640d 100644
--- a/www/roster/views/podlings.html.rb
+++ b/www/roster/views/podlings.html.rb
@@ -2,6 +2,19 @@
# List of all Podings
#
+# Match name and aliases to find the entry
+def findName(podling, list)
+ if list.include?(podling.name)
+ return podling.name
+ end
+ podling.resourceAliases.each do |a|
+ if list.include? a
+ return a
+ end
+ end
+ return nil
+end
+
_html do
_link rel: 'stylesheet', href: "stylesheets/app.css?#{cssmtime}"
_style %{
@@ -57,7 +70,7 @@ _html do
end
_ ")"
end
-
+
_table.table.table_hover do
_thead do
_tr do
@@ -69,7 +82,9 @@ _html do
_tbody do
@podlings.sort_by {|podling| podling.name.downcase}.each do |podling|
- status = (@attic.include?(podling.name) ? 'attic' : podling.status)
+ attic = findName(podling, @attic)
+ pmc = findName(podling, @committees)
+ status = (attic ? 'attic' : podling.status)
_tr_ class: color[status] do
_td do
@@ -77,14 +92,14 @@ _html do
"http://incubator.apache.org/projects/#{podling.name}.html"
end
- if @committees.include? podling.name
+ if pmc
_td data_sort_value: "#{podling.status} - pmc" do
- _a podling.status, href: "committee/#{podling.name}"
+ _a podling.status, href: "committee/#{pmc}"
end
- elsif @attic.include? podling.name
+ elsif attic
_td data_sort_value: "#{podling.status} - attic" do
_a podling.status, href:
- "http://attic.apache.org/projects/#{podling.name}.html"
+ "http://attic.apache.org/projects/#{attic}.html"
end
else
_td podling.status