This question about Configuration: Needs followup in Tasks

disable edit-Button

Hi,

how can I disable the edit-button and attach-button, if in a certain stage it's not allowed to change the controlled document?

In the WorkflowPlugin-Documentation is written this info, but I'm not sure how it works:

f you replace Edit with %WORKFLOWEDITTOPIC% in your skin templates, then the Edit link is crossed out when the user is not allowed to edit the page in a state.

Thanks a lot.

Wolfgang


although not directly applicable, you might find http://biohack.net/TWikiRelease04x00/bin/view/Main/WillNorris/BlogEntry135 somewhat enlightening?

-- WillNorris - 21 Jun 2009

As Wills comment proposes, you can use IfStatements (or the IfDefinedPlugin) to conditionally render parts (ie. topic action buttons) of the page. You have to alter your tmpl files to do that.

-- OliverKrueger - 26 Jul 2009

Sorry for reopening this, but I came across this question when trying to do the same thing, ie replace %EDITTOPIC% with %WORKFLOWEDITTOPIC% in the templates as suggested on the Workflow Plugin page. The answers above do not for me answer the question, and have left me none the wiser frown, sad smile I have looked through the various files in the templates directory, but I can't find anywhere the term %EDITTOPIC%. I also notice that in Wolfgang's original question above, if you hover over the edittopic term that has been processed, it suggests that the term is deprecated...

Any hints?

-- EdMcDonagh - 12 Nov 2009

For the default skin (patternskin) you find the definition of the edit button in templates/viewtopicactionbuttons.tmpl. The TMP:DEF container may be used in various places, so be careful when changing it.

-- OliverKrueger - 13 Nov 2009

Thanks Oliver. As I thought, it looks like the suggestion in the workflow plugin page to make the simple switch of edittopic to workflowedittopic won't work in the current foswiki - with pattern skin anyway. One of the key things is that the workflowedittopic term depends on the edit link being a text link, where as the pattern skin uses a button these days!

So, do we either a/ remove the suggestion from the topic, or b/ find a new way to do this. It is a useful thing to be able to do. I get lots of support emails saying 'Why can't I edit this page x?', to which the answer is invariably that the topic is either 'approved' or 'awaiting approval'. If the edit button was not available to them in these states, they may look a bit harder at the text that says 'This topic is an approved document... ...Revise (button)'

-- EdMcDonagh - 13 Nov 2009

Agreed. Please go ahead or ask one of the original authors. smile (I'm not very familiar with the workflowplugin.)

Oops, I probably pointed you to the wrong definition of the edit-link. The topicactionbuttons are the links below the topictext. Anyway.

-- OliverKrueger - 14 Nov 2009

Thanks for your contribution Oliver. I don't know what the correct way to alert the authors of the plugin, so I have added ThomasWeigert to the topic notification page with Question208. CrawfordCurrie is already in the list with a * catch all. I hope this is ok!

-- EdMcDonagh - 14 Nov 2009

Sounds like you may have found an error, but without more details about your configuration, I couldn't say for sure. Raise a report at WorkflowPlugin including as many details of the scenario as you can.

-- CrawfordCurrie - 11 Dec 2009

QuestionForm edit

Subject Configuration
Extension WorkflowPlugin
Version
Status Needs followup in Tasks
Topic revision: r9 - 11 Dec 2009, CrawfordCurrie
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy