Geeklog Bugtracker
Geeklog

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000810 [Geeklog] Feature Requests feature N/A 2009-02-05 22:00 2009-02-06 07:14
Reporter euan View Status public  
Assigned To
Priority normal Resolution open  
Status feedback   Product Version 1.5.1
Summary 0000810: Options on cancelling edit of an item
Description When cancelling an edit, the user is sent back to the main admin screen of the plugin or stories etc.

I would like to have a config option to send the user back to either the top page, the admin screen, the plugin public page, or the plugin admin page, or the public page of the item that was being edited (if relevant). This is particularly useful for novice users, who get confused when they don't recognise their surroundings.

Additional Information I implement this with one plugin as follows:

in the plugin admin/index.php:

} else { // 'cancel' or no mode at all
    if ($_NE_CONF['aftercancel'] == 'plugin') {
        $display = COM_refresh($_CONF['site_url'] . '/news/index.php');
    } else if ($_NE_CONF['aftercancel'] == 'admin') {
        $display = COM_refresh($_CONF['site_admin_url'] . '/moderation.php');
    } else if ($_NE_CONF['aftercancel'] == 'home') {
        $display = COM_refresh($_CONF['site_url']);
    } else {
        $display .= COM_siteHeader ('menu', $LANG_BL_ADMIN[11]);
        if (isset ($_REQUEST['msg'])) {
            $msg = COM_applyFilter ($_REQUEST['msg'], true);
            if ($msg > 0) {
                $display .= COM_showMessage ($msg, 'blog');
            }
        }
        $display .= list_news();
        $display .= COM_siteFooter ();
    }
}

with config options in install_defaults.php:

/** What to show after a News item edit has been cancelled? Possible choices:
 * 'list' -> display the admin-list of Blog
 * 'plugin' -> display the public homepage of the Blog plugin
 * 'home' -> display the site homepage
 * 'admin' -> display the site admin homepage
 */
$_NE_DEFAULT['aftercancel'] = 'list';

        $c->add('aftercancel', $_BL_DEFAULT['aftercancel'], 'select',
                0, 1, 10, 130, true, 'news');

language strings:

    'aftercancel' => 'After cancelling edit',

    10 => array('Display Admin List' => 'list', 'Display Public List' => 'plugin', 'Display Home' => 'home', 'Display Admin' => 'admin'),

And that's it.

This solution requires however that the link to the admin screen in moderation.php is altered with a ?mode=list or something - otherwise, you will shut everyone out of the admin screen totally when not redirecting there.

Tags No tags attached.
Target not specified
Attached Files

- Relationships

-  Notes
User avatar (0000518)
dhaun (administrator)
2009-02-06 04:18

"Cancel" is a button like any other, so I'm sure we can recognize when it has been clicked. That would get rid of the need of adding ?mode=list for the default case.

Also, would it make sense to use the "aftersave" option for cancel, too?
User avatar (0000519)
euan (reporter)
2009-02-06 07:14

I can imagine wanting to go to the item saved "aftersave", and perhaps the admin list "aftercancel". So I think they need to be separate settings.

- Issue History
Date Modified Username Field Change
2009-02-05 22:00 euan New Issue
2009-02-06 04:18 dhaun Note Added: 0000518
2009-02-06 04:18 dhaun Status new => feedback
2009-02-06 07:14 euan Note Added: 0000519


Copyright © 2000 - 2009 Mantis Group
Hosted by pair.com
Powered by Mantis Bugtracker