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 2018/04/06 13:59:48 UTC

[whimsy] branch master updated: terminate project resolution

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 30a7486  terminate project resolution
30a7486 is described below

commit 30a7486deead1296ae964d32d66f8252c9584ce6
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Fri Apr 6 09:59:23 2018 -0400

    terminate project resolution
---
 www/board/agenda/templates/terminate.erb  |  4 +-
 www/board/agenda/views/buttons/post.js.rb | 79 +++++++++++++++++++++++++++++--
 2 files changed, 77 insertions(+), 6 deletions(-)

diff --git a/www/board/agenda/templates/terminate.erb b/www/board/agenda/templates/terminate.erb
index cd327c7..01407cd 100644
--- a/www/board/agenda/templates/terminate.erb
+++ b/www/board/agenda/templates/terminate.erb
@@ -1,8 +1,8 @@
-<% if @method == 'vote' %>
+<% if @reason == 'vote' %>
 WHEREAS, the Project Management Committee of the Apache 
 <%= @committee.display_name %> project has chosen by vote to recommend moving
 the project to the Attic; and
-<% elsif @method == 'consensus' %>
+<% elsif @reason == 'consensus' %>
 WHEREAS, the Project Management Committee of the Apache 
 <%= @committee.display_name %> project has arrived at a consensus to recommend
 moving the project to the Attic; and
diff --git a/www/board/agenda/views/buttons/post.js.rb b/www/board/agenda/views/buttons/post.js.rb
index 9471ea1..f7818cc 100644
--- a/www/board/agenda/views/buttons/post.js.rb
+++ b/www/board/agenda/views/buttons/post.js.rb
@@ -31,7 +31,7 @@ class Post < Vue
         _ul.new_item_type do
           _li do
             _button.btn.btn_primary 'Change Chair', onClick: selectItem
-            _span '- change chair for an existing PMC'
+            _ '- change chair for an existing PMC'
           end
   
           _li do
@@ -39,17 +39,18 @@ class Post < Vue
           end
   
           _li do
-            _button.btn.btn_primary 'Terminate Project', disabled: true
+            _button.btn.btn_primary 'Terminate Project', onClick: selectItem
+            _ '- move a project to the attic'
           end
   
           _li do
             _button.btn.btn_primary 'Out of Cycle Report', onClick: selectItem
-            _span '- report from a PMC not currently on the agenda for this month'
+            _ '- report from a PMC not currently on the agenda for this month'
           end
   
           _li do
             _button.btn.btn_primary 'New Resolution', onClick: selectItem
-            _span '- free form entry of a new resolution'
+            _ '- free form entry of a new resolution'
           end
         end
   
@@ -87,6 +88,43 @@ class Post < Vue
         _button.btn_primary 'Draft', disabled: @disabled,
           onClick: draft_chair_change_resolution
 
+      elsif @button == 'Terminate Project'
+        _h4 'Terminate Project Resolution'
+
+        _div.form_group do
+          _label 'PMC', for: 'terminate-pmc'
+          _select.form_control.terminate_pmc! do
+            @pmcs.each {|pmc| _option pmc}
+          end
+        end
+
+        _p 'Reason for termination:'
+
+        _div.form_check do
+          _input.form_check_input.termvote! type: 'radio', name: 'termreason', 
+            onClick: -> {@termreason = 'vote'}
+          _label.form_check_label 'by vote of the PMC', for: 'termvote'
+        end
+
+        _div.form_check do
+          _input.form_check_input.termconsensus! type: 'radio', 
+            name: 'termreason', onClick: -> {@termreason = 'consensus'}
+          _label.form_check_label 'by consensus of the PMC', 
+            for: 'termconsensus'
+        end
+
+        _div.form_check do
+          _input.form_check_input.termboard! type: 'radio', 
+            name: 'termreason', onClick: -> {@termreason = 'board'}
+          _label.form_check_label 'by the board for inactivity', 
+            for: 'termboard'
+        end
+
+        _button.btn_default 'Cancel', data_dismiss: 'modal', disabled: @disabled
+        _button.btn_primary 'Draft', onClick: draft_terminate_project,
+          disabled: (@pmcs.empty? or not @termreason)
+
+
       elsif @button == 'Out of Cycle Report'
         _h4 'Out of Cycle PMC Report'
 
@@ -149,6 +187,8 @@ class Post < Vue
 
     if @button == 'Change Chair'
       initialize_chair_change()
+    elsif @button == 'Terminate Project'
+      initialize_terminate_project()
     elsif @button == 'Out of Cycle Report'
       initialize_out_of_cycle()
     end
@@ -416,6 +456,37 @@ class Post < Vue
   end
 
   #########################################################################
+  #                            Terminate Project                          #
+  #########################################################################
+
+  def initialize_terminate_project()
+    # get a list of PMCs
+    @pmcs = []
+    post 'post-data', request: 'committee-list' do |response|
+      @pmcs = response
+    end
+
+    @terreason = nil
+  end
+
+  def draft_terminate_project()
+    @disabled = true
+    options = {
+      request: 'terminate', 
+      pmc: document.getElementById('terminate-pmc').value, 
+      reason: @termreason
+    }
+
+    post 'post-data', options do |response|
+      @button = @header = 'Add Resolution'
+      @title = response.title
+      @report = response.draft
+      @label = 'resolution'
+      @disabled = false
+    end
+  end
+
+  #########################################################################
   #                           Out of Cycle report                         #
   #########################################################################
 

-- 
To stop receiving notification emails like this one, please contact
rubys@apache.org.