
from lino_xl.lib.tickets import *

class Plugin(Plugin):
    """Adds the :mod:`lino_xl.lib.votes` plugin.
    """

    extends_models = ['Ticket']
    
    needs_plugins = [
        'lino_xl.lib.excerpts',
        'lino_xl.lib.topics',
        'lino.modlib.comments', 'lino.modlib.changes',
        # 'lino_xl.lib.votes',
        'lino_noi.lib.noi']



from lino_xl.lib.tickets import *

class Plugin(Plugin):
    """Adds the :mod:`lino_xl.lib.votes` plugin.
    """

    extends_models = ['Ticket']
    
    needs_plugins = [
        'lino_xl.lib.excerpts',
        'lino_xl.lib.topics',
        'lino.modlib.comments', 'lino.modlib.changes',
        # 'lino_xl.lib.votes',
        'lino_noi.lib.noi']

    def setup_main_menu(self, site, profile, m):
        p = self.get_menu_group()
        m = m.add_menu(p.app_label, p.verbose_name)
        m.add_action('tickets.MyTicketsToWork')


    def get_dashboard_items(self, user):
        if user.authenticated:
            yield self.site.actors.tickets.MyTicketsToWork
            # else:
            #     yield self.site.actors.tickets.   PublicTickets


Move asigned menu and dashboard items to noi/tickets
Move asigned menu and dashboard items to noi/tickets

  
  from lino_xl.lib.tickets import *
  
  class Plugin(Plugin):
      """Adds the :mod:`lino_xl.lib.votes` plugin.
      """
  
      extends_models = ['Ticket']
      
      needs_plugins = [
          'lino_xl.lib.excerpts',
          'lino_xl.lib.topics',
          'lino.modlib.comments', 'lino.modlib.changes',
          # 'lino_xl.lib.votes',
          'lino_noi.lib.noi']
  
+     def setup_main_menu(self, site, profile, m):
+         p = self.get_menu_group()
+         m = m.add_menu(p.app_label, p.verbose_name)
+         m.add_action('tickets.MyTicketsToWork')
  
+ 
+     def get_dashboard_items(self, user):
+         if user.authenticated:
+             yield self.site.actors.tickets.MyTicketsToWork
+             # else:
+             #     yield self.site.actors.tickets.   PublicTickets
+ 
+ 
Move asigned menu and dashboard items to noi/tickets
## Code Before:

from lino_xl.lib.tickets import *

class Plugin(Plugin):
    """Adds the :mod:`lino_xl.lib.votes` plugin.
    """

    extends_models = ['Ticket']
    
    needs_plugins = [
        'lino_xl.lib.excerpts',
        'lino_xl.lib.topics',
        'lino.modlib.comments', 'lino.modlib.changes',
        # 'lino_xl.lib.votes',
        'lino_noi.lib.noi']


## Instruction:
Move asigned menu and dashboard items to noi/tickets
## Code After:

from lino_xl.lib.tickets import *

class Plugin(Plugin):
    """Adds the :mod:`lino_xl.lib.votes` plugin.
    """

    extends_models = ['Ticket']
    
    needs_plugins = [
        'lino_xl.lib.excerpts',
        'lino_xl.lib.topics',
        'lino.modlib.comments', 'lino.modlib.changes',
        # 'lino_xl.lib.votes',
        'lino_noi.lib.noi']

    def setup_main_menu(self, site, profile, m):
        p = self.get_menu_group()
        m = m.add_menu(p.app_label, p.verbose_name)
        m.add_action('tickets.MyTicketsToWork')


    def get_dashboard_items(self, user):
        if user.authenticated:
            yield self.site.actors.tickets.MyTicketsToWork
            # else:
            #     yield self.site.actors.tickets.   PublicTickets

