def get_participants(self): dossier = IDossier(self.context) rows = [] # add the responsible rows.append('%s, %s' % ( readable_ogds_author(None, dossier.responsible), translate(_dossier(u'label_responsible', 'Responsible'), context=self.request))) # add the participants participants = list(IParticipationAware( self.context).get_participations()) for participant in participants: rows.append('%s, %s' % ( readable_ogds_author(participant, participant.contact), role_list_helper(participant, participant.roles))) values = ['{', '\\vspace{-\\baselineskip}\\begin{itemize}'] for row in self.convert_list(rows): values.append('\\item {}'.format(row)) values.append('\\vspace{-\\baselineskip}\\end{itemize}') values.append('}') return ' \n'.join(values)
def sortable_author(obj): """Index to allow users to sort on document_author.""" author = obj.document_author if author: readable_author = readable_ogds_author(obj, author) return readable_author return ''
def participation_removed(context, event): title = _( u"label_participant_removed", default=u"Participant removed: ${contact}", mapping={"contact": readable_ogds_author(event.participant, event.participant.contact)}, ) journal_entry_factory(context, PARTICIPANT_REMOVED, title)
def _search_method(participation): if text.lower() in role_list_helper(participation, participation.roles).lower(): return True if text.lower() in readable_ogds_author( participation, participation.contact).lower(): return True return False
def _search_method(participation): if text.lower() in role_list_helper( participation, participation.roles).lower(): return True if text.lower() in readable_ogds_author( participation, participation.contact).lower(): return True return False
def participation_removed(context, event): title = _(u'label_participant_removed', default=u'Participant removed: ${contact}', mapping={ 'contact': readable_ogds_author(event.participant, event.participant.contact), }) journal_entry_factory(context, PARTICIPANT_REMOVED, title)
def participation_created(context, event): title = _( u"label_participant_added", default=u"Participant added: ${contact} with " "roles ${roles}", mapping={ "contact": readable_ogds_author(event.participant, event.participant.contact), "roles": role_list_helper(event.participant, event.participant.roles), }, ) journal_entry_factory(context, PARTICIPANT_ADDED, title)
def participation_removed(context, event): title = _( u'label_participant_removed', default=u'Participant removed: ${contact}', mapping={ 'contact': readable_ogds_author( event.participant, event.participant.contact), }) journal_entry_factory(context, PARTICIPANT_REMOVED, title)
def participation_created(context, event): author = readable_ogds_author(event.participant, event.participant.contact) roles = role_list_helper(event.participant, event.participant.roles) title = _(u'label_participant_added', default=u'Participant added: ${contact} with ' 'roles ${roles}', mapping={ 'contact': author, 'roles': roles }) journal_entry_factory(context, PARTICIPANT_ADDED, title)
def participation_created(context, event): author = readable_ogds_author(event.participant, event.participant.contact) roles = role_list_helper(event.participant, event.participant.roles) title = _(u'label_participant_added', default=u'Participant added: ${contact} with ' 'roles ${roles}', mapping={'contact': author, 'roles': roles} ) journal_entry_factory(context, PARTICIPANT_ADDED, title)
def interactive_user_helper(item, value): """Helper method for `ftw.table` which is able to translate the available interactive users (from vocabluaries) or effective OGDS users. """ # create a interactive users mapping iuser_map = dict(interactive_users({})) # is it a interactive user? if value in iuser_map: return iuser_map.get(value) # fall back to OGDS helper else: return readable_ogds_author(item, value)