Skip to content

organize topic detail page in tabs

Philipp S. Sommer requested to merge topic-tabs into master

this MR changes the topic detail page and organizes the content in tabs as desired by @esoeding

this then looks like this

image

to extent the tabs to add more topic metadata, one can add tabs in templates, such as the following

{% extends "topics/topic_detail.html" %}

{% load bootstrap_helpers %}
{% load community_utils %}

{% block tabs %}
  {% extra_tabs publicationsTab="Publications" %}
    {% with disabled_tabs=topic.topicpublication_set.exists|ifnotthen:"publicationsTab" %}
      {{ block.super }}
    {% endwith %}
  {% endextra_tabs %}
{% endblock tabs %}

{% block tab_contents %}

  {{ block.super }}

  {% tab_content "publicationsTab" %}
    <ul>
      {% for publication in topic.topicpublication_set.all %}
        <li>{{ publication.reference|safe }}</li>
      {% endfor %}
    </ul>
  {% endtab_content %}

{% endblock tab_contents %}

Merge request reports

Loading