From: <de...@de...> - 2007-06-02 23:26:18
|
Author: ArthurClemens Date: 2007-06-02 18:26:10 -0500 (Sat, 02 Jun 2007) New Revision: 14019 Modified: twiki/branches/MAIN/twikiplugins/PatternSkin/data/TWiki/PatternSkinCustomization.txt twiki/branches/MAIN/twikiplugins/PatternSkin/templates/viewtoolbar.pattern.tmpl twiki/branches/MAIN/twikiplugins/PatternSkin/templates/viewtopicactionbuttons.pattern.tmpl Log: Item4193: Show and hide WYSIWYG buttons based on COMPOSER setting Modified: twiki/branches/MAIN/twikiplugins/PatternSkin/data/TWiki/PatternSkinCustomization.txt =================================================================== --- twiki/branches/MAIN/twikiplugins/PatternSkin/data/TWiki/PatternSkinCustomization.txt 2007-06-02 23:03:55 UTC (rev 14018) +++ twiki/branches/MAIN/twikiplugins/PatternSkin/data/TWiki/PatternSkinCustomization.txt 2007-06-02 23:26:10 UTC (rev 14019) @@ -397,4 +397,18 @@ </verbatim> </blockquote> +---+++ I only want to show the WYSIWYG button on explicit pages +In [[Main.TWikiPreferences]], set =COMPOSER= to a blank value: +<blockquote> +<verbatim> + * Set COMPOSER = +</verbatim> +</blockquote> + +In the topic, set the =COMPOSER= variable to =kupu=: +<blockquote> +<verbatim> + * Set COMPOSER = kupu +</verbatim> +</blockquote> Modified: twiki/branches/MAIN/twikiplugins/PatternSkin/templates/viewtoolbar.pattern.tmpl =================================================================== --- twiki/branches/MAIN/twikiplugins/PatternSkin/templates/viewtoolbar.pattern.tmpl 2007-06-02 23:03:55 UTC (rev 14018) +++ twiki/branches/MAIN/twikiplugins/PatternSkin/templates/viewtoolbar.pattern.tmpl 2007-06-02 23:26:10 UTC (rev 14019) @@ -1,4 +1,4 @@ -%TMPL:DEF{toolbar_buttons}%<div class="patternToolBarButtons">%TMPL:P{"activatable_edit_or_create"}%%TMPL:P{context="WysiwygPluginEnabled" then="activatable_edit_wysiwyg"}%<span class="patternButton">%TMPL:P{"activatable_attach"}%</span><span class="patternButton">%TMPL:P{"printable"}%</span> +%TMPL:DEF{toolbar_buttons}%<div class="patternToolBarButtons">%TMPL:P{"activatable_edit_or_create"}%%TMPL:P{"wysiwyg"}%<span class="patternButton">%TMPL:P{"activatable_attach"}%</span><span class="patternButton">%TMPL:P{"printable"}%</span> </div>%TMPL:END% Modified: twiki/branches/MAIN/twikiplugins/PatternSkin/templates/viewtopicactionbuttons.pattern.tmpl =================================================================== --- twiki/branches/MAIN/twikiplugins/PatternSkin/templates/viewtopicactionbuttons.pattern.tmpl 2007-06-02 23:03:55 UTC (rev 14018) +++ twiki/branches/MAIN/twikiplugins/PatternSkin/templates/viewtopicactionbuttons.pattern.tmpl 2007-06-02 23:26:10 UTC (rev 14019) @@ -1,4 +1,4 @@ -%TMPL:DEF{"topicactionbuttons"}%%TMPL:P{"activatable_edit_or_create"}%%TMPL:P{"sep"}%%TMPL:P{context="WysiwygPluginEnabled" then="activatable_edit_wysiwyg"}%%TMPL:P{context="WysiwygPluginEnabled" then="sep"}%%TMPL:P{"activatable_attach"}%%TMPL:P{"sep"}%%TMPL:P{"printable"}%%TMPL:P{"raw_or_view"}%%TMPL:P{"sep"}%%TMPL:P{"backlinks"}%%TMPL:P{"sep"}%%TMPL:P{"revisions"}%%TMPL:P{"sep"}%%TMPL:P{"activatable_more"}%%TMPL:END% +%TMPL:DEF{"topicactionbuttons"}%%TMPL:P{"activatable_edit_or_create"}%%TMPL:P{"sep"}%%TMPL:P{"wysiwyg"}%%TMPL:P{"activatable_attach"}%%TMPL:P{"sep"}%%TMPL:P{"printable"}%%TMPL:P{"raw_or_view"}%%TMPL:P{"sep"}%%TMPL:P{"backlinks"}%%TMPL:P{"sep"}%%TMPL:P{"revisions"}%%TMPL:P{"sep"}%%TMPL:P{"activatable_more"}%%TMPL:END% %TMPL:DEF{"topicaction"}%<a name="topic-actions"> </a><div class="patternTopicActions"><div class="patternTopicAction"><span class="patternActionButtons"> %TMPL:P{"topicactionbuttons"}%</span></div></div><!--/patternTopicActions-->%TMPL:END% @@ -10,10 +10,10 @@ %TMPL:DEF{"edit_topic_link"}%<span class="patternButton"><a href='%SCRIPTURL{"edit"}%/%WEB%/%TOPIC%?t=%GMTIME{"$epoch"}%%TMPL:P{"url_param_editaction"}%' rel='nofollow' %MAKETEXT{"title='Edit this topic text' accesskey='e'>&Edit"}%</a></span>%TMPL:END% -%TMPL:DEF{"edit_wysiwyg_link"}%<span class="patternButton"><a href='%SCRIPTURL{"edit"}%/%WEB%/%TOPIC%?cover=%COMPOSER%&t=%GMTIME{"$epoch"}%' rel='nofollow' %MAKETEXT{"title='Edit this topic text' accesskey='w'>&WYSIWYG"}%</a></span>%TMPL:END% +%TMPL:DEF{"edit_wysiwyg_link"}%<span class="patternButton"><a href='%SCRIPTURL{"edit"}%/%WEB%/%TOPIC%?cover=%COMPOSER%&t=%GMTIME{"$epoch"}%' rel='nofollow' %MAKETEXT{"title='Edit this topic text' accesskey='w'>&WYSIWYG"}%</a></span>%TMPL:P{"sep"}%%TMPL:END% -%TMPL:DEF{"wysiwyg_create_topic_link"}%<span class="patternButton"><a href='%SCRIPTURL{"edit"}%/%WEB%/%TOPIC%?cover=%COMPOSER%&t=%GMTIME{"$epoch"}%' rel='nofollow' %MAKETEXT{"title='Create this topic' accesskey='w'>Create (&WYSIWYG)"}%</a></span>%TMPL:END% +%TMPL:DEF{"wysiwyg_create_topic_link"}%<span class="patternButton"><a href='%SCRIPTURL{"edit"}%/%WEB%/%TOPIC%?cover=%COMPOSER%&t=%GMTIME{"$epoch"}%' rel='nofollow' %MAKETEXT{"title='Create this topic' accesskey='w'>Create (&WYSIWYG)"}%</a></span>%TMPL:P{"sep"}%%TMPL:END% %TMPL:DEF{"view_topic_link"}%<span class='patternButton'><a href='%SCRIPTURL{"view"}%/%WEB%/%TOPIC%' rel='nofollow' %MAKETEXT{"title='View topic' accesskey='v'>&View topic"}%</a></span>%TMPL:END% @@ -53,14 +53,16 @@ %TMPL:DEF{"edit_or_create"}%%TMPL:P{context="new_topic" then="create_topic_link" else="edit_topic_link"}%%TMPL:END% +%TMPL:DEF{"wysiwyg"}%%IF{"context WysiwygPluginEnabled and $COMPOSER" then="$percntTMPL:P{$quotactivatable_edit_wysiwyg$quot}$percnt"}%%TMPL:END% + +%TMPL:DEF{"activatable_edit_wysiwyg"}%%TMPL:P{context="inactive" then="inactive_wysiwyg" else="wysiwyg_edit_or_create"}%%TMPL:END% + %TMPL:DEF{"wysiwyg_edit_or_create"}%%TMPL:P{context="new_topic" then="wysiwyg_create_topic_link" else="edit_wysiwyg_link"}%%TMPL:END% %TMPL:DEF{"activatable_edit_or_create"}%%TMPL:P{context="inactive" then="inactive_edit_with_view_topic" else="edit_or_create"}%%TMPL:END% -%TMPL:DEF{"activatable_edit_wysiwyg"}%%TMPL:P{context="inactive" then="inactive_wysiwyg" else="wysiwyg_edit_or_create"}%%TMPL:END% - %TMPL:DEF{"active_attach"}%%TMPL:P{"attach_link"}%%TMPL:END% %TMPL:DEF{"inactive_attach"}%<span class="patternButton"><strike>%MAKETEXT{"Attach"}%</strike></span>%TMPL:END% |