##// END OF EJS Templates
added handling of deleted users in journal data
marcink -
r3068:44827c84 beta
parent child Browse files
Show More
@@ -114,7 +114,8 b' class JournalController(BaseController):'
114 groups = []
114 groups = []
115 for k, g in groupby(journal, lambda x: x.action_as_day):
115 for k, g in groupby(journal, lambda x: x.action_as_day):
116 user_group = []
116 user_group = []
117 for k2, g2 in groupby(list(g), lambda x: x.user.email):
117 #groupby username if it's a present value, else fallback to journal username
118 for _, g2 in groupby(list(g), lambda x: x.user.username if x.user else x.username):
118 l = list(g2)
119 l = list(g2)
119 user_group.append((l[0].user, l))
120 user_group.append((l[0].user, l))
120
121
@@ -2327,6 +2327,15 b' a.metatag[tag="license"]:hover {'
2327 height: 30px;
2327 height: 30px;
2328 }
2328 }
2329
2329
2330 #journal .journal_user.deleted {
2331 color: #747474;
2332 font-size: 14px;
2333 font-weight: normal;
2334 height: 30px;
2335 font-style: italic;
2336 }
2337
2338
2330 #journal .journal_icon {
2339 #journal .journal_icon {
2331 clear: both;
2340 clear: both;
2332 float: left;
2341 float: left;
@@ -6,9 +6,13 b''
6 % for user,entries in items:
6 % for user,entries in items:
7 <div class="journal_container">
7 <div class="journal_container">
8 <div class="gravatar">
8 <div class="gravatar">
9 <img alt="gravatar" src="${h.gravatar_url(user.email,24)}"/>
9 <img alt="gravatar" src="${h.gravatar_url(user.email if user else 'anonymous@rhodecode.org',24)}"/>
10 </div>
10 </div>
11 <div class="journal_user">${user.name} ${user.lastname}</div>
11 %if user:
12 <div class="journal_user">${user.name} ${user.lastname}</div>
13 %else:
14 <div class="journal_user deleted">${entries[0].username}</div>
15 %endif
12 <div class="journal_action_container">
16 <div class="journal_action_container">
13 % for entry in entries:
17 % for entry in entries:
14 <div class="journal_icon"> ${h.action_parser(entry)[2]()}</div>
18 <div class="journal_icon"> ${h.action_parser(entry)[2]()}</div>
General Comments 0
You need to be logged in to leave comments. Login now