{{!
    @template local_kid/capp_grid_student

    Student-mode fragment of local_kid/capp_grid, extracted so it can be
    re-rendered on its own by the AJAX student-switch endpoint
    (classes/external/get_grid_student_view.php) without re-rendering the
    "<h2>libelle</h2>" or the summary-mode table.

    Context: same as local_kid/capp_grid's student-mode branch, plus
    studentnav (see templates/student_nav.mustache).

    Note: this partial is the CONTENT of [data-region="kid-grid-student"],
    not the wrapper itself — the wrapper div lives in local_kid/capp_grid
    so amd/src/student_nav.js can replace this partial's output via
    innerHTML without nesting an extra wrapper on every student switch.
}}
<p class="fr-mb-2w"><a class="fr-link" href="{{backurl}}" data-kid-guard-nav="1">{{#str}}entry_back_to_summary, local_kid{{/str}}</a></p>
{{#studentnav}}{{> local_kid/student_nav}}{{/studentnav}}
{{> local_kid/workflow_stepper}}
<div class="kid-publication fr-mb-2w">
    <ul class="fr-btns-group fr-btns-group--inline-md fr-mb-0">
        {{#canvalidate}}<li><a class="fr-btn fr-btn--secondary" href="{{validateurl}}">{{#str}}workflow_action_validate, local_kid{{/str}}</a></li>{{/canvalidate}}
        {{#canfinalise}}<li><a class="fr-btn fr-btn--secondary" href="{{finaliseurl}}">{{#str}}workflow_action_finalise, local_kid{{/str}}</a></li>{{/canfinalise}}
        {{#canreopen}}<li><a class="fr-btn fr-btn--secondary" href="{{reopenurl}}">{{#str}}workflow_action_reopen, local_kid{{/str}}</a></li>{{/canreopen}}
    </ul>
    {{#ispublished}}<span class="fr-badge fr-badge--success">{{#str}}published_yes, local_kid{{/str}}</span>{{/ispublished}}
</div>

{{#hasprevious}}
<p class="fr-mb-2w"><a class="fr-link" href="{{recoveroneurl}}">{{#str}}capp_recover_one, local_kid, {{previouslabel}}{{/str}}</a></p>
{{/hasprevious}}

{{#fichestudenturl_docx}}
<ul class="fr-btns-group fr-btns-group--inline-md fr-btns-group--sm fr-mb-2w">
    <li><a class="fr-btn fr-btn--tertiary fr-btn--sm" href="{{fichestudenturl_docx}}">{{#str}}fiche_download_student, local_kid{{/str}} ({{#str}}fiche_format_docx, local_kid{{/str}})</a></li>
    <li><a class="fr-btn fr-btn--tertiary fr-btn--sm" href="{{fichestudenturl_pdf}}">{{#str}}fiche_download_student, local_kid{{/str}} ({{#str}}fiche_format_pdf, local_kid{{/str}})</a></li>
</ul>
{{/fichestudenturl_docx}}

<div class="fr-card" data-region="kid-entry-form">
    <div class="fr-card__body">
        <div class="fr-card__content">
            {{{formhtml}}}
        </div>
    </div>
</div>
