Merge branch 'master' into bbmaster
This commit is contained in:
commit
6e36c6708c
12 changed files with 98 additions and 24 deletions
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (c) 2009 Helmut Merz helmutm@cy55.de
|
# Copyright (c) 2012 Helmut Merz helmutm@cy55.de
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@ -18,8 +18,6 @@
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Base classes (sort of views) for action portlet items.
|
Base classes (sort of views) for action portlet items.
|
||||||
|
|
||||||
$Id$
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from urllib import urlencode
|
from urllib import urlencode
|
||||||
|
@ -75,7 +73,6 @@ class DialogAction(Action):
|
||||||
|
|
||||||
@Lazy
|
@Lazy
|
||||||
def url(self):
|
def url(self):
|
||||||
#return '%s/%s' % (self.page.getUrlForTarget(self.view), self.viewName)
|
|
||||||
if self.target is not None:
|
if self.target is not None:
|
||||||
url = self.page.getUrlForTarget(self.target)
|
url = self.page.getUrlForTarget(self.target)
|
||||||
else:
|
else:
|
||||||
|
@ -96,9 +93,6 @@ class DialogAction(Action):
|
||||||
if self.viewTitle:
|
if self.viewTitle:
|
||||||
urlParams['view_title'] = self.viewTitle
|
urlParams['view_title'] = self.viewTitle
|
||||||
urlParams.update(self.addParams)
|
urlParams.update(self.addParams)
|
||||||
#url = self.page.getUrlForTarget(self.view)
|
|
||||||
#return self.jsOnClick % (self.dialogName, url, self.viewName,
|
|
||||||
# urlencode(urlParams))
|
|
||||||
if self.target is not None:
|
if self.target is not None:
|
||||||
url = self.page.getUrlForTarget(self.target)
|
url = self.page.getUrlForTarget(self.target)
|
||||||
else:
|
else:
|
||||||
|
@ -116,7 +110,6 @@ class DialogAction(Action):
|
||||||
actions.register('info', 'object', DialogAction,
|
actions.register('info', 'object', DialogAction,
|
||||||
description=_(u'Information about this object.'),
|
description=_(u'Information about this object.'),
|
||||||
viewName='object_info.html',
|
viewName='object_info.html',
|
||||||
#dialogName='object_info',
|
|
||||||
dialogName='',
|
dialogName='',
|
||||||
icon='cybertools.icons/info.png',
|
icon='cybertools.icons/info.png',
|
||||||
cssClass='icon-action',
|
cssClass='icon-action',
|
||||||
|
@ -152,8 +145,6 @@ actions.register('create_concept', 'portlet', DialogAction,
|
||||||
viewName='create_concept.html',
|
viewName='create_concept.html',
|
||||||
dialogName='createConcept',
|
dialogName='createConcept',
|
||||||
qualifier='create_concept',
|
qualifier='create_concept',
|
||||||
#typeToken='.loops/concepts/topic',
|
|
||||||
#fixedType=True,
|
|
||||||
innerForm='inner_concept_form.html',
|
innerForm='inner_concept_form.html',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (c) 2010 Helmut Merz helmutm@cy55.de
|
# Copyright (c) 2012 Helmut Merz helmutm@cy55.de
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@ -18,8 +18,6 @@
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Classes for form presentation and processing.
|
Classes for form presentation and processing.
|
||||||
|
|
||||||
$Id$
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from zope import component, interface, schema
|
from zope import component, interface, schema
|
||||||
|
@ -561,8 +559,8 @@ class EditObject(FormController, I18NView):
|
||||||
if k.startswith('state.'):
|
if k.startswith('state.'):
|
||||||
stateKeys.append(k)
|
stateKeys.append(k)
|
||||||
self.collectAutoConcepts()
|
self.collectAutoConcepts()
|
||||||
if self.old or self.selected:
|
#if self.old or self.selected:
|
||||||
self.assignConcepts(obj)
|
self.assignConcepts(obj)
|
||||||
for k in stateKeys:
|
for k in stateKeys:
|
||||||
self.updateState(k)
|
self.updateState(k)
|
||||||
notify(ObjectModifiedEvent(obj))
|
notify(ObjectModifiedEvent(obj))
|
||||||
|
@ -641,7 +639,6 @@ class EditObject(FormController, I18NView):
|
||||||
form = self.request.form
|
form = self.request.form
|
||||||
if form.get('version.create'):
|
if form.get('version.create'):
|
||||||
versionable = IVersionable(obj)
|
versionable = IVersionable(obj)
|
||||||
#level = int(form.get('version.level', 1))
|
|
||||||
level = int(form.get('version.level', 0))
|
level = int(form.get('version.level', 0))
|
||||||
version = versionable.createVersion(level)
|
version = versionable.createVersion(level)
|
||||||
notify(ObjectCreatedEvent(version))
|
notify(ObjectCreatedEvent(version))
|
||||||
|
@ -712,8 +709,6 @@ class EditConcept(EditObject):
|
||||||
obj.deassignParent(concept, predicates)
|
obj.deassignParent(concept, predicates)
|
||||||
|
|
||||||
def update(self):
|
def update(self):
|
||||||
#self.object = self.view.virtualTargetObject
|
|
||||||
#self.object = self.view.item.context
|
|
||||||
self.object = self.view.item.target
|
self.object = self.view.item.target
|
||||||
formState = self.updateFields()
|
formState = self.updateFields()
|
||||||
self.view.formState = formState
|
self.view.formState = formState
|
||||||
|
|
|
@ -23,6 +23,14 @@
|
||||||
factory="loops.browser.lobo.standard.Grid3"
|
factory="loops.browser.lobo.standard.Grid3"
|
||||||
permission="zope.View" />
|
permission="zope.View" />
|
||||||
|
|
||||||
|
<zope:adapter
|
||||||
|
name="lobo_lt"
|
||||||
|
for="loops.interfaces.IConcept
|
||||||
|
loops.browser.skin.Lobo"
|
||||||
|
provides="zope.interface.Interface"
|
||||||
|
factory="loops.browser.lobo.standard.ListThumbs"
|
||||||
|
permission="zope.View" />
|
||||||
|
|
||||||
<zope:adapter
|
<zope:adapter
|
||||||
name="lobo_l1"
|
name="lobo_l1"
|
||||||
for="loops.interfaces.IConcept
|
for="loops.interfaces.IConcept
|
||||||
|
@ -39,6 +47,14 @@
|
||||||
factory="loops.browser.lobo.standard.List2"
|
factory="loops.browser.lobo.standard.List2"
|
||||||
permission="zope.View" />
|
permission="zope.View" />
|
||||||
|
|
||||||
|
<zope:adapter
|
||||||
|
name="lobo_ht"
|
||||||
|
for="loops.interfaces.IConcept
|
||||||
|
loops.browser.skin.Lobo"
|
||||||
|
provides="zope.interface.Interface"
|
||||||
|
factory="loops.browser.lobo.standard.HeaderThumbs"
|
||||||
|
permission="zope.View" />
|
||||||
|
|
||||||
<zope:adapter
|
<zope:adapter
|
||||||
name="lobo_h0"
|
name="lobo_h0"
|
||||||
for="loops.interfaces.IConcept
|
for="loops.interfaces.IConcept
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
title cell/description">
|
title cell/description">
|
||||||
<div class="legend">
|
<div class="legend">
|
||||||
<b tal:content="cell/title" /><br />
|
<b tal:content="cell/title" /><br />
|
||||||
<i tal:content="cell/description" />
|
<i tal:content="structure cell/renderedDescription" />
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -202,6 +202,13 @@ class Grid3(BasePart):
|
||||||
gridPattern = ['span-2 clear', 'span-2', 'span-2 last']
|
gridPattern = ['span-2 clear', 'span-2', 'span-2 last']
|
||||||
|
|
||||||
|
|
||||||
|
class ListThumbs(BasePart):
|
||||||
|
|
||||||
|
macroName = 'list'
|
||||||
|
imageSize = 'minithumb'
|
||||||
|
gridPattern = [['span-1 clear', 'span-5 last']]
|
||||||
|
|
||||||
|
|
||||||
class List1(BasePart):
|
class List1(BasePart):
|
||||||
|
|
||||||
macroName = 'list'
|
macroName = 'list'
|
||||||
|
@ -224,6 +231,13 @@ class Header0(BasePart):
|
||||||
cssClass = ['', 'span-6 last', 'clear']
|
cssClass = ['', 'span-6 last', 'clear']
|
||||||
|
|
||||||
|
|
||||||
|
class HeaderThumbs(BasePart):
|
||||||
|
|
||||||
|
macroName = 'header'
|
||||||
|
imageSize = 'minithumb'
|
||||||
|
cssClass = ['span-1', 'span-5 last', 'clear']
|
||||||
|
|
||||||
|
|
||||||
class Header1(BasePart):
|
class Header1(BasePart):
|
||||||
|
|
||||||
macroName = 'header'
|
macroName = 'header'
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
/*
|
/*
|
||||||
$Id$
|
|
||||||
|
|
||||||
settings specific for view / node objects
|
settings specific for view / node objects
|
||||||
|
|
||||||
|
@ -467,6 +466,20 @@ div.comment {
|
||||||
padding-top: 0.4em;
|
padding-top: 0.4em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* microart */
|
||||||
|
|
||||||
|
.micropart {
|
||||||
|
background-color: #f7f7f7;
|
||||||
|
padding: 0 5px 0 5px;
|
||||||
|
margin: 5px 0 5px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.micropart h3,h4,h5 {
|
||||||
|
font-weight: bold;
|
||||||
|
margin-bottom: 0.2em;
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
|
||||||
/* calendar, work items */
|
/* calendar, work items */
|
||||||
|
|
||||||
.today {
|
.today {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (c) 2011 Helmut Merz helmutm@cy55.de
|
# Copyright (c) 2012 Helmut Merz helmutm@cy55.de
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@ -34,7 +34,7 @@ class Controller(BaseController):
|
||||||
|
|
||||||
def setupMetadata(self):
|
def setupMetadata(self):
|
||||||
macros = self.macros
|
macros = self.macros
|
||||||
target = self.view.virtualTarget
|
target = getattr(self.view, 'virtualTarget', None)
|
||||||
if target is not None:
|
if target is not None:
|
||||||
desc = target.dcDescription
|
desc = target.dcDescription
|
||||||
if desc:
|
if desc:
|
||||||
|
|
|
@ -484,6 +484,12 @@ img.notselected {
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* no vertical spacing for descriptions in grids */
|
||||||
|
div.legend i p {
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
/* comments */
|
/* comments */
|
||||||
|
|
||||||
div.comment {
|
div.comment {
|
||||||
|
|
|
@ -26,12 +26,32 @@ from zope import component
|
||||||
from zope.app.pagetemplate import ViewPageTemplateFile
|
from zope.app.pagetemplate import ViewPageTemplateFile
|
||||||
from zope.cachedescriptors.property import Lazy
|
from zope.cachedescriptors.property import Lazy
|
||||||
|
|
||||||
|
from loops.browser.action import actions, DialogAction
|
||||||
from loops.browser.concept import ConceptView
|
from loops.browser.concept import ConceptView
|
||||||
from loops.common import adapted
|
from loops.common import adapted
|
||||||
from loops import util
|
from loops import util
|
||||||
from loops.util import _
|
from loops.util import _
|
||||||
|
|
||||||
|
|
||||||
|
actions.register('create_microart', 'portlet', DialogAction,
|
||||||
|
title=_(u'Create MicroArticle...'),
|
||||||
|
description=_(u'Create a new MicroArticle.'),
|
||||||
|
viewName='create_concept.html',
|
||||||
|
dialogName='createConcept',
|
||||||
|
typeToken='.loops/concepts/microart',
|
||||||
|
fixedType=True,
|
||||||
|
#prerequisites=['registerDojoTextWidget'],
|
||||||
|
)
|
||||||
|
|
||||||
|
actions.register('edit_microart', 'portlet', DialogAction,
|
||||||
|
title=_(u'Edit MicroArticle...'),
|
||||||
|
description=_(u'Modify MicroArticle.'),
|
||||||
|
viewName='edit_concept.html',
|
||||||
|
dialogName='editConcept',
|
||||||
|
#prerequisites=['registerDojoTextWidget'],
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
view_macros = ViewPageTemplateFile('view_macros.pt')
|
view_macros = ViewPageTemplateFile('view_macros.pt')
|
||||||
|
|
||||||
|
|
||||||
|
|
Binary file not shown.
|
@ -3,7 +3,7 @@ msgstr ""
|
||||||
|
|
||||||
"Project-Id-Version: $Id$\n"
|
"Project-Id-Version: $Id$\n"
|
||||||
"POT-Creation-Date: 2007-05-22 12:00 CET\n"
|
"POT-Creation-Date: 2007-05-22 12:00 CET\n"
|
||||||
"PO-Revision-Date: 2011-12-02 12:00 CET\n"
|
"PO-Revision-Date: 2012-02-16 12:00 CET\n"
|
||||||
"Last-Translator: Helmut Merz <helmutm@cy55.de>\n"
|
"Last-Translator: Helmut Merz <helmutm@cy55.de>\n"
|
||||||
"Language-Team: loops developers <helmutm@cy55.de>\n"
|
"Language-Team: loops developers <helmutm@cy55.de>\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
|
@ -108,6 +108,24 @@ msgstr "Tagebuch exportieren"
|
||||||
|
|
||||||
# micro article
|
# micro article
|
||||||
|
|
||||||
|
msgid "Edit MicroArticle..."
|
||||||
|
msgstr "MikroArtikel bearbeiten..."
|
||||||
|
|
||||||
|
msgid "Edit MicroArticle"
|
||||||
|
msgstr "MikroArtikel bearbeiten"
|
||||||
|
|
||||||
|
msgid "Modify MicroArticle."
|
||||||
|
msgstr "MikroArtikel ändern."
|
||||||
|
|
||||||
|
msgid "Create MicroArticle..."
|
||||||
|
msgstr "MikroArtikel anlegen..."
|
||||||
|
|
||||||
|
msgid "Create a new MicroArticle."
|
||||||
|
msgstr "Einen neuen MikroArtikel erzeugen"
|
||||||
|
|
||||||
|
msgid "Create MicroArticle"
|
||||||
|
msgstr "MikroArtikel anlegen"
|
||||||
|
|
||||||
msgid "Story"
|
msgid "Story"
|
||||||
msgstr "Story"
|
msgstr "Story"
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,8 @@ class CommentsView(NodeView):
|
||||||
|
|
||||||
@Lazy
|
@Lazy
|
||||||
def addUrl(self):
|
def addUrl(self):
|
||||||
return '%s/create_comment.html' % self.getUrlForTarget(self.context)
|
return '%s/create_comment.html' % self.virtualTargetUrl
|
||||||
|
#return '%s/create_comment.html' % self.getUrlForTarget(self.context)
|
||||||
|
|
||||||
@Lazy
|
@Lazy
|
||||||
def addOnClick(self):
|
def addOnClick(self):
|
||||||
|
|
Loading…
Add table
Reference in a new issue