$if isRegistered
  <div .allocation-course__registered>
    #{iconOK}
    \ _{MsgRegistered}
$if is _Just muid
  <div .allocation-course__priority-label .allocation__label>
    _{MsgAllocationPriority}
  <div .allocation-course__priority>
    $maybe prioView <- mApplyFormView' >>= afvPriority
      ^{fvWidget prioView}
    $nothing
      _{MsgAllocationNoApplication}
<a .allocation-course__name href=@{CourseR courseTerm courseSchool courseShorthand CShowR} target="_blank">
  #{courseName}
  $if not courseVisible && mayEdit
    \ #{iconInvisible}
$if isAdmin
  <div .allocation-course__admin-info>
    <p>
      $maybe deadline <- allocationCourseAcceptSubstitutes
        _{MsgCourseAllocationCourseAcceptsSubstitutesUntil}: #
        ^{formatTimeW SelFormatDateTime deadline}
      $nothing
        _{MsgCourseAllocationCourseAcceptsSubstitutesNever}
      $if allocationCourseAcceptSubstitutes >= Just now
        \ ^{iconOK}
    <p>
      _{MsgCourseAllocationCourseParticipants}:
      $maybe capacity <- courseCapacity
        \ _{MsgCourseMembersCountLimited partCount capacity}
        $if partCount < capacity
          \ ^{iconProblem}
      $nothing
        \ _{MsgCourseMembersCount partCount}
        \ ^{iconProblem}
$if hasApplicationTemplate || is _Just courseApplicationsInstructions
  <div .allocation-course__instructions-label .allocation__label>
    _{MsgCourseApplicationInstructionsApplication}
  <div .allocation-course__instructions>
    $maybe aInst <- courseApplicationsInstructions
      <p>
        #{aInst}
    $maybe templateUrl <- mApplicationTemplate
      <p>
        <a href=#{templateUrl}>
          #{iconRegisterTemplate} _{MsgCourseApplicationTemplateApplication}
$maybe ApplicationFormView{ ..} <- mApplyFormView'
  <div .allocation-course__application-label .allocation__label :not overrideVisible:uw-interactive-fieldset data-conditional-input=#{maybe "" fvId afvPriority} data-conditional-value="" data-conditional-negated>
    _{MsgCourseApplication}
  <div .allocation-course__application :not overrideVisible:uw-interactive-fieldset data-conditional-input=#{maybe "" fvId afvPriority} data-conditional-value="" data-conditional-negated>
    ^{renderFieldViews FormStandard afvForm}
    ^{snd afvButtons}
