mirror of
https://github.com/partitioncloud/partitioncloud-server.git
synced 2025-01-24 01:36:25 +01:00
79 lines
3.3 KiB
HTML
79 lines
3.3 KiB
HTML
{% extends 'base.html' %}
|
|
|
|
|
|
{% block content %}
|
|
<h2>{% block title %}{{ _('Résultats de la recherche "%(query)s', query=query)}}{% endblock %}</h2>
|
|
{% if partitions|length != 0 %}
|
|
<h3>{{ _("Résultats dans la bibliothèque locale") }}</h3>
|
|
<div id="partitions-grid">
|
|
{% for partition in partitions %}
|
|
<div class="partition-container">
|
|
<a href="/partition/{{ partition['uuid'] }}">
|
|
<div class="partition" id="partition-{{ partition['uuid'] }}">
|
|
<img class="partition-thumbnail" src="/thumbnails/{{ partition['uuid'] }}.jpg" loading="lazy">
|
|
<div class="partition-description">
|
|
<div class="partition-name">{{ partition["name"] }}</div>
|
|
<div class="partition-author">{{ partition["author"] }}</div>
|
|
</div>
|
|
</div>
|
|
</a>
|
|
<div class="partition-buttons">
|
|
{% if partition["has_attachment"] %}
|
|
<a href="/partition/{{ partition['uuid'] }}/attachments"><div class="partition-action">📎</div></a>
|
|
{% endif %}
|
|
</div>
|
|
<form action="/albums/add-partition" class="add-partition-form" method="post">
|
|
<select name="album-uuid">
|
|
{% for album in user.albums %}
|
|
<option value="{{ album['uuid'] }}">{{ album["name"] }}</option>
|
|
{% endfor %}
|
|
{% for groupe in user.get_groupes() %}
|
|
{% for album in groupe.get_albums() %}
|
|
<option value="{{ album['uuid'] }}">{{ groupe.name }}/{{ album["name"] }}</option>
|
|
{% endfor %}
|
|
{% endfor %}
|
|
</select>
|
|
<input type="hidden" value="{{ partition['uuid'] }}" name="partition-uuid">
|
|
<input type="hidden" value="local_file" name="partition-type">
|
|
<input type="submit" value="{{ _('Ajouter à l'album') }}" class="add-to-album">
|
|
</form>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
{% if google_results|length != 0 %}
|
|
<h3>{{ _("Résultats de la recherche en ligne") }}</h3>
|
|
<div id="partitions-grid">
|
|
{% for partition in google_results %}
|
|
<div class="partition-container">
|
|
<a href="/partition/search/{{ partition['uuid'] }}">
|
|
<div class="partition" id="partition-{{ partition['uuid'] }}">
|
|
<img class="partition-thumbnail" src="/thumbnails/search/{{ partition['uuid'] }}.jpg" loading="lazy">
|
|
<div class="partition-description">
|
|
<div class="partition-name">{{ partition["name"] }}</div>
|
|
</div>
|
|
</div>
|
|
</a>
|
|
<form action="/albums/add-partition" class="add-partition-form" method="post">
|
|
<select name="album-uuid">
|
|
{% for album in user.albums %}
|
|
<option value="{{ album['uuid'] }}">{{ album["name"] }}</option>
|
|
{% endfor %}
|
|
{% for groupe in user.get_groupes() %}
|
|
{% for album in groupe.get_albums() %}
|
|
<option value="{{ album['uuid'] }}">{{ groupe.name }}/{{ album["name"] }}</option>
|
|
{% endfor %}
|
|
{% endfor %}
|
|
</select>
|
|
<input type="hidden" value="{{ partition['uuid'] }}" name="partition-uuid">
|
|
<input type="hidden" value="online_search" name="partition-type">
|
|
<input type="submit" value="{{ _('Ajouter à l'album') }}">
|
|
</form>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
{% if google_results|length == 0 and partitions|length == 0 %}
|
|
{{ _("Aucun résultat. Essayez d'augmenter le nombre de recherches en ligne ou d'affiner votre recherche.") }}
|
|
{% endif %}
|
|
{% endblock %} |