Skip to content

Commit

Permalink
add stats link
Browse files Browse the repository at this point in the history
  • Loading branch information
rubys committed Mar 2, 2015
1 parent 68b6ee9 commit 6895e8f
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 9 deletions.
1 change: 1 addition & 0 deletions asf.gemspec
Expand Up @@ -25,6 +25,7 @@ Gem::Specification.new do |s|
s.add_dependency("rack")
s.add_dependency("ruby-ldap")
s.add_dependency("tzinfo")
s.add_dependency("tzinfo-data")
s.add_dependency("wunderbar")

# If your tests use any gems, include them here
Expand Down
2 changes: 1 addition & 1 deletion asf.version
@@ -1 +1 @@
0.0.10
0.0.12
18 changes: 11 additions & 7 deletions lib/whimsy/asf/agenda.rb
Expand Up @@ -89,13 +89,17 @@ def parse(file, quick=false)
# add roster and prior report link
whimsy = 'https://whimsy.apache.org'
@sections.each do |section, hash|
next unless section =~ /^(4[A-Z]|\d+|[A-Z][A-Z]?)$/
committee = ASF::Committee.find(hash['title'] ||= 'UNKNOWN')
unless section =~ /^4[A-Z]$/
hash['roster'] =
"#{whimsy}/roster/committee/#{CGI.escape committee.name}"
end
hash['prior_reports'] = minutes(committee.display_name)
next unless section =~ /^(4[A-Z]|\d+|[A-Z][A-Z]?)$/
committee = ASF::Committee.find(hash['title'] ||= 'UNKNOWN')
unless section =~ /^4[A-Z]$/
hash['roster'] =
"#{whimsy}/roster/committee/#{CGI.escape committee.name}"
end
if section =~ /^[A-Z][A-Z]?$/
hash['stats'] =
"https://reporter.apache.org/?#{CGI.escape committee.name}"
end
hash['prior_reports'] = minutes(committee.display_name)
end
end

Expand Down
2 changes: 2 additions & 0 deletions lib/whimsy/asf/agenda/special.rb
Expand Up @@ -60,6 +60,8 @@ class ASF::Board::Agenda
committee = ASF::Committee.find($1)
attrs['roster'] =
"#{whimsy}/roster/committee/#{CGI.escape committee.name}"
attrs['stats'] =
"https://reporter.apache.org/?#{CGI.escape committee.name}"
attrs['prior_reports'] = minutes(committee.display_name)
name1 = text[/heretofore\sappointed\s(\w.*)\sto/,1]
sname1 = name1.to_s.downcase.gsub('.', ' ').split(/\s+/)
Expand Down
5 changes: 4 additions & 1 deletion www/board/agenda/views/main._html
Expand Up @@ -39,13 +39,16 @@ _html ng_app: 'AsfBoardAgenda', ng_controller: 'Layout' do
_dt 'Approved', ng_show: 'item.approved'
_dd '{{ item.approved && item.approved.join(", ") }}',
ng_show: 'item.approved'
_dt 'Links', ng_show: 'item.roster || item.prior_reports'
_dt 'Links', ng_show: 'item.roster||item.prior_reports||item.stats'
_dd ng_show: 'item.roster' do
_a 'Roster', href: '{{ item.roster }}'
end
_dd ng_show: 'item.prior_reports' do
_a 'Prior Reports', ng_href: '{{ item.prior_reports }}'
end
_dd ng_show: 'item.stats' do
_a 'Statistics', ng_href: '{{ item.stats }}'
end
end
end

Expand Down

0 comments on commit 6895e8f

Please sign in to comment.