Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
La Quadrature du Net
rpteam
Revue de Press
Commits
9bae6017
Commit
9bae6017
authored
Jul 16, 2019
by
Okhin
Browse files
Adds votes, reject, publish and unpublish buttons on article details
parent
43cf545d
Pipeline
#2658
passed with stages
in 3 minutes and 45 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
apps/rp/templates/rp/article_detail.html
View file @
9bae6017
...
...
@@ -28,9 +28,17 @@
<span
class=
"btn-group"
role=
"group"
aria-label=
"Actions"
>
{% if object.status == 'PUBLISHED' %}
<a
class=
"btn btn-outline-danger"
href=
"{% url 'rp:article-edit' object.id %}"
>
Edit
</a>
{% if perms.rp.can_change_status %}
<a
class=
"btn btn-outline-default"
href=
"{% url 'api:article-unpublish' object.id %}"
>
UnPublish
</a>
<a
class=
"btn btn-outline-danger"
href=
"{% url 'api:article-reject' object.id %}"
>
Reject
</a>
{% endif %}
{% else %}
<a
class=
"btn btn-outline-primary"
href=
"{% url 'rp:article-edit' object.id %}"
>
Edit
</a>
<a
class=
"btn btn-outline-warning"
href=
"#"
>
Publish
</a>
{% if perms.rp.can_change_status %}
<a
class=
"btn btn-outline-warning"
href=
"{% url 'api:article-publish' object.id %}"
>
Publish
</a>
<a
class=
"btn btn-outline-danger"
href=
"{% url 'api:article-reject' object.id %}"
>
Reject
</a>
<a
class=
"btn btn-outline-default"
href=
"{% url 'api:article-recover' object.id %}"
>
Recover
</a>
{% endif %}
{% endif %}
</span>
</div>
...
...
@@ -65,6 +73,12 @@
<a
target=
"mailto:{{ article.created_by.user.email }}"
><span
class=
"glyphicon glyphicon-envelope"
aria-label=
"{{ _("
Contact
this
user
by
email
")}}"
></span>
</p>
<p>
{{object.extracts |markdown}}
</p>
{% if perms.rp.can_vote %}
<span>
<a
href=
"{% url 'api:upvote' object.id %}"
class=
"btn btn-outline-default"
>
+1
</a>
<a
href=
"{% url 'api:downvote' object.id %}"
class=
"btn btn-outline-default"
>
-1
</a>
</span>
{% endif %}
</div>
</div>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment