-
-
Notifications
You must be signed in to change notification settings - Fork 527
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP attachments list in account settings
- Loading branch information
Showing
7 changed files
with
131 additions
and
73 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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.attachment-list-item { | ||
background-color: #f00; | ||
} |
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
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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
136 changes: 69 additions & 67 deletions
136
misago/templates/misago/account/settings/attachments_toolbar.html
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,70 +1,72 @@ | ||
{% load i18n %} | ||
{% if attachments.has_previous or attachments.has_next %} | ||
<nav class="toolbar"> | ||
<div class="toolbar-section"> | ||
<div class="toolbar-item"> | ||
<div | ||
class="misago-pagination" | ||
hx-push-url="true" | ||
hx-target="#misago-htmx-root" | ||
hx-swap="outerHTML show:#misago-page-scroll-target:top" | ||
> | ||
{% if attachments.has_previous %} | ||
<a | ||
href="{% url 'misago:account-attachments' %}" | ||
class="btn btn-default btn-outline btn-icon" | ||
title="{% trans 'Go to first page' context 'attachments list paginator' %}" | ||
hx-get="{% url 'misago:account-attachments' %}" | ||
> | ||
<span class="material-icon">first_page</span> | ||
</a> | ||
<a | ||
href="{% url 'misago:account-attachments' %}{{ attachments.previous_cursor_query }}" | ||
class="btn btn-default btn-outline btn-icon" | ||
title="{% trans 'Go to previous page' context 'username history paginator' %}" | ||
hx-get="{% url 'misago:account-attachments' %}{{ attachments.previous_cursor_query }}" | ||
> | ||
<span class="material-icon">chevron_left</span> | ||
</a> | ||
{% else %} | ||
<button | ||
class="btn btn-default btn-outline btn-icon" | ||
title="{% trans 'Go to first page' context 'username history paginator' %}" | ||
type="button" | ||
disabled | ||
> | ||
<span class="material-icon">first_page</span> | ||
</button> | ||
<button | ||
class="btn btn-default btn-outline btn-icon" | ||
title="{% trans 'Go to previous page' context 'username history paginator' %}" | ||
type="button" | ||
disabled | ||
> | ||
<span class="material-icon">chevron_left</span> | ||
</button> | ||
{% endif %} | ||
{% if attachments.has_next %} | ||
<a | ||
href="{% url 'misago:account-attachments' %}{{ attachments.next_cursor_query }}" | ||
class="btn btn-default btn-outline btn-icon" | ||
title="{% trans 'Go to next page' context 'username history paginator' %}" | ||
hx-get="{% url 'misago:account-attachments' %}{{ attachments.next_cursor_query }}" | ||
> | ||
<span class="material-icon">chevron_right</span> | ||
</a> | ||
{% else %} | ||
<button | ||
class="btn btn-default btn-outline btn-icon" | ||
title="{% trans 'Go to next page' context 'username history paginator' %}" | ||
type="button" | ||
disabled | ||
> | ||
<span class="material-icon">chevron_right</span> | ||
</button> | ||
{% endif %} | ||
{% with paginator=attachments.paginator %} | ||
{% if paginator.has_previous or paginator.has_next %} | ||
<nav class="toolbar"> | ||
<div class="toolbar-section"> | ||
<div class="toolbar-item"> | ||
<div | ||
class="misago-pagination" | ||
hx-push-url="true" | ||
hx-target="#misago-htmx-root" | ||
hx-swap="outerHTML show:#misago-page-scroll-target:top" | ||
> | ||
{% if paginator.has_previous %} | ||
<a | ||
href="{% url 'misago:account-attachments' %}" | ||
class="btn btn-default btn-outline btn-icon" | ||
title="{% trans 'Go to first page' context 'attachments list paginator' %}" | ||
hx-get="{% url 'misago:account-attachments' %}" | ||
> | ||
<span class="material-icon">first_page</span> | ||
</a> | ||
<a | ||
href="{% url 'misago:account-attachments' %}{{ paginator.previous_cursor_query }}" | ||
class="btn btn-default btn-outline btn-icon" | ||
title="{% trans 'Go to previous page' context 'username history paginator' %}" | ||
hx-get="{% url 'misago:account-attachments' %}{{ paginator.previous_cursor_query }}" | ||
> | ||
<span class="material-icon">chevron_left</span> | ||
</a> | ||
{% else %} | ||
<button | ||
class="btn btn-default btn-outline btn-icon" | ||
title="{% trans 'Go to first page' context 'username history paginator' %}" | ||
type="button" | ||
disabled | ||
> | ||
<span class="material-icon">first_page</span> | ||
</button> | ||
<button | ||
class="btn btn-default btn-outline btn-icon" | ||
title="{% trans 'Go to previous page' context 'username history paginator' %}" | ||
type="button" | ||
disabled | ||
> | ||
<span class="material-icon">chevron_left</span> | ||
</button> | ||
{% endif %} | ||
{% if paginator.has_next %} | ||
<a | ||
href="{% url 'misago:account-attachments' %}{{ paginator.next_cursor_query }}" | ||
class="btn btn-default btn-outline btn-icon" | ||
title="{% trans 'Go to next page' context 'username history paginator' %}" | ||
hx-get="{% url 'misago:account-attachments' %}{{ paginator.next_cursor_query }}" | ||
> | ||
<span class="material-icon">chevron_right</span> | ||
</a> | ||
{% else %} | ||
<button | ||
class="btn btn-default btn-outline btn-icon" | ||
title="{% trans 'Go to next page' context 'username history paginator' %}" | ||
type="button" | ||
disabled | ||
> | ||
<span class="material-icon">chevron_right</span> | ||
</button> | ||
{% endif %} | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</nav> | ||
{% endif %} | ||
</nav> | ||
{% endif %} | ||
{% endwith %} |