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