2015-06-05 09:48:09 -04:00
|
|
|
extends /templates/base
|
|
|
|
|
|
|
|
block content
|
|
|
|
|
|
|
|
if !me.isAdmin()
|
|
|
|
div You must be logged in as an admin to view this page.
|
|
|
|
|
|
|
|
else
|
|
|
|
h2 Trial Requests
|
|
|
|
if !trialRequests || trialRequests.length < 1
|
|
|
|
h4 Fetching trial requests...
|
|
|
|
else
|
|
|
|
table.table.table-condensed
|
|
|
|
thead
|
|
|
|
tr
|
|
|
|
th Created
|
|
|
|
th Reviewed
|
|
|
|
th Applicant
|
2015-06-08 09:39:26 -04:00
|
|
|
th School
|
2015-06-05 09:48:09 -04:00
|
|
|
th Location
|
2016-01-21 17:41:57 -05:00
|
|
|
th Age / Level
|
2015-06-05 09:48:09 -04:00
|
|
|
th Students
|
2016-02-24 13:22:55 -05:00
|
|
|
th Role
|
|
|
|
th Phone
|
2015-06-05 09:48:09 -04:00
|
|
|
th Status
|
|
|
|
tbody
|
|
|
|
each trialRequest in trialRequests
|
|
|
|
tr
|
2015-11-20 18:53:00 -05:00
|
|
|
td.created= trialRequest.get('created').substring(0, 10)
|
2015-06-05 09:48:09 -04:00
|
|
|
td.reviewed
|
|
|
|
if trialRequest.get('reviewDate')
|
|
|
|
span= trialRequest.get('reviewDate').substring(0, 10)
|
2016-01-21 17:41:57 -05:00
|
|
|
- var props = trialRequest.get('properties')
|
2015-06-05 09:48:09 -04:00
|
|
|
td
|
2016-01-21 17:41:57 -05:00
|
|
|
a(href="/user/#{trialRequest.get('applicant')}")= trialRequest.nameString()
|
|
|
|
td= props.school || props.organization
|
|
|
|
td= props.location || trialRequest.locationString()
|
|
|
|
td= props.age || trialRequest.educationLevelString()
|
|
|
|
td= props.numStudents
|
2016-02-24 13:22:55 -05:00
|
|
|
td= props.role
|
|
|
|
td= props.phoneNumber
|
2015-06-05 09:48:09 -04:00
|
|
|
td.status-cell
|
|
|
|
if trialRequest.get('status') === 'submitted'
|
2015-06-08 08:36:02 -04:00
|
|
|
button.btn.btn-xs.btn-success.btn-approve(data-trial-request-id=trialRequest.id) Approve
|
|
|
|
button.btn.btn-xs.btn-danger.btn-deny(data-trial-request-id=trialRequest.id) Deny
|
2015-06-05 09:48:09 -04:00
|
|
|
else if trialRequest.get('prepaidCode')
|
|
|
|
span= trialRequest.get('prepaidCode')
|
|
|
|
else
|
|
|
|
span= trialRequest.get('status')
|
2016-02-24 13:22:55 -05:00
|
|
|
if props.heardAbout || props.notes
|
|
|
|
tr
|
|
|
|
td(colspan=2)
|
|
|
|
td(colspan=7)
|
|
|
|
strong #{trialRequest.nameString()} notes:
|
|
|
|
div= props.heardAbout || props.notes
|
|
|
|
td
|