1. BoldProgressives
  2. Untitled project
  3. trac-userpictures-plugin


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
  • Branches default

Comments (0)

Files changed (2)

File userpictures/__init__.py

View file
     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)
             return self._browser_lineitem_filter(req, data)
         return [lambda stream: Transformer('//table[@id="info"]//th'
                     req, author,
-                    "browser-changeset", self.browser_changeset_size)
+                    "browser-filesource", self.browser_filesource_size)
                 lambda stream: Transformer('//dd[@class="author"]'

File userpictures/htdocs/userpictures.css

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