diff --git a/trac/htdocs/css/timeline.css b/trac/htdocs/css/timeline.css
|
a
|
b
|
|
| 10 | 10 | font-size: 105%; |
| 11 | 11 | margin: 2em 0 .5em; |
| 12 | 12 | } |
| 13 | | dl { line-height: 1.3em; margin-left: 1em } |
| | 13 | dl { |
| | 14 | line-height: 1.3em; |
| | 15 | margin-left: 1em; |
| | 16 | } |
| | 17 | dl.unread { |
| | 18 | margin-left: 0.38em; |
| | 19 | border-left: 0.31em solid #c0f0c0; |
| | 20 | padding-left: 0.31em; |
| | 21 | } |
| | 22 | |
| 14 | 23 | dt { background: 3px 4px no-repeat; padding: 0 } |
| 15 | 24 | dt :link, dt :visited { |
| 16 | 25 | background: 3px 3px no-repeat; |
| … |
… |
|
| 34 | 43 | dt.highlight { background-color: #ffa; } |
| 35 | 44 | dd { |
| 36 | 45 | font-size: 80%; |
| 37 | | margin: 0 0 .75em 5.5em; |
| | 46 | margin: 0 0 .75em 5.8em; |
| 38 | 47 | padding: 0; |
| 39 | 48 | color: #776; |
| 40 | 49 | } |
diff --git a/trac/timeline/templates/timeline.html b/trac/timeline/templates/timeline.html
|
a
|
b
|
|
| 34 | 34 | |
| 35 | 35 | <py:for each="day, events in groupby(events, key=lambda e: format_date(e.date))"> |
| 36 | 36 | <h2>${day}: ${day == today and _("Today") or day == yesterday and _("Yesterday") or None}</h2> |
| 37 | | <dl> |
| | 37 | <dl py:for="unread, events in groupby(events, key=lambda e: lastvisit and lastvisit < e.dateuid)" |
| | 38 | class="${unread and 'unread' or None}"> |
| 38 | 39 | <py:for each="event in events" |
| 39 | 40 | py:with="highlight = precision and precisedate and timedelta(0) <= (event.date - precisedate) < precision"> |
| … |
… |
|
| 38 | 39 | <py:for each="event in events" |
| 39 | 40 | py:with="highlight = precision and precisedate and timedelta(0) <= (event.date - precisedate) < precision"> |
| 40 | | <dt class="${classes(event.kind, highlight=highlight)}"> |
| | 41 | <dt class="${classes(event.kind, highlight=highlight, unread=unread)}"> |
| 41 | 42 | <a href="${event.render('url', context)}" py:choose=""> |
| 42 | 43 | <py:when test="event.author"><i18n:msg params="time, title, author"> |
| 43 | 44 | <span class="time">${format_time(event.date, str('%H:%M'))}</span> ${event.render('title', context)} |
diff --git a/trac/timeline/web_ui.py b/trac/timeline/web_ui.py
|
a
|
b
|
|
| 89 | 89 | |
| 90 | 90 | format = req.args.get('format') |
| 91 | 91 | maxrows = int(req.args.get('max', 0)) |
| | 92 | lastvisit = int(req.session.get('timeline.lastvisit', '0')) |
| | 93 | |
| | 94 | # indication of new events is unchanged when form is updated by user |
| | 95 | revisit = any([a in req.args for a in ['update', 'from', 'daysback', |
| | 96 | 'author']]) |
| | 97 | if revisit: |
| | 98 | lastvisit = int(req.session.get('timeline.nextlastvisit', |
| | 99 | lastvisit)) |
| 92 | 100 | |
| 93 | 101 | # Parse the from date and adjust the timestamp to the last second of |
| 94 | 102 | # the day |
| … |
… |
|
| 128 | 136 | 'yesterday': format_date(today - timedelta(days=1)), |
| 129 | 137 | 'precisedate': precisedate, 'precision': precision, |
| 130 | 138 | 'events': [], 'filters': [], |
| 131 | | 'abbreviated_messages': self.abbreviated_messages} |
| | 139 | 'abbreviated_messages': self.abbreviated_messages, |
| | 140 | 'lastvisit': lastvisit} |
| 132 | 141 | |
| 133 | 142 | available_filters = [] |
| 134 | 143 | for event_provider in self.event_providers: |
| … |
… |
|
| 204 | 213 | else: |
| 205 | 214 | req.session['timeline.daysback'] = daysback |
| 206 | 215 | req.session['timeline.authors'] = authors |
| | 216 | # store lastvisit |
| | 217 | if events and not revisit: |
| | 218 | lastviewed = to_utimestamp(events[0]['date']) |
| | 219 | req.session['timeline.lastvisit'] = max(lastvisit, lastviewed) |
| | 220 | req.session['timeline.nextlastvisit'] = lastvisit |
| 207 | 221 | html_context = Context.from_request(req) |
| 208 | 222 | html_context.set_hints(wiki_flavor='oneliner', |
| 209 | 223 | shorten_lines=self.abbreviated_messages) |