Show More
@@ -345,6 +345,14 b' short_id = lambda x: x[:12]' | |||||
345 | hide_credentials = lambda x: ''.join(credentials_filter(x)) |
|
345 | hide_credentials = lambda x: ''.join(credentials_filter(x)) | |
346 |
|
346 | |||
347 |
|
347 | |||
|
348 | def fmt_date(date): | |||
|
349 | if date: | |||
|
350 | return (date.strftime(_(u"%a, %d %b %Y %H:%M:%S").encode('utf8')) | |||
|
351 | .decode('utf8')) | |||
|
352 | ||||
|
353 | return "" | |||
|
354 | ||||
|
355 | ||||
348 | def is_git(repository): |
|
356 | def is_git(repository): | |
349 | if hasattr(repository, 'alias'): |
|
357 | if hasattr(repository, 'alias'): | |
350 | _type = repository.alias |
|
358 | _type = repository.alias |
@@ -25,7 +25,7 b'' | |||||
25 | %endif |
|
25 | %endif | |
26 | </td> |
|
26 | </td> | |
27 |
|
27 | |||
28 | <td>${l.action_date}</td> |
|
28 | <td>${h.fmt_date(l.action_date)}</td> | |
29 | <td>${l.user_ip}</td> |
|
29 | <td>${l.user_ip}</td> | |
30 | </tr> |
|
30 | </tr> | |
31 | %endfor |
|
31 | %endfor |
@@ -46,7 +46,7 b'' | |||||
46 | <td>${h.link_to(user.username,h.url('edit_user', id=user.user_id))}</td> |
|
46 | <td>${h.link_to(user.username,h.url('edit_user', id=user.user_id))}</td> | |
47 | <td>${user.name}</td> |
|
47 | <td>${user.name}</td> | |
48 | <td>${user.lastname}</td> |
|
48 | <td>${user.lastname}</td> | |
49 | <td>${user.last_login}</td> |
|
49 | <td>${h.fmt_date(user.last_login)}</td> | |
50 | <td>${h.bool2icon(user.active)}</td> |
|
50 | <td>${h.bool2icon(user.active)}</td> | |
51 | <td>${h.bool2icon(user.admin)}</td> |
|
51 | <td>${h.bool2icon(user.admin)}</td> | |
52 | <td>${h.bool2icon(bool(user.ldap_dn))}</td> |
|
52 | <td>${h.bool2icon(bool(user.ldap_dn))}</td> |
@@ -17,7 +17,7 b'' | |||||
17 | h.url('files_home',repo_name=c.repo_name,revision=book[1].raw_id))}</span> |
|
17 | h.url('files_home',repo_name=c.repo_name,revision=book[1].raw_id))}</span> | |
18 | </span> |
|
18 | </span> | |
19 | </td> |
|
19 | </td> | |
20 | <td><span class="tooltip" title="${h.age(book[1].date)}">${book[1].date}</span></td> |
|
20 | <td><span class="tooltip" title="${h.age(book[1].date)}">${h.fmt_date(book[1].date)}</span></td> | |
21 | <td title="${book[1].author}">${h.person(book[1].author)}</td> |
|
21 | <td title="${book[1].author}">${h.person(book[1].author)}</td> | |
22 | <td> |
|
22 | <td> | |
23 | <div> |
|
23 | <div> |
@@ -17,7 +17,7 b'' | |||||
17 | h.url('files_home',repo_name=c.repo_name,revision=branch[1].raw_id))}</span> |
|
17 | h.url('files_home',repo_name=c.repo_name,revision=branch[1].raw_id))}</span> | |
18 | </span> |
|
18 | </span> | |
19 | </td> |
|
19 | </td> | |
20 | <td><span class="tooltip" title="${h.age(branch[1].date)}">${branch[1].date}</span></td> |
|
20 | <td><span class="tooltip" title="${h.age(branch[1].date)}">${h.fmt_date(branch[1].date)}</span></td> | |
21 | <td title="${branch[1].author}">${h.person(branch[1].author)}</td> |
|
21 | <td title="${branch[1].author}">${h.person(branch[1].author)}</td> | |
22 | <td> |
|
22 | <td> | |
23 | <div> |
|
23 | <div> | |
@@ -35,7 +35,7 b'' | |||||
35 | h.url('changeset_home',repo_name=c.repo_name,revision=branch[1].raw_id))}</span> |
|
35 | h.url('changeset_home',repo_name=c.repo_name,revision=branch[1].raw_id))}</span> | |
36 | </span> |
|
36 | </span> | |
37 | </td> |
|
37 | </td> | |
38 | <td><span class="tooltip" title="${h.age(branch[1].date)}">${branch[1].date}</span></td> |
|
38 | <td><span class="tooltip" title="${h.age(branch[1].date)}">${h.fmt_date(branch[1].date)}</span></td> | |
39 | <td title="${branch[1].author}">${h.person(branch[1].author)}</td> |
|
39 | <td title="${branch[1].author}">${h.person(branch[1].author)}</td> | |
40 | <td> |
|
40 | <td> | |
41 | <div> |
|
41 | <div> |
@@ -57,7 +57,7 b'' | |||||
57 | </div> |
|
57 | </div> | |
58 | <div title="${cs.author}" class="user">${h.shorter(h.person(cs.author),22)}</div> |
|
58 | <div title="${cs.author}" class="user">${h.shorter(h.person(cs.author),22)}</div> | |
59 | </div> |
|
59 | </div> | |
60 | <div class="date">${cs.date}</div> |
|
60 | <div class="date">${h.fmt_date(cs.date)}</div> | |
61 | </div> |
|
61 | </div> | |
62 | <div class="mid"> |
|
62 | <div class="mid"> | |
63 | <div class="message">${h.urlify_commit(h.wrap_paragraphs(cs.message),c.repo_name,h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</div> |
|
63 | <div class="message">${h.urlify_commit(h.wrap_paragraphs(cs.message),c.repo_name,h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</div> |
@@ -31,7 +31,7 b'' | |||||
31 | r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)} |
|
31 | r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)} | |
32 | </div> |
|
32 | </div> | |
33 | <div class="date"> |
|
33 | <div class="date"> | |
34 | ${c.changeset.date} |
|
34 | ${h.fmt_date(c.changeset.date)} | |
35 | </div> |
|
35 | </div> | |
36 | <div class="diff-actions"> |
|
36 | <div class="diff-actions"> | |
37 | <a href="${h.url('raw_changeset_home',repo_name=c.repo_name,revision=c.changeset.raw_id,diff='show')}" title="${_('raw diff')}" class="tooltip"><img class="icon" src="${h.url('/images/icons/page_white.png')}"/></a> |
|
37 | <a href="${h.url('raw_changeset_home',repo_name=c.repo_name,revision=c.changeset.raw_id,diff='show')}" title="${_('raw diff')}" class="tooltip"><img class="icon" src="${h.url('/images/icons/page_white.png')}"/></a> |
@@ -40,7 +40,7 b'' | |||||
40 | <td><div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(h.email(cs.author),14)}"/></div></td> |
|
40 | <td><div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(h.email(cs.author),14)}"/></div></td> | |
41 | <td>${h.link_to('r%s:%s' % (cs.revision,h.short_id(cs.raw_id)),h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</td> |
|
41 | <td>${h.link_to('r%s:%s' % (cs.revision,h.short_id(cs.raw_id)),h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</td> | |
42 | <td><div class="author">${h.person(cs.author)}</div></td> |
|
42 | <td><div class="author">${h.person(cs.author)}</div></td> | |
43 | <td><span class="tooltip" title="${h.age(cs.date)}">${cs.date}</span></td> |
|
43 | <td><span class="tooltip" title="${h.age(cs.date)}">${h.fmt_date(cs.date)}</span></td> | |
44 | <td><div class="message">${h.urlify_commit(h.wrap_paragraphs(cs.message),c.repo_name)}</div></td> |
|
44 | <td><div class="message">${h.urlify_commit(h.wrap_paragraphs(cs.message),c.repo_name)}</div></td> | |
45 | </tr> |
|
45 | </tr> | |
46 | %endfor |
|
46 | %endfor |
@@ -95,7 +95,7 b'' | |||||
95 | </td> |
|
95 | </td> | |
96 | <td> |
|
96 | <td> | |
97 | %if node.is_file(): |
|
97 | %if node.is_file(): | |
98 | <span class="tooltip" title="${node.last_changeset.date}"> |
|
98 | <span class="tooltip" title="${h.fmt_date(node.last_changeset.date)}"> | |
99 | ${h.age(node.last_changeset.date)}</span> |
|
99 | ${h.age(node.last_changeset.date)}</span> | |
100 | %endif |
|
100 | %endif | |
101 | </td> |
|
101 | </td> |
@@ -16,7 +16,7 b'' | |||||
16 | <div class="code-header"> |
|
16 | <div class="code-header"> | |
17 | <div class="stats"> |
|
17 | <div class="stats"> | |
18 | <div class="left img"><img src="${h.url('/images/icons/file.png')}"/></div> |
|
18 | <div class="left img"><img src="${h.url('/images/icons/file.png')}"/></div> | |
19 | <div class="left item"><pre class="tooltip" title="${c.file.changeset.date}">${h.link_to("r%s:%s" % (c.file.changeset.revision,h.short_id(c.file.changeset.raw_id)),h.url('changeset_home',repo_name=c.repo_name,revision=c.file.changeset.raw_id))}</pre></div> |
|
19 | <div class="left item"><pre class="tooltip" title="${h.fmt_date(c.file.changeset.date)}">${h.link_to("r%s:%s" % (c.file.changeset.revision,h.short_id(c.file.changeset.raw_id)),h.url('changeset_home',repo_name=c.repo_name,revision=c.file.changeset.raw_id))}</pre></div> | |
20 | <div class="left item"><pre>${h.format_byte_size(c.file.size,binary=True)}</pre></div> |
|
20 | <div class="left item"><pre>${h.format_byte_size(c.file.size,binary=True)}</pre></div> | |
21 | <div class="left item last"><pre>${c.file.mimetype}</pre></div> |
|
21 | <div class="left item last"><pre>${c.file.mimetype}</pre></div> | |
22 | <div class="buttons"> |
|
22 | <div class="buttons"> |
@@ -89,7 +89,7 b'' | |||||
89 | </td> |
|
89 | </td> | |
90 | ##LAST CHANGE DATE |
|
90 | ##LAST CHANGE DATE | |
91 | <td> |
|
91 | <td> | |
92 | <span class="tooltip" title="${repo['last_change']}">${h.age(repo['last_change'])}</span> |
|
92 | <span class="tooltip" title="${h.fmt_date(repo['last_change'])}">${h.age(repo['last_change'])}</span> | |
93 | </td> |
|
93 | </td> | |
94 | ##LAST REVISION |
|
94 | ##LAST REVISION | |
95 | <td> |
|
95 | <td> |
@@ -24,7 +24,7 b'' | |||||
24 | </span> |
|
24 | </span> | |
25 | </div> |
|
25 | </div> | |
26 | <div class="journal_action_params">${h.literal(h.action_parser(entry)[1]())}</div> |
|
26 | <div class="journal_action_params">${h.literal(h.action_parser(entry)[1]())}</div> | |
27 | <div class="date"><span class="tooltip" title="${entry.action_date}">${h.age(entry.action_date)}</span></div> |
|
27 | <div class="date"><span class="tooltip" title="${h.fmt_date(entry.action_date)}">${h.age(entry.action_date)}</span></div> | |
28 | %endfor |
|
28 | %endfor | |
29 | </div> |
|
29 | </div> | |
30 | </div> |
|
30 | </div> |
@@ -19,7 +19,7 b'' | |||||
19 | h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id), |
|
19 | h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id), | |
20 | title=cs.message)} |
|
20 | title=cs.message)} | |
21 | </td> |
|
21 | </td> | |
22 | <td><span class="tooltip" title="${cs.date}"> |
|
22 | <td><span class="tooltip" title="${h.fmt_date(cs.date)}"> | |
23 | ${h.age(cs.date)}</span> |
|
23 | ${h.age(cs.date)}</span> | |
24 | </td> |
|
24 | </td> | |
25 | <td title="${cs.author}">${h.person(cs.author)}</td> |
|
25 | <td title="${cs.author}">${h.person(cs.author)}</td> |
@@ -18,7 +18,7 b'' | |||||
18 | </span> |
|
18 | </span> | |
19 | </span> |
|
19 | </span> | |
20 | </td> |
|
20 | </td> | |
21 | <td><span class="tooltip" title="${h.age(tag[1].date)}">${tag[1].date}</span></td> |
|
21 | <td><span class="tooltip" title="${h.age(tag[1].date)}">${h.fmt_date(tag[1].date)}</span></td> | |
22 | <td title="${tag[1].author}">${h.person(tag[1].author)}</td> |
|
22 | <td title="${tag[1].author}">${h.person(tag[1].author)}</td> | |
23 | <td> |
|
23 | <td> | |
24 | <div> |
|
24 | <div> |
General Comments 0
You need to be logged in to leave comments.
Login now