collection_ticket.rb 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. # Copyright (C) 2012-2013 Zammad Foundation, http://zammad-foundation.org/
  2. module ExtraCollection
  3. def session( collections, user )
  4. # all ticket stuff
  5. collections['TicketStateType'] = Ticket::StateType.all
  6. collections['TicketState'] = Ticket::State.all
  7. collections['TicketPriority'] = Ticket::Priority.all
  8. collections['TicketArticleType'] = Ticket::Article::Type.all
  9. collections['TicketArticleSender'] = Ticket::Article::Sender.all
  10. if !user.is_role('Customer')
  11. # all signatures
  12. collections['Signature'] = Signature.all
  13. # all email addresses
  14. collections['EmailAddress'] = EmailAddress.all
  15. end
  16. end
  17. def push( collections, user )
  18. # all ticket stuff
  19. collections['TicketStateType'] = Ticket::StateType.all
  20. collections['TicketState'] = Ticket::State.all
  21. collections['TicketPriority'] = Ticket::Priority.all
  22. collections['TicketArticleType'] = Ticket::Article::Type.all
  23. collections['TicketArticleSender'] = Ticket::Article::Sender.all
  24. if !user.is_role('Customer')
  25. # all signatures
  26. collections['Signature'] = Signature.all
  27. # all email addresses
  28. collections['EmailAddress'] = EmailAddress.all
  29. end
  30. end
  31. module_function :session, :push
  32. end