Show More
@@ -44,6 +44,7 b' from rhodecode.lib.utils2 import str2boo' | |||||
44 | from rhodecode.lib.markup_renderer import MarkupRenderer |
|
44 | from rhodecode.lib.markup_renderer import MarkupRenderer | |
45 | from rhodecode.lib.vcs.exceptions import ChangesetDoesNotExistError |
|
45 | from rhodecode.lib.vcs.exceptions import ChangesetDoesNotExistError | |
46 | from rhodecode.lib.vcs.backends.base import BaseChangeset |
|
46 | from rhodecode.lib.vcs.backends.base import BaseChangeset | |
|
47 | from rhodecode.config.conf import DATE_FORMAT, DATETIME_FORMAT | |||
47 | from rhodecode.model.changeset_status import ChangesetStatusModel |
|
48 | from rhodecode.model.changeset_status import ChangesetStatusModel | |
48 | from rhodecode.model.db import URL_SEP |
|
49 | from rhodecode.model.db import URL_SEP | |
49 |
|
50 | |||
@@ -351,8 +352,8 b" hide_credentials = lambda x: ''.join(cre" | |||||
351 |
|
352 | |||
352 | def fmt_date(date): |
|
353 | def fmt_date(date): | |
353 | if date: |
|
354 | if date: | |
354 |
|
|
355 | _fmt = _(u"%a, %d %b %Y %H:%M:%S").encode('utf8') | |
355 |
|
|
356 | return date.strftime(_fmt).decode('utf8') | |
356 |
|
357 | |||
357 | return "" |
|
358 | return "" | |
358 |
|
359 |
@@ -32,7 +32,6 b' import datetime' | |||||
32 | from pylons.i18n.translation import _ |
|
32 | from pylons.i18n.translation import _ | |
33 |
|
33 | |||
34 | import rhodecode |
|
34 | import rhodecode | |
35 | from rhodecode.config.conf import DATETIME_FORMAT |
|
|||
36 | from rhodecode.lib import helpers as h |
|
35 | from rhodecode.lib import helpers as h | |
37 | from rhodecode.model import BaseModel |
|
36 | from rhodecode.model import BaseModel | |
38 | from rhodecode.model.db import Notification, User, UserNotification |
|
37 | from rhodecode.model.db import Notification, User, UserNotification | |
@@ -209,12 +208,12 b' class NotificationModel(BaseModel):' | |||||
209 | _n.TYPE_PULL_REQUEST_COMMENT: _('commented on pull request') |
|
208 | _n.TYPE_PULL_REQUEST_COMMENT: _('commented on pull request') | |
210 | } |
|
209 | } | |
211 |
|
210 | |||
212 | tmpl = "%(user)s %(action)s %(when)s" |
|
211 | # action == _map string | |
|
212 | tmpl = "%(user)s %(action)s at %(when)s" | |||
213 | if show_age: |
|
213 | if show_age: | |
214 | when = h.age(notification.created_on) |
|
214 | when = h.age(notification.created_on) | |
215 | else: |
|
215 | else: | |
216 | DTF = lambda d: datetime.datetime.strftime(d, DATETIME_FORMAT) |
|
216 | when = h.fmt_date(notification.created_on) | |
217 | when = DTF(notification.created_on) |
|
|||
218 |
|
217 | |||
219 | data = dict( |
|
218 | data = dict( | |
220 | user=notification.created_by_user.username, |
|
219 | user=notification.created_by_user.username, |
@@ -54,7 +54,7 b'' | |||||
54 | <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">${_('Files affected')}</div> |
|
54 | <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">${_('Files affected')}</div> | |
55 | <div class="cs_files"> |
|
55 | <div class="cs_files"> | |
56 | %for cs in c.cs_ranges: |
|
56 | %for cs in c.cs_ranges: | |
57 | <div class="cur_cs">r${cs}</div> |
|
57 | <div class="cur_cs">${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))}</div> | |
58 | %for change,filenode,diff,cs1,cs2,st in c.changes[cs.raw_id]: |
|
58 | %for change,filenode,diff,cs1,cs2,st in c.changes[cs.raw_id]: | |
59 | <div class="cs_${change}">${h.link_to(h.safe_unicode(filenode.path),h.url.current(anchor=h.FID(cs.raw_id,filenode.path)))}</div> |
|
59 | <div class="cs_${change}">${h.link_to(h.safe_unicode(filenode.path),h.url.current(anchor=h.FID(cs.raw_id,filenode.path)))}</div> | |
60 | %endfor |
|
60 | %endfor | |
@@ -68,7 +68,8 b'' | |||||
68 | %for cs in c.cs_ranges: |
|
68 | %for cs in c.cs_ranges: | |
69 | ##${comment.comment_inline_form(cs)} |
|
69 | ##${comment.comment_inline_form(cs)} | |
70 | ## diff block |
|
70 | ## diff block | |
71 |
<h3 style=" |
|
71 | <h3 style="padding-top:8px;">${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))}</h3> | |
|
72 | ||||
72 | ${diff_block.diff_block(c.changes[cs.raw_id])} |
|
73 | ${diff_block.diff_block(c.changes[cs.raw_id])} | |
73 | ##${comment.comments(cs)} |
|
74 | ##${comment.comments(cs)} | |
74 |
|
75 |
General Comments 0
You need to be logged in to leave comments.
Login now