2018-12-21 17:06:52 +01:00
{% set query=package.name %}
2018-03-19 19:08:41 +01:00
{% extends "base.html" %}
{% block title %}
2018-03-20 03:17:33 +01:00
{{ package.title }}
2018-03-19 19:08:41 +01:00
{% endblock %}
2020-04-23 19:25:38 +02:00
{% block headextra %}
< meta name = "og:title" content = "{{ package.title }}" / >
< meta name = "og:description" content = "{{ package.short_desc }}" / >
< meta name = "description" content = "{{ package.short_desc }}" / >
2020-04-24 00:49:46 +02:00
< meta name = "og:url" content = "{{ package.getDetailsURL(absolute=True) }}" / >
2020-04-23 19:25:38 +02:00
{% if package.getMainScreenshotURL() %}
2020-04-24 00:49:46 +02:00
< meta name = "og:image" content = "{{ package.getMainScreenshotURL(absolute=True) }}" / >
2020-04-23 19:25:38 +02:00
{% endif %}
{% endblock %}
2018-12-21 16:58:43 +01:00
{% block container %}
2020-01-21 23:40:51 +01:00
{% if not package.license.is_foss and not package.media_license.is_foss and package.type != package.type.TXP %}
{% set package_warning="Non-free code and media" %}
{% elif not package.license.is_foss and package.type != package.type.TXP %}
{% set package_warning="Non-free code" %}
{% elif not package.media_license.is_foss %}
{% set package_warning="Non-free media" %}
{% endif %}
{% set release = package.getDownloadRelease() %}
2018-12-21 17:36:54 +01:00
< header class = "jumbotron pb-3"
2020-01-21 23:40:51 +01:00
style="background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.7)), url('{{ package.getMainScreenshotURL() }}');
background-size: cover;
background-repeat: no-repeat;
background-position: center;">
2018-12-21 16:58:43 +01:00
< div class = "container" >
2018-12-23 17:28:15 +01:00
< h1 class = "display-3" >
{{ package.title }}
< / h1 >
2018-03-20 03:17:33 +01:00
2018-12-21 16:58:43 +01:00
< p class = "lead" >
2019-01-29 04:00:01 +01:00
{{ package.short_desc }}
2018-12-21 16:58:43 +01:00
< / p >
2018-05-29 22:24:50 +02:00
2020-01-21 23:40:51 +01:00
< p >
{% if package_warning %}
2020-05-29 16:52:30 +02:00
< a class = "badge badge-danger" href = "/help/non_free/" >
2020-01-21 23:40:51 +01:00
< i class = "fas fa-exclamation-circle" style = "margin-right: 0.3em;" > < / i >
{{ package_warning }}
2020-05-29 16:52:30 +02:00
< / a >
2020-01-21 23:40:51 +01:00
{% endif %}
{% for t in package.tags %}
2020-04-07 19:23:06 +02:00
< a class = "badge badge-primary"
href="{{ url_for('packages.list_all', tag=t.name) }}">{{ t.title }}< / a >
2020-01-21 23:40:51 +01:00
{% endfor %}
< / p >
< div class = "info-row row" style = "margin-top: 2rem;" >
< div class = "btn-group-horizontal col" >
< a class = "btn" href = "{{ url_for('users.profile', username=package.author.username) }}" >
< i class = "fas fa-user" > < / i >
< span class = "count" >
{{ package.author.display_name }}
< / span >
< / a >
< a class = "btn" rel = "nofollow" href = "{{ package.getDownloadURL() }}" >
< i class = "fas fa-download" > < / i >
2020-07-09 02:11:50 +02:00
< span class = "count" > {{ package.downloads }}< / span >
2020-01-21 23:40:51 +01:00
< / a >
< a class = "btn" href = "{{ url_for('threads.list_all', pid=package.id) }}" >
< i class = "fas fa-comment-alt" > < / i >
< span class = "count" > {{ threads | length }}< / span >
< / a >
{% if package.website %}
< a class = "btn" href = "{{ package.website }}" >
< i class = "fas fa-globe-europe" > < / i >
< span class = "count" > {{ _("Website") }}< / span >
< / a >
{% endif %}
{% if package.repo %}
< a class = "btn" href = "{{ package.repo }}" >
< i class = "fas fa-code" > < / i >
< span class = "count" > {{ _("Source") }}< / span >
< / a >
{% endif %}
{% if package.forums %}
< a class = "btn" href = "https://forum.minetest.net/viewtopic.php?t={{ package.forums }}" >
< i class = "fas fa-comments" > < / i >
< span class = "count" > {{ _("Forums") }}< / span >
< / a >
{% endif %}
{% if package.issueTracker %}
< a class = "btn" href = "{{ package.issueTracker }}" >
< i class = "fas fa-bug" > < / i >
< span class = "count" > {{ _("Issue Tracker") }}< / span >
< / a >
{% endif %}
2018-12-21 17:36:54 +01:00
< / div >
2020-01-21 23:40:51 +01:00
{% if release and (release.min_rel or release.max_rel) %}
2020-01-22 00:42:41 +01:00
< div class = "btn col-md-auto" >
2020-01-21 23:40:51 +01:00
< img src = "https://www.minetest.net/media/icon.svg" style = "max-height: 1.2em;" >
< span class = "count" >
{% if release.min_rel and release.max_rel %}
{{ _("%(min)s - %(max)s", min=release.min_rel.name, max=release.max_rel.name) }}
{% elif release.min_rel %}
{{ _("%(min)s and above", min=release.min_rel.name) }}
{% elif release.max_rel %}
{{ _("%(max)s and below", max=release.max_rel.name) }}
{% endif %}
< / span >
< / div >
{% endif %}
2018-12-21 17:36:54 +01:00
< div class = "btn-group-horizontal col-md-auto" >
2020-01-21 23:40:51 +01:00
{% if release %}
< a class = "btn btn-download btn_green" rel = "nofollow"
href="{{ package.getDownloadURL() }}">
{{ _("Download") }}
< / a >
{% else %}
< i >
{{ _("No downloads available") }}
< / i >
{% endif %}
2018-12-21 17:36:54 +01:00
< / div >
2018-12-21 16:58:43 +01:00
< / div >
2018-05-21 23:42:02 +02:00
< / div >
2018-12-21 17:36:54 +01:00
< / header >
< main class = "container mt-4" >
2018-12-21 17:55:22 +01:00
{% if not package.approved %}
< div class = "alert alert-warning" >
< span class = "icon_message" > < / span >
{% if package.releases.count() == 0 %}
< h4 class = "alert-heading" > Release Required< / h4 >
{% if package.checkPerm(current_user, "MAKE_RELEASE") %}
< p > You need to create a release before this package can be approved.< / p >
< p >
A release is a single downloadable version of your {{ package.type.value | lower }}.
You need to create releases even if you use a rolling release development cycle,
as Minetest needs them to check for updates.
< / p >
< a class = "btn" href = "{{ package.getCreateReleaseURL() }}" > Create Release< / a >
{% else %}
A release is required before this package can be approved.
{% endif %}
{% elif (package.type == package.type.GAME or package.type == package.type.TXP) and package.screenshots.count() == 0 %}
You need to add at least one screenshot.
2018-12-22 21:13:43 +01:00
{% elif topic_error_lvl == "danger" %}
2018-12-21 17:55:22 +01:00
Please fix the below topic issue(s).
{% elif "Other" in package.license.name or "Other" in package.media_license.name %}
Please wait for the license to be added to CDB.
{% else %}
{% if package.screenshots.count() == 0 %}
< b > You should add at least one screenshot, but this isn't required.< / b > < br / >
{% endif %}
{% if not package.getDownloadRelease() %}
Please wait for the release to be approved.
{% elif package.checkPerm(current_user, "APPROVE_NEW") %}
< form class = "float-right" method = "post" action = "{{ package.getApproveURL() }}" >
< input type = "hidden" name = "csrf_token" value = "{{ csrf_token() }}" / >
< input class = "btn btn-sm btn-warning" type = "submit" value = "Approve" / >
< / form >
You can now approve this package if you're ready.
{% else %}
Please wait for the package to be approved.
{% endif %}
{% endif %}
< div style = "clear: both;" > < / div >
< / div >
{% if topic_error %}
< div class = "alert alert-{{ topic_error_lvl }}" >
< span class = "icon_message" > < / span >
{{ topic_error | safe }}
< div style = "clear: both;" > < / div >
< / div >
{% endif %}
{% if similar_topics %}
< div class = "alert alert-warning" >
Please make sure that this package has the right to
the name '{{ package.name }}'.
See the
< a href = "/policy_and_guidance/" > Inclusion Policy< / a >
for more info.
< / div >
{% endif %}
2018-12-22 21:13:43 +01:00
{% if not review_thread and (package.author == current_user or package.checkPerm(current_user, "APPROVE_NEW")) %}
< div class = "alert alert-info" >
2019-11-16 00:51:42 +01:00
< a class = "float-right btn btn-sm btn-info" href = "{{ url_for('threads.new', pid=package.id, title='Package approval comments') }}" > Open Thread< / a >
2018-12-21 17:55:22 +01:00
2018-12-22 21:13:43 +01:00
Privately ask a question or give feedback
< div style = "clear:both;" > < / div >
< / div >
2018-12-21 17:55:22 +01:00
{% endif %}
{% endif %}
2018-03-20 03:17:33 +01:00
2018-12-21 17:06:52 +01:00
< aside class = "float-right ml-4" style = "width: 18rem;" >
2020-01-21 23:40:51 +01:00
< div class = "card mb-4" >
2018-12-21 16:58:43 +01:00
< div class = "card-header" >
Details
2018-12-21 18:00:16 +01:00
< div class = "btn-group float-right" >
2018-12-21 16:58:43 +01:00
{% if package.checkPerm(current_user, "EDIT_PACKAGE") %}
2020-01-21 23:40:51 +01:00
< a class = "btn btn-primary btn-sm ml-1" href = "{{ package.getEditURL() }}" > < i class = "fas fa-edit" > < / i > < / a >
2018-12-21 18:00:16 +01:00
{% endif %}
2018-12-21 21:59:12 +01:00
{# {% if current_user.is_authenticated %}
2020-01-21 23:40:51 +01:00
< a class = "btn btn-primary btn-sm ml-1" href = "{{ package.getCreateEditRequestURL() }}" > Suggest Changes< / a >
2018-12-21 21:59:12 +01:00
{% endif %} #}
2018-12-25 16:13:30 +01:00
{% if package.checkPerm(current_user, "DELETE_PACKAGE") or package.checkPerm(current_user, "UNAPPROVE_PACKAGE") %}
2020-01-21 23:40:51 +01:00
< a class = "btn btn-danger btn-sm ml-1" href = "{{ package.getRemoveURL() }}" > < i class = "fas fa-trash" > < / i > < / a >
2018-12-21 16:58:43 +01:00
{% endif %}
2018-12-21 18:00:16 +01:00
< / div >
2018-12-21 16:58:43 +01:00
< / div >
2020-05-29 16:52:30 +02:00
2018-12-22 13:36:49 +01:00
{% if package_warning %}
< div class = "card-body" >
2018-12-21 16:58:43 +01:00
< div class = "alert alert-danger" >
2020-05-29 16:52:30 +02:00
< a href = "/help/non_free/" class = "float-right" > Info< / a >
2018-12-21 16:58:43 +01:00
< b > Warning:< / b > {{ package_warning }}
< / div >
2018-12-22 13:36:49 +01:00
< / div >
{% endif %}
< table class = "table" >
2020-01-21 23:40:51 +01:00
< tr >
< td > Type< / td >
< td > {{ package.type.value }}< / td >
< / tr >
2018-12-22 13:36:49 +01:00
< tr >
< td > Name< / td >
< td > {{ package.name }}< / td >
< / tr >
{% if package.provides %}
< tr >
< td > Provides< / td >
< td > {% for meta in package.provides %}
< a class = "badge badge-primary"
2019-11-16 00:51:42 +01:00
href="{{ url_for('metapackages.view', name=meta.name) }}">{{ meta.name }}< / a >
2018-12-22 13:36:49 +01:00
{% endfor %}< / td >
< / tr >
2018-12-21 16:58:43 +01:00
{% endif %}
2018-12-22 13:36:49 +01:00
< tr >
< td > License< / td >
< td >
{% if package.license == package.media_license %}
{{ package.license.name }}
{% elif package.type == package.type.TXP %}
{{ package.media_license.name }}
{% else %}
{{ package.license.name }} for code,< br / >
{{ package.media_license.name }} for media.
{% endif %}
< / td >
< / tr >
< tr >
< td > Added< / td >
< td > {{ package.created_at | datetime }}< / td >
< / tr >
2020-07-08 23:45:24 +02:00
< tr >
< td > Maintainers< / td >
< td >
{% if package.checkPerm(current_user, "EDIT_MAINTAINERS") %}
< a class = "btn btn-primary btn-sm ml-1 float-right" href = "{{ package.getEditMaintainersURL() }}" > < i class = "fas fa-edit" > < / i > < / a >
{% endif %}
{% for user in package.maintainers %}
< a class = "badge badge-primary"
2020-07-09 01:02:56 +02:00
href="{{ url_for('users.profile', username=user.username) }}">
2020-07-08 23:45:24 +02:00
{{ user.display_name }}
< / a >
{% endfor %}
2020-07-09 00:42:30 +02:00
2020-07-09 00:44:13 +02:00
{% if current_user in package.maintainers and current_user != package.author %}
2020-07-09 00:42:30 +02:00
< form class = "mt-2" method = "post" action = "{{ package.getRemoveSelfMaintainerURL() }}" >
< input type = "hidden" name = "csrf_token" value = "{{ csrf_token() }}" / >
< input class = "btn btn-sm btn-link p-0" type = "submit" value = "{{ _(" Remove myself " ) } } " / >
< / form >
{% endif %}
2020-07-08 23:45:24 +02:00
< / td >
< / tr >
2018-12-22 13:36:49 +01:00
< / table >
2018-12-21 16:58:43 +01:00
< / div >
2018-12-21 17:00:18 +01:00
2019-07-02 01:45:04 +02:00
{% if package.author.donate_url %}
< div class = "alert alert-secondary" >
Like {{ package.author.display_name }}'s work?
< a href = "{{ package.author.donate_url }}" rel = "nofollow" > Donate now!< / a >
< / div >
{% endif %}
2018-12-21 17:55:22 +01:00
{% if package.type == package.type.MOD %}
< div class = "card my-4" >
< div class = "card-header" > Dependencies< / div >
< div class = "card-body" >
2020-01-21 23:59:44 +01:00
< div class = "card-subtitle mb-2 text-muted" > {{ _("Required") }}< / div >
{% for dep in package.getSortedHardDependencies() %}
2018-12-21 17:00:18 +01:00
{%- if dep.package %}
2020-01-21 23:59:44 +01:00
< div < / div class = "badge badge-primary"
2018-12-21 17:55:22 +01:00
href="{{ dep.package.getDetailsURL() }}">
{{ dep.package.title }} by {{ dep.package.author.display_name }}
2018-12-21 17:00:18 +01:00
{% elif dep.meta_package %}
2020-01-21 23:59:44 +01:00
< a class = "badge badge-primary"
2019-11-16 00:51:42 +01:00
href="{{ url_for('metapackages.view', name=dep.meta_package.name) }}">
2018-12-21 17:55:22 +01:00
{{ dep.meta_package.name }}
2018-12-21 17:00:18 +01:00
{% else %}
{{ "Excepted package or meta_package in dep!" | throw }}
2018-12-21 17:55:22 +01:00
{% endif %}< / a >
{% else %}
2020-01-21 23:59:44 +01:00
< i > No required dependencies< / i >
2018-12-21 17:55:22 +01:00
{% endfor %}
2020-01-21 23:59:44 +01:00
{% set optional_deps=package.getSortedOptionalDependencies() %}
{% if optional_deps %}
< div class = "card-subtitle my-2 text-muted" > {{ _("Optional") }}< / div >
{% for dep in optional_deps %}
{%- if dep.package %}
< a class = "badge badge-secondary"
href="{{ dep.package.getDetailsURL() }}">
{{ dep.package.title }} by {{ dep.package.author.display_name }}
{% elif dep.meta_package %}
< a class = "badge badge-secondary"
href="{{ url_for('metapackages.view', name=dep.meta_package.name) }}">
{{ dep.meta_package.name }}
{% else %}
{{ "Excepted package or meta_package in dep!" | throw }}
{% endif %}< / a >
{% endfor %}
{% endif %}
2018-12-21 17:55:22 +01:00
< / div >
< / div >
{% endif %}
2018-12-21 17:00:18 +01:00
< div class = "card my-4" >
< div class = "card-header" >
Releases
2020-01-21 23:40:51 +01:00
{% if package.checkPerm(current_user, "MAKE_RELEASE") %}
< div class = "btn-group float-right" >
< a class = "btn btn-primary btn-sm ml-1" href = "{{ package.getBulkReleaseURL() }}" >
< i class = "fas fa-wrench" > < / i >
{{ _("Bulk") }}
< / a >
< a class = "btn btn-primary btn-sm ml-1" href = "{{ package.getCreateReleaseURL() }}" > < i class = "fas fa-plus" > < / i > < / a >
< / div >
{% endif %}
2018-12-21 17:00:18 +01:00
< / div >
< ul class = "list-group list-group-flush" >
{% for rel in releases %}
{% if rel.approved or package.checkPerm(current_user, "MAKE_RELEASE") or package.checkPerm(current_user, "APPROVE_RELEASE") %}
2018-12-22 14:16:45 +01:00
< li class = "list-group-item" >
2018-12-21 17:36:54 +01:00
{% if package.checkPerm(current_user, "MAKE_RELEASE") or package.checkPerm(current_user, "APPROVE_RELEASE") %}
< a class = "btn btn-sm btn-primary float-right" href = "{{ rel.getEditURL() }}" > Edit
{% if not rel.task_id and not rel.approved and package.checkPerm(current_user, "APPROVE_RELEASE") %}
/ Approve
{% endif %}
< / a >
{% endif %}
2018-12-21 17:00:18 +01:00
{% if not rel.approved %}< i > {% endif %}
2019-01-29 03:03:10 +01:00
< a href = "{{ rel.getDownloadURL() }}" rel = "nofollow" > {{ rel.title }}< / a >
< span style = "color:#ddd;" >
{% if rel.min_rel and rel.max_rel %}
[MT {{ rel.min_rel.name }}-{{ rel.max_rel.name }}]
{% elif rel.min_rel %}
[MT {{ rel.min_rel.name }}+]
{% elif rel.max_rel %}
[MT ≤ {{ rel.max_rel.name }}]
{% endif %}
< / span >
< br >
< small style = "color:#999;" >
{% if rel.commit_hash %}
[{{ rel.commit_hash | truncate(5, end='') }}]
{% endif %}
created {{ rel.releaseDate | date }}.
< / small >
2019-01-29 01:43:55 +01:00
{% if (package.checkPerm(current_user, "MAKE_RELEASE") or package.checkPerm(current_user, "APPROVE_RELEASE")) and rel.task_id %}
2019-11-16 00:51:42 +01:00
< a href = "{{ url_for('tasks.check', id=rel.task_id, r=package.getDetailsURL()) }}" > Importing...< / a >
2018-12-21 17:00:18 +01:00
{% elif not rel.approved %}
Waiting for approval.
{% endif %}
{% if not rel.approved %}< / i > {% endif %}
< / li >
{% endif %}
{% else %}
< li class = "list-group-item" > No releases available.< / li >
{% endfor %}
< / ul >
< / div >
2020-01-22 23:10:02 +01:00
< div class = "card my-4" >
2018-12-21 17:00:18 +01:00
< div class = "card-header" >
2020-01-21 23:40:51 +01:00
{% if package.approved and package.checkPerm(current_user, "CREATE_THREAD") %}
< div class = "btn-group float-right" >
< a class = "btn btn-primary btn-sm mx-1" href = "{{ url_for('threads.new', pid=package.id) }}" > < i class = "fas fa-plus" > < / i > < / a >
< / div >
{% endif %}
2018-12-22 13:20:26 +01:00
Threads
2018-12-21 17:00:18 +01:00
< / div >
< ul class = "list-group list-group-flush" >
{% from "macros/threads.html" import render_threadlist %}
{{ render_threadlist(threads, list_group=True) }}
< / ul >
< / div >
2019-01-28 20:41:24 +01:00
{% if package.approved and package.checkPerm(current_user, "CREATE_THREAD") and current_user != package.author and not current_user.rank.atLeast(current_user.rank.EDITOR) %}
< a class = "float-right"
2019-11-16 00:51:42 +01:00
href="{{ url_for('threads.new', pid=package.id) }}">
2019-01-28 20:41:24 +01:00
Report a problem with this listing
< / a >
{% endif %}
2018-12-21 16:58:43 +01:00
< / aside >
2018-03-20 03:17:33 +01:00
2018-12-22 21:13:43 +01:00
{% if not package.approved and (package.author == current_user or package.checkPerm(current_user, "APPROVE_NEW")) %}
{% if review_thread %}
< h2 > {% if review_thread.private %}🔒 {% endif %} {{ review_thread.title }}< / h2 >
{% if review_thread.private %}
< p > < i >
This thread is only visible to the package owner and users of
Editor rank or above.
< / i > < / p >
{% endif %}
{% from "macros/threads.html" import render_thread %}
{{ render_thread(review_thread, current_user) }}
{% endif %}
{% endif %}
2018-12-21 17:36:54 +01:00
< ul class = "screenshot_list mb-4" >
2018-12-21 16:58:43 +01:00
{% for ss in package.screenshots %}
{% if ss.approved or package.checkPerm(current_user, "ADD_SCREENSHOTS") %}
< li >
< a href = "{% if package.checkPerm(current_user, 'ADD_SCREENSHOTS') %}{{ ss.getEditURL() }}{% else %}{{ ss.url }}{% endif %}" >
< img src = "{{ ss.getThumbnailURL() }}" alt = "{{ ss.title }}" / >
< / a >
< / li >
{% endif %}
{% endfor %}
2020-01-21 23:40:51 +01:00
{% if package.checkPerm(current_user, "EDIT_PACKAGE") %}
< li >
< a href = "{{ package.getNewScreenshotURL() }}" >
< div class = "fas fa-plus screenshot-add" > < / div >
< / a >
< / li >
{% endif %}
2018-12-21 16:58:43 +01:00
< / ul >
2018-03-20 19:20:30 +01:00
2018-12-21 16:58:43 +01:00
{{ package.desc | markdown }}
< div style = "clear: both;" > < / div >
{#
{% if current_user.is_authenticated or requests %}
< h3 > Edit Requests< / h3 >
2018-05-11 16:04:17 +02:00
2018-05-21 23:20:28 +02:00
< ul >
2018-12-21 16:58:43 +01:00
{% for r in requests %}
2018-05-27 22:31:11 +02:00
< li >
2018-12-21 16:58:43 +01:00
< a href = "{{ r.getURL() }}" > {{ r.title }}< / a >
by
2019-11-16 00:51:42 +01:00
< a href = "{{ url_for('users.profile', username=r.author.username) }}" > {{ r.author.display_name }}< / a >
2018-05-27 22:31:11 +02:00
< / li >
2018-05-21 23:20:28 +02:00
{% else %}
2018-12-21 16:58:43 +01:00
< li > No edit requests have been made.< / li >
2018-05-21 23:20:28 +02:00
{% endfor %}
< / ul >
2018-12-21 16:58:43 +01:00
{% endif %}
#}
{% if alternatives %}
< h3 > Related< / h3 >
2018-05-21 23:20:28 +02:00
2018-12-21 16:58:43 +01:00
{% from "macros/packagegridtile.html" import render_pkggrid %}
{{ render_pkggrid(alternatives) }}
{% endif %}
2018-05-29 21:51:42 +02:00
2018-12-21 16:58:43 +01:00
{% if similar_topics %}
< h3 > Similar Forum Topics< / h3 >
2018-05-29 21:51:42 +02:00
< ul >
2018-12-21 16:58:43 +01:00
{% for t in similar_topics %}
2018-05-29 21:51:42 +02:00
< li >
2018-12-21 16:58:43 +01:00
[{{ t.type.value }}]
< a href = "https://forum.minetest.net/viewtopic.php?t={{ t.topic_id }}" >
{{ t.title }} by {{ t.author.display_name }}
< / a >
{% if t.wip %}[WIP]{% endif %}
2018-05-29 21:51:42 +02:00
< / li >
{% endfor %}
< / ul >
{% endif %}
2018-12-21 16:58:43 +01:00
< / main >
2018-03-19 19:08:41 +01:00
{% endblock %}