Beispiel #1
0
 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
     ])
Beispiel #2
0
 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
     ])
Beispiel #3
0
 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
     ])
Beispiel #4
0
 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
     ])
Beispiel #5
0
 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
     ])
Beispiel #6
0
 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
     ]
Beispiel #7
0
 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
     ]
Beispiel #8
0
 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
     ]
Beispiel #9
0
 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
     ]
Beispiel #10
0
 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
     ]
Beispiel #11
0
 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
     ]
Beispiel #12
0
 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
Beispiel #13
0
 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
Beispiel #14
0
 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
Beispiel #15
0
 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
Beispiel #16
0
 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
Beispiel #17
0
 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]
Beispiel #18
0
 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]
Beispiel #19
0
 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]