Skip to content
Snippets Groups Projects
Commit ab87c02f authored by Ecaterina Moraru (Valica)'s avatar Ecaterina Moraru (Valica)
Browse files

XWIKI-13689: Additional space before title when activating Ratings

- Removed unneeded spaces between velocity calls
- Removing unneeded {{velocity}} call that added a paragraph
- Removed unneeded if
- Fixed the indentation
parent b2382f4e
No related branches found
No related tags found
No related merge requests found
...@@ -360,6 +360,9 @@ ...@@ -360,6 +360,9 @@
} }
</code> </code>
</property> </property>
<property>
<contentType>CSS</contentType>
</property>
<property> <property>
<name>Ratings CSS</name> <name>Ratings CSS</name>
</property> </property>
...@@ -443,32 +446,28 @@ ...@@ -443,32 +446,28 @@
</class> </class>
<property> <property>
<content>{{velocity}} <content>{{velocity}}
#set($canView = $services.security.authorization.hasAccess("view", "XWiki.RatingsMacros")) #set($canView = $services.security.authorization.hasAccess("view", "XWiki.RatingsMacros"))
#if($canView) #if($canView)
{{include reference='XWiki.RatingsMacros'/}} {{include reference='XWiki.RatingsMacros'/}}
#end #set($configClass = 'XWiki.RatingsConfigClass')
{{/velocity}} #set($globalConfigDoc = $xwiki.getDocument('XWiki.RatingsConfig'))
{{velocity}} #set($webPrefDoc = $xwiki.getDocument("${doc.space}.WebPreferences"))
#if($canView) ##
#set($configClass = 'XWiki.RatingsConfigClass') #if($xwiki.exists($webPrefDoc) &amp;&amp; $webPrefDoc.getObjectNumbers($configClass) &gt; 0)
#set($globalConfigDoc = $xwiki.getDocument('XWiki.RatingsConfig')) #set($configObj = $webPrefDoc.getObject($configClass))
#set($webPrefDoc = $xwiki.getDocument("${doc.space}.WebPreferences")) #else
## #set($configObj = $globalConfigDoc.getObject($configClass))
#if($xwiki.exists($webPrefDoc) &amp;&amp; $webPrefDoc.getObjectNumbers($configClass) &gt; 0) #end
#set($configObj = $webPrefDoc.getObject($configClass)) ##
#else #set($displayRatings = $configObj.getProperty('displayRatings').value == 1)
#set($configObj = $globalConfigDoc.getObject($configClass)) #set($excludedPages = $stringtool.split($configObj.getProperty('excludedPages').value, ','))
#end #set($excludedPages = $stringtool.stripAll($excludedPages))
## ##
#set($displayRatings = $configObj.getProperty('displayRatings').value == 1) #if($displayRatings &amp;&amp; !$excludedPages.contains($doc.name))
#set($excludedPages = $stringtool.split($configObj.getProperty('excludedPages').value, ',')) #displayFullRating($doc.getDocumentReference() "")
#set($excludedPages = $stringtool.stripAll($excludedPages)) #end
## #end
#if($displayRatings &amp;&amp; !$excludedPages.contains($doc.name)) {{/velocity}}</content>
#displayFullRating($doc.getDocumentReference() "")
#end
#end
{{/velocity}}</content>
</property> </property>
<property> <property>
<extensionPointId>org.xwiki.platform.template.title.before</extensionPointId> <extensionPointId>org.xwiki.platform.template.title.before</extensionPointId>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment