forked from mirrors/bookwyrm
Removes username snippet
This commit is contained in:
parent
a63471c56f
commit
0bd27928e4
15 changed files with 58 additions and 37 deletions
|
@ -252,7 +252,7 @@
|
|||
<div class="media-left">{% include 'snippets/avatar.html' with user=rating.user %}</div>
|
||||
<div class="media-content">
|
||||
<div>
|
||||
{% include 'snippets/username.html' with user=rating.user %}
|
||||
<a href="{{ rating.user.local_path }}">{{ rating.user.display_name }}</a>
|
||||
</div>
|
||||
<div class="is-flex">
|
||||
<p class="mr-1">{% trans "rated it" %}</p>
|
||||
|
|
|
@ -79,7 +79,7 @@
|
|||
aria-controls="navbar-dropdown"
|
||||
>
|
||||
{% include 'snippets/avatar.html' with user=request.user %}
|
||||
<span class="ml-2">{% include 'snippets/username.html' with user=request.user anchor=false %}</span>
|
||||
<span class="ml-2">{{ user.display_name }}</span>
|
||||
</a>
|
||||
<ul class="navbar-dropdown" id="navbar-dropdown">
|
||||
<li>
|
||||
|
|
10
bookwyrm/templates/lists/created_text.html
Normal file
10
bookwyrm/templates/lists/created_text.html
Normal file
|
@ -0,0 +1,10 @@
|
|||
{% load i18n %}
|
||||
{% spaceless %}
|
||||
|
||||
{% if list.curation != 'open' %}
|
||||
{% blocktrans with username=list.user.display_name path=list.user.local_path %}Created and curated by <a href="{{ path }}">{{ username }}</a>{% endblocktrans %}
|
||||
{% else %}
|
||||
{% blocktrans with username=list.user.display_name path=list.user.local_path %}Created by <a href="{{ path }}">{{ username }}</a>{% endblocktrans %}
|
||||
{% endif %}
|
||||
|
||||
{% endspaceless %}
|
|
@ -24,7 +24,7 @@
|
|||
{% include 'snippets/book_titleby.html' with book=item.book %}
|
||||
</td>
|
||||
<td>
|
||||
{% include 'snippets/username.html' with user=item.user %}
|
||||
<a href="{{ item.user.local_path }}">{{ item.user.display_name }}</a>
|
||||
</td>
|
||||
<td>
|
||||
<div class="field has-addons">
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{% load bookwyrm_tags %}
|
||||
{% load i18n %}
|
||||
<div class="columns is-multiline">
|
||||
{% for list in lists %}
|
||||
<div class="column is-one-quarter">
|
||||
|
@ -16,7 +15,9 @@
|
|||
</div>
|
||||
<div class="card-content is-flex-grow-0">
|
||||
{% if list.description %}{{ list.description | to_markdown | safe | truncatewords_html:20 }}{% endif %}
|
||||
<p class="subtitle help">{% if list.curation != 'open' %}{% trans "Created and curated by" %}{% else %}{% trans "Created by" %}{% endif %} {% include 'snippets/username.html' with user=list.user %}</p>
|
||||
<p class="subtitle help">
|
||||
{% include 'lists/created_text.html' with list=list %}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -8,8 +8,9 @@
|
|||
<header class="columns content is-mobile">
|
||||
<div class="column">
|
||||
<h1 class="title">{{ list.name }} <span class="subtitle">{% include 'snippets/privacy-icons.html' with item=list %}</span></h1>
|
||||
<p class="subtitle help">{% if list.curation != 'open' %}{% trans "Created and curated by" %}{% else %}{% trans "Created by" %} {% include 'snippets/username.html' with user=list.user %}</p>
|
||||
{% endif %}
|
||||
<p class="subtitle help">
|
||||
{% include 'lists/created_text.html' with list=list %}
|
||||
</p>
|
||||
{% include 'snippets/trimmed_text.html' with full=list.description %}
|
||||
</div>
|
||||
{% if request.user == list.user %}
|
||||
|
|
|
@ -42,8 +42,10 @@
|
|||
<p>
|
||||
{# DESCRIPTION #}
|
||||
{% if notification.related_user %}
|
||||
{% include 'snippets/avatar.html' with user=notification.related_user %}
|
||||
{% include 'snippets/username.html' with user=notification.related_user %}
|
||||
<a href="{{ notification.related_user.local_path }}">
|
||||
{% include 'snippets/avatar.html' with user=notification.related_user %}
|
||||
{{ notification.related_user.display_name }}
|
||||
</a>
|
||||
{% if notification.notification_type == 'FAVORITE' %}
|
||||
{% if related_status.status_type == 'Review' %}
|
||||
{% blocktrans with book_title=related_status.book.title related_path=related_status.local_path %}favorited your <a href="{{ related_path }}">review of <em>{{ book_title }}</em></a>{% endblocktrans %}
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
{% for user in request.user.blocks.all %}
|
||||
<li class="is-flex">
|
||||
<p>
|
||||
{% include 'snippets/avatar.html' with user=user %} {% include 'snippets/username.html' with user=user %}
|
||||
<a href="{{ user.local_path }}">{% include 'snippets/avatar.html' with user=user %} {{ user.display_name }}</a>
|
||||
</p>
|
||||
<p class="mr-2">
|
||||
{% include 'snippets/block_button.html' with user=user %}
|
||||
|
|
|
@ -79,8 +79,10 @@
|
|||
<ul>
|
||||
{% for result in user_results %}
|
||||
<li class="block">
|
||||
{% include 'snippets/avatar.html' with user=result %}</h2>
|
||||
{% include 'snippets/username.html' with user=result show_full=True %}</h2>
|
||||
<a href="{{ result.local_path }}">
|
||||
{% include 'snippets/avatar.html' with user=result %}
|
||||
{{ result.display_name }}
|
||||
</a> ({{ result.username }})
|
||||
{% include 'snippets/follow_button.html' with user=result %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
|
|
|
@ -2,8 +2,10 @@
|
|||
{% load i18n %}
|
||||
{% if not status.deleted %}
|
||||
{% if status.status_type == 'Announce' %}
|
||||
{% include 'snippets/avatar.html' with user=status.user %}
|
||||
{% include 'snippets/username.html' with user=status.user %}
|
||||
<a href="{{ status.user.local_path }}">
|
||||
{% include 'snippets/avatar.html' with user=status.user %}
|
||||
{{ user.display_name }}
|
||||
</a>
|
||||
{% trans "boosted" %}
|
||||
{% include 'snippets/status/status_body.html' with status=status|boosted_status %}
|
||||
{% else %}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
{% load i18n %}
|
||||
<a href="{{ status.user.local_path }}">
|
||||
{% include 'snippets/avatar.html' with user=status.user ariaHide="true" %}
|
||||
{% include 'snippets/username.html' with user=status.user %}
|
||||
{{ status.user.display_name }}
|
||||
</a>
|
||||
|
||||
{% if status.status_type == 'GeneratedNote' %}
|
||||
|
@ -17,7 +17,17 @@
|
|||
{% trans "quoted" %}
|
||||
{% elif status.reply_parent %}
|
||||
{% with parent_status=status|parent %}
|
||||
replied to {% include 'snippets/username.html' with user=parent_status.user possessive=True %} <a href="{{parent_status.remote_id }}">{% if parent_status.status_type == 'GeneratedNote' %}update{% else %}{{ parent_status.status_type | lower }}{% endif %}</a>
|
||||
|
||||
{% if parent_status.status_type == 'Review' %}
|
||||
{% blocktrans with username=parent_status.user.display_name user_path=parent_status.user.local_path status_path=parent_status.local_path %}replied to <a href="{{ user_path }}">{{ username}}'s</a> <a href="{{ status_path }}">review</a>{% endblocktrans %}
|
||||
{% elif parent_status.status_type == 'Comment' %}
|
||||
{% blocktrans with username=parent_status.user.display_name user_path=parent_status.user.local_path status_path=parent_status.local_path %}replied to <a href="{{ user_path }}">{{ username}}'s</a> <a href="{{ status_path }}">comment</a>{% endblocktrans %}
|
||||
{% elif parent_status.status_type == 'Quotation' %}
|
||||
{% blocktrans with username=parent_status.user.display_name user_path=parent_status.user.local_path status_path=parent_status.local_path %}replied to <a href="{{ user_path }}">{{ username}}'s</a> <a href="{{ status_path }}">quote</a>{% endblocktrans %}
|
||||
{% else %}
|
||||
{% blocktrans with username=parent_status.user.display_name user_path=parent_status.user.local_path status_path=parent_status.local_path %}replied to <a href="{{ user_path }}">{{ username}}'s</a> <a href="{{ status_path }}">status</a>{% endblocktrans %}
|
||||
{% endif %}
|
||||
|
||||
{% endwith %}
|
||||
{% endif %}
|
||||
{% if status.book %}
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
{% spaceless %}
|
||||
{% load bookwyrm_tags %}
|
||||
|
||||
<{% if anchor %}a href="{{ user.local_path }}"{% else %}span{% endif %}>
|
||||
{{ user.display_name }}
|
||||
</a>
|
||||
|
||||
{% if possessive %}'s{% endif %}
|
||||
|
||||
{% if show_full and user.name or show_full and user.localname %}
|
||||
({{ user.username }})
|
||||
{% endif %}
|
||||
{% endspaceless %}
|
|
@ -11,19 +11,22 @@
|
|||
{% block panel %}
|
||||
<div class="block">
|
||||
<h2 class="title">{% trans "Followers" %}</h2>
|
||||
{% for followers in followers %}
|
||||
{% for follower in followers %}
|
||||
<div class="block columns">
|
||||
<div class="column">
|
||||
{% include 'snippets/avatar.html' with user=followers %}
|
||||
{% include 'snippets/username.html' with user=followers show_full=True %}
|
||||
<a href="{{ follower.local_path }}">
|
||||
{% include 'snippets/avatar.html' with user=follower %}
|
||||
{{ follower.display_name }}
|
||||
</a>
|
||||
({{ follower.username }})
|
||||
</div>
|
||||
<div class="column is-narrow">
|
||||
{% include 'snippets/follow_button.html' with user=followers %}
|
||||
{% include 'snippets/follow_button.html' with user=follower %}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% if not followers.count %}
|
||||
<div>{% blocktrans with username=user|username %}{{ username }} has no followers{% endblocktrans %}</div>
|
||||
<div>{% blocktrans with username=user.display_name %}{{ username }} has no followers{% endblocktrans %}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
|
@ -14,8 +14,11 @@
|
|||
{% for follower in user.following.all %}
|
||||
<div class="block columns">
|
||||
<div class="column">
|
||||
{% include 'snippets/avatar.html' with user=follower %}
|
||||
{% include 'snippets/username.html' with user=follower show_full=True %}
|
||||
<a href="{{ follower.local_path }}">
|
||||
{% include 'snippets/avatar.html' with user=follower %}
|
||||
{{ follower.display_name }}
|
||||
</a>
|
||||
({{ follower.username }})
|
||||
</div>
|
||||
<div class="column">
|
||||
{% include 'snippets/follow_button.html' with user=follower %}
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
{% for requester in user.follower_requests.all %}
|
||||
<div class="row shrink">
|
||||
<p>
|
||||
{% include 'snippets/username.html' with user=requester show_full=True %}
|
||||
<a href="{{ requester.local_path }}">{{ requester.display_name }}</a> ({{ requester.username }})
|
||||
</p>
|
||||
{% include 'snippets/follow_request_buttons.html' with user=requester %}
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue