.d-flex.justify-content-between.flex-wrap.flex-md-nowrap.align-items-center.pt-3.pb-2.mb-3.border-bottom .d-flex.align-items-center.flex-wrap %h1.h2.mr-3 = title @questionnaire.full_name %div %span.mr-1 = render 'acc_status_badge' %span = render 'check_in_badge' .btn-group{role: "group"} - if current_user.admin? = link_to 'Edit', edit_manage_questionnaire_path(@questionnaire), class: 'btn btn-sm btn-outline-secondary' - if current_user.admin? .btn-group{role: "group"} %button.btn.btn-sm.btn-outline-secondary.dropdown-toggle#title-actions{"aria-expanded" => "false", "aria-haspopup" => "true", "data-toggle" => "dropdown", type: "button"} .fa.fa-cog .dropdown-menu.dropdown-menu-right{"aria-labelledby" => "title-actions"} = link_to 'Convert to Admin', convert_to_admin_manage_questionnaire_path(@questionnaire), method: :patch, data: { confirm: "Are you sure? The questionnaire for \"#{@questionnaire.full_name}\" will be permanently erased, and \"#{@questionnaire.email}\" will become an admin. This action is irreversible." }, class: 'dropdown-item' = render 'overview' .row .col %h3.mt-3.pb-2.border-bottom.mb-3 Admissions .row .col-md-6 .card.mb-3 .card-body %h5.card-title.mb-1 Acceptance %p.card-text = render 'acc_status_badge' %small = @questionnaire.acc_status_author_id ? @questionnaire.acc_status_author.email : "(no author)" = @questionnaire.acc_status_date ? display_datetime(@questionnaire.acc_status_date, in_sentence: true) : "(no date)" - if current_user.admin? = bs_vertical_simple_form @questionnaire, url: url_for(action: "update_acc_status", controller: "questionnaires") do |f| = f.input :acc_status, as: :select, collection: Questionnaire::POSSIBLE_ACC_STATUS.invert, include_blank: false, label: "Acceptance Status:", hint: "Updating this status may trigger an automatic email to the applicant - see #{link_to('messages', manage_messages_path(anchor: 'triggered-email-overview'))} for details.".html_safe = f.button :submit, value: "Update Status", class: 'btn-primary' .col-md-6 = render 'checkin_card' .row .col %h3.mt-3.pb-2.border-bottom.mb-3 History = render 'history'