SciPost Code Repository
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SciPost
Manage
Activity
Members
Labels
Plan
Issues
118
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SciPost
SciPost
Commits
cc8d25d6
Commit
cc8d25d6
authored
6 years ago
by
Jean-Sébastien Caux
Browse files
Options
Downloads
Patches
Plain Diff
Add topic detail card
parent
97d8ae60
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
ontology/templates/ontology/_topic_card.html
+19
-0
19 additions, 0 deletions
ontology/templates/ontology/_topic_card.html
ontology/templates/ontology/topic_detail.html
+1
-2
1 addition, 2 deletions
ontology/templates/ontology/topic_detail.html
ontology/urls.py
+1
-1
1 addition, 1 deletion
ontology/urls.py
with
21 additions
and
3 deletions
ontology/templates/ontology/_topic_card.html
0 → 100644
+
19
−
0
View file @
cc8d25d6
<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>
This diff is collapsed.
Click to expand it.
ontology/templates/ontology/topic_detail.html
+
1
−
2
View file @
cc8d25d6
...
...
@@ -4,7 +4,6 @@
{% block breadcrumb_items %}
{{ block.super }}
<span
class=
"breadcrumb-item"
><a
href=
"{% url 'ontology:topics' %}"
>
Topics
</a></span>
<span
class=
"breadcrumb-item"
>
{{ topic }}
</span>
{% endblock %}
...
...
@@ -13,7 +12,7 @@
{% block content %}
<div
class=
"row"
>
<div
class=
"col-12"
>
{
{ topic }
}
{
% include 'ontology/_topic_card.html' with topic=topic %
}
</div>
</div>
{% endblock content %}
This diff is collapsed.
Click to expand it.
ontology/urls.py
+
1
−
1
View file @
cc8d25d6
...
...
@@ -14,7 +14,7 @@ urlpatterns = [
),
url
(
r
'
^topic/(?P<slug>[-\w]+)/update/$
'
,
views
.
Topic
Cre
ateView
.
as_view
(),
views
.
Topic
Upd
ateView
.
as_view
(),
name
=
'
topic_update
'
),
url
(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment