diff --git a/browser/concept.py b/browser/concept.py index 546a22e..9fa7d5e 100644 --- a/browser/concept.py +++ b/browser/concept.py @@ -350,7 +350,12 @@ class ConceptView(BaseView): #IOptions(adapted(pr.predicate))('hide_parents_for', [])): IOptions(pr.predicate)('hide_parents_for', [])): return True - hideRoles = IOptions(adapted(pr.first.conceptType))('hide_for', None) + hideRoles = None + options = component.queryAdapter(adapted(pr.first), IOptions) + if options is not None: + hideRoles = options('hide_for', None) + if not hideRoles: + hideRoles = IOptions(adapted(pr.first.conceptType))('hide_for', None) if hideRoles is not None: principal = self.request.principal if (IUnauthenticatedPrincipal.providedBy(principal) and @@ -398,10 +403,16 @@ class ConceptView(BaseView): if fv.check(r.first): yield ResourceRelationView(r, self.request, contextIsSecond=True) + @Lazy + def resourcesList(self): + from loops.browser.resource import ResourceRelationView + return [ResourceRelationView(r, self.request, contextIsSecond=True) + for r in self.context.getResourceRelations()] + @Lazy def resourcesByType(self): result = dict(texts=[], images=[], files=[]) - for rv in self.resources(): + for rv in self.resourcesList: r = rv.context if r.contentType.startswith('text/'): result['texts'].append(r) diff --git a/browser/lobo/configure.zcml b/browser/lobo/configure.zcml index db3b254..0be24a7 100644 --- a/browser/lobo/configure.zcml +++ b/browser/lobo/configure.zcml @@ -39,6 +39,14 @@ factory="loops.browser.lobo.standard.List2" permission="zope.View" /> + +
-
- - - - - -
+ +
+ + + + + +
+
diff --git a/browser/lobo/standard.py b/browser/lobo/standard.py index b6e02ef..b1374cd 100644 --- a/browser/lobo/standard.py +++ b/browser/lobo/standard.py @@ -157,6 +157,7 @@ class BasePart(Base): imageCssClass = '' height = 260 gridPattern = [] + showImage = True def getChildren(self): subtypeNames = (self.params.get('subtypes') or [''])[0].split(',') @@ -206,6 +207,13 @@ class List2(BasePart): gridPattern = [['span-4 clear', 'span-2 last']] +class Header0(BasePart): + + macroName = 'header' + cssClass = ['span-6 last', 'clear'] + showImage = False + + class Header1(BasePart): macroName = 'header' diff --git a/browser/skin/lobo/lobo.css b/browser/skin/lobo/lobo.css index b088587..fd323c7 100644 --- a/browser/skin/lobo/lobo.css +++ b/browser/skin/lobo/lobo.css @@ -443,7 +443,7 @@ img.notselected { /* lobo layout-specific classes */ .legend { - margin-top: 3px; + margin-top: 1px; } /* comments */