Commits

ejucovy committed 4782199

fix display for viewing the source of a single file (either at HEAD or at a particular revision) -- distinct from viewing a changeset

  • Participants
  • Parent commits a9b0125

Comments (0)

Files changed (2)

File userpictures/__init__.py

     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="30")
+    browser_filesource_size = Option("userpictures", "browser_filesource_size", default="40")
     browser_lineitem_size = Option("userpictures", "browser_lineitem_size", default="20")
 
     ## ITemplateProvider methods
         return []
 
     def _browser_filter(self, req, data):
-        if 'dir' not in data:
+        if not data.get('dir'):
             return self._browser_changeset_filter(req, data)
         else:
             return self._browser_lineitem_filter(req, data)
         return [lambda stream: Transformer('//table[@id="info"]//th'
                                            ).prepend(self._generate_avatar(
                     req, author,
-                    "browser-changeset", self.browser_changeset_size)
+                    "browser-filesource", self.browser_filesource_size)
                                                      )(stream),
                 lambda stream: Transformer('//dd[@class="author"]'
                                            ).prepend(self._generate_avatar(

File userpictures/htdocs/userpictures.css

   margin: 3px 10px 5px 0px;
   vertical-align: middle;
 }
+
+img.userpictures_avatar.browser-filesource {
+  margin: 3px 10px 0px 0px;
+  vertical-align: top;
+}