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: add links to project pages
Date Sun, 04 Jun 2017 15:51:46 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  4e22f0a   add links to project pages
4e22f0a is described below

commit 4e22f0af97f8bdd65295b1cfeb0e06f34dfa5f1e
Author: Sam Ruby <rubys@intertwingly.net>
AuthorDate: Sun Jun 4 11:51:22 2017 -0400

    add links to project pages
---
 www/roster/models/committee.rb  |  4 ++++
 www/roster/views/pmc/main.js.rb | 28 ++++++++++++++++++++++++++++
 2 files changed, 32 insertions(+)

diff --git a/www/roster/models/committee.rb b/www/roster/models/committee.rb
index 2d20092..63318ca 100644
--- a/www/roster/models/committee.rb
+++ b/www/roster/models/committee.rb
@@ -13,6 +13,9 @@ class Committee
       list =~ /^#{pmc.mail_list}\b/
     end
 
+    comdev = ASF::SVN['asf/comdev/projects.apache.org/site/json/foundation']
+    info = JSON.parse(File.read("#{comdev}/projects.json"))[id]
+
     moderators = nil
 
     if pmc.roster.include? env.user or ASF::Person.find(env.user).asf_member?
@@ -45,6 +48,7 @@ class Committee
       roster: pmc.roster,
       mail: Hash[lists.sort],
       moderators: moderators,
+      project_info: info,
     }
 
     response
diff --git a/www/roster/views/pmc/main.js.rb b/www/roster/views/pmc/main.js.rb
index 34238d8..004c1cf 100644
--- a/www/roster/views/pmc/main.js.rb
+++ b/www/roster/views/pmc/main.js.rb
@@ -111,6 +111,34 @@ class PMC < React
       end
     end
 
+    _h2.links! 'Links'
+    _ul do
+      _li {_a 'Site check', href: "../site/project/#{@committee.id}"}
+
+      info = @committee.project_info
+
+      if info.doap
+        _li {_a 'DOAP', href: info.doap}
+      end
+
+      if info['bug-database']
+        _li {_a 'Bug Database', href: info['bug-database']}
+      end
+
+      if info.repository and not info.repository.empty?
+        if info.repository.length == 1
+          _li {_a 'Repository', href: info.repository.first}
+        else
+          _li do
+            _span 'Repositories:'
+            _ul info.repository do |repository|
+              _li {_a repository, href: repository}
+            end
+          end
+        end
+      end
+    end
+
     # hidden form
     if auth
       _Confirm action: :committee, project: @committee.id, update: self.update

-- 
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" <commits@whimsical.apache.org>'].

Mime
View raw message