Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try and get folks to put more tags. #3350

Merged
merged 5 commits into from
Dec 5, 2017
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/contribute.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ command will be run immediately and will inform you of the changes and errors.
.. _Sprintable: https://github.com/rtfd/readthedocs.org/issues?q=is%3Aopen+is%3Aissue+label%3ASprintable
.. _contribution-guide.org: http://www.contribution-guide.org/#submitting-bugs

.. _pre-commit: https://github.com/pre-commit/pre-commit
.. _autoflake: https://github.com/myint/autoflake
.. _autopep8: https://github.com/hhatto/autopep8
.. _docformatter: https://github.com/myint/docformatter
Expand Down
2 changes: 1 addition & 1 deletion readthedocs/projects/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@ class Meta(object):
'documentation_type',
'language',
'programming_language',
'project_url',
'tags',
'project_url',
)

description = forms.CharField(
Expand Down
9 changes: 7 additions & 2 deletions readthedocs/templates/core/project_detail_right.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,21 @@ <h3>{% trans "Badge" %}</h3>


{% block tags %}
{% if project.tags.count %}
<h3>{% trans "Tags" %}</h3>
<p>
{% if project.tags.count %}
{% for tag in project.tags.all %}
<a href="{% url "projects_tag_detail" tag.slug %}">{{ tag.name }}</a>{% if forloop.last %}{% else %}, {% endif %}
{% empty %}
<span class="quiet">{% trans "No tags" %}</span>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This condition won't be met since it has to be 0 on project.tags.count to have an empty list. I think you can remove the empty block.

{% endfor %}
</p>
{% else %}
Project has no tags.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

trans is missing

{% if request.user|is_admin:project %}
Add some in your <a href="{% url 'projects_edit' project.slug %}">project settings</a>.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

trans is missing

{% endif %}
{% endif %}
</p>
{% endblock %}

{% block privacy-level %}
Expand Down