Modify

Ticket #281 (closed enhancement: fixed)

Opened 6 years ago

Last modified 5 years ago

Allow the edit link to be disabled

Reported by: anonymous Owned by: moschny
Priority: normal Milestone:
Component: trac.tracnav Version: tracnav-3.92
Severity: normal Keywords:
Cc:

Description

When dealing with non technical users the edit link can tend to confuse them. Especially if the Trac site is mainly for showing information - and not necessarily expected to have a lot of user edits.

I made a quick change to the code adding a 'noeditlink' argument in a similar way to nocollapse which would allow disabling of the edit link.

Technical users can still edit the page - by either re-saving without that parameter - or by looking at the link text in the Plain text and copy and pasting into the address box.

Please find the diff attached. (against 3.92)

Attachments

no_edit_link.diff (4.6 KB) - added by mark.m.mcmahon@… 6 years ago.
Patch to add an option for having no edit link shown for TracNav areas

Change History

Changed 6 years ago by mark.m.mcmahon@…

Patch to add an option for having no edit link shown for TracNav areas

comment:1 Changed 6 years ago by mark.m.mcmahon@…

Hmm - seems the patch I uploaded was a bit different then I intended there are really only 4 or 5 lines modified. A) check for argument in Invocation.__init__() B) an extra condition to check whether the link should be displayed in Invocation.dispaly_all()

comment:2 in reply to: ↑ description Changed 6 years ago by moschny

Replying to anonymous:

When dealing with non technical users the edit link can tend to confuse them. Especially if the Trac site is mainly for showing information - and not necessarily expected to have a lot of user edits.

You know that the "edit" link disappears when the TOC page is read-only?

I made a quick change to the code adding a 'noeditlink' argument in a similar way to nocollapse which would allow disabling of the edit link. Technical users can still edit the page - by either re-saving without that parameter - or by looking at the link text in the Plain text and copy and pasting into the address box.

For new users that may be confusing, don't know.

The real solution would be to have some more fine-grained access control. Maybe the RestrictedAreaPlugin is helpful here?

Replying to mark.m.mcmahon@gmail.com:

Hmm - seems the patch I uploaded was a bit different then I intended there are really only 4 or 5 lines modified.

The patch really has nothing to do with that ticket. Maybe we should delete the attachment?

comment:3 Changed 6 years ago by anonymous

You know that the "edit" link disappears when the TOC page is read-only?

No I didn't know that. - Thanks

The real solution would be to have some more fine-grained access control. Maybe the RestrictedAreaPlugin is helpful here?

I may try that out.

The patch really has nothing to do with that ticket. Maybe we should delete the attachment?

The change is really simple and is probably not the right thing to do - so feel free to delete the patch and decline the ticket

comment:4 Changed 5 years ago by moschny

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

Implemented in r3244.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as 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.