Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
2433 rajveer 1
## This velocity file will generate all slides for a given entity. It will get just {$expentity}  from java and generate the content.
2
#set( $expslides = $expentity.getExpandedSlides() )
3
#set($entityid = $expentity.getID())
4
#set($urlpart1 = "http://static")
5
#set($urlpart2 = "." + $domain)
6
#set($staticnum = $entityid%3)
7
#set($defaulturl = $urlpart1 + $staticnum + $urlpart2)
8
#set($staticnum = $staticnum+1)
9
#set($staticnum = $staticnum%3)
10
#set($skinurl = $urlpart1 + $staticnum + $urlpart2)
11
#set($staticnum = $staticnum+1)
12
#set($staticnum = $staticnum%3)
13
#set($numcount = $staticnum)
14
#set($dynamicurl = $urlpart1 + $numcount + $urlpart2)
15
#set($entitytitle =  $expentity.getBrand().trim() + ' ' + $expentity.getModelName().trim() + ' ' + $expentity.getModelNumber().trim())
16
 
17
 
18
#foreach( $expslide in $expslides )
3231 rajveer 19
#if($expslide.getSlideDefinitionID() != 130054 && $expslide.getSlideDefinitionID() != 130088)
2433 rajveer 20
#set($slideno = $velocityCount)
21
#set($slidename = $expslide.getSlideDefinition().getLabel().toLowerCase().replace(" ", ""))
22
#set($slidename = $slidename.replace("/", ""))
23
 
24
<div class="vtab-$slidename  comparision comparision-hide" >
25
  <div class="inner-column">
26
    <div class="featureslisting">
27
 
28
## Text content of each slide will be displayed here
29
<ul>
30
#if ( $expslide.getExpandedFeatures() )
31
#set ( $expfeatures = $expslide.getExpandedFeatures() )
32
#foreach( $expfeature in $expfeatures )
33
<li class="mainFeature">$expfeature.getFeatureDefinition().getLabel()</li>
34
#if ( $expfeature.getExpandedBullets() )
35
#set ( $expbullets = $expfeature.getExpandedBullets() )
36
#foreach ( $expbullet in $expbullets)
37
<li class="mainFeatureValue">$expbullet.displayText()</li>
38
#if ( $expbullet.getFreeformContent() )
39
#if($expbullet.getFreeformContent().getFreeformText() && !$expbullet.getFreeformContent().getFreeformText().trim().isEmpty())
40
<li class="mainFeaturePunchline">$expbullet.getFreeformContent().getFreeformText()</li>
41
#end
42
#end
43
#end
44
#end
45
 
46
#if ( $expfeature.getFreeformContent() )
47
#if($expfeature.getFreeformContent().getFreeformText())
48
#set($lines = $expfeature.getFreeformContent().getFreeformText())
49
#set($lines = $lines.replaceAll("</?li>|</?ul>|</?br>|</?b>|</?p>",""))
50
#foreach($line in $lines.split("\n"))
51
#if(!$line.trim().isEmpty())
52
<li class="mainFeaturePunchline">$line</li>
53
#end
54
#end
55
#end
56
#end
57
#end
58
#end
59
 
60
#if ( $expslide.getExpandedChildrenSlides() )
61
#set ( $expchildren = $expslide.getExpandedChildrenSlides() )
62
#foreach( $expchild in $expchildren )
63
#showchildslidecmp ( $expchild 1)
64
#end
65
#end
66
 
67
#if ( $expslide.getFreeformContent() )
68
#if($expslide.getSlideDefinitionID() != 130001)
69
#if($expslide.getFreeformContent().getFreeformText())
70
#set($lines = $expslide.getFreeformContent().getFreeformText())
71
#set($lines = $lines.replaceAll("</?li>|</?ul>|</?br>|</?b>|</?p>",""))
72
#set($isfirst = 1)
73
#foreach($line in $lines.split("\n"))
74
#if(!$line.trim().isEmpty())
75
#if($isfirst == 1)  
76
<li class="mainPunchline  spacing">$line</li>
77
#set($isfirst = 0)
78
#else
79
<li class="mainPunchline">$line</li>
80
#end
81
#end
82
#end
83
#end
84
#else
85
<li class="introduction">$expslide.getFreeformContent().getFreeformText()</li>
86
#end
87
#end
88
</ul>
89
 
