Modify

Opened 11 years ago

Closed 11 years ago

#11043 closed enhancement (fixed)

Don't show bookmark icon on edit and delete pages

Reported by: Ryan J Ollos Owned by: Ryan J Ollos
Priority: normal Component: BookmarkPlugin
Severity: normal Keywords:
Cc: Jun Omae, yosiyuki, Steffen Hoffmann 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 11 years ago by Ryan J Ollos

Cc: Steffen Hoffmann 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 11 years ago by Ryan J Ollos

Resolution: fixed
Status: newclosed

(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.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.