2019-02-11 17:18:09 +01:00
|
|
|
{% extends "layout-full.html" %}
|
2017-09-14 14:02:31 +02:00
|
|
|
{% block title %}
|
|
|
|
<title>
|
|
|
|
{{tracker.name}}
|
|
|
|
—
|
|
|
|
{{ cfg("sr.ht", "site-name") }} todo
|
|
|
|
</title>
|
2021-02-16 15:26:40 +01:00
|
|
|
<!-- Tracker ID: {{tracker.id}} -->
|
2017-09-14 14:02:31 +02:00
|
|
|
{% endblock %}
|
2017-09-13 13:39:40 +02:00
|
|
|
{% block body %}
|
2020-03-30 16:15:39 +02:00
|
|
|
<div class="header-tabbed">
|
|
|
|
<div class="container-fluid">
|
|
|
|
<h2>
|
2020-09-10 17:49:47 +02:00
|
|
|
<a href="{{ tracker.owner|user_url }}">{{ tracker.owner }}</a>/<wbr
|
|
|
|
>{{ tracker.name }}
|
2020-03-30 16:15:39 +02:00
|
|
|
</h2>
|
|
|
|
<ul class="nav nav-tabs">
|
2021-09-22 12:24:35 +02:00
|
|
|
{% if tracker.visibility.value != "PUBLIC" %}
|
|
|
|
<li
|
|
|
|
class="nav-item nav-text vis-{{tracker.visibility.value.lower()}}"
|
|
|
|
{% if tracker.visibility.value == "UNLISTED" %}
|
|
|
|
title="This tracker is only visible to those who know the URL."
|
|
|
|
{% elif tracker.visibility.value == "PRIVATE" %}
|
|
|
|
title="This tracker is only visible to those who were invited to view it."
|
|
|
|
{% endif %}
|
|
|
|
>
|
|
|
|
{% if tracker.visibility.value == "UNLISTED" %}
|
|
|
|
Unlisted
|
|
|
|
{% elif tracker.visibility.value == "PRIVATE" %}
|
|
|
|
Private
|
|
|
|
{% endif %}
|
|
|
|
</li>
|
|
|
|
{% endif %}
|
2020-03-30 16:15:39 +02:00
|
|
|
<li class="nav-item">
|
|
|
|
<a class="nav-link {{ "active" if not search else "" }}"
|
2021-03-01 14:57:57 +01:00
|
|
|
href="{{ tracker | tracker_url }}">open tickets</a>
|
2020-03-30 16:15:39 +02:00
|
|
|
</li>
|
|
|
|
<li class="nav-item">
|
|
|
|
<a class="nav-link {{
|
|
|
|
"active" if search == "status:closed"
|
|
|
|
or search == "status:resolved" else ""
|
2021-03-01 14:57:57 +01:00
|
|
|
}}" href="{{ tracker | tracker_url}}?search=status:closed">closed tickets</a>
|
2020-03-30 16:15:39 +02:00
|
|
|
</li>
|
|
|
|
{% if search and search != "status:closed" and search != "status:resolved" %}
|
|
|
|
<li class="nav-item">
|
|
|
|
<a class="nav-link active" href="?search={{ search }}">
|
|
|
|
search results
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
{% endif %}
|
|
|
|
<li class="nav-item">
|
|
|
|
<a class="nav-link"
|
|
|
|
href="{{ tracker|tracker_labels_url }}">labels</a>
|
|
|
|
</li>
|
|
|
|
{% if current_user and current_user.id == tracker.owner_id %}
|
2020-08-26 01:55:55 +02:00
|
|
|
<li class="nav-item">
|
2020-03-30 16:15:39 +02:00
|
|
|
<a class="nav-link" href="{{url_for("settings.details_GET",
|
|
|
|
owner=tracker.owner.canonical_name,
|
|
|
|
name=tracker.name)}}"
|
|
|
|
>settings</a>
|
|
|
|
</li>
|
|
|
|
{% endif %}
|
|
|
|
<li class="flex-grow-1 d-none d-sm-block"></li>
|
|
|
|
<li class="nav-item d-none d-sm-block">
|
2020-07-27 23:24:32 +02:00
|
|
|
{% if current_user %}
|
2020-03-30 16:15:39 +02:00
|
|
|
<form method="POST" action="{{url_for("tracker." +
|
|
|
|
("disable_notifications" if is_subscribed else "enable_notifications"),
|
2018-12-30 21:52:29 +01:00
|
|
|
owner=tracker.owner.canonical_name,
|
2020-03-30 16:15:39 +02:00
|
|
|
name=tracker.name)}}">
|
|
|
|
{{csrf_token()}}
|
|
|
|
<button class="nav-link active" type="submit">
|
|
|
|
{{icon("envelope-o")}}
|
|
|
|
{% if is_subscribed %}
|
|
|
|
Disable notifications
|
|
|
|
{% else %}
|
|
|
|
Enable notifications
|
|
|
|
{% endif %}
|
|
|
|
{{icon("caret-right")}}
|
|
|
|
</button>
|
|
|
|
</form>
|
2020-07-27 23:24:32 +02:00
|
|
|
{% else %}
|
|
|
|
<a class="nav-link active" href="{{ tracker_subscribe }}">
|
|
|
|
{{icon("envelope-o")}}
|
|
|
|
Subscribe
|
|
|
|
{{icon("caret-right")}}
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
2020-03-30 16:15:39 +02:00
|
|
|
</li>
|
|
|
|
</ul>
|
2017-09-13 13:39:40 +02:00
|
|
|
</div>
|
2020-03-30 16:15:39 +02:00
|
|
|
</div>
|
|
|
|
<div class="container-fluid">
|
2017-09-13 13:39:40 +02:00
|
|
|
<div class="row">
|
2020-03-10 16:03:49 +01:00
|
|
|
<div class="col-lg-4 col-md-12">
|
2019-02-27 14:45:22 +01:00
|
|
|
{% if tracker.description %}
|
2017-09-13 13:39:40 +02:00
|
|
|
{{ tracker.description | md }}
|
2019-02-27 14:45:22 +01:00
|
|
|
{% endif %}
|
2018-06-23 21:38:45 +02:00
|
|
|
{% if TicketAccess.submit in access %}
|
2019-08-22 06:31:29 +02:00
|
|
|
{% if current_user %}
|
2017-09-13 13:39:40 +02:00
|
|
|
<h3 style="margin-top: 1rem">Submit ticket</h3>
|
|
|
|
<form method="POST" action="{{
|
2017-09-14 04:09:32 +02:00
|
|
|
url_for(".tracker_submit_POST",
|
2017-09-13 14:02:25 +02:00
|
|
|
owner="~" + tracker.owner.username,
|
2017-09-13 13:39:40 +02:00
|
|
|
name=tracker.name
|
|
|
|
)
|
|
|
|
}}">
|
2018-11-16 06:40:57 +01:00
|
|
|
{{csrf_token()}}
|
2018-06-17 01:53:19 +02:00
|
|
|
<div class="form-group">
|
2017-09-13 13:39:40 +02:00
|
|
|
<label for="title">Title</label>
|
|
|
|
<input
|
|
|
|
type="text"
|
2018-06-17 01:53:19 +02:00
|
|
|
class="form-control {{ valid.cls("title") }}"
|
2017-09-13 14:02:25 +02:00
|
|
|
maxlength="2048"
|
2017-09-13 13:39:40 +02:00
|
|
|
id="title"
|
2017-09-13 14:02:25 +02:00
|
|
|
name="title"
|
2019-12-11 14:43:44 +01:00
|
|
|
value="{{ title or "" }}"
|
|
|
|
{% if another %}
|
|
|
|
autofocus
|
|
|
|
{% endif %} />
|
2017-09-13 14:02:25 +02:00
|
|
|
{{valid.summary("title")}}
|
2017-09-13 13:39:40 +02:00
|
|
|
</div>
|
2018-06-17 01:53:19 +02:00
|
|
|
<div class="form-group">
|
2017-09-13 13:39:40 +02:00
|
|
|
<label for="description">Description</label>
|
|
|
|
<textarea
|
2018-06-17 01:53:19 +02:00
|
|
|
class="form-control {{ valid.cls("description") }}"
|
2017-09-13 13:39:40 +02:00
|
|
|
id="description"
|
|
|
|
name="description"
|
|
|
|
placeholder="Markdown supported"
|
2017-09-13 14:02:25 +02:00
|
|
|
maxlength="16384"
|
|
|
|
rows="5">{{ description or "" }}</textarea>
|
|
|
|
{{valid.summary("description")}}
|
2017-09-13 13:39:40 +02:00
|
|
|
</div>
|
|
|
|
<button
|
|
|
|
type="submit"
|
2018-06-17 01:23:03 +02:00
|
|
|
class="btn btn-primary"
|
|
|
|
>
|
2018-09-01 19:43:05 +02:00
|
|
|
Submit {{icon("caret-right")}}
|
2018-06-17 01:23:03 +02:00
|
|
|
</button>
|
2020-05-19 10:07:52 +02:00
|
|
|
<button type="submit" name="preview" class="btn btn-default">
|
|
|
|
Preview {{icon("caret-right")}}
|
|
|
|
</button>
|
2018-06-17 01:23:03 +02:00
|
|
|
<label class="form-check-label" style="margin-left: 2rem">
|
2017-09-13 13:39:40 +02:00
|
|
|
<input
|
|
|
|
class="form-check-input"
|
|
|
|
type="checkbox"
|
|
|
|
name="another"
|
|
|
|
style="position: relative; top: 2px;"
|
|
|
|
{% if another %}
|
|
|
|
checked
|
|
|
|
{% endif %}> Submit another?
|
|
|
|
</label>
|
|
|
|
</form>
|
2020-05-19 10:07:52 +02:00
|
|
|
|
|
|
|
{% if rendered_preview %}
|
|
|
|
<div class="ticket-preview">
|
|
|
|
<span class="preview-tag">Ticket preview</span>
|
|
|
|
<h2>{{ title }}</h2>
|
|
|
|
{{ rendered_preview }}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
|
2019-08-22 06:31:29 +02:00
|
|
|
{% elif cfg("todo.sr.ht::mail", "posting-domain") %}
|
|
|
|
<a
|
|
|
|
class="btn btn-primary"
|
|
|
|
href="{{get_origin("meta.sr.ht", external=True)}}/register"
|
|
|
|
>Register here {{icon('caret-right')}}</a>
|
|
|
|
or
|
|
|
|
<a href="{{oauth_url}}">
|
|
|
|
Log in {{icon('caret-right')}}
|
|
|
|
</a>
|
|
|
|
to submit tickets, or
|
|
|
|
<a
|
2020-07-20 18:51:29 +02:00
|
|
|
href="mailto:{{tracker.ref()}}@{{cfg("todo.sr.ht::mail", "posting-domain")}}"
|
2019-08-22 06:31:29 +02:00
|
|
|
>submit via email</a>.
|
|
|
|
{% endif %}
|
2017-09-15 13:52:16 +02:00
|
|
|
{% else %}
|
|
|
|
<hr />
|
2020-09-01 22:26:53 +02:00
|
|
|
{% if current_user %}
|
|
|
|
<p>You are not permitted to submit tickets for this tracker.</p>
|
|
|
|
{% else %}
|
2017-09-15 13:52:16 +02:00
|
|
|
<p>You need to <a href="{{ oauth_url }}">log in</a> to submit tickets.</p>
|
|
|
|
{% endif %}
|
2020-09-01 22:26:53 +02:00
|
|
|
{% endif %}
|
2017-09-13 13:39:40 +02:00
|
|
|
</div>
|
2020-03-10 16:03:49 +01:00
|
|
|
<div class="col-md-12 col-lg-8">
|
2020-01-09 18:19:44 +01:00
|
|
|
{% if tracker.import_in_progress %}
|
|
|
|
<div class="alert alert-primary">
|
|
|
|
An import operation is currently in progress.
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2021-09-22 12:24:35 +02:00
|
|
|
{% if TicketAccess.browse not in access and TicketAccess.submit in access %}
|
|
|
|
<div class="alert alert-warning">
|
|
|
|
You do not have permission to view tickets on this tracker unless you
|
|
|
|
submitted them.
|
|
|
|
</div>
|
|
|
|
{% elif TicketAccess.browse not in access and TicketAccess.submit not in access %}
|
|
|
|
<div class="alert alert-warning">
|
|
|
|
You do not have permission to view tickets on this tracker.
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2018-07-14 16:40:52 +02:00
|
|
|
<form style="margin-bottom: 0.5rem">
|
2020-04-24 08:37:09 +02:00
|
|
|
<label for="search" class="sr-only">Search tickets</label>
|
2017-09-13 13:39:40 +02:00
|
|
|
<input
|
|
|
|
name="search"
|
|
|
|
type="text"
|
2021-09-13 20:19:54 +02:00
|
|
|
placeholder="Search tickets... status:closed sort:created label:label{{" submitter:me" if current_user else ""}}"
|
2020-02-04 11:42:53 +01:00
|
|
|
class="form-control{% if search_error %} is-invalid{% endif %}"
|
2019-12-11 14:43:44 +01:00
|
|
|
{% if not another %}
|
2019-11-20 00:27:23 +01:00
|
|
|
autofocus
|
2019-12-11 14:43:44 +01:00
|
|
|
{% endif %}
|
2017-09-13 13:39:40 +02:00
|
|
|
value="{{ search if search else "" }}" />
|
2020-02-04 11:42:53 +01:00
|
|
|
{% if search_error %}
|
|
|
|
<div class="invalid-feedback">{{ search_error }}</div>
|
|
|
|
{% endif %}
|
2017-09-13 13:39:40 +02:00
|
|
|
</form>
|
2017-09-14 04:09:32 +02:00
|
|
|
{% if len(tickets) %}
|
2018-08-25 16:52:07 +02:00
|
|
|
<div class="ticket-list">
|
2018-12-04 17:47:58 +01:00
|
|
|
{% for ticket in tickets %}
|
2018-08-25 17:13:08 +02:00
|
|
|
<div class="id">
|
2018-11-17 20:21:55 +01:00
|
|
|
<a href="{{ ticket|ticket_url }}">#{{ticket.scoped_id}}</a>
|
|
|
|
</div>
|
2018-10-15 13:18:51 +02:00
|
|
|
<div class="title">
|
2019-02-22 22:35:22 +01:00
|
|
|
<a href="{{ ticket|ticket_url }}">
|
|
|
|
{{ ticket.title }}
|
|
|
|
</a>
|
2018-10-17 03:33:05 +02:00
|
|
|
<span class="pull-right">
|
2018-10-24 15:49:24 +02:00
|
|
|
{% for label in ticket.labels %}
|
2019-06-02 21:56:51 +02:00
|
|
|
{% if not search %}
|
|
|
|
{{ label|label_badge(cls="small", terms="status:open") }}
|
|
|
|
{% else %}
|
|
|
|
{{ label|label_badge(cls="small", terms=search) }}
|
|
|
|
{% endif %}
|
2018-10-17 03:33:05 +02:00
|
|
|
{% endfor %}
|
|
|
|
</span>
|
2018-10-15 13:18:51 +02:00
|
|
|
</div>
|
2018-08-25 17:13:08 +02:00
|
|
|
<div class="updated">{{ ticket.updated | date }}</div>
|
|
|
|
<div class="submitter">
|
2019-08-21 08:35:44 +02:00
|
|
|
<a href="{{ ticket.submitter|participant_url }}">
|
2019-08-22 06:20:39 +02:00
|
|
|
{{ ticket.submitter.name }}
|
2018-11-17 20:21:55 +01:00
|
|
|
</a>
|
2018-08-25 16:52:07 +02:00
|
|
|
</div>
|
2021-08-19 19:06:01 +02:00
|
|
|
<div class="comments" aria-label="Comments">
|
2019-08-07 08:57:02 +02:00
|
|
|
<span class="icon_count">
|
2019-08-02 19:43:57 +02:00
|
|
|
{{icon("comments-o")}}
|
2021-09-13 20:19:55 +02:00
|
|
|
{{ ticket.comment_count }}
|
2019-08-02 19:43:57 +02:00
|
|
|
</span>
|
2019-08-07 08:57:02 +02:00
|
|
|
<span class="commentlabel">
|
2021-09-13 20:19:55 +02:00
|
|
|
{{ "comment" if ticket.comment_count == 1 else "comments" }}
|
2019-08-02 19:43:57 +02:00
|
|
|
</span>
|
2018-08-25 16:52:07 +02:00
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
2017-09-14 04:09:32 +02:00
|
|
|
{% else %}
|
|
|
|
<div class="alert alert-info">No tickets found for this search criteria.</div>
|
|
|
|
{% endif %}
|
2018-07-11 03:35:46 +02:00
|
|
|
{{pagination()}}
|
2017-09-13 13:39:40 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|