-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add view partials for repeated content on post or topic writer
If we want to override the way the last writer of a post or a topic is shown, the project forces us to repeat our modification in multiple templates. We introduce two different partials to simplify the overload.
- Loading branch information
Showing
9 changed files
with
48 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{% load i18n %} | ||
|
||
{% if display_label_by is not defined or display_label_by %} | ||
{% trans "By:" %} | ||
{% endif %} | ||
{% if poster %} | ||
{% include "partials/profile_link.html" %} | ||
{% else %} | ||
{% if username_highlighted %}<b>{% endif %}{{ username }}{% if username_highlighted %}</b>{%endif%} | ||
{% endif %} | ||
|
||
{% if creation_date %} | ||
{% blocktrans trimmed%} | ||
on {{ creation_date }} | ||
{% endblocktrans %} | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{% load forum_member_tags %} | ||
|
||
{% if poster %} | ||
{% url 'forum_member:profile' poster.id as profil_url %} | ||
{% with username=poster|forum_member_display_name %} | ||
<a href="{{profil_url }}" title="title"> | ||
{% if username_highlighted %}<b>{%endif%}{{ username }}{% if username_highlighted %}</b>{%endif%} | ||
</a> | ||
{% endwith %} | ||
{% endif %} |