control display of resource titles in book sections; use book views also in old Loopz skin

This commit is contained in:
Helmut Merz 2013-09-08 11:59:38 +02:00
parent 4c3848f8db
commit 3c153ce058
3 changed files with 14 additions and 4 deletions

View file

@ -59,6 +59,15 @@ textarea {
margin-top: 0.5em;
}
/* elements taken from blueprint (Lobo) skin */
.span-1, .span-2, .span-3, .span-4, .span-5, .span-6 {float: left;}
.span-1 {width: 105px;}
.span-2 {width: 230px;}
.span-3 {width: 355px;}
.span-4 {width: 480px;}
.span-5 {width: 605px;}
.span-6 {width: 730px;}
table.listing {
margin: 1px;
margin-top: 6px;

View file

@ -130,7 +130,8 @@ class Base(object):
return IOptions(adapted(dt))(name)
def getTitleForResource(self, r):
if self.getOptionsForResource(r, 'showtitle'):
if (IOptions(adapted(r.context.resourceType))('show_title_in_section') or
self.getOptionsForResource(r, 'show_title_in_section')):
return r.title
def getIconForResource(self, r):

View file

@ -8,7 +8,7 @@
<zope:adapter
name="book_overview"
for="loops.interfaces.IConcept
loops.browser.skin.Lobo"
zope.publisher.interfaces.browser.IBrowserRequest"
provides="zope.interface.Interface"
factory="loops.compound.book.browser.BookView"
permission="zope.View" />
@ -16,7 +16,7 @@
<zope:adapter
name="section_view"
for="loops.interfaces.IConcept
loops.browser.skin.Lobo"
zope.publisher.interfaces.browser.IBrowserRequest"
provides="zope.interface.Interface"
factory="loops.compound.book.browser.SectionView"
permission="zope.View" />
@ -24,7 +24,7 @@
<zope:adapter
name="book_topic_view"
for="loops.interfaces.IConcept
loops.browser.skin.Lobo"
zope.publisher.interfaces.browser.IBrowserRequest"
provides="zope.interface.Interface"
factory="loops.compound.book.browser.TopicView"
permission="zope.View" />