[dokuwiki] Re: [Patch] - Hide "old revs" when not actin show

On Tue, Nov 03, 2009 at 07:25:20PM +0100, Hakan.Sandell@xxxxxxxxx wrote:
> Hi,

Hi,

> I have attached a small patch hiding the "Old revisions" button and link for
> every action besides "show". This will change template.php affecting ALL
> templates, not just the default. Reason behind this is that the action doesn't
> make sense in any other context. Especially not with the admin screen and a
> novice admin looking for how to revert to his/her old settings.

I don't think that's a good idea for a couple of reasons:

As a template developer I'd expect that both, tpl_button() and
tpl_actionlink() work exactly the same for all button types and I think it's
out of the scope of both functions to handle the logic whether a button should
be shown or not

Your argument about the context is debatable, because you don't know if other
templates provide additional context. In case of the default template I would
argue that you always see the current page name/title in the upper left
corner, just above the revisions button. For people who know that the button
does this might be just the context they need. Also I think the example with
the novice admin is a little far fetched, clicking on the link once should be
enough for most people to realize that reverting to an older config is not
what it does ;-).

And as you said already, the patch is a tad bit invasive in that it will affect
all templates, which I think is not optimal either.

I think it should be left to the template developer to show/hide buttons under
certain conditions (i.e. what if a template dev wants to show the button on
the admin screen but with this patch applied?).

Just my 2c.

Regards,
        Chi

-- 
Michael Klier

www:    http://www.chimeric.de
jabber: chi@xxxxxxxxxxxxxxxxxx
key:    http://downloads.chimeric.de/chi.asc
key-id: 0x8308F551

Other related posts: