Changeset - 44827c84dc66
[Not reviewed]
beta
0 3 0
Marcin Kuzminski - 13 years ago 2012-12-06 01:49:18
marcin@python-works.com
added handling of deleted users in journal data
3 files changed with 17 insertions and 3 deletions:
0 comments (0 inline, 0 general)
rhodecode/controllers/journal.py
Show inline comments
 
@@ -114,7 +114,8 @@ class JournalController(BaseController):
 
        groups = []
 
        for k, g in groupby(journal, lambda x: x.action_as_day):
 
            user_group = []
 
            for k2, g2 in groupby(list(g), lambda x: x.user.email):
 
            #groupby username if it's a present value, else fallback to journal username
 
            for _, g2 in groupby(list(g), lambda x: x.user.username if x.user else x.username):
 
                l = list(g2)
 
                user_group.append((l[0].user, l))
 

	
rhodecode/public/css/style.css
Show inline comments
 
@@ -2327,6 +2327,15 @@ a.metatag[tag="license"]:hover {
 
	height: 30px;
 
}
 
 
#journal .journal_user.deleted {
 
    color: #747474;
 
    font-size: 14px;
 
    font-weight: normal;
 
    height: 30px;
 
    font-style: italic;
 
}
 
 
 
#journal .journal_icon {
 
	clear: both;
 
	float: left;
rhodecode/templates/journal/journal_data.html
Show inline comments
 
@@ -6,9 +6,13 @@
 
        % for user,entries in items:
 
	        <div class="journal_container">
 
	            <div class="gravatar">
 
	                <img alt="gravatar" src="${h.gravatar_url(user.email,24)}"/>
 
	                <img alt="gravatar" src="${h.gravatar_url(user.email if user else 'anonymous@rhodecode.org',24)}"/>
 
	            </div>
 
	            <div class="journal_user">${user.name} ${user.lastname}</div>
 
                %if user:
 
	               <div class="journal_user">${user.name} ${user.lastname}</div>
 
                %else:
 
                    <div class="journal_user deleted">${entries[0].username}</div>
 
                %endif
 
	            <div class="journal_action_container">
 
	            % for entry in entries:
 
		            <div class="journal_icon"> ${h.action_parser(entry)[2]()}</div>
0 comments (0 inline, 0 general)