Fix quotes in templates

This commit is contained in:
rubenwardy 2023-06-18 22:00:24 +01:00
parent 8585357942
commit e8b14709e6
20 changed files with 54 additions and 54 deletions

@ -36,7 +36,7 @@
{% set cover_image = package.get_cover_image_url() %}
{% set tags = package.tags | sort(attribute="views", reverse=True) %}
<div class="carousel-item {% if loop.index == 1 %}active{% endif %}">
<a href="{{ package.get_url("packages.view") }}">
<a href="{{ package.get_url('packages.view') }}">
<div class="embed-responsive embed-responsive-16by9">
<img class="embed-responsive-item" src="{{ cover_image }}"
alt="{{ _('%(title)s by %(author)s', title=package.title, author=package.author.display_name) }}">

@ -1,5 +1,5 @@
{% macro render_pkgtile(package, show_author) -%}
<li class="packagetile flex-fill"><a href="{{ package.get_url("packages.view") }}"
<li class="packagetile flex-fill"><a href="{{ package.get_url('packages.view') }}"
style="background-image: url({{ package.get_thumb_or_placeholder(2) }});">
<div class="packagegridscrub"></div>
<div class="packagegridinfo">

@ -89,7 +89,7 @@
{{ _("created %(date)s", date=rel.releaseDate | date) }}.
</small>
{% if (package.check_perm(current_user, "MAKE_RELEASE") or rel.check_perm(current_user, "APPROVE_RELEASE")) and rel.task_id %}
<a href="{{ url_for('tasks.check', id=rel.task_id, r=package.get_url("packages.view")) }}">
<a href="{{ url_for('tasks.check', id=rel.task_id, r=package.get_url('packages.view')) }}">
{{ _("Importing...") }}
</a>
{% elif not rel.approved %}

@ -58,7 +58,7 @@
<div class="card-body markdown">
{% if current_user == review.author %}
<a class="btn btn-primary btn-sm ml-1 float-right"
href="{{ review.package.get_url("packages.review") }}">
href="{{ review.package.get_url('packages.review') }}">
<i class="fas fa-pen"></i>
</a>
{% endif %}
@ -71,7 +71,7 @@
<div class="btn-toolbar mt-2 mb-0">
{% if show_package_link %}
<a class="btn btn-primary mr-1" href="{{ review.package.get_url("packages.view") }}">
<a class="btn btn-primary mr-1" href="{{ review.package.get_url('packages.view') }}">
{{ _("%(title)s by %(author)s",
title="<b>" | safe + review.package.title + "</b>" | safe,
author=review.package.author.display_name) }}
@ -105,7 +105,7 @@
<div class="card-header">
{{ _("Review") }}
</div>
<form method="post" action="{{ package.get_url("packages.review") }}" class="card-body">
<form method="post" action="{{ package.get_url('packages.review') }}" class="card-body">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
<p>
{{ _("Do you recommend this %(type)s?", type=package.type.text | lower) }}
@ -148,7 +148,7 @@
<div class="card-header">
{{ _("Review") }}
</div>
<form method="post" action="{{ package.get_url("packages.review") }}" class="card-body">
<form method="post" action="{{ package.get_url('packages.review') }}" class="card-body">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
<p>
{{ _("Do you recommend this %(type)s?", type=package.type.text | lower) }}

@ -4,7 +4,7 @@
{% set config = package.update_config %}
<li class="list-group-item">
<div class="row">
<a class="col-sm-auto text-muted" style="min-width: 200px;" href="{{ package.get_url("packages.view") }}">
<a class="col-sm-auto text-muted" style="min-width: 200px;" href="{{ package.get_url('packages.view') }}">
<img
class="img-fluid"
style="max-height: 22px; max-width: 22px;"
@ -43,7 +43,7 @@
</a>
{% if package.check_perm(current_user, "MAKE_RELEASE") %}
<a class="btn btn-sm btn-secondary" href="{{ package.get_url("packages.update_config") }}">
<a class="btn btn-sm btn-secondary" href="{{ package.get_url('packages.update_config') }}">
<i class="fas fa-cog mr-1"></i>
{{ _("Update settings") }}
</a>

