whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@apache.org
Subject [whimsy] 02/02: add a page showing rejected reports
Date Tue, 10 Oct 2017 14:57:26 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

commit 9866f4221450f4bf249caad215fb9f9df0f549ba
Author: Sam Ruby <rubys@intertwingly.net>
AuthorDate: Tue Oct 10 10:56:51 2017 -0400

    add a page showing rejected reports
---
 www/board/agenda/views/app.js.rb            |  1 +
 www/board/agenda/views/models/agenda.js.rb  |  8 ++++++++
 www/board/agenda/views/pages/rejected.js.rb | 25 +++++++++++++++++++++++++
 www/board/agenda/views/router.js.rb         |  3 +++
 4 files changed, 37 insertions(+)

diff --git a/www/board/agenda/views/app.js.rb b/www/board/agenda/views/app.js.rb
index 002c6f4..846e203 100644
--- a/www/board/agenda/views/app.js.rb
+++ b/www/board/agenda/views/app.js.rb
@@ -25,6 +25,7 @@ require_relative 'pages/help'
 require_relative 'pages/shepherd'
 require_relative 'pages/queue'
 require_relative 'pages/flagged'
+require_relative 'pages/rejected'
 require_relative 'pages/missing'
 require_relative 'pages/backchannel'
 require_relative 'pages/roll-call'
diff --git a/www/board/agenda/views/models/agenda.js.rb b/www/board/agenda/views/models/agenda.js.rb
index cda4c9e..4545cc7 100644
--- a/www/board/agenda/views/models/agenda.js.rb
+++ b/www/board/agenda/views/models/agenda.js.rb
@@ -374,6 +374,14 @@ class Agenda
     results <<  {color: 'missing', count: count, href: 'missing',
       text: 'missing reports'}
 
+    # rejected reports
+    count = 0
+    Agenda.index.each {|item| count += 1 if item.rejected}
+    if Minutes.started or count > 0
+      results <<  {color: 'missing', count: count, href: 'rejected',
+        text: 'not accepted'}
+    end
+
     return results
   end
 
diff --git a/www/board/agenda/views/pages/rejected.js.rb b/www/board/agenda/views/pages/rejected.js.rb
new file mode 100644
index 0000000..1d57501
--- /dev/null
+++ b/www/board/agenda/views/pages/rejected.js.rb
@@ -0,0 +1,25 @@
+#
+# A page showing all reports that were NOT accepted
+#
+
+class Rejected < Vue
+  def render
+    first = true
+
+    Agenda.index.each do |item|
+      if item.rejected
+        _h3 class: item.color do
+          _Link text: item.title, href: "flagged/#{item.href}",
+            class: ('default' if first)
+          first = false
+
+          _span.owner " [#{item.owner} / #{item.shepherd}]"
+        end
+
+        _AdditionalInfo item: item, prefix: true
+      end
+    end
+
+    _em.comment 'None' if first
+  end
+end
diff --git a/www/board/agenda/views/router.js.rb b/www/board/agenda/views/router.js.rb
index c4e9aaa..02e4fb5 100644
--- a/www/board/agenda/views/router.js.rb
+++ b/www/board/agenda/views/router.js.rb
@@ -32,6 +32,9 @@ class Router
     elsif path == 'flagged'
       item = {view: Flagged, title: 'Flagged reports'}
 
+    elsif path == 'rejected'
+      item = {view: Rejected, title: 'Reports which were NOT accepted'}
+
     elsif path == 'missing'
       item = {view: Missing, title: 'Missing reports',
         buttons: [{form: InitialReminder}, {button: FinalReminder}]}

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

Mime
View raw message