Modify

Opened 5 years ago

Closed 5 years ago

#5682 closed enhancement (fixed)

Announcer should have a page listing all Watched items

Reported by: anonymous Owned by: doki_pen
Priority: high Component: AnnouncerPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

Please see WatchlistPlugin.

If this functionality can't be duplicated/merged, please change the wording of "Watch This"/"Unwatch This" to something that doesn't closely match the wording used in the WatchlistPlugin. Perhaps "Add to Announcements" or "Remove from Announcements" or something similar.

See #4744 for this workaround.

Attachments (2)

announcer_ctxtnav_config.patch (1.3 KB) - added by martin_s 5 years ago.
Patch to make context navigation entries ('Watch this','Unwatch this') configurable
announcer_ctxtnav_config2.patch (1.5 KB) - added by martin_s 5 years ago.
Patch to fix wrong index order and rename notifications.

Download all attachments as: .zip

Change History (19)

comment:1 follow-up: Changed 5 years ago by rjollos

It would be nice put an entry in the metanav ('Watchlist') that links to the page with the table of all watched pages for a particular user.

comment:2 Changed 5 years ago by sincoder

I second this

comment:3 in reply to: ↑ 1 ; follow-up: Changed 5 years ago by martin_s

Replying to rjollos:

It would be nice put an entry in the metanav ('Watchlist') that links to the page with the table of all watched pages for a particular user.

This is exactly what the WatchlistPlugin does.

comment:4 Changed 5 years ago by martin_s

  • Priority changed from normal to high

The WatchlistPlugin rev.[6834] now actively supports the AnnouncerPlugin (see #4744) and allows to switch notification of wikis and tickets watched by the WatchlistPlugin on or off. This is not exactly the same as requested by this ticket but it comes close. Please note that wikis/tickets can be independently watched by both plugins.

I agree with the ticket creator that the navbar entries "Watch This"/"Unwatch This" would be changed to someting else not including 'watch', because this is to close to the WatchlistPlugin (uses "Watch"/"Unwatch"). Maybe having it configurable by the trac.ini config, so it can be changed by people which want to use both plugins?

comment:5 Changed 5 years ago by doki_pen

I would accept that patch

Changed 5 years ago by martin_s

Patch to make context navigation entries ('Watch this','Unwatch this') configurable

comment:6 Changed 5 years ago by martin_s

  • Owner changed from doki_pen to martin_s
  • Status changed from new to assigned

The attached patch allows the user (Trac admin) to rename or disable the context navigation entries.

Examples

Rename the cxtnav entries:

[announcer]
ctxtnav_names = Notify me, Do not notify me 

Disable the entries:

[announcer]
ctxtnav_names =

comment:7 in reply to: ↑ 3 Changed 5 years ago by rjollos

Replying to martin_s:

This is exactly what the WatchlistPlugin does.

If these are two plugin are working nicely together now, that will be great! I will try installing the WatchListPlugin shortly. I have been using the AnnouncerPlugin for 6 months.

comment:8 Changed 5 years ago by martin_s

See also the related #6052.

comment:9 Changed 5 years ago by doki_pen

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [6916]) Allow the ctxnav names for "watch/unwatch this" to be relabeled or shut off (by setting to blank). This patch was contributed by martin_s closes #5682

comment:10 Changed 5 years ago by anonymous

Thanks for the patch, I really appreciate it.

comment:11 follow-up: Changed 5 years ago by rjollos

I'm working on upgrading to install this patch and I added this change to the wiki page to document the configuration parameter. Please correct if this could be documented better.

Thanks!

comment:12 in reply to: ↑ 11 Changed 5 years ago by martin_s

Replying to rjollos:

I'm working on upgrading to install this patch and I added

this change to the wiki >page to document the configuration parameter. Please correct if this could be documented >better.

Thanks, I now added some more information and crosslinks in this change.

comment:13 Changed 5 years ago by martin_s

See also the related change of the WatchlistPlugin documentation.

comment:14 Changed 5 years ago by martin_s

  • Resolution fixed deleted
  • Status changed from closed to reopened

Sorry, I got the indexes wrong therefore the ctxtnav item names are swapped at the moment.

Either change the order of the names in the documentation or fix the indexes in the source code. I would prefer the latter because it is more natural to specify the 'Watch' action name before the 'Unwatch' one.

Simply replaces index [0] with [1] and vice versa:

  • subscribers/watchers.py

     
    150150        realm, resource = resource.split('/', 1)
    151151        if self.is_watching(req.session.sid, not req.authname == 'anonymous',
    152152                realm, resource):
     153            action_name = self.ctxtnav_names[1]
     154        else:
    153155            action_name = self.ctxtnav_names[0]
    154         else:
    155             action_name = self.ctxtnav_names[1]
    156156        add_ctxtnav(req,
    157157            tag.a(
    158158                action_name, href=req.href.watch(realm, resource)

Changed 5 years ago by martin_s

Patch to fix wrong index order and rename notifications.

comment:15 Changed 5 years ago by martin_s

In my opinion the messages "You are now watching this resource for changes." and "You are no longer watching this resource for changes." should also be changed, so that the user is not confusing this with the addition and removal from the watchlist.

I made this changes in the attachment:announcer_ctxtnav_config2.patch .

comment:16 Changed 5 years ago by martin_s

  • Owner changed from martin_s to doki_pen
  • Status changed from reopened to new

comment:17 Changed 5 years ago by doki_pen

  • Resolution set to fixed
  • Status changed from new to closed

(In [7138]) reverse ctxtnames and check for exist fixes #5682

Add Comment

Modify Ticket

Action
as closed The owner will remain doki_pen.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.