Skip to content
Snippets Groups Projects
list.pug 1.84 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').plus-button
        div.icon-plus
        div.button_base Post a new Resource

    div.dashboard__database
        sib-link(next='mentor-database')
        div.button_base Browse database

div.tabs
    div(class='tablink', onclick="openTab('reviews', this)")
        h2 Resources requesting validation
    div(class='tablink', onclick="openTab('requests', this)")
        h2 Requested resources
    div(class='tablink', onclick="openTab('history', this)", id='defaultOpen')
        h2 history of your resources

    div(id='reviews', class="tabcontent")
        sib-display(
            nested-field='resources'
            fields='content(name), info(author, publication_year)',
            widget-status='resource-format-name',
            next='mentor-resource-validate'
        )

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

            next='mentor-resource-create'
        )

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

            widget-edit='cs-action'
            action-edit='mentor-resource-edit'
            next='mentor-resource-detail'
        )