diff --git a/browser/common.py b/browser/common.py index 42b1a35..62c5491 100644 --- a/browser/common.py +++ b/browser/common.py @@ -44,6 +44,7 @@ from zope.traversing.api import getName from cybertools.browser.view import GenericView from cybertools.relation.interfaces import IRelationRegistry +from cybertools.text import mimetypes from cybertools.typology.interfaces import IType, ITypeManager from loops.interfaces import IView from loops.resource import Resource @@ -173,6 +174,17 @@ class BaseView(GenericView): def typeTitle(self): return self.type.title + @Lazy + def longTypeTitle(self): + t = self.typeTitle + ct = getattr(self.context, 'contentType') + if ct: + ext = mimetypes.extensions.get(ct) + if ext: + #return '%s (%s)' % (t, ext.upper()) + return ext.upper() + return t + @Lazy def typeUrl(self): provider = self.typeProvider diff --git a/browser/concept_macros.pt b/browser/concept_macros.pt index c5bfe9b..b238c4c 100644 --- a/browser/concept_macros.pt +++ b/browser/concept_macros.pt @@ -91,22 +91,23 @@
Description
+
+ Download
+
Download
diff --git a/search/search.pt b/search/search.pt
index 3449f7e..1c94d98 100644
--- a/search/search.pt
+++ b/search/search.pt
@@ -56,20 +56,21 @@
-
-
- Type
+ Type
Size
modified
describing...