2017-09-14 04:51:33 +02:00
|
|
|
{% extends "todo.html" %}
|
2017-09-14 14:02:31 +02:00
|
|
|
{% block title %}
|
|
|
|
<title>
|
|
|
|
{{tracker.name}}
|
|
|
|
—
|
|
|
|
{{ cfg("sr.ht", "site-name") }} todo
|
|
|
|
</title>
|
|
|
|
{% endblock %}
|
2017-09-13 13:39:40 +02:00
|
|
|
{% block body %}
|
|
|
|
<div class="container-fluid">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-12">
|
2017-11-09 04:49:39 +01:00
|
|
|
<h2>
|
|
|
|
{{ format_tracker_name(tracker) }}
|
2018-07-11 03:29:20 +02:00
|
|
|
{% if current_user and current_user.id == tracker.owner_id %}
|
2018-06-23 21:38:45 +02:00
|
|
|
<small>
|
2018-07-11 03:43:24 +02:00
|
|
|
<a href="{{url_for(".configure_GET",
|
|
|
|
owner=tracker.owner.canonical_name(),
|
|
|
|
name=tracker.name)}}"
|
2018-06-23 21:38:45 +02:00
|
|
|
>Configure</a>
|
|
|
|
</small>
|
2018-07-11 03:29:20 +02:00
|
|
|
{% endif %}
|
2017-11-09 04:49:39 +01:00
|
|
|
</h2>
|
2017-09-13 13:39:40 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-4">
|
|
|
|
{{ tracker.description | md }}
|
2018-06-23 21:38:45 +02:00
|
|
|
{% if TicketAccess.submit in access %}
|
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-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"
|
2017-09-13 14:28:10 +02:00
|
|
|
autofocus
|
2017-09-13 14:02:25 +02:00
|
|
|
value="{{ title or "" }}" />
|
|
|
|
{{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"
|
|
|
|
>
|
|
|
|
Submit
|
|
|
|
<i class="fa fa-caret-right"></i>
|
|
|
|
</button>
|
|
|
|
<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>
|
2018-07-11 03:43:24 +02:00
|
|
|
<form method="POST" action="{{url_for("tracker." +
|
2018-07-11 03:51:26 +02:00
|
|
|
("disable_notifications" if is_subscribed else "enable_notifications"),
|
2018-07-11 03:43:24 +02:00
|
|
|
owner=tracker.owner.canonical_name(),
|
|
|
|
name=tracker.name)}}">
|
2018-07-11 03:51:26 +02:00
|
|
|
<h3>Notifications</h3>
|
|
|
|
{% if is_subscribed %}
|
|
|
|
<p>You are receiving email notifications for this tracker.</p>
|
|
|
|
{% else %}
|
|
|
|
<p>You are not receiving email notifications for this tracker.</p>
|
|
|
|
{% endif %}
|
2018-07-11 03:43:24 +02:00
|
|
|
<button class="btn btn-default btn-block" type="submit">
|
2017-11-09 04:49:39 +01:00
|
|
|
{% if is_subscribed %}
|
|
|
|
Disable notifications
|
|
|
|
{% else %}
|
|
|
|
Enable notifications
|
|
|
|
{% endif %}
|
2018-07-11 03:51:26 +02:00
|
|
|
<i class="fa fa-caret-right"></i>
|
2017-11-09 04:49:39 +01:00
|
|
|
</button>
|
|
|
|
</form>
|
2017-09-15 13:52:16 +02:00
|
|
|
{% else %}
|
|
|
|
<hr />
|
|
|
|
<p>You need to <a href="{{ oauth_url }}">log in</a> to submit tickets.</p>
|
|
|
|
{% endif %}
|
2017-09-13 13:39:40 +02:00
|
|
|
</div>
|
|
|
|
<div class="col-md-8">
|
|
|
|
<form>
|
|
|
|
<input
|
|
|
|
name="search"
|
|
|
|
type="text"
|
|
|
|
placeholder="Search tickets... status:closed order:updated submitter:me"
|
|
|
|
class="form-control"
|
|
|
|
value="{{ search if search else "" }}" />
|
|
|
|
</form>
|
|
|
|
<ul class="nav nav-tabs">
|
|
|
|
<li class="nav-item">
|
|
|
|
<a
|
2017-11-09 17:17:04 +01:00
|
|
|
class="nav-link {{ "active" if not search else "" }}"
|
|
|
|
href="{{url_for(".tracker_GET",
|
2018-07-11 03:43:24 +02:00
|
|
|
owner=tracker.owner.canonical_name(),
|
2017-11-09 17:17:04 +01:00
|
|
|
name=tracker.name
|
|
|
|
)}}">open tickets</a>
|
2017-09-13 13:39:40 +02:00
|
|
|
</li>
|
|
|
|
<li class="nav-item">
|
|
|
|
<a
|
2017-11-09 17:17:04 +01:00
|
|
|
class="nav-link {{
|
|
|
|
"active" if search == "status:closed" or search == "status:resolved" else ""
|
|
|
|
}}" href="?search=status:closed">closed tickets</a>
|
2017-09-13 13:39:40 +02:00
|
|
|
</li>
|
2017-11-09 17:17:04 +01:00
|
|
|
{% 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 %}
|
2017-09-13 13:39:40 +02:00
|
|
|
</ul>
|
2017-09-14 04:09:32 +02:00
|
|
|
{% if len(tickets) %}
|
2017-09-13 13:39:40 +02:00
|
|
|
<table class="table table-striped">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
2017-12-11 01:45:49 +01:00
|
|
|
<th style="width: 1px"></th>
|
2017-09-13 13:39:40 +02:00
|
|
|
<th>Title</th>
|
|
|
|
<th>Updated</th>
|
|
|
|
<th>Submitter</th>
|
2018-01-27 22:38:59 +01:00
|
|
|
<th style="width: 4rem; white-space: nowrap;"></th>
|
2017-09-13 13:39:40 +02:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
2017-09-13 14:19:53 +02:00
|
|
|
{% for ticket in tickets %}
|
2017-09-13 13:39:40 +02:00
|
|
|
<tr>
|
2017-12-11 01:45:49 +01:00
|
|
|
<td style="text-align: right"><a href="{{url_for("ticket.ticket_GET",
|
2018-07-11 03:43:24 +02:00
|
|
|
owner=tracker.owner.canonical_name(),
|
2017-09-14 04:09:32 +02:00
|
|
|
name=tracker.name,
|
2017-09-14 13:20:47 +02:00
|
|
|
ticket_id=ticket.scoped_id)}}">#{{ticket.scoped_id}}</a></td>
|
2017-09-13 14:17:52 +02:00
|
|
|
<td>{{ ticket.title }}</td>
|
|
|
|
<td>{{ ticket.updated | date }}</td>
|
2018-07-11 03:31:03 +02:00
|
|
|
<td>
|
|
|
|
<a href="{{url_for("html.user_GET",
|
|
|
|
username=ticket.submitter.username)}}"
|
|
|
|
>~{{ ticket.submitter.username }}</a>
|
|
|
|
</td>
|
2017-10-30 20:46:49 +01:00
|
|
|
{% if ticket.new_updates(current_user) %}
|
2017-11-09 04:04:44 +01:00
|
|
|
<td style="text-align: center">
|
|
|
|
{{ ticket.comments | length }} <span class="fa fa-fw fa-comments-o"></span>
|
|
|
|
</td>
|
2017-10-30 20:46:49 +01:00
|
|
|
{% else %}
|
2017-11-09 04:04:44 +01:00
|
|
|
<td style="text-align: center">
|
|
|
|
{{ ticket.comments | length }} <span class="fa fa-fw fa-comments"></span>
|
|
|
|
</td>
|
2017-10-30 20:46:49 +01:00
|
|
|
{% endif %}
|
2017-09-13 13:39:40 +02:00
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
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 %}
|