Skip to content

Commit 3d8e022

Browse files
authored
Rename get_latest_build -> latest_internal_build (#639)
Matches readthedocs/readthedocs.org#12400
1 parent 564506a commit 3d8e022

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

readthedocsext/theme/templates/core/project_list_detailed.html

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,33 @@
1-
{% load i18n %}
1+
{% load trans blocktrans from i18n %}
22

33
{% for project in project_list %}
44
<li class="item">
55
<a href="{{ project.get_absolute_url }}">{{ project.name }}</a>
66

77
{% with project.users.all as users %}
88
{% if users|length > 1 %}
9-
({% for user in project.users.all|slice:":3" %}
9+
(
10+
{% for user in project.users.all|slice:":3" %}
1011
{% if omit and user.pk != omit.pk %}
1112
<a href="{{ user.get_absolute_url }}">{{ user }}</a>
1213
{% endif %}
1314
{% if not omit %}
1415
<a href="{{ user.get_absolute_url }}">{{ user }}</a>
1516
{% endif %}
16-
{% endfor %})
17+
{% endfor %}
18+
)
1719
{% else %}
18-
{% if omit and users.0.pk == omit.pk %}{% else %}{% with project.users.all.0 as user %}
19-
(<a href="{{ user.get_absolute_url }}">{{ user }}</a>)
20-
{% endwith %}
20+
{% if omit and users.0.pk == omit.pk %}
21+
{% else %}
22+
{% with project.users.all.0 as user %}
23+
(<a href="{{ user.get_absolute_url }}">{{ user }}</a>)
24+
{% endwith %}
2125
{% endif %}
2226
{% endif %}
2327
{% endwith %}
2428

2529
{% if project.has_good_build %}
26-
<span>{% blocktrans with date=project.get_latest_build.date|timesince %}{{ date }} ago{% endblocktrans %}</span>
30+
<span>{% blocktrans with date=project.latest_internal_build.date|timesince %}{{ date }} ago{% endblocktrans %}</span>
2731
{% else %}
2832
<span>{% trans "No builds" %}</span>
2933
{% endif %}
@@ -37,8 +41,6 @@
3741
{% endif %}
3842
</li>
3943
</ul>
40-
41-
4244
</li>
4345
{% empty %}
4446
<li class="item">{% trans "No projects found" %}</li>

readthedocsext/theme/templates/projects/partials/project_list.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
{% block list_item_header %}
5353
<a href="{% url "projects_detail" object.slug %}">{{ object.name }}</a>
5454
<div class="sub header">
55-
{% with build=object.get_latest_build %}
55+
{% with build=object.latest_internal_build %}
5656
{% if build %}
5757
<time data-content="{{ build.date }}">
5858
{% if build.finished %}
@@ -78,7 +78,7 @@
7878
{% endblock list_item_meta %}
7979

8080
{% block list_item_extra_items %}
81-
{% with build=object.get_latest_build %}
81+
{% with build=object.latest_internal_build %}
8282
{% if build %}
8383
{% include "includes/elements/chips/build.html" with project=object build=build %}
8484
{% endif %}

0 commit comments

Comments
 (0)