ejucovy avatar ejucovy committed a56be67

add userpicture for ticket owner

Comments (0)

Files changed (2)


     ticket_comment_diff_size = Option("userpictures", "ticket_comment_diff_size", default="40")
     ticket_reporter_size = Option("userpictures", "ticket_reporter_size", default="60")
+    ticket_owner_size = Option("userpictures", "ticket_owner_size", default="30")
     ticket_comment_size = Option("userpictures", "ticket_comment_size", default="40")
     timeline_size = Option("userpictures", "timeline_size", default="30")
     browser_changeset_size = Option("userpictures", "browser_changeset_size", default="40")
             filter_.extend(self._ticket_comment_diff_filter(req, data))
             filter_.extend(self._ticket_reporter_filter(req, data))
+            filter_.extend(self._ticket_owner_filter(req, data))
             filter_.extend(self._ticket_comment_filter(req, data))
         return filter_
                     req, author,
                     'ticket-reporter', self.ticket_reporter_size)
+    def _ticket_owner_filter(self, req, data):
+        if 'ticket' not in data:
+            return []
+        author = data['ticket'].values['owner']
+        return [lambda stream: Transformer('//td[@headers="h_owner"]'
+                                           ).prepend(self._generate_avatar(
+                    req, author,
+                    'ticket-owner', self.ticket_owner_size)
+                                                     )(stream)]
     def _ticket_comment_filter(self, req, data):
         if 'changes' not in data:
             return []


 img.userpictures_avatar.ticket-comment {
   margin: 0 5px 5px 0;
+img.userpictures_avatar.ticket-owner {
+  margin-top: 0.2em;
+  margin-right: 1em;
+  vertical-align: middle;
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.