@ -5,11 +5,11 @@
{% endblock %}
{% block link %}
<a href="{{ package.get_url("packages.view") }}">{{ package.title }}</a>
<a href="{{ package.get_url('packages.view') }}">{{ package.title }}</a>
{% endblock %}
{% block content %}
<a class="btn btn-secondary" href="{{ package.get_url("packages.alias_list") }}">
<a class="btn btn-secondary" href="{{ package.get_url('packages.alias_list') }}">
{{ _("Back to Aliases") }}
</a>

@ -5,11 +5,11 @@
{% endblock %}
{% block link %}
<a href="{{ package.get_url("packages.view") }}">{{ package.title }}</a>
<a href="{{ package.get_url('packages.view') }}">{{ package.title }}</a>
{% endblock %}
{% block content %}
<a class="btn btn-primary float-right" href="{{ package.get_url("packages.alias_create_edit") }}">
<a class="btn btn-primary float-right" href="{{ package.get_url('packages.alias_create_edit') }}">
{{ _("Create") }}
</a>
<h1>{{ _("Aliases for %(title)s by %(author)s", title=self.link(), author=package.author.display_name) }}</h1>

@ -6,7 +6,7 @@
<div class="row">
<div class="col-md-3 mb-4">
<div class="list-group">
<a class="list-group-item list-group-item-action" href="{{ package.get_url("packages.view") }}">
<a class="list-group-item list-group-item-action" href="{{ package.get_url('packages.view') }}">
<span class="row m-0 p-0">
<span class="col-auto m-0 p-0">
<img class="img-fluid user-photo img-thumbnail img-thumbnail-1"

@ -9,7 +9,7 @@
{% if package.update_config %}
<p class="alert alert-secondary mb-4">
<a class="float-right btn btn-sm btn-secondary" href="{{ package.get_url("packages.update_config") }}">{{ _("Settings") }}</a>
<a class="float-right btn btn-sm btn-secondary" href="{{ package.get_url('packages.update_config') }}">{{ _("Settings") }}</a>
{% if package.update_config.make_release %}
{{ _("You have automatic releases enabled.") }}
{% else %}
@ -20,12 +20,12 @@
{% else %}
<p class="alert alert-info mb-4">
{% if package.repo %}
<a class="float-right btn btn-sm btn-info" href="{{ package.get_url("packages.setup_releases") }}">{{ _("Set up") }}</a>
<a class="float-right btn btn-sm btn-info" href="{{ package.get_url('packages.setup_releases') }}">{{ _("Set up") }}</a>
<i class="fas fa-info mr-2"></i>
{{ _("You can create releases automatically when you push commits or tags to your repository.") }}
{% else %}
<a class="float-right btn btn-sm btn-info" href="{{ package.get_url("packages.create_edit") }}">{{ _("Add Git repo") }}</a>
<a class="float-right btn btn-sm btn-info" href="{{ package.get_url('packages.create_edit') }}">{{ _("Add Git repo") }}</a>
<i class="fas fa-info mr-2"></i>
{{ _("Using Git would allow you to create releases automatically when you push code or tags.") }}

