def getKeywords(self): ids = self.context.getKeywords() terms = getTerms('keywords', ids) return sorted([ term['name'].get(self.current_language, None) for term in terms if term is not None ])
def getThemes(self): ids = self.context.getThemes() terms = getTerms('theme', ids) return sorted([ term['name'].get(self.current_language, None) for term in terms if term is not None ])
def getCountries(self): ids = self.context.getCountries() terms = getTerms('country', ids) return sorted([ term['name'].get(self.current_language, None) for term in terms if term is not None ])
def getBrusselsPartners(self): ids = self.context.getBrusselspartners() terms = getTerms('brusselspartners', ids) return sorted([ u'{0} {1}'.format(term['lastname'], term['firstname']) for term in terms if term is not None ])
def getKeywords(self, project): project = self.getFullProject(project) ids = project.getKeywords() terms = getTerms('keywords', ids) return [ term['id'] for term in terms if term is not None ]
def getRegions(self, project): project = self.getFullProject(project) ids = project.getRegions() terms = getTerms('region', ids) return [ term['id'] for term in terms if term is not None ]
def getCities(self, project): project = self.getFullProject(project) ids = project.getCities() terms = getTerms('city', ids) return [ term['id'] for term in terms if term is not None ]
def getContacts(self, project): project = self.getFullProject(project) ids = project.getContacts() terms = getTerms('contact', ids) return [ u'{0} {1}'.format(term['lastname'], term['firstname']) for term in terms if term is not None ]
def getKeywords(self, project): project = self.getFullProject(project) ids = project.getKeywords() terms = getTerms('keywords', ids) return [ ( term['id'], term['name']['en'], term['name']['fr'], term['name']['nl'] ) for term in terms if term is not None ]
def getPartners(self, project): project = self.getFullProject(project) ids = project.getBrusselspartners() contacts = getTerms('brusselspartners', ids) organisations = [] for contact in contacts: orga = self.getContactOrganisation(contact) if orga and orga not in organisations: organisations.append(orga) #remove duplicates organisations = list(set(organisations)) return organisations
def getBrusselsPartners(self): ids = self.context.getBrusselspartners() terms = getTerms('brusselspartners', ids) terms = [term for term in terms if term is not None] for term in terms: for id in ('organisation', 'cell'): term[id] = getTerm(id, term[id]) if term['organisation'] is not None: term['organisation'] = term['organisation']['name']\ .get(self.current_language, '') if term['cell'] is not None: term['cell'] = term['cell']['description']\ .get(self.current_language, '') return terms
def getContacts(self): ids = self.context.getContacts() terms = getTerms('contact', ids) terms = [term for term in terms if term is not None] for term in terms: for id in ('organisation', 'cell', 'function'): term[id] = getTerm(id, term[id]) if term['organisation'] is not None: term['organisation'] = term['organisation']['name']\ .get(self.current_language, '') if term['cell'] is not None: term['cell'] = term['cell']['description']\ .get(self.current_language, '') if term['function'] is not None: term['function'] = term['function']['code']\ .get(self.current_language, '') return terms
def getKeywords(self, project): project = self.getFullProject(project) ids = project.getKeywords() terms = getTerms('keywords', ids) return [term['id'] for term in terms if term is not None]
def getRegions(self, project): project = self.getFullProject(project) ids = project.getRegions() terms = getTerms('region', ids) return [term['id'] for term in terms if term is not None]
def getCities(self, project): project = self.getFullProject(project) ids = project.getCities() terms = getTerms('city', ids) return [term['id'] for term in terms if term is not None]