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

div.resources__newresource
    sib-link(next='mentor-resource-create').plus-button
      div 
        p Post a new Resource
div.dashboard__database
    sib-link(next='mentor-database')
      div 
        p Browse database

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'
    )