@ -5,7 +5,7 @@
{% endblock %}
{% block content %}
<a class="btn btn-secondary float-right" href="{{ package.get_url("packages.view") }}">
<a class="btn btn-secondary float-right" href="{{ package.get_url('packages.view') }}">
{{ _("Later") }}
</a>
<h1>{{ self.title() }}</h1>
@ -30,13 +30,13 @@
<div class="col-md-6 mt-5">
<h3 class="mt-0">{{ _("Automatically (Recommended)") }}</h3>
<p>
<a class="btn btn-primary" href="{{ package.get_url("packages.update_config", trigger="commit") }}">
<a class="btn btn-primary" href="{{ package.get_url('packages.update_config', trigger='commit') }}">
{{ _("Rolling Release") }}
</a>
<a class="btn btn-primary ml-2" href="{{ package.get_url("packages.update_config", trigger="tag") }}">
<a class="btn btn-primary ml-2" href="{{ package.get_url('packages.update_config', trigger='tag') }}">
{{ _("On Git Tag") }}
</a>
{# <a class="btn btn-secondary ml-2" href="{{ package.get_url("packages.update_config") }}">#}
{# <a class="btn btn-secondary ml-2" href="{{ package.get_url('packages.update_config') }}">#}
{# {{ _("Advanced") }}#}
{# </a>#}
</p>
@ -45,10 +45,10 @@
<div class="col-md-6 mt-5">
<h3 class="mt-0">{{ _("Manually") }}</h3>
<p>
<a class="btn btn-secondary" href="{{ package.get_url("packages.update_config", action="notification") }}">
<a class="btn btn-secondary" href="{{ package.get_url('packages.update_config', action='notification') }}">
{{ _("With reminders") }}
</a>
<a class="btn btn-secondary ml-2" href="{{ package.get_url("packages.create_release") }}">
<a class="btn btn-secondary ml-2" href="{{ package.get_url('packages.create_release') }}">
{{ _("No reminders") }}
</a>
</p>
@ -65,13 +65,13 @@
</p>
<p class="mt-5">
<a class="btn btn-primary" href="{{ package.get_url("packages.create_edit") }}">
<a class="btn btn-primary" href="{{ package.get_url('packages.create_edit') }}">
{{ _("Add Git repo") }}
</a>
<a class="btn btn-secondary ml-2" href="{{ package.get_url("packages.create_release") }}">
<a class="btn btn-secondary ml-2" href="{{ package.get_url('packages.create_release') }}">
{{ _("Create releases manually") }}
</a>
<a class="btn btn-secondary ml-2" href="{{ package.get_url("packages.view") }}">
<a class="btn btn-secondary ml-2" href="{{ package.get_url('packages.view') }}">
{{ _("Later") }}
</a>
</p>

@ -8,23 +8,23 @@
{% if package.check_perm(current_user, "MAKE_RELEASE") %}
<p class="float-right">
{% if package.update_config %}
<a class="btn btn-secondary" href="{{ package.get_url("packages.update_config") }}">
<a class="btn btn-secondary" href="{{ package.get_url('packages.update_config') }}">
<i class="fas fa-cog mr-1"></i>
{{ _("Update settings") }}
</a>
{% elif package.repo %}
<a class="btn btn-secondary" href="{{ package.get_url("packages.setup_releases") }}">
<a class="btn btn-secondary" href="{{ package.get_url('packages.setup_releases') }}">
<i class="fas fa-hat-wizard mr-1"></i>
{{ _("Set up automatic releases") }}
</a>
{% endif %}
<a class="btn btn-secondary ml-1" href="{{ package.get_url("packages.bulk_change_release") }}">
<a class="btn btn-secondary ml-1" href="{{ package.get_url('packages.bulk_change_release') }}">
<i class="fas fa-wrench mr-1"></i>
{{ _("Bulk update") }}
</a>
<a class="btn btn-primary ml-1" href="{{ package.get_url("packages.create_release") }}">
<a class="btn btn-primary ml-1" href="{{ package.get_url('packages.create_release') }}">
<i class="fas fa-plus mr-1"></i>
{{ _("Create") }}
</a>

@ -31,7 +31,7 @@ Remove {{ package.title }}
</small>
</div>
<a class="btn btn-secondary float-right" href="{{ package.get_url("packages.view") }}">{{ _("Cancel") }}</a>
<a class="btn btn-secondary float-right" href="{{ package.get_url('packages.view') }}">{{ _("Cancel") }}</a>
<input type="submit" name="delete" value="{{ _('Remove') }}" class="btn btn-danger mr-2" />

@ -5,7 +5,7 @@
{% endblock %}
{% block link %}
<a href="{{ package.get_url("packages.view") }}">{{ package.title }}</a>
<a href="{{ package.get_url('packages.view') }}">{{ package.title }}</a>
{% endblock %}
{% block content %}

@ -5,7 +5,7 @@
{% endblock %}
{% block link %}
<a href="{{ package.get_url("packages.view") }}">{{ package.title }}</a>
<a href="{{ package.get_url('packages.view') }}">{{ package.title }}</a>
{% endblock %}

@ -5,7 +5,7 @@
{% endblock %}
{% block content %}
<h1><a href="{{ package.get_url("packages.view") }}">{{ package.title }}</a></h1>
<h1><a href="{{ package.get_url('packages.view') }}">{{ package.title }}</a></h1>
<h2>{{ self.title() }}</h2>
{% if packages_modnames %}

@ -178,7 +178,7 @@
<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) }}" title="{{ _("Author") }}">
<a class="btn" href="{{ url_for('users.profile', username=package.author.username) }}" title="{{ _('Author') }}">
<img src="{{ package.author.get_profile_pic_url() }}" style="max-height: 1em; filter: none">
<span class="count">
{{ package.author.display_name }}
@ -191,11 +191,11 @@
<span class="count">{{ package.downloads }}</span>
</a>
{% endif %}
<a class="btn" href="{{ url_for('threads.list_all', pid=package.id) }}" title="{{ _("Threads") }}">
<a class="btn" href="{{ url_for('threads.list_all', pid=package.id) }}" title="{{ _('Threads') }}">
<i class="fas fa-comment-alt"></i>
<span class="count">{{ threads | length }}</span>
</a>
<a class="btn" href="#reviews" title="{{ _("Reviews") }}">
<a class="btn" href="#reviews" title="{{ _('Reviews') }}">
<i class="fas fa-star-half-alt"></i>
<span class="count">
+{{ package.reviews | selectattr("rating", "equalto", 5) | list | length }}
@ -303,7 +303,7 @@
{% if current_user.is_authenticated %}
{% if has_review %}
<p>
<a class="btn btn-primary" href="{{ package.get_url("packages.review") }}">
<a class="btn btn-primary" href="{{ package.get_url('packages.review') }}">
{{ _("Edit Review") }}
</a>
</p>
@ -366,7 +366,7 @@
<i class="fas fa-plus mr-1"></i>
{{ _("Release") }}
</a>
<a class="btn btn-warning" href="{{ package.get_url("packages.update_config") }}">
<a class="btn btn-warning" href="{{ package.get_url('packages.update_config') }}">
<i class="fas fa-cog mr-1"></i>
{{ _("Update settings") }}
</a>
@ -404,7 +404,7 @@
{% for dep in package.get_sorted_hard_dependencies() %}
{%- if dep.package %}
<a class="badge badge-primary"
href="{{ dep.package.get_url("packages.view") }}">
href="{{ dep.package.get_url('packages.view') }}">
{{ _("%(title)s by %(display_name)s",
title=dep.package.title, display_name=dep.package.author.display_name) }}
</a>
@ -428,7 +428,7 @@
{% for dep in optional_deps %}
{%- if dep.package %}
<a class="badge badge-secondary"
href="{{ dep.package.get_url("packages.view") }}">
href="{{ dep.package.get_url('packages.view') }}">
{{ _("%(title)s by %(display_name)s",
title=dep.package.title, display_name=dep.package.author.display_name) }}
{% elif dep.meta_package %}
@ -570,7 +570,7 @@
{% endfor %}
{% if current_user in package.maintainers and current_user != package.author %}
<form class="mt-2" method="post" action="{{ package.get_url("packages.remove_self_maintainers") }}">
<form class="mt-2" method="post" action="{{ package.get_url('packages.remove_self_maintainers') }}">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
<input class="btn btn-sm btn-link p-0" type="submit" value="{{ _('Remove myself') }}" />
</form>
@ -587,7 +587,7 @@
<h3>
{% if package.check_perm(current_user, "MAKE_RELEASE") %}
<a class="btn btn-primary btn-sm float-right" href="{{ package.get_url("packages.create_release") }}"><i class="fas fa-plus"></i></a>
<a class="btn btn-primary btn-sm float-right" href="{{ package.get_url('packages.create_release') }}"><i class="fas fa-plus"></i></a>
{% endif %}
{{ _("Releases") }}
</h3>
@ -598,7 +598,7 @@
{% else %}
{{ render_releases_download(releases, package, current_user) }}
{% endif %}
<a class="list-group-item list-group-item-action text-center py-1 text-muted" href="{{ package.get_url("packages.list_releases") }}">
<a class="list-group-item list-group-item-action text-center py-1 text-muted" href="{{ package.get_url('packages.list_releases') }}">
{{ _("More") }}
</a>
</div>

@ -64,7 +64,7 @@
{% if current_user == thread.author and thread.review %}
<a class="btn btn-primary ml-1 float-right mr-2"
href="{{ thread.review.package.get_url("packages.review") }}">
href="{{ thread.review.package.get_url('packages.review') }}">
<i class="fas fa-pen"></i>
{{ _("Edit Review") }}
</a>

@ -46,7 +46,7 @@
<h3 class="card-header">{{ _("Packages") }}</h3>
<div class="list-group list-group-flush">
{% for p in packages %}
<a href="{{ p.get_url("packages.view") }}" class="list-group-item list-group-item-action">
<a href="{{ p.get_url('packages.view') }}" class="list-group-item list-group-item-action">
<span class="float-right" title="Created {{ p.created_at | datetime }}">
<small>
{{ p.created_at | timedelta }} ago
@ -81,7 +81,7 @@
{% endif %}
<a href="{{ r.get_edit_url() }}">{{ r.title }}</a>
on
<a href="{{ r.package.get_url("packages.view") }}">
<a href="{{ r.package.get_url('packages.view') }}">
{{ _("%(title)s by %(display_name)s",
title=r.package.title, display_name=r.package.author.display_name) }}
</a>
@ -107,7 +107,7 @@
<h3 class="card-header">{{ _("License Needed") }}</h3>
<div class="list-group list-group-flush">
{% for p in license_needed %}
<a href="{{ p.get_url("packages.view") }}" class="list-group-item list-group-item-action">
<a href="{{ p.get_url('packages.view') }}" class="list-group-item list-group-item-action">
<span class="float-right" title="Created {{ p.created_at | datetime }}">
<small>
{{ p.created_at | timedelta }} ago
@ -164,7 +164,7 @@
<h3 class="card-header">WIP Packages</h3>
<div class="list-group list-group-flush" style="max-height: 300px; overflow: hidden auto;">
{% for p in wip_packages %}
<a href="{{ p.get_url("packages.view") }}" class="list-group-item list-group-item-action">
<a href="{{ p.get_url('packages.view') }}" class="list-group-item list-group-item-action">
<span class="float-right" title="Created {{ p.created_at | datetime }}">
<small>
{{ p.created_at | timedelta }} ago

@ -42,7 +42,7 @@
{% for package in packages %}
<tr>
<td>
<a href="{{ package.get_url("packages.view") }}">
<a href="{{ package.get_url('packages.view') }}">
{{ package.title }}
</a>
@ -50,7 +50,7 @@
</td>
<td class="text-center">
{% if package.check_perm(current_user, "EDIT_PACKAGE") %}
<a class="btn btn-link btn-sm py-0" href="{{ package.get_url("packages.create_edit") }}">
<a class="btn btn-link btn-sm py-0" href="{{ package.get_url('packages.create_edit') }}">
<i class="fas fa-pen"></i>
</a>
{% endif %}

@ -18,7 +18,7 @@
<h2>{{ _("Unapproved Packages Needing Action") }}</h2>
<div class="list-group mt-3 mb-5">
{% for package in unapproved_packages %}
<a class="list-group-item list-group-item-action" href="{{ package.get_url("packages.view") }}">
<a class="list-group-item list-group-item-action" href="{{ package.get_url('packages.view') }}">
<div class="row">
<div class="col-sm-2 text-muted">
<img
@ -50,7 +50,7 @@
{% if outdated_packages %}
<form class="float-right mr-2" method="post" action="{{ url_for('todo.apply_all_updates', username=user.username) }}">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
<input class="btn btn-primary" type="submit" value="{{ _("Create All Releases") }}" />
<input class="btn btn-primary" type="submit" value="{{ _('Create All Releases') }}" />
</form>
{% endif %}
<h2>{{ _("Potentially Outdated Packages") }}</h2>
@ -183,7 +183,7 @@
</p>
<div class="list-group mt-3 mb-5">
{% for package in needs_tags %}
<a class="list-group-item list-group-item-action" href="{{ package.get_url("packages.view") }}">
<a class="list-group-item list-group-item-action" href="{{ package.get_url('packages.view') }}">
<img
class="img-fluid"
style="max-height: 22px; max-width: 22px;"