mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2025-01-11 09:45:27 +00:00
Issue-3187: changes
This commit is contained in:
parent
1966f1d9a3
commit
1a682753c0
2 changed files with 4 additions and 1 deletions
|
@ -33,7 +33,7 @@
|
||||||
<span data-poll="stream/{{ tab.key }}"></span>
|
<span data-poll="stream/{{ tab.key }}"></span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
{% if request.user.show_goal and not goal and tab.key == 'home' %}
|
{% if request.user.show_goal and not goal and tab.key == 'home' and has_read_throughs %}
|
||||||
{% now 'Y' as year %}
|
{% now 'Y' as year %}
|
||||||
<section class="block">
|
<section class="block">
|
||||||
{% include 'feed/goal_card.html' with year=year %}
|
{% include 'feed/goal_card.html' with year=year %}
|
||||||
|
|
|
@ -52,6 +52,8 @@ class Feed(View):
|
||||||
|
|
||||||
suggestions = suggested_users.get_suggestions(request.user)
|
suggestions = suggested_users.get_suggestions(request.user)
|
||||||
|
|
||||||
|
readthroughs = models.ReadThrough.objects.filter(user=request.user)
|
||||||
|
|
||||||
data = {
|
data = {
|
||||||
**feed_page_data(request.user),
|
**feed_page_data(request.user),
|
||||||
**{
|
**{
|
||||||
|
@ -66,6 +68,7 @@ class Feed(View):
|
||||||
"path": f"/{tab['key']}",
|
"path": f"/{tab['key']}",
|
||||||
"annual_summary_year": get_annual_summary_year(),
|
"annual_summary_year": get_annual_summary_year(),
|
||||||
"has_tour": True,
|
"has_tour": True,
|
||||||
|
"has_read_throughs": True if len(readthroughs) else False,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
return TemplateResponse(request, "feed/feed.html", data)
|
return TemplateResponse(request, "feed/feed.html", data)
|
||||||
|
|
Loading…
Reference in a new issue