contentdb/app/templates/todo/user.html

118 lines
3.9 KiB
HTML
Raw Normal View History

2021-01-29 20:38:14 +01:00
{% extends "todo/todo_base.html" %}
{% block title %}
{{ _("%(username)s's to do list", username=user.display_name) }}
{% endblock %}
{% block content %}
{% if user.notification_preferences is none %}
<h2>{{ _("Misc To do") }}</h2>
<div class="list-group mt-3 mb-5">
<a class="list-group-item list-group-item-action"
href="{{ url_for('users.email_notifications', username=user.username) }}">
{{ _("Enable email notifications") }}
</a>
</div>
{% endif %}
2021-01-29 20:38:14 +01:00
<h2>{{ _("Unapproved Packages Needing Action") }}</h2>
<div class="list-group mt-3 mb-5">
2021-01-29 20:38:14 +01:00
{% for package in unapproved_packages %}
2021-07-24 05:30:14 +02:00
<a class="list-group-item list-group-item-action" href="{{ package.getURL("packages.view") }}">
2021-01-29 20:38:14 +01:00
<div class="row">
<div class="col-sm-2 text-muted">
<img
class="img-fluid"
style="max-height: 22px; max-width: 22px;"
src="{{ package.getThumbnailOrPlaceholder() }}" />
2021-01-29 20:38:14 +01:00
<span class="pl-2">
{{ package.title }}
</span>
</div>
2021-01-29 20:38:14 +01:00
<div class="col-sm">
2022-01-08 00:27:00 +01:00
{{ _("State") }}: {{ package.state.value }}
2021-01-29 20:38:14 +01:00
</div>
</div>
</a>
{% else %}
<p class="text-muted">{{ _("Nothing to do :)") }}</p>
2021-01-29 20:38:14 +01:00
{% endfor %}
</div>
2022-01-14 19:25:28 +01:00
<a class="btn btn-secondary float-right" href="/help/update_config/">
{{ _("Help") }}
</a>
2022-01-08 00:27:00 +01:00
<a class="btn btn-secondary float-right mr-2" href="{{ url_for('packages.bulk_update_config', username=user.username) }}">
{{ _("See all Update Settings") }}
</a>
{% 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") }}" />
</form>
{% endif %}
<h2>{{ _("Potentially Outdated Packages") }}</h2>
<p class="alert alert-info">
{{ _("New: Git Update Detection has been set up on all packages to send notifications.") }}<br />
{{ _("Consider changing the update settings to create releases automatically instead.") }}
</p>
<p>
{{ _("Instead of marking packages as outdated, you can automatically create releases when New Commits or New Tags are pushed to Git by clicking 'Update Settings'.") }}
{% if outdated_packages %}
{{ _("To remove a package from below, create a release or change the update settings.") }}
{% endif %}
</p>
2021-01-29 20:38:14 +01:00
{% from "macros/todo.html" import render_outdated_packages %}
{{ render_outdated_packages(outdated_packages, current_user) }}
2021-01-29 20:38:14 +01:00
<div class="mt-5"></div>
2022-01-14 19:25:28 +01:00
<a class="btn btn-secondary float-right" href="{{ url_for('todo.tags', author=user.username) }}">
{{_ ("See All") }}</a>
<h2>{{ _("Packages Without Tags") }}</h2>
<p>
2022-01-08 00:27:00 +01:00
{{ _("Labelling your packages with tags helps users find them.") }}
</p>
<div class="list-group mt-3 mb-5">
{% for package in needs_tags %}
2021-07-24 05:30:14 +02:00
<a class="list-group-item list-group-item-action" href="{{ package.getURL("packages.view") }}">
<img
class="img-fluid"
style="max-height: 22px; max-width: 22px;"
src="{{ package.getThumbnailOrPlaceholder() }}" />
<span class="pl-2">
{{ package.title }}
</span>
</a>
{% else %}
<p class="text-muted">{{ _("Nothing to do :)") }}</p>
{% endfor %}
</div>
2021-01-29 20:38:14 +01:00
<h2 class="mt-5">{{ _("Unadded Topics") }}</h2>
{% if topics_to_add %}
<p>
2022-01-08 00:27:00 +01:00
{{ _("List of your forum topics which do not have a matching package.") }}
{{ _("Topics with a strikethrough have been marked as discarded.") }}
2021-01-29 20:38:14 +01:00
</p>
<div style="max-height: 20em; overflow-y: auto">
{% from "macros/topics.html" import render_topics_table %}
{{ render_topics_table(topics_to_add, show_author=False, show_discard=True, current_user=current_user) }}
</div>
{% else %}
2022-01-08 00:27:00 +01:00
<p class="card-body">{{ _("Congrats! You don't have any topics which aren't on CDB.") }}</p>
2021-01-29 20:38:14 +01:00
{% endif %}
{% endblock %}
{% block scriptextra %}
<script>
const csrf_token = "{{ csrf_token() }}";
</script>
<script src="/static/topic_discard.js"></script>
{% endblock %}