show attachment details on its own line, more readable
diff --git a/Allura/allura/lib/helpers.py b/Allura/allura/lib/helpers.py
index 1382897..b144cc8 100644
--- a/Allura/allura/lib/helpers.py
+++ b/Allura/allura/lib/helpers.py
@@ -589,3 +589,35 @@
             else:
                 text = '<pre>%s</pre>' % text
     return Markup(text)
+
+# copied from jinja2 dev
+# latest release, 2.6, implements this incorrectly
+# can remove and use jinja2 implementation after upgrading to 2.7
+def do_filesizeformat(value, binary=False):
+    """Format the value like a 'human-readable' file size (i.e. 13 kB,
+4.1 MB, 102 Bytes, etc). Per default decimal prefixes are used (Mega,
+Giga, etc.), if the second parameter is set to `True` the binary
+prefixes are used (Mebi, Gibi).
+"""
+    bytes = float(value)
+    base = binary and 1024 or 1000
+    prefixes = [
+        (binary and 'KiB' or 'kB'),
+        (binary and 'MiB' or 'MB'),
+        (binary and 'GiB' or 'GB'),
+        (binary and 'TiB' or 'TB'),
+        (binary and 'PiB' or 'PB'),
+        (binary and 'EiB' or 'EB'),
+        (binary and 'ZiB' or 'ZB'),
+        (binary and 'YiB' or 'YB')
+    ]
+    if bytes == 1:
+        return '1 Byte'
+    elif bytes < base:
+        return '%d Bytes' % bytes
+    else:
+        for i, prefix in enumerate(prefixes):
+            unit = base ** (i + 2)
+            if bytes < unit:
+                return '%.1f %s' % ((base * bytes / unit), prefix)
+        return '%.1f %s' % ((base * bytes / unit), prefix)
diff --git a/Allura/allura/model/notification.py b/Allura/allura/model/notification.py
index 2562c41..60ded08 100644
--- a/Allura/allura/model/notification.py
+++ b/Allura/allura/model/notification.py
@@ -121,7 +121,7 @@
                 file_info.file.seek(0, 2)
                 bytecount = file_info.file.tell()
                 file_info.file.seek(0)
-                text = "%s\n%s (%s bytes in %s)" % (text, file_info.filename, bytecount, file_info.type)
+                text = "%s\n\n\nAttachment: %s (%s; %s)" % (text, file_info.filename, h.do_filesizeformat(bytecount), file_info.type)
 
             subject = post.subject or ''
             if post.parent_id and not subject.lower().startswith('re:'):
diff --git a/Allura/allura/tests/model/test_discussion.py b/Allura/allura/tests/model/test_discussion.py
index c43efe3..f80805e 100644
--- a/Allura/allura/tests/model/test_discussion.py
+++ b/Allura/allura/tests/model/test_discussion.py
@@ -167,7 +167,7 @@
     p = t.post(text=u'test message', forum= None, subject= '', file_info=fs)
     ThreadLocalORMSession.flush_all()
     n = M.Notification.query.get(subject=u'[test:wiki] Test comment notification')
-    assert u'test message\nfake.txt (37 bytes in text/plain)'==n.text
+    assert_equals(u'test message\n\n\nAttachment: fake.txt (37 Bytes; text/plain)', n.text)
 
 @with_setup(setUp, tearDown)
 def test_discussion_delete():