<commit_before># Copyright 2008-2017 <NAME>
# License: BSD (see file COPYING for details)
"""
Adds functionality for managing tickets.

See :doc:`/specs/noi/tickets`.

.. autosummary::
   :toctree:

    roles
    ui


"""

from lino.api import ad, _


class Plugin(ad.Plugin):

    verbose_name = _("Tickets")
    # verbose_name = _("Projects")

    needs_plugins = [
        # 'lino_xl.lib.stars',
        'lino_xl.lib.excerpts',
        'lino_xl.lib.deploy',
        'lino.modlib.comments',
        # 'lino.modlib.changes',
        'lino_noi.lib.noi']

    site_model = 'cal.Room'
    milestone_model = 'meetings.Meeting'

    def on_site_startup(self, site):
        self.site_model = site.models.resolve(self.site_model)
        self.milestone_model = site.models.resolve(self.milestone_model)
        super(Plugin, self).on_site_startup(site)
        
    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.MyCompetences')
        m.add_action('tickets.MyTickets')
        m.add_action('tickets.SuggestedTicketsByEndUser')
        # m.add_action('tickets.TicketsToDo')
        # m.add_action('tickets.MyOwnedTickets')<commit_msg>fixed recursion limit in book.projects.max<commit_after># Copyright 2008-2017 <NAME>
# License: BSD (see file COPYING for details)
"""
Adds functionality for managing tickets.

See :doc:`/specs/noi/tickets`.

.. autosummary::
   :toctree:

    roles
    ui


"""

from lino.api import ad, _


class Plugin(ad.Plugin):

    verbose_name = _("Tickets")
    # verbose_name = _("Projects")

    needs_plugins = [
        # 'lino_xl.lib.stars',
        'lino_xl.lib.excerpts',
        # 'lino_xl.lib.deploy',
        'lino.modlib.comments',
        # 'lino.modlib.changes',
        'lino_noi.lib.noi']

    site_model = 'cal.Room'
    milestone_model = 'meetings.Meeting'

    def on_site_startup(self, site):
        self.site_model = site.models.resolve(self.site_model)
        self.milestone_model = site.models.resolve(self.milestone_model)
        super(Plugin, self).on_site_startup(site)
        
    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.MyCompetences')
        m.add_action('tickets.MyTickets')
        m.add_action('tickets.SuggestedTicketsByEndUser')
        # m.add_action('tickets.TicketsToDo')
        # m.add_action('tickets.MyOwnedTickets')
{'fraction_non_alphanumeric': 0.13198573127229488, 'fraction_numerical': 0.006341656757827983, 'mean_word_length': 2.871165644171779, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7367928', 'n_tokens_mistral': 937, 'n_tokens_neox': 895, 'n_words': 137}