Subversion Repositories SmartDukaan

Rev

Rev 2433 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

## This velocity file will generate all slides for a given entity. It will get just {$expentity}  from java and generate the content.
#set( $expslides = $expentity.getExpandedSlides() )
#set($entityid = $expentity.getID())
#set($urlpart1 = "http://static")
#set($urlpart2 = "." + $domain)
#set($staticnum = $entityid%3)
#set($defaulturl = $urlpart1 + $staticnum + $urlpart2)
#set($staticnum = $staticnum+1)
#set($staticnum = $staticnum%3)
#set($skinurl = $urlpart1 + $staticnum + $urlpart2)
#set($staticnum = $staticnum+1)
#set($staticnum = $staticnum%3)
#set($numcount = $staticnum)
#set($dynamicurl = $urlpart1 + $numcount + $urlpart2)
#set($entitytitle =  $expentity.getBrand().trim() + ' ' + $expentity.getModelName().trim() + ' ' + $expentity.getModelNumber().trim())


#foreach( $expslide in $expslides )
#if($expslide.getSlideDefinitionID() != 130054 && $expslide.getSlideDefinitionID() != 130088)
#set($slideno = $velocityCount)
#set($slidename = $expslide.getSlideDefinition().getLabel().toLowerCase().replace(" ", ""))
#set($slidename = $slidename.replace("/", ""))

<div class="vtab-$slidename  comparision comparision-hide" >
  <div class="inner-column">
    <div class="featureslisting">

## Text content of each slide will be displayed here
<ul>
#if ( $expslide.getExpandedFeatures() )
#set ( $expfeatures = $expslide.getExpandedFeatures() )
#foreach( $expfeature in $expfeatures )
<li class="mainFeature">$expfeature.getFeatureDefinition().getLabel()</li>
#if ( $expfeature.getExpandedBullets() )
#set ( $expbullets = $expfeature.getExpandedBullets() )
#foreach ( $expbullet in $expbullets)
<li class="mainFeatureValue">$expbullet.displayText()</li>
#if ( $expbullet.getFreeformContent() )
#if($expbullet.getFreeformContent().getFreeformText() && !$expbullet.getFreeformContent().getFreeformText().trim().isEmpty())
<li class="mainFeaturePunchline">$expbullet.getFreeformContent().getFreeformText()</li>
#end
#end
#end
#end

#if ( $expfeature.getFreeformContent() )
#if($expfeature.getFreeformContent().getFreeformText())
#set($lines = $expfeature.getFreeformContent().getFreeformText())
#set($lines = $lines.replaceAll("</?li>|</?ul>|</?br>|</?b>|</?p>",""))
#foreach($line in $lines.split("\n"))
#if(!$line.trim().isEmpty())
<li class="mainFeaturePunchline">$line</li>
#end
#end
#end
#end
#end
#end

#if ( $expslide.getExpandedChildrenSlides() )
#set ( $expchildren = $expslide.getExpandedChildrenSlides() )
#foreach( $expchild in $expchildren )
#showchildslidecmp ( $expchild 1)
#end
#end

#if ( $expslide.getFreeformContent() )
#if($expslide.getSlideDefinitionID() != 130001)
#if($expslide.getFreeformContent().getFreeformText())
#set($lines = $expslide.getFreeformContent().getFreeformText())
#set($lines = $lines.replaceAll("</?li>|</?ul>|</?br>|</?b>|</?p>",""))
#set($isfirst = 1)
#foreach($line in $lines.split("\n"))
#if(!$line.trim().isEmpty())
#if($isfirst == 1)  
<li class="mainPunchline  spacing">$line</li>
#set($isfirst = 0)
#else
<li class="mainPunchline">$line</li>
#end
#end
#end
#end
#else
<li class="introduction">$expslide.getFreeformContent().getFreeformText()</li>
#end
#end
</ul>

    </div>
  </div>
</div>

#end
#end

## MACROS ##
## Show content of child slide.
#macro ( showchildslidecmp $expslide $level)
#if($level == 1)
<li class="mainFeature">$expslide.getSlideDefinition().getLabel()</li>
#else
<li class="subFeature">$expslide.getSlideDefinition().getLabel()</li>
#end
#if ( $expslide.getExpandedFeatures() )
#set ( $expfeatures = $expslide.getExpandedFeatures() )
#foreach( $expfeature in $expfeatures )
#if($level == 1)
<li class="subFeature">$expfeature.getFeatureDefinition().getLabel()</li>
#else
<li class="subsubFeature">$expfeature.getFeatureDefinition().getLabel()</li>
#end
#if ( $expfeature.getExpandedBullets() )
#set ( $expbullets = $expfeature.getExpandedBullets() )
#foreach ( $expbullet in $expbullets )
#if($level == 1)
<li class="subFeatureValue"> $expbullet.displayText()</li>
#else
<li class="subsubFeatureValue"> $expbullet.displayText()</li>
#end
#if ( $expbullet.getFreeformContent() )
#if($expbullet.getFreeformContent().getFreeformText() && !$expbullet.getFreeformContent().getFreeformText().trim().isEmpty())
<li class="subFeaturePunchline"> $expbullet.getFreeformContent().getFreeformText()</li>
#end
#end
#end
#end
#if ( $expfeature.getFreeformContent() )
#if($expfeature.getFreeformContent().getFreeformText())
#set($lines = $expfeature.getFreeformContent().getFreeformText())
#set($lines = $lines.replaceAll("</?li>|</?ul>|</?br>|</?b>|</?p>",""))
#foreach($line in $lines.split("\n"))
#if(!$line.trim().isEmpty())
#if($level == 1)
<li class="subFeaturePunchline">$line</li>
#else
<li class="subsubFeaturePunchline">$line</li>
#end
#end
#end
#end
#end
#end
#end
 
#if ( $expslide.getExpandedChildrenSlides() )
#set ( $expchildren = $expslide.getExpandedChildrenSlides() )
#foreach( $expchild in $expchildren )
#showchildslidecmp ( $expchild 2)
#end
#end

#if ( $expslide.getFreeformContent() )
#if($expslide.getFreeformContent().getFreeformText())
#set($lines = $expslide.getFreeformContent().getFreeformText())
#set($lines = $lines.replaceAll("</?li>|</?ul>|</?br>|</?b>|</?p>",""))
#set($isfirst = 1)
#foreach($line in $lines.split("\n"))
#if(!$line.trim().isEmpty())
#if($level == 1)
#if($isfirst == 1)
<li class="mainFeaturePunchline subspacing">$line</li>
#set($isfirst = 0)
#else
<li class="mainFeaturePunchline">$line</li>
#end
#else
#if($isfirst == 1)
<li class="subFeaturePunchline subspacing">$line</li>
#set($isfirst = 0)
#else
<li class="subFeaturePunchline">$line</li>
#end
#end
#end
#end
#end
#end
#end