@@ -338,7 +338,7 @@ function renderProposals() {
338
338
var detailNodes = [ ]
339
339
detailNodes . push ( renderAuthors ( proposal . authors ) )
340
340
341
- if ( proposal . reviewManager . name ) detailNodes . push ( renderReviewManager ( proposal . reviewManager ) )
341
+ if ( proposal . reviewManagers . length > 0 ) detailNodes . push ( renderReviewManagers ( proposal . reviewManagers ) )
342
342
if ( proposal . trackingBugs ) detailNodes . push ( renderTrackingBugs ( proposal . trackingBugs ) )
343
343
if ( state === '.implemented' ) detailNodes . push ( renderVersion ( proposal . status . version ) )
344
344
if ( state === '.previewing' ) detailNodes . push ( renderPreview ( ) )
@@ -370,36 +370,39 @@ function renderProposals() {
370
370
371
371
/** Authors have a `name` and optional `link`. */
372
372
function renderAuthors ( authors ) {
373
- var authorNodes = authors . map ( function ( author ) {
374
- if ( author . link . length > 0 ) {
375
- return html ( 'a' , { href : author . link , target : '_blank' } , author . name )
376
- } else {
377
- return document . createTextNode ( author . name )
378
- }
379
- } )
380
-
381
- authorNodes = _joinNodes ( authorNodes , ', ' )
382
-
383
373
return html ( 'div' , { className : 'authors proposal-detail' } , [
384
374
html ( 'div' , { className : 'proposal-detail-label' } ,
385
375
authors . length > 1 ? 'Authors: ' : 'Author: '
386
376
) ,
387
- html ( 'div' , { className : 'proposal-detail-value' } , authorNodes )
377
+ html ( 'div' , { className : 'proposal-detail-value' } ,
378
+ personNodesForPersonArray ( authors ) )
388
379
] )
389
380
}
390
381
391
382
/** Review managers have a `name` and optional `link`. */
392
- function renderReviewManager ( reviewManager ) {
393
- return html ( 'div' , { className : 'review-manager proposal-detail' } , [
394
- html ( 'div' , { className : 'proposal-detail-label' } , 'Review Manager: ' ) ,
395
- html ( 'div' , { className : 'proposal-detail-value' } , [
396
- reviewManager . link
397
- ? html ( 'a' , { href : reviewManager . link , target : '_blank' } , reviewManager . name )
398
- : reviewManager . name
399
- ] )
383
+ function renderReviewManagers ( reviewManagers ) {
384
+ return html ( 'div' , { className : 'review-managers proposal-detail' } , [
385
+ html ( 'div' , { className : 'proposal-detail-label' } ,
386
+ reviewManagers . length > 1 ? 'Review Managers: ' : 'Review Manager: '
387
+ ) ,
388
+ html ( 'div' , { className : 'proposal-detail-value' } ,
389
+ personNodesForPersonArray ( reviewManagers ) )
400
390
] )
401
391
}
402
392
393
+ /** Create nodes for arrays of authors and review managers. */
394
+ function personNodesForPersonArray ( personArray ) {
395
+ let personNodes = personArray . map ( function ( person ) {
396
+ if ( person . link . length > 0 ) {
397
+ return html ( 'a' , { href : person . link , target : '_blank' } , person . name )
398
+ } else {
399
+ return document . createTextNode ( person . name )
400
+ }
401
+ } )
402
+
403
+ return _joinNodes ( personNodes , ', ' )
404
+ }
405
+
403
406
/** Tracking bugs linked in a proposal are updated via GitHub Issues. */
404
407
function renderTrackingBugs ( bugs ) {
405
408
var bugNodes = bugs . map ( function ( bug ) {
@@ -742,7 +745,7 @@ function _searchProposals(filterText) {
742
745
var searchableProperties = [
743
746
[ 'id' ] ,
744
747
[ 'title' ] ,
745
- [ 'reviewManager ' , 'name' ] ,
748
+ [ 'reviewManagers ' , 'name' ] ,
746
749
[ 'status' , 'state' ] ,
747
750
[ 'status' , 'version' ] ,
748
751
[ 'authors' , 'name' ] ,
0 commit comments