Revision: 7072
          
http://languagetool.svn.sourceforge.net/languagetool/?rev=7072&view=rev
Author:   dnaber
Date:     2012-05-26 21:52:20 +0000 (Sat, 26 May 2012)
Log Message:
-----------
fix: use subid to jump to the correct rule

Modified Paths:
--------------
    trunk/ltcommunity/grails-app/views/_ruleMatches.gsp

Modified: trunk/ltcommunity/grails-app/views/_ruleMatches.gsp
===================================================================
--- trunk/ltcommunity/grails-app/views/_ruleMatches.gsp 2012-05-26 21:21:05 UTC 
(rev 7071)
+++ trunk/ltcommunity/grails-app/views/_ruleMatches.gsp 2012-05-26 21:52:20 UTC 
(rev 7072)
@@ -1,12 +1,20 @@
-<%@page import="org.languagetool.Language" %>
+<%@page import="org.languagetool.rules.patterns.PatternRule; 
org.languagetool.Language" %>
 
 <ul>
     <g:each in="${matches}" var="matchInfo" status="i">
         <li class="errorList">${matchInfo.getMessage().
             replaceAll("<suggestion>", "<span class='correction'>").
             replaceAll("</suggestion>", "</span>")}
-           <g:link controller="rule" action="show" 
id="${matchInfo.getRule().getId()}"
-               params="${[lang: lang]}"><span class="additional"><g:message 
code="ltc.check.visit.rule"/></span></g:link>
+
+            <g:if test="${matchInfo.getRule() instanceof PatternRule}">
+                <g:link controller="rule" action="show" 
id="${matchInfo.getRule().getId()}"
+                       params="${[lang: lang, 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: lang]}"><span 
class="additional"><g:message code="ltc.check.visit.rule"/></span></g:link>
+            </g:else>
+
            <br/>
            <span class="exampleSentence">${
            org.languagetool.gui.Tools.getContext(matchInfo.getFromPos(),

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
[email protected]
https://lists.sourceforge.net/lists/listinfo/languagetool-cvs

Reply via email to