Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

* The collection now only accepts topics/collections as references

* You get a friendly error when you didn't select a collection.
  • Loading branch information...
commit eb3fbd912d3aedd1b4603e67b55422feca10ef2d 1 parent 56f7055
Alessandro Vermeulen authored
View
50 Products/Doormat/browser/views.py
@@ -80,35 +80,39 @@ def getDoormatData(self):
elif item.portal_type == "Document":
text = item.getText()
elif item.portal_type == "DoormatCollection":
- results = self.getCollection(item)
+ if item.getCollection().portal_type == "Topic":
+ results = self.getCollection(item)
- # Add links from collections
- for nitem in results:
- obj = nitem.getObject()
+ # Add links from collections
+ for nitem in results:
+ obj = nitem.getObject()
- if (item.showTime):
- title = self.localizedTime(obj.modified()) + ' - ' + obj.title
- else:
- title = obj.title
+ if (item.showTime):
+ title = self.localizedTime(obj.modified()) + ' - ' + obj.title
+ else:
+ title = obj.title
- section_links.append({
- 'content': '',
- 'link_url': obj.absolute_url(),
- 'link_title': title,
- 'link_class': 'collection-item',
- })
+ section_links.append({
+ 'content': '',
+ 'link_url': obj.absolute_url(),
+ 'link_title': title,
+ 'link_class': 'collection-item',
+ })
- # Add the read more link if it is specified
- if item.getShowMoreLink():
- section_links.append({
- 'content': '',
- 'link_url': item.getShowMoreLink().absolute_url(),
- 'link_title': item.showMoreText,
- 'link_class': 'read-more'
- })
+ # Add the read more link if it is specified
+ if item.getShowMoreLink():
+ section_links.append({
+ 'content': '',
+ 'link_url': item.getShowMoreLink().absolute_url(),
+ 'link_title': item.showMoreText,
+ 'link_class': 'read-more'
+ })
- continue
+ continue
+ else:
+ url = ''
+ text = item.id+': This is not a collection, but a ' + item.getCollection().portal_type + ' :-)'
if not (text or url):
continue
View
1  Products/Doormat/content/DoormatCollection.py
@@ -38,6 +38,7 @@
label_msgid='Doormat_label_collection',
i18n_domain='Doormat',
),
+ allowed_types="('Topic')",
relationship="internally_references_to_collection",
),
ReferenceField(
View
4 Products/Doormat/profiles/default/import_steps.xml
@@ -8,7 +8,7 @@
id="Doormat-Update-RoleMappings"
handler="Products.Doormat.setuphandlers.updateRoleMappings"
title="Update Workflow role mappings for Doormat"
- version="2011-03-23T10:38:49.700908">
+ version="2011-03-23T15:21:09.806795">
<dependency step="Doormat-QI-dependencies"/>
updates the workflow role mappings for Doormat
</import-step>
@@ -17,7 +17,7 @@
id="Doormat-postInstall"
handler="Products.Doormat.setuphandlers.postInstall"
title="manual coded post-install for Doormat"
- version="2011-03-23T10:38:49.700908">
+ version="2011-03-23T15:21:09.806795">
<dependency step="Doormat-QI-dependencies"/>
manual coded post-install for Doormat
</import-step>
View
2  Products/Doormat/profiles/default/metadata.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<metadata>
- <version>0.6.13</version>
+ <version>0.6.14</version>
<!-- ##code-section METADATA -->
<!-- ##/code-section METADATA -->
</metadata>
View
13 uml/doormat.uml
@@ -48,7 +48,7 @@
UML 1.4
</plugin>
</profile>
-<XMI xmi.version = '1.2' xmlns:UML = 'org.omg.xmi.namespace.UML' timestamp = 'Wed Mar 23 10:38:31 CET 2011'>
+<XMI xmi.version = '1.2' xmlns:UML = 'org.omg.xmi.namespace.UML' timestamp = 'Wed Mar 23 15:19:39 CET 2011'>
<XMI.header> <XMI.documentation>
<XMI.exporter>ArgoUML (using Netbeans XMI Writer version 1.0)</XMI.exporter>
<XMI.exporterVersion>0.32.1(6) revised on $Date: 2010-01-11 22:20:14 +0100 (Mon, 11 Jan 2010) $ </XMI.exporterVersion>
@@ -3279,6 +3279,13 @@
<UML:TagDefinition xmi.idref = 'd8173c3e-2367-5adf-9fee-a5f97447736b'/>
</UML:TaggedValue.type>
</UML:TaggedValue>
+ <UML:TaggedValue xmi.id = '-64--88--72-113--3ed87035:12ee3112737:-8000:0000000000000DE7'
+ isSpecification = 'false'>
+ <UML:TaggedValue.dataValue>(&apos;Topic&apos;)</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref = 'a31a0693-c6e7-581b-a9fb-0b107bacd90c'/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
</UML:ModelElement.taggedValue>
<UML:StructuralFeature.type>
<UML:DataType xmi.idref = 'e85df323-29b1-5d10-98de-7c2a1c60f9da'/>
@@ -5108,7 +5115,7 @@
justification="Center"
>content::DoormatCollection</text>
<group name="Fig16.2"
- description="org.argouml.uml.diagram.ui.FigStereotypesGroup[705, 337, 163, 0]"
+ description="org.argouml.uml.diagram.ui.FigStereotypesGroup[705, 337, 168, 0]"
href="-64--88--72-113-37f439a7:12edccb3896:-8000:0000000000000DBD"
fill="0"
fillcolor="white"
@@ -5122,7 +5129,7 @@
<rectangle name="Fig16.2.0"
x="705"
y="337"
- width="163"
+ width="168"
height="0"
fill="0"
fillcolor="white"
Please sign in to comment.
Something went wrong with that request. Please try again.