Revision: 7840 http://languagetool.svn.sourceforge.net/languagetool/?rev=7840&view=rev Author: dnaber Date: 2012-08-12 00:25:06 +0000 (Sun, 12 Aug 2012) Log Message: ----------- rule editor: warn about disabled rules
Modified Paths: -------------- trunk/ltcommunity/grails-app/controllers/org/languagetool/RuleEditorController.groovy trunk/ltcommunity/grails-app/views/ruleEditor/_checkRuleProblem.gsp Modified: trunk/ltcommunity/grails-app/controllers/org/languagetool/RuleEditorController.groovy =================================================================== --- trunk/ltcommunity/grails-app/controllers/org/languagetool/RuleEditorController.groovy 2012-08-12 00:16:27 UTC (rev 7839) +++ trunk/ltcommunity/grails-app/controllers/org/languagetool/RuleEditorController.groovy 2012-08-12 00:25:06 UTC (rev 7840) @@ -94,7 +94,8 @@ List shortProblems = [] checkExampleSentences(patternRule, language, problems, shortProblems) if (problems.size() > 0) { - render(template: 'checkRuleProblem', model: [problems: problems, hasRegex: hasRegex(patternRule), expertMode: true]) + render(template: 'checkRuleProblem', model: [problems: problems, hasRegex: hasRegex(patternRule), + expertMode: true, isOff: patternRule.isDefaultOff()]) return } long startTime = System.currentTimeMillis() Modified: trunk/ltcommunity/grails-app/views/ruleEditor/_checkRuleProblem.gsp =================================================================== --- trunk/ltcommunity/grails-app/views/ruleEditor/_checkRuleProblem.gsp 2012-08-12 00:16:27 UTC (rev 7839) +++ trunk/ltcommunity/grails-app/views/ruleEditor/_checkRuleProblem.gsp 2012-08-12 00:25:06 UTC (rev 7840) @@ -6,10 +6,15 @@ <div class="errors">There are problems with your rule: <ul> - <g:each in="${problems}" var="problem"> - <li>${problem.encodeAsHTML()}</li> - </g:each> - <li>Please make sure you selected the correct language for your rule - your selection was: <b>${params.language.encodeAsHTML()}</b></li> + <g:if test="${isOff}"> + <li>Your rule is not enabled - please remove the default="off" from the XML</li> + </g:if> + <g:else> + <g:each in="${problems}" var="problem"> + <li>${problem.encodeAsHTML()}</li> + </g:each> + <li>Please make sure you selected the correct language for your rule - your selection was: <b>${params.language.encodeAsHTML()}</b></li> + </g:else> </ul> </div> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Languagetool-cvs mailing list Languagetool-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/languagetool-cvs