Revision: 9740
          
http://languagetool.svn.sourceforge.net/languagetool/?rev=9740&view=rev
Author:   dnaber
Date:     2013-03-20 20:59:05 +0000 (Wed, 20 Mar 2013)
Log Message:
-----------
don't display a useless link (leads to the page itself)

Modified Paths:
--------------
    
trunk/ltcommunity/grails-app/controllers/org/languagetool/RuleController.groovy
    trunk/ltcommunity/grails-app/views/_ruleMatches.gsp

Modified: 
trunk/ltcommunity/grails-app/controllers/org/languagetool/RuleController.groovy
===================================================================
--- 
trunk/ltcommunity/grails-app/controllers/org/languagetool/RuleController.groovy 
    2013-03-20 18:10:23 UTC (rev 9739)
+++ 
trunk/ltcommunity/grails-app/controllers/org/languagetool/RuleController.groovy 
    2013-03-20 20:59:05 UTC (rev 9740)
@@ -110,7 +110,6 @@
             String catName = rule.category.name.toLowerCase()
             if (catName.contains(filter)) {
                 filtered.add(rule)
-                continue
             }
         }
         return filtered
@@ -162,7 +161,7 @@
         }
         int corpusMatchCount = countCorpusMatches(lang, selectedRule.id)
         List ruleMatches = lt.check(text)
-        render(view:'show', model: [ rule: selectedRule, isDisabled: disableId 
!= -1, disableId: disableId,
+        render(view:'show', model: [ hideRuleLink: true, rule: selectedRule, 
isDisabled: disableId != -1, disableId: disableId,
                 textToCheck: params.text, matches: ruleMatches, ruleId: 
params.id,
                 isUserRule: isUserRule, corpusMatchCount: corpusMatchCount],
                 contentType: "text/html", encoding: "utf-8")

Modified: trunk/ltcommunity/grails-app/views/_ruleMatches.gsp
===================================================================
--- trunk/ltcommunity/grails-app/views/_ruleMatches.gsp 2013-03-20 18:10:23 UTC 
(rev 9739)
+++ trunk/ltcommunity/grails-app/views/_ruleMatches.gsp 2013-03-20 20:59:05 UTC 
(rev 9740)
@@ -8,15 +8,17 @@
             <li class="errorList">
                 ${matchInfo.getMessage().replaceAll("<suggestion>", "<span 
class='correction'>").replaceAll("</suggestion>", "</span>")}
 
-                <g:set var="langParam" 
value="${language?.getShortNameWithVariant() ? 
language.getShortNameWithVariant() : lang}"/>
-                <g:if test="${matchInfo.getRule() instanceof PatternRule}">
-                    <g:link controller="rule" action="show" 
id="${matchInfo.getRule().getId()}"
-                    params="${[lang: langParam, subId: 
matchInfo.getRule().getSubId()]}"><span class="additional"><g:message 
code="ltc.check.visit.rule"/></span></g:link>
+                <g:if test="${!hideRuleLink}">
+                    <g:set var="langParam" 
value="${language?.getShortNameWithVariant() ? 
language.getShortNameWithVariant() : lang}"/>
+                    <g:if test="${matchInfo.getRule() instanceof PatternRule}">
+                        <g:link controller="rule" action="show" 
id="${matchInfo.getRule().getId()}"
+                        params="${[lang: langParam, subId: 
matchInfo.getRule().getSubId()]}"><span class="additional"><g:message 
code="ltc.check.visit.rule"/></span></g:link>
+                    </g:if>
+                    <g:else>
+                        <g:link controller="rule" action="show" 
id="${matchInfo.getRule().getId()}"
+                        params="${[lang: langParam]}"><span 
class="additional"><g:message code="ltc.check.visit.rule"/></span></g:link>
+                    </g:else>
                 </g:if>
-                <g:else>
-                    <g:link controller="rule" action="show" 
id="${matchInfo.getRule().getId()}"
-                    params="${[lang: langParam]}"><span 
class="additional"><g:message code="ltc.check.visit.rule"/></span></g:link>
-                </g:else>
 
                <br/>
                <g:set var="css" value="${matchInfo.getRule().isSpellingRule() 
? 'spellingError' : 'error'}"/>

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
Languagetool-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/languagetool-commits

Reply via email to