forked from edgewall/trac
-
Notifications
You must be signed in to change notification settings - Fork 1
/
jtimeline.html
109 lines (96 loc) · 3.56 KB
/
jtimeline.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
{# Copyright (C) 2006-2014 Edgewall Software
This software is licensed as described in the file COPYING, which
you should have received as part of this distribution. The terms
are also available at http://trac.edgewall.com/license.html.
This software consists of voluntary contributions made by many
individuals. For the exact contribution history, see the revision
history and logs, available at http://trac.edgewall.org/.
#}
# extends "jlayout.html"
<!DOCTYPE html>
<html>
<head>
<title>
# block title
${_("Timeline")}
${ super() }
# endblock title
</title>
## Note: no need to reimplement head block if no changes needed there
</head>
<body>
# block content
<div id="content" class="timeline">
<h1>${_("Timeline")}</h1>
<form id="prefs" method="get" action="">
<div>
# set fromdate_input
<input type="text" id="fromdate" class="trac-datepicker" size="10"
name="from" value="${format_date(fromdate)}" />
# endset
# set daysback_input
<input type="text" size="3" name="daysback" value="${daysback}" />
# endset
# set authors_input
<input type="text" size="16" name="authors" value="${authors}" />
# endset
# trans fromdate = fromdate_input, daysback = daysback_input, authors = authors_input
<label>View changes from ${fromdate}</label> <br />
<label>going back ${daysback} days</label><br />
<label>by author ${authors}</label>
# endtrans
</div>
<fieldset>
# for filter in filters:
<label>
<input type="checkbox" name="${filter.name}"
${{'checked': filter.enabled}|htmlattr}/> ${filter.label}
</label>
# endfor
</fieldset>
<div class="buttons">
<input type="submit" name="update" value="${_('Update')}" />
</div>
</form>
# for day, events in events|groupby('key_date')|sort(reverse=true):
<h2>${day}: ${_("Today") if day == today else _("Yesterday") if
day == yesterday}</h2>
# for unread, events in events|groupby('unread')|sort(reverse=true):
<dl ${{'class': 'unread' if events[0].unread}|htmlattr}>
# for event in events:
# set event_delta = precisedate and (event.date - precisedate)
# set highlight = precision and precisedate and timedelta(0) is lessthanorequal(event_delta) and event_delta is lessthan(precision)
<dt class="${classes(event.kind, highlight=highlight, unread=unread)}">
<a href="${event.render('url', context)}">
# set time
<span class="time">${format_time(event.date, 'short')}</span>
# endset
# set title = event.render('title', context)
# if event.author:
# trans time = time, title, author = authorinfo(event.author)
${time} ${title} by ${author}
# endtrans
# else:
${time} ${title}
# endif
</a>
</dt>
<dd class="${classes(event.kind, highlight=highlight)}">
${event.render('description', context)}
</dd>
# endfor
</dl>
# endfor
# endfor
<div id="help">
# trans timeline_href = href.wiki('TracTimeline')
<strong>Note:</strong>
See <a href="${timeline_href}">TracTimeline</a> for
information about the timeline view.
# endtrans
</div>
</div>
${ super() }
# endblock content
</body>
</html>