Opened 15 years ago

Closed 13 years ago

#159 closed enhancement (fixed)

Overhaul delete version links on history view

Reported by: Earle Martin Owned by: Dominic Hargreaves
Priority: normal Milestone:
Component: openguides Version: svn
Severity: normal Keywords: templates, history, patch
Cc:

Description

The links for deleting a particular historic version shouldn't be on view to the general public. Additionally, rather than having one link to click per version, there should be tickboxes and a button at the bottom of the page, which takes you to the password-confirmation stage.

Attachments (1)

deleteforadminsonly.diff (11.2 KB) - added by bob 13 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 Changed 15 years ago by Ivor Williams

So, action=list_all_versions should not normally give links to delete.

We need to qualify this, either with another parameter e.g. admin=y or action=list_all_versions_admin. When displaying in admin mode, the page should also list unmoderated versions. The page needs to make it clear which version is the latest moderated one.

This page should present a checkbox next to each version. There will also be a password textbox for the admin password. A form submit button will perform the deletion (having checked the password) and send the user to a "done" page.

comment:2 Changed 15 years ago by Earle Martin

Perhaps we should have something like action=admin&id=node_name, which shows all admin actions for a node (i.e. moderate, delete versions)?

comment:3 Changed 15 years ago by Dominic Hargreaves

Alternatively, have various admin functions show up based on the user preferences. Until we have proper login we would of course still have the actual authentication requiring the password on form submit, but this is a neat solution: those who consider themselves admins can then turn on the delete links at will.

comment:4 Changed 14 years ago by Dominic Hargreaves

Owner: changed from Dominic Hargreaves to Nobody

Changed 13 years ago by bob

Attachment: deleteforadminsonly.diff added

comment:5 Changed 13 years ago by bob

attached diff. only shows delete links to people who choose to be admins.

This doesnt change the delete mechanism merely hides it from normal users.

diff also contains extra test for #261 and fixes a misnamed prereq in Build.PL

comment:6 Changed 13 years ago by Dominic Hargreaves

Keywords: patch added
Owner: changed from Nobody to Dominic Hargreaves
Status: newassigned

comment:7 Changed 13 years ago by Dominic Hargreaves

The following new HTML parser issues arise:

t/84_navbar_admin........................ok 1/2HTML parser error : Misplaced DOC
TYPE declaration
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
^
HTML parser error : htmlParseStartTag: misplaced <html> tag
<html lang="en">
     ^
HTML parser error : Couldn't find end of Start Tag p
<html lang="en">
     ^
HTML parser error : htmlParseStartTag: misplaced <head> tag
<head profile="http://a9.com/-/spec/opensearch/1.1/">
     ^
HTML parser error : Couldn't find end of Start Tag body
<head profile="http://a9.com/-/spec/opensearch/1.1/">
     ^
HTML parser error : Unexpected end tag : head
</head>
       ^
HTML parser error : htmlParseStartTag: misplaced <body> tag
<body>
     ^
HTML parser error : Misplaced DOCTYPE declaration
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
^
HTML parser error : htmlParseStartTag: misplaced <html> tag
<html lang="en">
     ^
HTML parser error : Couldn't find end of Start Tag p
<html lang="en">
     ^
HTML parser error : htmlParseStartTag: misplaced <head> tag
<head profile="http://a9.com/-/spec/opensearch/1.1/">
     ^
HTML parser error : Couldn't find end of Start Tag body
<head profile="http://a9.com/-/spec/opensearch/1.1/">
     ^
HTML parser error : Unexpected end tag : head
</head>
       ^
HTML parser error : htmlParseStartTag: misplaced <body> tag
<body>
     ^
t/84_navbar_admin........................ok                       

comment:8 Changed 13 years ago by Dominic Hargreaves

sorry, ignore me. Not new with this patch.

comment:9 Changed 13 years ago by Dominic Hargreaves

Resolution: fixed
Status: assignedclosed

(In [1243]) Don't add delete links unless the user requests (fixes #159 - thanks bob)

Note: See TracTickets for help on using tickets.