{#
    Copyright (C) 2024 CERN.
  
    Invenio App RDM is free software; you can redistribute it and/or modify it
    under the terms of the MIT License; see LICENSE file for more details.
  #}
  
  {%- from "invenio_administration/macros.html" import go_back %}
  
  {% extends "invenio_administration/search.html" %}
  
  {% block admin_main_column %}
    <main id="admin-main-content"
          class="ten wide mobile twelve wide tablet thirteen wide computer fourteen wide widescreen column">
  
      <div class="ui container fluid pl-10 pr-10 pt-10 pb-10">
        {{ go_back() }}
      <div class="ui grid">
        <div class="column six wide">
          <h1 class="ui header">{{ title or name }}</h1>
        </div>
        <div class="column ten wide right aligned">
          <a class="ui icon labeled button"
              href="{{ edit_endpoint }}">
            <i aria-hidden="true"
                class="cog icon"></i>{{ _("Settings") }}
          </a>
          <a class="ui icon labeled button"
              href="{{ create_ui_endpoint }}">
            <i aria-hidden="true"
                class="calendar icon"></i>{{ _("Schedule") }}
          </a>
          <a class="ui icon labeled button"
              href="{{ run_endpoint }}">
            <i aria-hidden="true"
                class="play icon"></i>{{ _("Run now") }}
          </a>
        </div>
      </div>
        {% block admin_page_content %}
          <div class="ui divider" aria-hidden="true"></div>
  
          {%- block search_app %}
            <div
              id="invenio-search-config"
              data-title='{{ title | tojson }}'
              data-resource-name='{{ resource_name | tojson }}'
              data-invenio-search-config='{{ search_config() | tojson }}'
              data-fields='{{ fields | tojson }}'
              data-display-search='{{ display_search | tojson }}'
              data-display-read='{{ display_read | tojson }}'
              data-display-edit='{{ display_edit | tojson }}'
              data-display-delete='{{ display_delete | tojson }}'
              data-resource-schema='{{ resource_schema | tojson }}'
              data-actions='{{ actions | tojson }}'
              data-api-endpoint='{{ api_endpoint }}'
              data-pid-path='{{ pid_path | tojson }}'
              data-create-endpoint='{{ create_ui_endpoint }}'
              data-list-endpoint='{{ list_ui_endpoint }}'
            >
            </div>
          {%- endblock search_app %}
        {% endblock admin_page_content %}
      </div>
    </main>
  {% endblock %}
  
  {% block javascript %}
    {{ super() }}
    {{ webpack['invenio-jobs-details.js'] }}
  {% endblock %}