Skip to content

Commit

Permalink
Fix date handling, fix CLI template rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
BjarniRunar committed Jul 8, 2013
1 parent aae2faf commit 6535b6f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions mailpile/plugins/dates.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ def search(config, term, hits):
end.extend([12, 31])
elif len(end) == 2:
end.append(31)
if not start < end:
if not start <= end:
raise ValueError()

terms = []
while start < end:
while start <= end:
# Move forward one year?
if start[1:] == [1, 1]:
ny = [start[0], 12, 31]
Expand Down
6 changes: 5 additions & 1 deletion mailpile/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@ def __init__(self, log_parent=None):
self.time_tracking = [('Main', [])]
self.last_display = [self.LOG_PROGRESS, 0]
self.render_mode = 'text'
self.html_variables = {}
self.html_variables = {
'title': 'Mailpile',
'name': 'Bradley Manning',
'csrf': '',
}

# Logging
def _display_log(self, text, level=LOG_URGENT):
Expand Down
2 changes: 1 addition & 1 deletion static/default/html/search-result-messages.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<tr class="result odd t_inbox t_sent" data-state="normal">
<td class="from"><a href="%(url)s">%(from)s</a></td>
<td class="subject"><a href="%(url)s">%(subject)s</a></td>
<td class="date"><a href="?q=date:2010-1-9">2010-01-09</a></td>
<td class="date"><a href="/_/search/dates:%(date)s">%(date)s</a></td>
<td class="checkbox"><input type="checkbox" name="msg_%(idx)s" value="normal"></td>
</tr>

0 comments on commit 6535b6f

Please sign in to comment.