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 second 'post report' button and de-emphasize 'send email' when there is a posted report.
Date Wed, 20 Jun 2018 02:42:59 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 44dc8a6539793eee49a51de8651cf86058347fa0
Author: Sam Ruby <rubys@intertwingly.net>
AuthorDate: Tue Jun 19 19:42:29 2018 -0700

    add a second 'post report' button and de-emphasize 'send email' when
    there is a posted report.
---
 www/board/agenda/views/buttons/email.js.rb | 6 +++++-
 www/board/agenda/views/pages/report.js.rb  | 5 +++++
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/www/board/agenda/views/buttons/email.js.rb b/www/board/agenda/views/buttons/email.js.rb
index 1314d49..3ae3a7b 100644
--- a/www/board/agenda/views/buttons/email.js.rb
+++ b/www/board/agenda/views/buttons/email.js.rb
@@ -15,7 +15,11 @@ class Email < Vue
       User.firstname and @@item.shepherd and
       User.firstname.start_with? @@item.shepherd.downcase()
     then
-      return 'btn-primary'
+      if @@item.missing and not Posted.get(@@item.title).empty?
+        return 'btn-link'
+      else
+        return 'btn-primary'
+      end
     elsif
       @@item.owner == User.username and not @@item.missing and
         @@item.comments.empty?
diff --git a/www/board/agenda/views/pages/report.js.rb b/www/board/agenda/views/pages/report.js.rb
index a41ddaa..fa58e9d 100644
--- a/www/board/agenda/views/pages/report.js.rb
+++ b/www/board/agenda/views/pages/report.js.rb
@@ -34,6 +34,11 @@ class Report < Vue
 
         if (@@item.missing or @@item.comments) and @@item.mail_list
           _section.reminder do
+            if @@item.missing and not Posted.get(@@item.title).empty?
+              _button.btn.btn_primary 'post report', data_toggle: 'modal',
+                data_target: '#post-report-form'
+            end
+
             _Email item: @@item
           end
         end


Mime
View raw message