render

in www/roster/views/pmc/members.js.rb [171:274]


  def render
    style = @@person.date ? '' : 'text-decoration: line-through'
    _tr do
      if @@auth
        _td do
           _input type: 'checkbox', checked: @@person.selected || false,
             onClick: -> {self.toggleSelect(@@person)}
        end
      end
      if @@person.member == true 
        _td { _b { _a @@person.id, href: "committer/#{@@person.id}", style: style }
              _a ' (*)', href: "committee/#{@@committee.id}#crosscheck", style: style if @@person.notSubbed
            }
        _td @@person.githubUsername, style: style
        _td { _b @@person.name, style: style }
      elsif @@person.member
        _td { _i { _a @@person.id, href: "committer/#{@@person.id}", style: style }
              _a ' (*)', href: "committee/#{@@committee.id}#crosscheck", style: style if @@person.notSubbed
            }
        _td @@person.githubUsername, style: style
        _td { _i @@person.name, style: style
              _ ' ('
              _ @@person.member.sub(%r{( \(Non-voting\))? Member}, '').sub(%r{^Emeritus}, 'ASF Emeritus'), style: style
              _ ')'
            }
      else
        _td { _a @@person.id, href: "committer/#{@@person.id}", style: style
              _a ' (*)', href: "committee/#{@@committee.id}#crosscheck", style: style if @@person.notSubbed
            }
        _td @@person.githubUsername, style: style
        _td @@person.name, style: style
      end

      _td @@person.date

      if @state == :open
        _td data_ids: @@person.id, onDoubleClick: self.select do
          if not @@person.date
            
            _button.btn.btn_warning 'Remove from LDAP',
              data_action: 'remove pmc',
              data_target: '#confirm', data_toggle: 'modal',
              data_confirmation: "Remove #{@@person.name} from LDAP?"

            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
             
            _button.btn.btn_success 'Add to LDAP',
              data_action: 'add pmc',
              data_target: '#confirm', data_toggle: 'modal',
              data_confirmation: "Add #{@@person.name} to LDAP?"

            _button.btn.btn_warning 'Remove from committee-info.txt',
              data_action: 'remove info',
              data_target: '#confirm', data_toggle: 'modal',
              data_confirmation:
                "Remove #{@@person.name} from committee-info.txt?"
          else
            
            if @@committee.committers.include? @@person.id
              _button.btn.btn_warning 'Remove only from PMC',
                data_action: 'remove pmc info',
                data_target: '#confirm', data_toggle: 'modal',
                data_confirmation: "Remove #{@@person.name} from the " +
                  "#{@@committee.display_name} PMC but leave as a committer?"

              _button.btn.btn_warning 'Remove as committer and from PMC',
                data_action: 'remove pmc info commit',
                data_target: '#confirm', data_toggle: 'modal',
                data_confirmation: "Remove #{@@person.name} as committer and " +
                  "from the #{@@committee.display_name} PMC?"
            else
              _button.btn.btn_warning 'Remove from PMC',
                data_action: 'remove pmc info',
                data_target: '#confirm', data_toggle: 'modal',
                data_confirmation: "Remove #{@@person.name} from the " +
                  "#{@@committee.display_name} PMC?"

              _button.btn.btn_primary 'Add as a committer',
                data_action: 'add commit',
                data_target: '#confirm', data_toggle: 'modal',
                data_confirmation: "Grant #{@@person.name} committer access?"
            end
          end
        end
      elsif not @@person.date
        _td.issue.clickable 'not in committee-info.txt', onClick: self.select
      elsif not @@person.ldap
        _td.issue.clickable 'not in LDAP', onClick: self.select
      elsif not @@committee.committers.include? @@person.id
        _td.issue.clickable 'not in committer list', onClick: self.select
      elsif @@person.id == @@committee.chair
        _td.chair.clickable (@@committee.pmc_chair ? 'chair' : 'chair (not in pmc-chairs)'), onClick: self.select
      else
        _td.clickable '', onClick: self.select
      end
    end
  end