Subversion Repositories SmartDukaan

Rev

Rev 3231 | 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)
5889 amit.gupta 37
#if($expbullet.displayText() && !$expbullet.displayText().equals(""))
38
<li class="mainFeatureValue"><span style="position: absolute; left: 8px;" class="feature-bullet-icon left"></span>$expbullet.displayText()</li>
39
#end
2433 rajveer 40
#if ( $expbullet.getFreeformContent() )
41
#if($expbullet.getFreeformContent().getFreeformText() && !$expbullet.getFreeformContent().getFreeformText().trim().isEmpty())
42
<li class="mainFeaturePunchline">$expbullet.getFreeformContent().getFreeformText()</li>
43
#end
44
#end
45
#end
46
#end
47
 
48
#if ( $expfeature.getFreeformContent() )
49
#if($expfeature.getFreeformContent().getFreeformText())
50
#set($lines = $expfeature.getFreeformContent().getFreeformText())
51
#set($lines = $lines.replaceAll("</?li>|</?ul>|</?br>|</?b>|</?p>",""))
52
#foreach($line in $lines.split("\n"))
53
#if(!$line.trim().isEmpty())
54
<li class="mainFeaturePunchline">$line</li>
55
#end
56
#end
57
#end
58
#end
59
#end
60
#end
61
 
62
#if ( $expslide.getExpandedChildrenSlides() )
63
#set ( $expchildren = $expslide.getExpandedChildrenSlides() )
64
#foreach( $expchild in $expchildren )
65
#showchildslidecmp ( $expchild 1)
66
#end
67
#end
68
 
69
#if ( $expslide.getFreeformContent() )
70
#if($expslide.getSlideDefinitionID() != 130001)
71
#if($expslide.getFreeformContent().getFreeformText())
72
#set($lines = $expslide.getFreeformContent().getFreeformText())
73
#set($lines = $lines.replaceAll("</?li>|</?ul>|</?br>|</?b>|</?p>",""))
74
#set($isfirst = 1)
75
#foreach($line in $lines.split("\n"))
76
#if(!$line.trim().isEmpty())
77
#if($isfirst == 1)  
78
<li class="mainPunchline  spacing">$line</li>
79
#set($isfirst = 0)
80
#else
81
<li class="mainPunchline">$line</li>
82
#end
83
#end
84
#end
85
#end
86
#else
87
<li class="introduction">$expslide.getFreeformContent().getFreeformText()</li>
88
#end
89
#end
90
</ul>
91
 
92
    </div>
93
  </div>
94
</div>
95
 
96
#end
97
#end
98
 
99
## MACROS ##
100
## Show content of child slide.
101
#macro ( showchildslidecmp $expslide $level)
102
#if($level == 1)
103
<li class="mainFeature">$expslide.getSlideDefinition().getLabel()</li>
104
#else
105
<li class="subFeature">$expslide.getSlideDefinition().getLabel()</li>
106
#end
107
#if ( $expslide.getExpandedFeatures() )
108
#set ( $expfeatures = $expslide.getExpandedFeatures() )
109
#foreach( $expfeature in $expfeatures )
110
#if($level == 1)
111
<li class="subFeature">$expfeature.getFeatureDefinition().getLabel()</li>
112
#else
113
<li class="subsubFeature">$expfeature.getFeatureDefinition().getLabel()</li>
114
#end
115
#if ( $expfeature.getExpandedBullets() )
116
#set ( $expbullets = $expfeature.getExpandedBullets() )
117
#foreach ( $expbullet in $expbullets )
118
#if($level == 1)
119
<li class="subFeatureValue"> $expbullet.displayText()</li>
120
#else
121
<li class="subsubFeatureValue"> $expbullet.displayText()</li>
122
#end
123
#if ( $expbullet.getFreeformContent() )
124
#if($expbullet.getFreeformContent().getFreeformText() && !$expbullet.getFreeformContent().getFreeformText().trim().isEmpty())
125
<li class="subFeaturePunchline"> $expbullet.getFreeformContent().getFreeformText()</li>
126
#end
127
#end
128
#end
129
#end
130
#if ( $expfeature.getFreeformContent() )
131
#if($expfeature.getFreeformContent().getFreeformText())
132
#set($lines = $expfeature.getFreeformContent().getFreeformText())
133
#set($lines = $lines.replaceAll("</?li>|</?ul>|</?br>|</?b>|</?p>",""))
134
#foreach($line in $lines.split("\n"))
135
#if(!$line.trim().isEmpty())
136
#if($level == 1)
137
<li class="subFeaturePunchline">$line</li>
138
#else
139
<li class="subsubFeaturePunchline">$line</li>
140
#end
141
#end
142
#end
143
#end
144
#end
145
#end
146
#end
147
 
148
#if ( $expslide.getExpandedChildrenSlides() )
149
#set ( $expchildren = $expslide.getExpandedChildrenSlides() )
150
#foreach( $expchild in $expchildren )
151
#showchildslidecmp ( $expchild 2)
152
#end
153
#end
154
 
155
#if ( $expslide.getFreeformContent() )
156
#if($expslide.getFreeformContent().getFreeformText())
157
#set($lines = $expslide.getFreeformContent().getFreeformText())
158
#set($lines = $lines.replaceAll("</?li>|</?ul>|</?br>|</?b>|</?p>",""))
159
#set($isfirst = 1)
160
#foreach($line in $lines.split("\n"))
161
#if(!$line.trim().isEmpty())
162
#if($level == 1)
163
#if($isfirst == 1)
164
<li class="mainFeaturePunchline subspacing">$line</li>
165
#set($isfirst = 0)
166
#else
167
<li class="mainFeaturePunchline">$line</li>
168
#end
169
#else
170
#if($isfirst == 1)
171
<li class="subFeaturePunchline subspacing">$line</li>
172
#set($isfirst = 0)
173
#else
174
<li class="subFeaturePunchline">$line</li>
175
#end
176
#end
177
#end
178
#end
179
#end
180
#end
181
#end
182