2023-08-14 22:48:50 +02:00
|
|
|
{% extends "base.html" %}
|
|
|
|
|
|
|
|
{% block title %}
|
|
|
|
{{ _("Add %(package_title)s to a collection", package_title=package.title)}}
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
<a href="{{ url_for('collections.create_edit', package=package.get_id()) }}" class="btn btn-primary float-right">
|
|
|
|
{{ _("Create Collection") }}
|
|
|
|
</a>
|
|
|
|
<h1>{{ self.title() }}</h1>
|
|
|
|
|
|
|
|
{% from "macros/forms.html" import render_field, render_submit_field, render_checkbox_field %}
|
|
|
|
<div class="list-group my-4">
|
|
|
|
{% for collection in collections %}
|
|
|
|
{% set active = package in collection.packages %}
|
|
|
|
<form method="POST" action="">
|
|
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
|
|
|
|
<input type="hidden" name="collection" value="{{ collection.id }}" />
|
|
|
|
<button type="submit"
|
|
|
|
class="list-group-item list-group-item-action {% if active %}active{% endif %}">
|
|
|
|
{% if active %}
|
|
|
|
<i class="fas fa-check mr-3 text-success"></i>
|
|
|
|
{% else %}
|
|
|
|
<i class="fas fa-square mr-3 text-muted"></i>
|
|
|
|
{% endif -%}
|
|
|
|
{% if collection.author != current_user %}{{ collection.author.display_name }}: {% endif -%}
|
|
|
|
{% if collection.name == 'favorites' %}
|
2023-08-19 01:46:27 +02:00
|
|
|
<i class="fas fa-star mr-1 text-info"></i>
|
2023-08-14 22:48:50 +02:00
|
|
|
{% endif %}
|
|
|
|
{% if collection.private %}
|
|
|
|
<i class="fas fa-lock mr-1" style="color:#ffac33;"></i>
|
|
|
|
{% endif %}
|
|
|
|
{{ collection.title }}
|
|
|
|
</button>
|
|
|
|
</form>
|
|
|
|
{% else %}
|
|
|
|
<div class="list-group-item text-muted">
|
|
|
|
<i>{{ _("You don't have any collections") }}</i>
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
<a href="{{ package.get_url('packages.view') }}" class="btn btn-secondary">
|
|
|
|
{{ _("Done") }}
|
|
|
|
</a>
|
|
|
|
</p>
|
|
|
|
{% endblock %}
|