SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit cc8d25d6 authored by Jean-Sébastien Caux's avatar Jean-Sébastien Caux
Browse files

Add topic detail card

parent 97d8ae60
No related branches found
No related tags found
No related merge requests found
<div class="card">
<div class="card-header">
<h3>{{ topic }}</h3>
{% if perms.scipost.can_manage_ontology %}
<a href="{% url 'ontology:topic_update' slug=topic.slug %}">Update</a>
{% endif %}
</div>
<div class="card-body">
{% if topic.tags.all %}
<ul class="list list-inline">
<li class="list-inline-item"><strong>Tags</strong>:</li>
{% for tag in topic.tags.all %}
<li class="list-inline-item">{{ tag }}</li>
{% endfor %}
</ul>
{% endif %}
</div>
</div>
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
{% block breadcrumb_items %} {% block breadcrumb_items %}
{{ block.super }} {{ block.super }}
<span class="breadcrumb-item"><a href="{% url 'ontology:topics' %}">Topics</a></span>
<span class="breadcrumb-item">{{ topic }}</span> <span class="breadcrumb-item">{{ topic }}</span>
{% endblock %} {% endblock %}
...@@ -13,7 +12,7 @@ ...@@ -13,7 +12,7 @@
{% block content %} {% block content %}
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
{{ topic }} {% include 'ontology/_topic_card.html' with topic=topic %}
</div> </div>
</div> </div>
{% endblock content %} {% endblock content %}
...@@ -14,7 +14,7 @@ urlpatterns = [ ...@@ -14,7 +14,7 @@ urlpatterns = [
), ),
url( url(
r'^topic/(?P<slug>[-\w]+)/update/$', r'^topic/(?P<slug>[-\w]+)/update/$',
views.TopicCreateView.as_view(), views.TopicUpdateView.as_view(),
name='topic_update' name='topic_update'
), ),
url( url(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment