Commits

Samael Bate committed 1e2ead5

I've added a web-item block into the atlassian plugin xml file so that the configuration page can be reached easily from the admin panel. I've also cleaned up the config page a little.

Comments (0)

Files changed (7)

     <developers>
         <developer>
             <name>Samael Bate</name>
-            <email>sbate@adaptavist.com</email>
-            <organization>Adaptavist.com Ltd</organization>
-            <organizationUrl>http://www.adaptavist.com/</organizationUrl>
+            <email>singingbush@hotmail.com.com</email>
+            <organization>singingbush</organization>
+            <organizationUrl>http://www.singingbush.com/</organizationUrl>
             <roles>
                 <role>Lead Developer</role>
             </roles>

src/main/resources/adv-i18n.properties

 profanity.i18n.configscreen.listing.heading=Current Profanities:
 profanity.i18n.configscreen.listing.subtext.nowords=There are currently no words being blocked.
 profanity.i18n.configscreen.listing.subtext.havewords=The following words are currently being blocked:
-profanity.i18n.configscreen.adaptavistInfo=This plugin has been created by a member of staff at <a href="http://www.adaptavist.com">Adaptavist</a>.
+profanity.i18n.configscreen.pluginInfo=WTFilter was made open-source in 2011 by Samael Bate &amp; Robin Crorie. Whilst the plugin can be used to prevent users from using specified words in page bodies and page titles, it is by no means production ready. If you wish for this plugin to be updated for current versions of Confluence or wish to contribute code please contact Samael Bate.
 
 ## Button text:
 profanity.i18n.config.action.add=Add word

src/main/resources/adv-i18n_de.properties

 profanity.i18n.configscreen.listing.heading=Current Profanities:
 profanity.i18n.configscreen.listing.subtext.nowords=There are currently no words being blocked.
 profanity.i18n.configscreen.listing.subtext.havewords=The following words are currently being blocked:
-profanity.i18n.configscreen.adaptavistInfo=This plugin has been created by a member of staff at <a href="http://www.adaptavist.com">Adaptavist</a>.
+profanity.i18n.configscreen.pluginInfo=WTFilter was made open-source in 2011 by Samael Bate &amp; Robin Crorie. Whilst the plugin can be used to prevent users from using specified words in page bodies and page titles, it is by no means production ready. If you wish for this plugin to be updated for current versions of Confluence or wish to contribute code please contact Samael Bate.
 
 ## Button text:
 profanity.i18n.config.action.add=Add word

src/main/resources/adv-i18n_ru.properties

 
 ## Module names:
 profanity.i18n.module.manager=Цензор
-profanity.i18n.module.actions=Config Actions - ??? (I ll call u about it later)
+profanity.i18n.module.actions=Config Actions
 profanity.i18n.module.servlet.createpage=цензура в период создания страницы
 profanity.i18n.module.servlet.editpage=цензура в период обработки страницы
 profanity.i18n.module.servlet.comment=цензура на добавление комментариев
 profanity.i18n.configscreen.listing.heading=Current Profanities:
 profanity.i18n.configscreen.listing.subtext.nowords=В настоящее время нет заблокированных слов.
 profanity.i18n.configscreen.listing.subtext.havewords=Следующие слова в настоящее время блокируются:
-profanity.i18n.configscreen.adaptavistInfo=This plugin has been created by a member of staff at <a href="http://www.adaptavist.com">Adaptavist</a>.
+profanity.i18n.configscreen.pluginInfo=WTFilter was made open-source in 2011 by Samael Bate &amp; Robin Crorie. Whilst the plugin can be used to prevent users from using specified words in page bodies and page titles, it is by no means production ready. If you wish for this plugin to be updated for current versions of Confluence or wish to contribute code please contact Samael Bate.
 
 ## Button text:
 profanity.i18n.config.action.add=Ввести слово

src/main/resources/atlassian-plugin.xml

         <description>Manager for Profanity Censor functionality.</description>
     </component>
 
+    <web-item key="WTFilterConfigPage" name="WTFilter Configuration" section="system.admin/administration" weight="70">
+        <label key="WTFilter" />
+        <link linkId="pm-config-link">/admin/WTFilter/configurePlugin.action</link>
+        <description>Allows access to the configuration page from the Confluence admin panel.</description>
+    </web-item>
+
     <xwork key="actions" name="Configuration Actions" >
         <description>Profanity Censor Configuration Menu.</description>
         <package name="profanity-admin" extends="default" namespace="/admin/WTFilter">

src/main/resources/config.vm

         </div>
 
         <div class="functionbox thickPadded">
-            <p>$i18n.getText("profanity.i18n.configscreen.adaptavistInfo")</p>
+            <p>$i18n.getText("profanity.i18n.configscreen.pluginInfo")</p>
         </div>
     </div>
 </div>

src/main/resources/config2.vm

-<title>$i18n.getText("profanity.i18n.pluginname") - $i18n.getText("profanity.i18n.configscreen.title")</title>
+<html>
+    <head>
+        <title>$i18n.getText("profanity.i18n.pluginname") - $i18n.getText("profanity.i18n.configscreen.title")</title>
+    </head>
 
-#if ($!{word})
-word added: ${word} is $word.length() characters in length.
-#end
-
-##<form class="aui" id="#profanityForm" name="update-profanities" action="configurePlugin.action" method="post">
-##    <label>
-##        <input type="text" id="profanity" name="badword" value=""/>
-##    </label>
-##    <label>
-##        <input type="submit" id="" class="submit button" value="Update" />
-##     </label>
-##</form>
+    <body>
 
         <div id="search-index-panel" class="functionbox thickPadded">
             <div id="search-index-panel-contents">
                 <h2>$i18n.getText("profanity.i18n.configscreen.heading")</h2>
                 <p class="description">$i18n.getText("profanity.i18n.configscreen.instructions")</p>
                 <form class="aui" id="#profanityForm" name="update-profanities" action="configurePlugin.action" method="post">
-                    <label for="profanity">Enter a word to add it to your list of censored
-                        <words></words>:
+                    <label for="profanity">Enter a word to add it to your list of censored words
                         <input type="text" id="profanity" name="badword" value="" />
                     </label>
                     <label for="add-profanity">
                         <input type="submit" id="add-profanity" name="add-profanity" class="submit button"
-                               value="$i18n.getText("profanity.i18n.config.action.add")"  />
+                               value="$i18n.getText('profanity.i18n.config.action.add')"  />
                      </label>
                     <label for="clear-all">
                         <input type="submit" id="clear-all" name="clear-all" class="submit button"
-                               value="$i18n.getText("profanity.i18n.config.action.reset")"  />
+                               value="$i18n.getText('profanity.i18n.config.action.reset')"  />
                      </label>
                 </form>
                  #if ( ($!{word}) && ($word.length() > 1) ) 
             #else
                 <div class="description">$i18n.getText("profanity.i18n.configscreen.listing.subtext.havewords")  Total: $badWords.size()</div>
             #end
-            #if ($!{word})
-                #foreach ($currentWord in ${badWords})
-                    <ol><strong class="good">$currentWord</strong> | <strong class="bad">Remove Word</strong></ol>
-                #end
+
+            <ol>
+            #foreach ($currentWord in ${badWords})
+                <li><strong class="good">$currentWord</strong> | <strong class="bad">Remove Word</strong></li>
+            #end
+            </ol>
+
+            #if ($!{errorMessage})
+            <div class="error">$i18n.getText("profanity.i18n.configscreen.errorMessage")</div>
             #end
 
         </div>
 
         <div class="functionbox thickPadded">
-            <p>$i18n.getText("profanity.i18n.configscreen.adaptavistInfo")</p>
-        </div>
+            <p>$i18n.getText("profanity.i18n.configscreen.pluginInfo")</p>
+        </div>
+
+    </body>
+</html>