def _right(self): projects = IProjectsTopic(self.context).get_projects_folder() topics = projects.get_projects_topics() for topic in topics: yield self.atomic( topic, fraglet( fragletPath=self._project_path(topic), fragletShowTitle=False, fragletShowDescription=False, fragletShowSummary=False, fragletShowThumbnail=False, fragletCssClass="tall-box", listingBatchResults=True, listingItemsPerPage=7, itemShowTitle=True, itemShowIcon=True, itemShowGraphic="tile", itemShowSummary=False, itemShowDescription=True, itemShowDownloadLink=True, ), hidden=True, ) yield self.atomic("project-topics", multi_portlet(dict(portlets=topics, portlet_type="tabbed")))
def _right(self): yield self.atomic( 'project-info', portlet_project_info.Assignment(path=self._project_path()) ) frag_paths = [] excluded_folders = ['partners', 'media', 'info'] for folder in self.project.get_project_folders(non_empty=True): if len(frag_paths) < 3: if not folder in excluded_folders: frag_paths.append(folder) else: break mf = [] subs = [] for path in frag_paths: news = IProjectNews( self.project.get_project_folder(path), None) events = IProjectEvents( self.project.get_project_folder(path), None) css_class = 'overlayFragletItems medium-tall-box' fraglet_dict = dict(fragletPath=self._project_path(path), fragletShowTitle=True, fragletShowDescription=False, fragletShowSummary=False, fragletShowThumbnail=False, fragletCssClass=css_class, listingBatchResults=True, listingItemsPerPage=5, itemShowTitle=True, itemShowIcon=True, itemShowGraphic='tile', itemShowSummary=False, itemShowDescription=True, itemShowDownloadLink=True) if events: fraglet_dict['itemProperties'] = 'timespan\nlongdate' if news: fraglet_dict['itemProperties'] =\ 'effective: Published: $PROP\nCreator: by $PROP' subportlet = path.split('/')[-1] subs.append(subportlet) yield self.atomic( subportlet, fraglet(**fraglet_dict), hidden=True ) yield self.atomic( 'project-listings', multi_portlet(dict(portlets=subs, portlet_type='tabbed'))) media = self.project.get_project_folder('media') if media and media.contentIds(): yield self.atomic( 'project-media', fraglet( fragletPath=self._project_path('media'), fragletShowTitle=True, fragletShowDescription=False, fragletShowSummary=False, fragletShowThumbnail=False, fragletCssClass='overlayFragletItems', listingBatchResults=True, listingItemsPerPage=5, itemShowTitle=True, itemShowIcon=True, itemShowGraphic='tile', itemShowSummary=False, itemLinkDirectly=False, itemShowDescription=True, itemShowDownloadLink=True))
def _right(self): projects = IProjectsFolder(self.context) topics = projects.get_projects_topics() yield self.atomic( 'site-contacts', fraglet(fragletPath="/about/contact", fragletShowTitle=True, fragletShowDescription=False, fragletShowSummary=False, fragletShowThumbnail=False, itemShowDescription=False, listingMaxItems=4, )) yield self.atomic( 'topics', multi_portlet(dict(portlets=topics, portlet_type='tabbed'))) for topic in topics: yield self.atomic( topic, fraglet( fragletPath=self._project_path(topic), fragletShowTitle=True, fragletShowDescription=False, fragletShowSummary=False, fragletShowThumbnail=False, fragletCssClass='tall-box', listingBatchResults=True, listingItemsPerPage=5, itemShowTitle=True, itemShowIcon=True, itemShowGraphic='tile', itemShowSummary=False, itemShowDescription=True, itemShowDownloadLink=True), hidden=True) # this needs cleaning up and moving! names = {'/events/upcoming': 'Events', '/about/news/latest': 'News'} yield self.atomic( 'latest', multi_portlet(dict(portlets=names.values(), portlet_type='tabbed'))) for path in ['/about/news/latest', '/events/upcoming',]: yield self.atomic( names[path], fraglet( fragletPath=path, fragletShowTitle=False, fragletShowDescription=False, fragletShowSummary=False, fragletShowThumbnail=False, fragletCssClass='tall-box overlayFragletItems', listingBatchResults=True, listingItemsPerPage=5, itemShowTitle=True, itemShowIcon=True, itemShowGraphic='tile', itemShowSummary=False, itemShowDescription=True, itemShowDownloadLink=True), hidden=True)