~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/bugs/browser/bugtask.py

[r=danilo][bug=878260] macro
        bugtarget-macros-search/simple-search-form: Show a title;
        drop the 'order by' widget; CSS changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
265
265
from lp.registry.interfaces.sourcepackage import ISourcePackage
266
266
from lp.registry.model.personroles import PersonRoles
267
267
from lp.registry.vocabularies import MilestoneVocabulary
 
268
from lp.services.features import getFeatureFlag
268
269
from lp.services.fields import PersonChoice
269
270
from lp.services.propertycache import (
270
271
    cachedproperty,
3041
3042
        else:
3042
3043
            return None
3043
3044
 
 
3045
    @cachedproperty
 
3046
    def dynamic_bug_listing_enabled(self):
 
3047
        """Feature flag: Can the bug listing be customized?"""
 
3048
        return bool(getFeatureFlag('bugs.dynamic_bug_listings.enabled'))
 
3049
 
 
3050
    @property
 
3051
    def search_macro_title(self):
 
3052
        """The search macro's title text."""
 
3053
        return u"Search bugs %s" % self.context_description
 
3054
 
 
3055
    @property
 
3056
    def context_description(self):
 
3057
        """A phrase describing the context of the bug.
 
3058
 
 
3059
        The phrase is intended to be used for headings like
 
3060
        "Bugs in $context", "Search bugs in $context". This
 
3061
        property should be overridden for person related views.
 
3062
        """
 
3063
        return "in %s" % self.context.displayname
 
3064
 
3044
3065
 
3045
3066
class BugNominationsView(BugTaskSearchListingView):
3046
3067
    """View for accepting/declining bug nominations."""