Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Library: improve the "view" direct link #2863

Merged
merged 2 commits into from
Jan 23, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions views/library-direct-media-details.twig
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,27 @@
{% if media.thumbnail %}<img src="{{ media.thumbnail }}" class="card-img-top" alt="{{ media.name }}">{% endif %}
<div class="card-body">
<h5 class="card-title">{% trans "Name" %} : {{ media.name }}</h5>
<p class="card-text">{% trans "Tags" %} : {{ media.tags }}</p>
<p class="card-text">{% trans "Tags" %} : {{ media.getTagString() }}</p>
<p class="card-text">{% trans "Type" %} : {{ media.mediaType }}</p>
{% if media.orientation %}<p class="card-text">{% trans "Orientation" %} : {{ media.orientation }}</p>{% endif %}
<p class="card-text">{% trans "File Size" %} : {{ media.fileSizeFormatted }}</p>
<p class="card-text">{% trans "File Size" %} : {{ media.getUnmatchedProperty("fileSizeFormatted") }}</p>
<p class="card-text">{% trans "Date Created" %} : {{ media.createdDt }}</p>
<p class="card-text">{% trans "Date Modified" %} : {{ media.modifiedDt }}</p>
<a href="{{ url_for("library.view")}}" class="btn btn-primary">{% trans "Go back to Library page" %}</a>
<hr>
{% if media.mediaType == 'image' %}
<img src="{{ url_for("library.download", {id: media.mediaId}) }}" class="img-fluid" alt="{{ media.fileName }}">
{% elseif media.mediaType == 'video' %}
<video class="w-100" controls autoplay muted>
<source src="{{ url_for("library.download", {id: media.mediaId}) }}">
Your browser does not support the video tag.
</video>
{% elseif media.mediaType == 'audio' %}
<audio class="w-100" controls>
<source src="{{ url_for("library.download", {id: media.mediaId}) }}">
Your browser does not support the audio tag.
</audio>
{% endif %}
</div>
</div>
{% endblock %}