-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Progress on the notification content and rendering #106
Signed-off-by: tdruez <[email protected]>
- Loading branch information
Showing
4 changed files
with
54 additions
and
31 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,13 @@ | ||
{% with notice.action_object.get_absolute_url as action_object_url %} | ||
<a href="{{ action_object_url }}{% if action_object_content_type|slugify == 'package' %}#scan{% endif %}" class="list-group-item list-group-item-action flex-column align-items-start{% if not action_object_url %} disabled{% endif %}"> | ||
<div class="d-flex w-100 justify-content-between"> | ||
<div class="h6 mb-1"> | ||
{% if notice.actor != request.user %} | ||
{{ notice.actor }} | ||
{% endif %} | ||
{{ notice.verb }} | ||
{% if notice.action_object %} | ||
{{ notice.action_object }} | ||
{% else %} | ||
<i>(object not found)</i> | ||
{% endif %} | ||
{% if notice.target %} | ||
of {{ notice.target }} | ||
{% endif %} | ||
</div> | ||
<small class="text-muted"> | ||
{{ notice.timesince }} ago | ||
</small> | ||
{% if action_object_url %} | ||
<a href="{{ action_object_url }}{% if action_object_content_type|slugify == 'package' %}#scan{% endif %}" class="list-group-item list-group-item-action flex-column align-items-start"> | ||
{% else %} | ||
<div class="list-group-item list-group-item-action flex-column align-items-start"> | ||
{% endif %} | ||
{% include 'notifications/notice_content.html' %} | ||
{% if action_object_url %} | ||
</a> | ||
{% else %} | ||
</div> | ||
{% if notice.description %} | ||
<small class="mb-0 text-muted">{{ notice.description|linebreaksbr }}</small> | ||
{% endif %} | ||
</a> | ||
{% endif %} | ||
{% endwith %} |
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,24 @@ | ||
<div class="d-flex w-100 justify-content-between"> | ||
<div class="h6 mb-1"> | ||
{% if notice.actor != request.user %} | ||
{{ notice.actor }} | ||
{% endif %} | ||
{{ notice.verb }} | ||
{% if notice.action_object %} | ||
{{ notice.action_object }} | ||
{% elif action_object_content_type|slugify == 'package' %} | ||
<i>(object not found)</i> | ||
{% endif %} | ||
{% if notice.target %} | ||
of {{ notice.target }} | ||
{% endif %} | ||
</div> | ||
<small class="text-muted"> | ||
{{ notice.timesince }} ago | ||
</small> | ||
</div> | ||
{% if notice.description %} | ||
<small class="mb-0 text-muted"> | ||
{{ notice.description|safe|linebreaksbr }} | ||
</small> | ||
{% 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