Merge branch 'master' into bbmaster
This commit is contained in:
commit
ca8267306a
4 changed files with 25 additions and 17 deletions
|
@ -290,7 +290,7 @@ class ConceptView(BaseView):
|
||||||
r.order = pos
|
r.order = pos
|
||||||
|
|
||||||
def getChildren(self, topLevelOnly=True, sort=True, noDuplicates=True,
|
def getChildren(self, topLevelOnly=True, sort=True, noDuplicates=True,
|
||||||
useFilter=True):
|
useFilter=True, predicates=None):
|
||||||
form = self.request.form
|
form = self.request.form
|
||||||
#if form.get('loops.viewName') == 'index.html' and self.editable:
|
#if form.get('loops.viewName') == 'index.html' and self.editable:
|
||||||
if self.editable:
|
if self.editable:
|
||||||
|
@ -307,7 +307,8 @@ class ConceptView(BaseView):
|
||||||
criteria['types'] = [cm.get(name) for name in params['types']]
|
criteria['types'] = [cm.get(name) for name in params['types']]
|
||||||
standard = cm.getDefaultPredicate()
|
standard = cm.getDefaultPredicate()
|
||||||
rels = (self.childViewFactory(r, self.request, contextIsSecond=True)
|
rels = (self.childViewFactory(r, self.request, contextIsSecond=True)
|
||||||
for r in self.context.getChildRelations(sort=None))
|
for r in self.context.getChildRelations(
|
||||||
|
predicates=predicates, sort=None))
|
||||||
if sort:
|
if sort:
|
||||||
rels = sorted(rels, key=lambda r: (r.order, r.title.lower()))
|
rels = sorted(rels, key=lambda r: (r.order, r.title.lower()))
|
||||||
from loops.organize.personal.browser.filter import FilterView
|
from loops.organize.personal.browser.filter import FilterView
|
||||||
|
@ -344,9 +345,10 @@ class ConceptView(BaseView):
|
||||||
# Override in subclass to control what is displayd in listings:
|
# Override in subclass to control what is displayd in listings:
|
||||||
children = getChildren
|
children = getChildren
|
||||||
|
|
||||||
def childrenAlphaGroups(self):
|
def childrenAlphaGroups(self, predicates=None):
|
||||||
result = Jeep()
|
result = Jeep()
|
||||||
rels = self.getChildren(topLevelOnly=False, sort=False)
|
rels = self.getChildren(predicates=predicates or [self.defaultPredicate],
|
||||||
|
topLevelOnly=False, sort=False)
|
||||||
rels = sorted(rels, key=lambda r: r.title.lower())
|
rels = sorted(rels, key=lambda r: r.title.lower())
|
||||||
for letter, group in groupby(rels, lambda r: r.title.lower()[0]):
|
for letter, group in groupby(rels, lambda r: r.title.lower()[0]):
|
||||||
letter = letter.upper()
|
letter = letter.upper()
|
||||||
|
|
|
@ -199,7 +199,7 @@ class Grid3(BasePart):
|
||||||
macroName = 'grid'
|
macroName = 'grid'
|
||||||
imageSize = 'small'
|
imageSize = 'small'
|
||||||
height = 'auto; padding-bottom: 10px'
|
height = 'auto; padding-bottom: 10px'
|
||||||
gridPattern = ['span-2', 'span-2', 'span-2 last']
|
gridPattern = ['span-2 clear', 'span-2', 'span-2 last']
|
||||||
|
|
||||||
|
|
||||||
class List1(BasePart):
|
class List1(BasePart):
|
||||||
|
@ -253,7 +253,7 @@ class ImageGrid3(BasePart):
|
||||||
macroName = 'imagegrid'
|
macroName = 'imagegrid'
|
||||||
imageSize = 'small'
|
imageSize = 'small'
|
||||||
height = 'auto; padding-bottom: 10px'
|
height = 'auto; padding-bottom: 10px'
|
||||||
gridPattern = ['span-2', 'span-2', 'span-2 last']
|
gridPattern = ['span-2 clear', 'span-2', 'span-2 last']
|
||||||
|
|
||||||
|
|
||||||
# relation views, used for cells (components) of lists and grids
|
# relation views, used for cells (components) of lists and grids
|
||||||
|
|
|
@ -3,8 +3,7 @@
|
||||||
|
|
||||||
|
|
||||||
<div metal:define-macro="main"
|
<div metal:define-macro="main"
|
||||||
tal:define="data item/data"
|
tal:define="data item/data">
|
||||||
class="microart">
|
|
||||||
<metal:block use-macro="view/concept_macros/concepttitle_only" />
|
<metal:block use-macro="view/concept_macros/concepttitle_only" />
|
||||||
<div class="description"
|
<div class="description"
|
||||||
tal:define="description description|item/renderedDescription"
|
tal:define="description description|item/renderedDescription"
|
||||||
|
@ -12,14 +11,18 @@
|
||||||
<span tal:content="structure description">Description</span>
|
<span tal:content="structure description">Description</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="text">
|
<div class="text">
|
||||||
<div class="span-6 last"
|
<div class="span-6 last micropart">
|
||||||
tal:content="structure item/story" />
|
<h4 i18n:translate="">Story</h4>
|
||||||
<div class="span-2"
|
<div tal:content="structure item/story" /></div>
|
||||||
tal:content="structure item/insight" />
|
<div class="span-6 last micropart">
|
||||||
<div class="span-2"
|
<h4 i18n:translate="">Insight</h4>
|
||||||
tal:content="structure item/consequences" />
|
<div tal:content="structure item/insight" /></div>
|
||||||
<div class="span-2 last"
|
<div class="span-6 last micropart">
|
||||||
tal:content="structure item/followUps" /></div><br clear="both" />
|
<h4 i18n:translate="">Consequences</h4>
|
||||||
|
<div tal:content="structure item/consequences" /></div>
|
||||||
|
<div class="span-6 last micropart">
|
||||||
|
<h4 i18n:translate="">Follow-up Questions</h4>
|
||||||
|
<div tal:content="structure item/followUps" /></div><br clear="both" /></div>
|
||||||
<metal:block use-macro="view/comment_macros/comments" />
|
<metal:block use-macro="view/comment_macros/comments" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,10 @@
|
||||||
|
|
||||||
|
|
||||||
<metal:block define-macro="glossaryitem">
|
<metal:block define-macro="glossaryitem">
|
||||||
<metal:title use-macro="item/conceptMacros/concepttitle" />
|
<metal:title use-macro="item/conceptMacros/concepttitle_only" />
|
||||||
|
<p tal:define="description item/renderedDescription"
|
||||||
|
tal:condition="description">
|
||||||
|
<tal:text content="structure description" /></p>
|
||||||
<p tal:define="translations item/adapted/translations|python:[]"
|
<p tal:define="translations item/adapted/translations|python:[]"
|
||||||
tal:condition="translations">
|
tal:condition="translations">
|
||||||
<span i18n:translate="">Translations</span>:
|
<span i18n:translate="">Translations</span>:
|
||||||
|
|
Loading…
Add table
Reference in a new issue