mirror of
https://github.com/minetest/contentdb.git
synced 2024-12-24 23:12:25 +01:00
50 lines
1.6 KiB
HTML
50 lines
1.6 KiB
HTML
|
{% 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' %}
|
||
|
<i class="fas fa-heart mr-1 text-danger"></i>
|
||
|
{% 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 %}
|