Swank Wiki
Recently Visited

Swank v0.05.00

Type: task
Description: better handling of new actions
Status: In Progress
Priority: 2
Assigned:

Notes

better handling of new actions...
        html/edit/save/delete
        submit
        history/revert
        attach, email
        rss, atom
        * /actions for display
        * Swank::Security::show_actions
        * /group/* for permissions
        * actions for a subset of pages  (how?)

Hash for action information (in pages?)

        action/whatever
                text (text to show)
                mode(s)? or when to show (based on mode or current action?) (next actions?)
                        list of other actions to show?
                priority  (determine order?)
                (page.action)?  (plugin to Swank::Page?)
                permissions same as (e.g. history same access as html,
                        revert same access as submit,
                        submit same access as edit,
                        delete same access as edit??,
                        attach same access as edit,
                        email same access as html)

        show_actions 
                view: html edit attach history emailpage
                edit: submit delete
                history: html history revert
                submit (redirect or re-edit)
                delete (redirect)
                revert (redirect)
                emailpage: (submit)
                attach: (as edit???  maybe no other action--upload on form)
DONE: Swank::Security::show_actions does this
DONE: plugins can add actions by overriding this method.


        allow_top_action
                  DONE: @group.allow_top_action

/actions.xml is critical for site functioning, and difficult to edit.
Such critical code belongs in a perl class.
The display of actions should be in a page which is easy to edit.

John Williams - 19 Feb 2026 06:44am

Groups reworked (on Task-7)

I have reworked the group on mountain-edibles, so the actions are better controled by them, and are simpler. 

Probably need to document that better.

John Williams - 19 Feb 2026 06:46am

Simple top_actions (on Task-7)

Pages can have an allow_top_action method to allow certain top actions for everyone.

Examples of this are sitemap (allows sitemap.xml) and robots (allows robots.txt)