{# -*- coding: utf-8 -*-

  This file is part of Invenio.
  Copyright (C) 2016-2022 CERN.

  Invenio is free software; you can redistribute it and/or modify it
  under the terms of the MIT License; see LICENSE file for more details.
#}

{% extends "invenio_requests/details/index.html" %}

{% block css %}
{{ super() }}
{{ webpack['invenio-app-rdm-requests-theme.css']}}
{% endblock %}

{% block javascript %}
  {{ super() }}
{{ webpack['invenio-app-rdm-requests.js']}}
{% endblock %}

{% block request_topic %}
  <h1 class="ui header">
    <div class="ui label green">New submission</div>
    {{ request.topic.metadata.title }}</h1><br/>
  <div class="ui horizontal list" role="list">
    {% for item in request.topic.metadata.creators %}
      <div class="item" role="listitem">
        <div class="content"><i class="user icon"></i>
          {{ item.person_or_org.name }}</div>
      </div>
    {% endfor %}
  </div>
{% endblock request_topic %}

{% block conversation %}
  <div class="ui divider hidden"></div>
  <div class="ui container" id="request-community-submission-tab-container">
  <div class="ui secondary pointing menu" id="request-community-submission-tab">
    <a class="active item" data-tab="conversation" role="tab"
       aria-selected="true" aria-controls="conversation"
       id="conversation-tab-menu">
      Conversation
    </a>
    <a class="item" data-tab="record" id="record-tab-menu"
       aria-controls="record">
      Record
    </a>
  </div>

  <div class="ui bottom attached tab segment active" data-tab="conversation"
       role="tabpanel" aria-labelledby="conversation" id="conversation-tab">
    <div class="ui divider hidden"></div>
    {{ super() }}
  </div>
  <div class="ui bottom attached tab segment" data-tab="record"
       role="tabpanel" aria-labelledby="record" id="record-tab"
       hidden="hidden">
  <div class="ui divider hidden"></div>
    {% if record %}
      {% set use_theme_basic_template = false %}
      {% include "invenio_app_rdm/records/detail.html" %}
    {% endif %}
  </div>
</div>

{% endblock conversation %}
