You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bloodhound.apache.org by rj...@apache.org on 2013/07/03 21:03:53 UTC

svn commit: r1499517 - /bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/timeline.py

Author: rjollos
Date: Wed Jul  3 19:03:52 2013
New Revision: 1499517

URL: http://svn.apache.org/r1499517
Log:
Improve message to help user resolve Timeline widget error, Fixes #540.

The warning message for the Timeline widget that displays when the Timeline component is disabled now includes a link to the plugin administration page.

Modified:
    bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/timeline.py

Modified: bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/timeline.py
URL: http://svn.apache.org/viewvc/bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/timeline.py?rev=1499517&r1=1499516&r2=1499517&view=diff
==============================================================================
--- bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/timeline.py (original)
+++ bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/timeline.py Wed Jul  3 19:03:52 2013
@@ -39,7 +39,7 @@ from trac.ticket.api import TicketSystem
 from trac.ticket.model import Ticket
 from trac.ticket.web_ui import TicketModule
 from trac.util.datefmt import utc
-from trac.util.translation import _
+from trac.util.translation import _, tag_
 from trac.web.chrome import add_stylesheet
 
 from bhdashboard.api import DateField, EnumField, ListField
@@ -140,14 +140,20 @@ class TimelineWidget(WidgetBase):
         req = context.req
         try:
             timemdl = self.env[TimelineModule]
+            admin_page = tag.a(_("administration page."),
+                               title=_("Plugin Administration Page"),
+                               href=req.href.admin('general/plugin'))
             if timemdl is None :
                 return 'widget_alert.html', {
                     'title':  _("Activity"),
                     'data': {
                         'msglabel': "Warning",
-                        'msgbody': _("TimelineWidget is disabled because the "
-                                     "Timeline component is not available. "
-                                     "Is the component disabled?"),
+                        'msgbody':
+                            tag_("The TimelineWidget is disabled because the "
+                                 "Timeline component is not available. "
+                                  "Is the component disabled? "
+                                  "You can enable from the %(page)s",
+                                  page=admin_page),
                         'dismiss': False,
                     }
                 }, context