-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#1798] Updated document list element
- Added date - Added 'new' indicator to documents created no more than 24h in the past
- Loading branch information
Showing
12 changed files
with
173 additions
and
55 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
93 changes: 51 additions & 42 deletions
93
src/open_inwoner/components/templates/components/File/File.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,48 +1,57 @@ | ||
{% load i18n link_tags utils icon_tags form_tags dropdown_tags button_tags string_tags %} | ||
{% load i18n l10n link_tags utils icon_tags form_tags dropdown_tags button_tags string_tags %} | ||
|
||
<aside class="file" aria-label="{% trans "Bestand" %} {{ name }}"> | ||
<div class="file__file"> | ||
{% if is_image %} | ||
{% icon icon="image" outlined=True %} | ||
{% else %} | ||
{% icon icon="description" outlined=True %} | ||
{% endif %} | ||
<p class="p"> | ||
{{ name }} | ||
{% if extension and size %} | ||
({{extension}}, {{size|readable_size}}) | ||
{% elif extension %} | ||
({{extension}}) | ||
{% elif size %} | ||
({{size|readable_size}}) | ||
{% endif %} | ||
</p> | ||
{% if allow_delete %} | ||
{% dropdown icon="more_horiz" %} | ||
<div class="dropdown__item"> | ||
{% url 'inbox:start' as inbox_url %} | ||
{% with inbox_url|addstr:"?file="|addstr:uuid as share_url %} | ||
{% button icon="send" text=_("Deel") href=share_url icon_outlined=True transparent=True %} | ||
{% endwith %} | ||
</div> | ||
{% if show_download %} | ||
<div class="dropdown__item"> | ||
{% button icon="file_download" text=_("Download") href=url icon_outlined=True transparent=True %} | ||
</div> | ||
<div class="file__container {% if recently_added %}file__container--recent{% endif %}"> | ||
<div class="file__file"> | ||
<p class="file__symbol"> | ||
{% if is_image %} | ||
{% icon icon="image" outlined=True %} | ||
{% else %} | ||
{% icon icon="insert_drive_file" outlined=True %} | ||
{% endif %} | ||
</p> | ||
|
||
<p class="p file__data"> | ||
{% if recently_added %} | ||
<span class="file__file--recent">{% icon icon="fiber_manual_record" outlined=False extra_classes="file__file--recent" %}{% trans "Nieuw" %}</span> | ||
{% endif %} | ||
{{ name }} | ||
{% if extension and size %} | ||
({{extension}}, {{size|readable_size}}) | ||
{% elif extension %} | ||
({{extension}}) | ||
{% elif size %} | ||
({{size|readable_size}}) | ||
{% endif %} | ||
<span class="file__date">{{ created|date:'d.m.Y' }}</span> | ||
</p> | ||
{% if allow_delete %} | ||
{% dropdown icon="more_horiz" %} | ||
<div class="dropdown__item"> | ||
{% url 'inbox:start' as inbox_url %} | ||
{% with inbox_url|addstr:"?file="|addstr:uuid as share_url %} | ||
{% button icon="send" text=_("Deel") href=share_url icon_outlined=True transparent=True %} | ||
{% endwith %} | ||
</div> | ||
{% if show_download %} | ||
<div class="dropdown__item"> | ||
{% button icon="file_download" text=_("Download") href=url icon_outlined=True transparent=True %} | ||
</div> | ||
{% endif %} | ||
<div class="dropdown__item"> | ||
{% url 'profile:documents_delete' uuid=uuid as delete_url %} | ||
{% render_form form=None form_action=delete_url method="POST" spaceless=True id="deactivate-form" extra_classes="confirm" data_confirm_title=_("Weet je het zeker dat je dit bestand wilt verwijderen?") data_confirm_cancel=_("Nee") data_confirm_default=_("Ja") %} | ||
{% csrf_token %} | ||
{% button icon="delete" text=_("Verwijderen") transparent=True %} | ||
{% endrender_form %} | ||
</div> | ||
{% enddropdown %} | ||
{% elif show_download %} | ||
{% trans "Download" as download %} | ||
{% link href=url text=download secondary=True download=True icon="file_download" icon_position="before" %} | ||
{% endif %} | ||
<div class="dropdown__item"> | ||
{% url 'profile:documents_delete' uuid=uuid as delete_url %} | ||
{% render_form form=None form_action=delete_url method="POST" spaceless=True id="deactivate-form" extra_classes="confirm" data_confirm_title=_("Weet je het zeker dat je dit bestand wilt verwijderen?") data_confirm_cancel=_("Nee") data_confirm_default=_("Ja") %} | ||
{% csrf_token %} | ||
{% button icon="delete" text=_("Verwijderen") transparent=True %} | ||
{% endrender_form %} | ||
</div> | ||
{% enddropdown %} | ||
{% elif show_download %} | ||
{% trans "Download" as download %} | ||
{% link href=url text=download secondary=True download=True icon="file_download" icon_position="before" %} | ||
{% endif %} | ||
{% if description %}<p class="p p--small">{{ description }}</p>{% endif %} | ||
</div> | ||
</div> | ||
{% if description %}<p class="p p--small">{{ description }}</p>{% endif %} | ||
</aside> | ||
|
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,3 @@ | ||
#documents { | ||
justify-content: left; | ||
} |
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
Oops, something went wrong.