unused file.
@@ -3,7 +3,7 @@ | ||
3 | 3 | from setuptools import setup, find_packages |
4 | 4 | |
5 | 5 | PACKAGE = 'ExcelReportPlugin' |
6 | -VERSION = '0.1' | |
6 | +VERSION = '0.2' | |
7 | 7 | |
8 | 8 | setup ( |
9 | 9 | name = PACKAGE, |
@@ -6,7 +6,7 @@ | ||
6 | 6 | from trac.ticket.web_ui import TicketModule |
7 | 7 | from trac.ticket.query import QueryModule |
8 | 8 | from pyExcelerator import * |
9 | -from datetime import datetime | |
9 | +from datetime import * | |
10 | 10 | import copy |
11 | 11 | import types |
12 | 12 | import re |
@@ -51,12 +51,6 @@ | ||
51 | 51 | |
52 | 52 | def render(self, req, cols, rows,id): |
53 | 53 | |
54 | - req.send_response(200) | |
55 | - req.send_header('Content-Type', self.get_report_mimetype()) | |
56 | - req.send_header('Content-Disposition', | |
57 | - 'filename=Report%s.xls' % id) | |
58 | - req.end_headers() | |
59 | - | |
60 | 54 | wb = Workbook() |
61 | 55 | sheetname = "Report%s" % id |
62 | 56 |
@@ -135,6 +129,8 @@ | ||
135 | 129 | rows, range(len(rows))): |
136 | 130 | if type(value) is int: |
137 | 131 | ws.write(rx, cx, value, self.style_num) |
132 | + elif type(value) is long: | |
133 | + ws.write(rx, cx, datetime.fromtimestamp(int(value*1e-6)), self.style_date) | |
138 | 134 | elif type(value) is datetime: |
139 | 135 | ws.write(rx, cx, value, self.style_date) |
140 | 136 | elif type(value) is types.NoneType: |
@@ -141,9 +137,14 @@ | ||
141 | 137 | ws.write(rx, cx, '-',self.style_str) |
142 | 138 | else: |
143 | 139 | ws.write(rx, cx, value, style) |
144 | - | |
145 | - | |
146 | - req.write(wb.get()) | |
140 | + buf = wb.get() | |
141 | + req.send_response(200) | |
142 | + req.send_header('Content-Type', self.get_report_mimetype()) | |
143 | + req.send_header('Content-Disposition', | |
144 | + 'filename=Report%s.xls' % id) | |
145 | + req.send_header('Content-Length', len(buf)) | |
146 | + req.end_headers() | |
147 | + req.write(buf) | |
147 | 148 | |
148 | 149 | def convertComments(self, x): |
149 | 150 | try: |
@@ -1,3 +1,4 @@ | ||
1 | +# -*- coding: utf-8 -*- | |
1 | 2 | # Created by Noah Kantrowitz on 2007-07-04. |
2 | 3 | # Copyright (c) 2007 Noah Kantrowitz. All rights reserved. |
3 | 4 | import re |
@@ -92,11 +93,11 @@ | ||
92 | 93 | config_dirty = False |
93 | 94 | if 'blocking' not in custom: |
94 | 95 | custom.set('blocking', 'text') |
95 | - custom.set('blocking.label', 'Blocking') | |
96 | + custom.set('blocking.label', u'ブロックするチケット') | |
96 | 97 | config_dirty = True |
97 | 98 | if 'blockedby' not in custom: |
98 | 99 | custom.set('blockedby', 'text') |
99 | - custom.set('blockedby.label', 'Blocked By') | |
100 | + custom.set('blockedby.label', u'ブロックされるチケット') | |
100 | 101 | config_dirty = True |
101 | 102 | if config_dirty: |
102 | 103 | self.config.save() |
@@ -1,3 +1,4 @@ | ||
1 | +# -*- coding: utf-8 -*- | |
1 | 2 | import subprocess |
2 | 3 | |
3 | 4 | from pkg_resources import resource_filename |
@@ -61,7 +62,7 @@ | ||
61 | 62 | |
62 | 63 | # Add link to depgraph if needed |
63 | 64 | if links: |
64 | - add_ctxtnav(req, 'Depgraph', req.href.depgraph(tkt.id)) | |
65 | + add_ctxtnav(req, u'チケット依存関係', req.href.depgraph(tkt.id)) | |
65 | 66 | |
66 | 67 | for change in data.get('changes', {}): |
67 | 68 | if not change.has_key('fields'): |