Modify

#11043 closed enhancement (fixed)

Don't show bookmark icon on edit and delete pages

Reported by: rjollos Owned by: rjollos
Priority: normal Component: BookmarkPlugin
Severity: normal Keywords:
Cc: jun66j5, saigon, hasienda Trac Release:

Description

If action=delete or action=edit are in the URL, don't show the bookmark icon on the page.

Attachments (0)

Change History (2)

comment:1 Changed 15 months ago by rjollos

  • Cc hasienda added

Steffen has shown me a better way to deal with this through his patches for the VotePlugin:

VotePlugin: Do allow vote requests only from resource view.

Because the vote request will always redirect to the standard resource view,
it will be undesired to vote from such pages like i.e. wiki page editor.
  • voteplugin/trunk/tracvote/__init__.py

    # HG changeset patch
    # Parent a8429b8d11151e92a2a92dc1763bddd2c34e5d1a
    VotePlugin: Do allow vote requests only from resource view.
    
    Because the vote request will always redirect to the standard resource view,
    it will be undesired to vote from such pages like i.e. wiki page editor.
    
    diff --git a/voteplugin/trunk/tracvote/__init__.py b/voteplugin/trunk/tracvote/__init__.py
    a b  
    460460                     alt='Up-vote') 
    461461        down = tag.img(src=req.href.chrome('vote/' + self.image_map[vote][1]), 
    462462                     alt='Down-vote') 
    463         if 'VOTE_MODIFY' in req.perm and get_reporter_id(req) != 'anonymous': 
     463        if not 'action' in req.args and 'VOTE_MODIFY' in req.perm and \ 
     464                get_reporter_id(req) != 'anonymous': 
    464465            down = tag.a(down, id='downvote', 
    465466                         href=req.href.vote('down', path), 
    466467                         title='Down-vote') 

comment:2 Changed 14 months ago by rjollos

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

(In [13229]) Fixes #11043: Blacklist certain pages that are used to edit and create resources, while still leaving open the possibility of bookmarking Wiki Change History pages (action=history) and diffs (action=diff). This behavior might be re-evaluated later and is therefore subject to change.

Add Comment

Modify Ticket

Action
as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from rjollos. Next status will be 'closed'.
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.