Skip to content

Commit 6dfb237

Browse files
authored
Merge pull request #3350 from rtfd/better-tags
Try and get folks to put more tags.
2 parents 76dbd45 + 5a5a906 commit 6dfb237

File tree

4 files changed

+26
-10
lines changed

4 files changed

+26
-10
lines changed

docs/contribute.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ command will be run immediately and will inform you of the changes and errors.
7171
.. _Sprintable: https://github.com/rtfd/readthedocs.org/issues?q=is%3Aopen+is%3Aissue+label%3ASprintable
7272
.. _contribution-guide.org: http://www.contribution-guide.org/#submitting-bugs
7373

74+
.. _pre-commit: https://github.com/pre-commit/pre-commit
7475
.. _autoflake: https://github.com/myint/autoflake
7576
.. _autopep8: https://github.com/hhatto/autopep8
7677
.. _docformatter: https://github.com/myint/docformatter

readthedocs/projects/forms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,8 @@ class Meta(object):
161161
'documentation_type',
162162
'language',
163163
'programming_language',
164-
'project_url',
165164
'tags',
165+
'project_url',
166166
)
167167

168168
description = forms.CharField(

readthedocs/settings/test.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ class CommunityTestSettings(CommunityDevSettings):
1717
DEBUG = False
1818
TEMPLATE_DEBUG = False
1919

20+
@property
21+
def LOGGING(self): # noqa - avoid pep8 N802
22+
logging = super(CommunityDevSettings, self).LOGGING
23+
return logging
24+
25+
2026

2127
CommunityTestSettings.load_settings(__name__)
2228

readthedocs/templates/core/project_detail_right.html

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ <h3>{% trans "Last Built" %}</h3>
2424
<span class="build-state build-state-failing">{% trans "failed" %}</span>
2525
{% endif %}
2626
{% else %}
27-
Currently Building
27+
{% trans "Currently Building" %}
2828
{% endif %}
2929
{% else %}
30-
No builds yet
30+
{% trans "No builds yet" %}
3131
{% endif %}
3232
{% endwith %}
3333
</p>
@@ -61,16 +61,25 @@ <h3>{% trans "Badge" %}</h3>
6161

6262

6363
{% block tags %}
64-
{% if project.tags.count %}
6564
<h3>{% trans "Tags" %}</h3>
6665
<p>
67-
{% for tag in project.tags.all %}
68-
<a href="{% url "projects_tag_detail" tag.slug %}">{{ tag.name }}</a>{% if forloop.last %}{% else %}, {% endif %}
69-
{% empty %}
70-
<span class="quiet">{% trans "No tags" %}</span>
71-
{% endfor %}
66+
67+
{% if project.tags.exists %}
68+
{% for tag in project.tags.all %}
69+
<a href="{% url "projects_tag_detail" tag.slug %}">{{ tag.name }}</a>{% if forloop.last %}{% else %}, {% endif %}
70+
{% endfor %}
71+
{% else %}
72+
{% trans "Project has no tags." %}
73+
{% if request.user|is_admin:project %}
74+
75+
{% url 'projects_edit' project.slug as edit_url %}
76+
{% blocktrans %}
77+
Add some in your <a href="{{ edit_url }}">project settings</a>.
78+
{% endblocktrans %}
79+
{% endif %}
80+
{% endif %}
81+
7282
</p>
73-
{% endif %}
7483
{% endblock %}
7584

7685
{% block privacy-level %}

0 commit comments

Comments
 (0)