Skip to content
Snippets Groups Projects
validate.pug 4.72 KiB
Newer Older
include ../../components/widgets

sib-router
  sib-route(name='improvement-dialog')
  sib-route(name='refusal-dialog')
  sib-route(name='review-submission-confirmation')
.block_log.block_creat_count.no_shadow
  sib-link(class="backlink", next="mentor-resource-list")
    .like
      p.backlink 
        i.fas.fa-times
  
  div#detail-validation-loader
    hidden Loading the resource, please wait...
 
  sib-display(
    loader-id="detail-validation-loader"
    fields='name, steps, format.name,\
            submitter_info(submitter.account.picture, submitter.name, \
            submitter.mentor_profile.organisation.name, skills, uri, broken),\
            content(preview_image, tags),\
            description, copyright, specifications(\
            header_specifications, author, country.name, language.name,\
            publication_year, fields, sharing)',

    widget-submitter.name='cs-display-resource-property',
    class-name="title_form"
    class-steps="steps"
    widget-author='cs-display-resource-property',
    widget-country.name='cs-display-resource-property',
    widget-submitter.mentor_profile.organisation.name='cs-display-resource-property'
    class-submitter.name="autor_ressource"
    class-broken="broken"
    widget-format.name='cs-display-resource-property'
    class-format.name='format_type'
    class-uri="pull-left"
    widget-skills='cs-display-resource-property'
    widget-description='cs-display-property'
    widget-name='cs-display-property'
    widget-publication_year='cs-display-resource-property'
    widget-sharing='cs-display-resource-property'
    widget-language.name='cs-display-resource-property'
    widget-submitter.account.picture='cs-account-picture'
    widget-broken='cs-broken-action'
    widget-preview_image='cs-preview-picture'
    widget-header_specifications='cs-section_header'
    label-broken='Report broken link'
    label-sharing='Access:'
    label-language.name='Language:'
    label-publication_year='Year of publication:'
    label-header_specifications='Resource specifications'
    label-format.name=''
    widget-steps='cs-display-step-property'
    label-steps=''
    each-label-steps="Step"
    multiple-steps

    widget-fields='cs-display-multiple-property'
    label-fields=''
    each-label-fields='Field:'
    multiple-fields

    label-skills='With this resource, you will be able to:'
    label-uri='Link to resource'
    name-uri='original-link'
    label-country.name='Country:'
    label-submitter.mentor_profile.organisation.name='Organisation:'
    label-author='Author :'
    label-submitter.name='Resource posted by:'
    action-broken='resource-report-broken-link-mentor'
  p.p_entete
    sib-display.action_button(
      bind-resources
      fields='improve'
      widget-improve='sib-action'
      label-improve='Require improvement'
      action-improve='improvement-dialog'
      class-improve='button_base'
    )

  p.p_entete
    sib-display.action_button(
      bind-resources
      fields='refuse'

      widget-refuse='sib-action'
      label-refuse='Report as inappropriate'
      action-refuse='refusal-dialog'
      class-refuse='button_base'
    )
  sib-form#validation-form.action_button(
    bind-resources
    nested-field='review'
    fields='status, reviewer',
    widget-reviewer='sib-form-hidden'
    widget-status='sib-form-hidden'
    value-status='validated'
    submit-button='Validate'
    next='review-submission-confirmation'
  dialog#refusal-dialog
    h2.title_lead Report as inappropriate
    sib-form#refusal-dialog-form(
      bind-resources
      nested-field='review'
      fields='comment, status, reviewer',

      label-comment='Explain reasons of refusal*'
      widget-comment='sib-form-textarea'
      widget-reviewer='sib-form-hidden'
      widget-status='sib-form-hidden'
      value-status='inappropriate'
      submit-button='Send ->'
      next='review-submission-confirmation'
    )

  dialog#improvement-dialog
    h2.title_lead Suggest improvement
    sib-form#improvement-dialog-form(
      bind-resources
      nested-field='review'
      fields='comment, status, reviewer',

      label-comment='Explain improvement required*'
      widget-reviewer='sib-form-hidden'
      widget-comment='sib-form-textarea'
      widget-status='sib-form-hidden'
      value-status='to_improve'
      submit-button='Send ->'
      next='review-submission-confirmation'
    )

  dialog#review-submission-confirmation
    h2.title_lead_avenir Thanks for your review
    p.flex The submitter of the resource will now receive a notification of your review.
    p.flex He will then be able to patch and send back the resource to validation
    p.flex
      sib-link(next='mentor-resource-list', class='button_base') Back to dashboard