90
    </div>
91
  </div>
92
</div>
93
 
94
#end
95
#end
96
 
97
## MACROS ##
98
## Show content of child slide.
99
#macro ( showchildslidecmp $expslide $level)
100
#if($level == 1)
101
<li class="mainFeature">$expslide.getSlideDefinition().getLabel()</li>
102
#else
103
<li class="subFeature">$expslide.getSlideDefinition().getLabel()</li>
104
#end
105
#if ( $expslide.getExpandedFeatures() )
106
#set ( $expfeatures = $expslide.getExpandedFeatures() )
107
#foreach( $expfeature in $expfeatures )
108
#if($level == 1)
109
<li class="subFeature">$expfeature.getFeatureDefinition().getLabel()</li>
110
#else
111
<li class="subsubFeature">$expfeature.getFeatureDefinition().getLabel()</li>
112
#end
113
#if ( $expfeature.getExpandedBullets() )
114
#set ( $expbullets = $expfeature.getExpandedBullets() )
115
#foreach ( $expbullet in $expbullets )
116
#if($level == 1)
117
<li class="subFeatureValue"> $expbullet.displayText()</li>
118
#else
119
<li class="subsubFeatureValue"> $expbullet.displayText()</li>
120
#end
121
#if ( $expbullet.getFreeformContent() )
122
#if($expbullet.getFreeformContent().getFreeformText() && !$expbullet.getFreeformContent().getFreeformText().trim().isEmpty())
123
<li class="subFeaturePunchline"> $expbullet.getFreeformContent().getFreeformText()</li>
124
#end
125
#end
126
#end
127
#end
128
#if ( $expfeature.getFreeformContent() )
129
#if($expfeature.getFreeformContent().getFreeformText())
130
#set($lines = $expfeature.getFreeformContent().getFreeformText())
131
#set($lines = $lines.replaceAll("</?li>|</?ul>|</?br>|</?b>|</?p>",""))
132
#foreach($line in $lines.split("\n"))
133
#if(!$line.trim().isEmpty())
134
#if($level == 1)
135
<li class="subFeaturePunchline">$line</li>
136
#else
137
<li class="subsubFeaturePunchline">$line</li>
138
#end
139
#end
140
#end
141
#end
142
#end
143
#end
144
#end
145
 
146
#if ( $expslide.getExpandedChildrenSlides() )
147
#set ( $expchildren = $expslide.getExpandedChildrenSlides() )
148
#foreach( $expchild in $expchildren )
149
#showchildslidecmp ( $expchild 2)
150
#end
151
#end
152
 
153
#if ( $expslide.getFreeformContent() )
154
#if($expslide.getFreeformContent().getFreeformText())
155
#set($lines = $expslide.getFreeformContent().getFreeformText())
156
#set($lines = $lines.replaceAll("</?li>|</?ul>|</?br>|</?b>|</?p>",""))
157
#set($isfirst = 1)
158
#foreach($line in $lines.split("\n"))
159
#if(!$line.trim().isEmpty())
160
#if($level == 1)
161
#if($isfirst == 1)
162
<li class="mainFeaturePunchline subspacing">$line</li>
163
#set($isfirst = 0)
164
#else
165
<li class="mainFeaturePunchline">$line</li>
166
#end
167
#else
168
#if($isfirst == 1)
169
<li class="subFeaturePunchline subspacing">$line</li>
170
#set($isfirst = 0)
171
#else
172
<li class="subFeaturePunchline">$line</li>
173
#end
174
#end
175
#end
176
#end
177
#end
178
#end
179
#end
180