whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sam Ruby <ru...@apache.org>
Subject [whimsy.git] [45/50] Commit b5d0cb2: show pending+actions
Date Fri, 22 Jan 2016 02:40:58 GMT
Commit b5d0cb23cee27e06600d7dbab4e1b7cdb86da6ab:
    show pending+actions


Branch: refs/heads/master
Author: Sam Ruby <rubys@intertwingly.net>
Committer: Sam Ruby <rubys@intertwingly.net>
Pusher: rubys <rubys@apache.org>

------------------------------------------------------------
views/models/agenda.js.rb                                    | ++++++++++++ 
views/models/pending.js.rb                                   | + -
views/pages/report.js.rb                                     | ++++++++ -
------------------------------------------------------------
31 changes: 28 additions, 3 deletions.
------------------------------------------------------------


diff --git a/views/models/agenda.js.rb b/views/models/agenda.js.rb
index 84a2dd8..53c2b3f 100644
--- a/views/models/agenda.js.rb
+++ b/views/models/agenda.js.rb
@@ -62,6 +62,18 @@ def comments
     return results
   end
 
+  def pending
+    Pending.comments[@attach]
+  end
+
+  def actions
+    if @title == 'Action Items'
+      @actions
+    else
+      Agenda.find('Action-Items').actions[@title]
+    end
+  end
+
   def self.view
     Index
   end
diff --git a/views/models/pending.js.rb b/views/models/pending.js.rb
index 894fb4d..ed7398b 100644
--- a/views/models/pending.js.rb
+++ b/views/models/pending.js.rb
@@ -13,7 +13,7 @@ def self.count
     comments.keys().length + approved.keys().length
   end
 
-  def self.approved
+  def self.comments
     Server.pending.comments
   end
 
diff --git a/views/pages/report.js.rb b/views/pages/report.js.rb
index 74641d0..43d85bb 100644
--- a/views/pages/report.js.rb
+++ b/views/pages/report.js.rb
@@ -8,13 +8,26 @@ def render
         end
       end
 
-      unless @@data.comments.empty?
-        _section do
+      _section do
+        unless @@data.comments.empty? or @@data.pending
           _h3.comments! 'Comments'
           @@data.comments.each do |comment|
             _pre.comment comment
           end
         end
+
+        if @@data.pending
+          _h3.comments! 'Pending Comment'
+          _pre.comment (Pending.initials || Server.initials) + ': ' + 
+            @@data.pending
+        end
+
+        if @@data.actions
+          _h3.comments! 'Action Items'
+          @@data.actions.each do |action|
+            _pre.comment action
+          end
+        end
       end
     end
   end

Mime
View raw message