Skip to content
Snippets Groups Projects
list.pug 2.1 KiB
Newer Older
include ../../components/widgets
Benoit Alessandroni's avatar
Benoit Alessandroni committed

h2.title_lead Welcome to your international index of resources for cooperative mentors and entrepreneurs

div.button__actions
    div.resources__newresource
        sib-link(next='mentor-resource-create').margin_bord_ecran
            div.ico_gauche.ico_plus
            div.button_base Post a new Resource

    div.dashboard__database
        sib-link(next='mentor-database')
            div.button_base Browse database
    div(class='tablink', onclick="openTab('reviews', this)", id='defaultOpen')
        h2 Resources requesting validation
    div(class='tablink', onclick="openTab('requests', this)")
        h2 Requested resources
    div(class='tablink', onclick="openTab('history', this)")
        h2 history of your resources

    div#reviews.tabcontent
            data-src=`${endpoints.resources}pending/`
            fields='content(name), info(author, publication_year), validate',
            widget-status='resource-format-name',

            action-validate='mentor-resource-validate'
            widget-validate='cs-action'
        )

    div(id='requests', class="tabcontent")
        sib-display(
            data-src=`${endpoints.requests}`
            fields='content(name, description), field, language.name, target, create',
            widget-format='resource-format-name',
            
            label-create='Create associated resource'
            action-create="mentor-resource-create"
            widget-create='cs-action'
        )

    div(id='history', class="tabcontent")
        sib-display(
            bind-user
            nested-field='resources'
            fields='content(name), review.status, info(format, publication_year), edit, detail',
            widget-review.status='cs-resource-status',
            
            widget-format='cs-display-multiple-property'
            label-format='Formats: '
            each-label-format=''
            multiple-format

            widget-edit='cs-action'
            action-edit='mentor-resource-edit'

            widget-detail='cs-action'
            action-detail='mentor-resource-detail'