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 0cab7ec  disllow adding/editing minutes after draft has been posted
0cab7ec is described below

commit 0cab7ec419e6e18bc2c14f1754f366ff350a97a8
Author: Sam Ruby <[email protected]>
AuthorDate: Sun May 27 20:16:45 2018 -0400

    disllow adding/editing minutes after draft has been posted
---
 www/board/agenda/spec/secretary_spec.rb    |  8 ++++----
 www/board/agenda/views/models/agenda.js.rb | 18 ++++++++++--------
 2 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/www/board/agenda/spec/secretary_spec.rb 
b/www/board/agenda/spec/secretary_spec.rb
index 14c1696..be589c5 100644
--- a/www/board/agenda/spec/secretary_spec.rb
+++ b/www/board/agenda/spec/secretary_spec.rb
@@ -10,7 +10,7 @@ feature 'report' do
   end
 
   it "should allow timestamps to be edited" do
-    visit '/2015-01-21/Call-to-order'
+    visit '/2015-02-18/Call-to-order'
     expect(page).to have_selector 'button', text: 'edit minutes'
   end
 
@@ -33,10 +33,10 @@ feature 'report' do
   end
 
   it "should prompt for action items" do
-    visit '/2015-01-21/Ant'
+    visit '/2015-02-18/Hama'
     expect(page).to have_selector 'button', text: 'add minutes'
-    expect(page).to have_selector 'option', text: 'Bertrand'
-    expect(page).to have_selector 'textarea', text: 'pursue a report for Ant'
+    expect(page).to have_selector 'option', text: 'Sam'
+    expect(page).to have_selector 'textarea', text: 'pursue a report for Hama'
     expect(page).to have_selector 'button', text: '+ AI'
   end
 
diff --git a/www/board/agenda/views/models/agenda.js.rb 
b/www/board/agenda/views/models/agenda.js.rb
index 7c1e667..7e7ada5 100644
--- a/www/board/agenda/views/models/agenda.js.rb
+++ b/www/board/agenda/views/models/agenda.js.rb
@@ -515,14 +515,16 @@ class Agenda
       end
 
     elsif User.role == :secretary
-      if @attach =~ /^7\w/
-        list << {form: Vote}
-      elsif Minutes.get(@title)
-        list << {form: AddMinutes, text: 'edit minutes'}
-      elsif ['Call to order', 'Adjournment'].include? @title
-        list << {button: Timestamp}
-      else
-        list << {form: AddMinutes, text: 'add minutes'}
+      unless Server.drafts.include? Agenda.file.sub('_agenda_', '_minutes_')
+        if @attach =~ /^7\w/
+          list << {form: Vote}
+        elsif Minutes.get(@title)
+          list << {form: AddMinutes, text: 'edit minutes'}
+        elsif ['Call to order', 'Adjournment'].include? @title
+          list << {button: Timestamp}
+        else
+          list << {form: AddMinutes, text: 'add minutes'}
+        end
       end
 
       if @attach =~ /^3\w/

-- 
To stop receiving notification emails like this one, please contact
[email protected].

Reply via email to