You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by ru...@apache.org on 2016/06/18 00:22:20 UTC

[whimsy] branch master updated: disable committee additions if committee-info entry is empty

This is an automated email from the ASF dual-hosted git repository.

rubys pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/whimsy.git

The following commit(s) were added to refs/heads/master by this push:
       new  810b97d   disable committee additions if committee-info entry is empty
810b97d is described below

commit 810b97d02cc417eac03abaf667f5860bb6acd374
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Fri Jun 17 20:21:11 2016 -0400

    disable committee additions if committee-info entry is empty
---
 www/roster/views/pmc/main.js.rb |  8 ++++++--
 www/roster/views/pmc/pmc.js.rb  | 12 +++++++-----
 2 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/www/roster/views/pmc/main.js.rb b/www/roster/views/pmc/main.js.rb
index 2317b10..49dbc2a 100644
--- a/www/roster/views/pmc/main.js.rb
+++ b/www/roster/views/pmc/main.js.rb
@@ -32,8 +32,12 @@ class PMC < React
 
     # usage information for authenticated users (PMC chair, etc.)
     if auth
-      _div.alert.alert_success 'Double click on a row to edit.  ' +
-        "Double click on \u2795 to add."
+      _div.alert.alert_success do
+        _span 'Double click on a row to edit.'
+        unless @committee.roster.keys().empty?
+          _span "  Double click on \u2795 to add."
+        end
+      end
     end
 
     # main content
diff --git a/www/roster/views/pmc/pmc.js.rb b/www/roster/views/pmc/pmc.js.rb
index 71f6b35..f80fa2d 100644
--- a/www/roster/views/pmc/pmc.js.rb
+++ b/www/roster/views/pmc/pmc.js.rb
@@ -24,7 +24,7 @@ class PMCMembers < React
           _PMCMember auth: @@auth, person: person, committee: @@committee
         end
 
-        if @@auth
+        if @@auth and not @@committee.roster.keys().empty?
           _tr onDoubleClick: self.select do
             _td((@state == :open ? '' : "\u2795"), colspan: 4)
           end
@@ -124,10 +124,12 @@ class PMCMember < React
               data_target: '#confirm', data_toggle: 'modal',
               data_confirmation: "Remove #{@@person.name} from LDAP?"
 
-            _button.btn.btn_success 'Add to committee-info.txt',
-              data_action: 'add info',
-              data_target: '#confirm', data_toggle: 'modal',
-              data_confirmation: "Add to #{@@person.name} committee-info.txt"
+            unless @@committee.roster.keys().empty?
+              _button.btn.btn_success 'Add to committee-info.txt',
+                data_action: 'add info',
+                data_target: '#confirm', data_toggle: 'modal',
+                data_confirmation: "Add to #{@@person.name} committee-info.txt"
+            end
           elsif not @@person.ldap
              # in committee-info.txt but not in ldap
             _button.btn.btn_success 'Add to LDAP',

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