PageRenderTime 27ms CodeModel.GetById 12ms app.highlight 7ms RepoModel.GetById 1ms app.codeStats 0ms

/protocols/smpp/src/site/smppapi-site.vm

http://mobicents.googlecode.com/
Unknown | 294 lines | 268 code | 26 blank | 0 comment | 0 complexity | 2732fa55925a77fd97678539e04fc5dc MD5 | raw file
  1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  2
  3#macro ( link $href $name )
  4  #if ( ( $href.toLowerCase().startsWith("http") || $href.toLowerCase().startsWith("https") ) )
  5    <a href="$href" class="externalLink">$name</a>
  6  #else
  7    <a href="$href">$name</a>
  8  #end
  9#end
 10
 11#macro ( banner $banner $id )
 12  #if ( $banner )
 13    #if( $banner.href )
 14      <a href="$banner.href" id="$id" #if( $banner.alt ) title="$banner.alt" #end >
 15    #else
 16        <div id="$id">
 17    #end
 18
 19    #if( $banner.src )
 20        #set ( $src = $banner.src )
 21        #if ( ! ( $src.toLowerCase().startsWith("http") || $src.toLowerCase().startsWith("https") ) )
 22            #set ( $src = $PathTool.calculateLink( $src, $relativePath ) )
 23            #set ( $src = $src.replaceAll( "\\", "/" ) )
 24        #end
 25        #if ( $banner.alt )
 26            #set ( $alt = $banner.alt )
 27        #else
 28            #set ( $alt = $banner.name )
 29        #end
 30        <img src="$src" alt="$alt" />
 31    #else
 32        $banner.name
 33    #end
 34
 35    #if( $banner.href )
 36        </a>
 37    #else
 38        </div>
 39    #end
 40  #end
 41#end
 42
 43#macro ( links $links )
 44  #set ( $counter = 0 )
 45  #foreach( $item in $links )
 46    #set ( $counter = $counter + 1 )
 47    #set ( $currentItemHref = $PathTool.calculateLink( $item.href, $relativePath ) )
 48    #set ( $currentItemHref = $currentItemHref.replaceAll( "\\", "/" ) )
 49    #link( $currentItemHref $item.name )
 50    #if ( $links.size() > $counter )
 51      |
 52    #end
 53  #end
 54#end
 55
 56#macro ( breadcrumbs $breadcrumbs )
 57  #set ( $counter = 0 )
 58  #foreach( $item in $breadcrumbs )
 59    #set ( $counter = $counter + 1 )
 60    #set ( $currentItemHref = $PathTool.calculateLink( $item.href, $relativePath ) )
 61    #set ( $currentItemHref = $currentItemHref.replaceAll( "\\", "/" ) )
 62
 63    #if ( $currentItemHref == $alignedFileName || $currentItemHref == "" )
 64      $item.name
 65    #else
 66      #link( $currentItemHref $item.name )
 67    #end
 68    #if ( $breadcrumbs.size() > $counter )
 69      &gt;
 70    #end
 71  #end
 72#end
 73
 74#macro ( displayTree $display $item )
 75  #if ( $item && $item.items && $item.items.size() > 0 )
 76    #foreach( $subitem in $item.items )
 77      #set ( $subitemHref = $PathTool.calculateLink( $subitem.href, $relativePath ) )
 78      #set ( $subitemHref = $subitemHref.replaceAll( "\\", "/" ) )
 79      #if ( $alignedFileName == $subitemHref )
 80        #set ( $display = true )
 81      #end
 82
 83      #displayTree( $display $subitem )
 84    #end
 85  #end
 86#end
 87
 88#macro ( menuItem $item )
 89  #set ( $collapse = "none" )
 90  #set ( $currentItemHref = $PathTool.calculateLink( $item.href, $relativePath ) )
 91  #set ( $currentItemHref = $currentItemHref.replaceAll( "\\", "/" ) )
 92
 93  #if ( $item && $item.items && $item.items.size() > 0 )
 94    #if ( $item.collapse == false )
 95      #set ( $collapse = "expanded" )
 96    #else
 97      ## By default collapsed
 98      #set ( $collapse = "collapsed" )
 99    #end
100
101    #set ( $display = false )
102    #displayTree( $display $item )
103
104    #if ( $alignedFileName == $currentItemHref || $display )
105      #set ( $collapse = "expanded" )
106    #end
107  #end
108  <li class="$collapse">
109    #if ( $item.img )
110      #if ( ! ( $item.img.toLowerCase().startsWith("http") || $item.img.toLowerCase().startsWith("https") ) )
111        #set ( $src = $PathTool.calculateLink( $item.img, $relativePath ) )
112        #set ( $src = $src.replaceAll( "\\", "/" ) )
113        <img src="$src"/>
114      #else
115        <img src="$item.img" align="absbottom" style="border-width: 0"/>
116      #end
117    #end
118    #if ( $alignedFileName == $currentItemHref )
119      <strong>$item.name</strong>
120    #else
121      #link( $currentItemHref $item.name )
122    #end
123  #if ( $item && $item.items && $item.items.size() > 0 )
124    #if ( $collapse == "expanded" )
125      <ul>
126        #foreach( $subitem in $item.items )
127          #menuItem( $subitem )
128        #end
129      </ul>
130    #end
131  #end
132  </li>
133#end
134
135#macro ( mainMenu $menus )
136  #foreach( $menu in $menus )
137    #if ( $menu.name )
138    <h5>$menu.name</h5>
139    #end
140    #if ( $menu.items && $menu.items.size() > 0 )
141    <ul>
142      #foreach( $item in $menu.items )
143        #menuItem( $item )
144      #end
145    </ul>
146    #end
147  #end
148#end
149
150#macro ( copyright )
151  #if ( $project )
152    #set ( $currentYear = ${currentDate.year} + 1900 )
153
154    #if ( ${project.inceptionYear} && ( ${project.inceptionYear} != ${currentYear.toString()} ) )
155      ${project.inceptionYear}-${currentYear}
156    #else
157      ${currentYear}
158    #end
159
160    #if ( ${project.organization} && ${project.organization.name} )
161      ${project.organization.name}
162    #end
163  #end
164#end
165
166#macro ( publishDate )
167  #if ( $publishDate && $publishDate.format )
168    #set ( $format = $publishDate.format )
169  #else
170    #set ( $format = "yyyy-MM-dd" )
171  #end
172  $dateFormat.applyPattern( $format )
173  #set ( $dateToday = $dateFormat.format( $currentDate ) )
174  $dateToday
175#end
176
177#macro ( poweredByLogo $poweredBy )
178    #if( $poweredBy )
179        #foreach ($item in $poweredBy)
180            #if( $item.href )
181                #set ( $href = $PathTool.calculateLink( $item.href, $relativePath ) )
182                #set ( $href = $href.replaceAll( "\\", "/" ) )
183            #else
184                #set ( $href="http://maven.apache.org/" )
185            #end
186
187            #if( $item.name )
188                #set ( $name = $item.name )
189            #else
190                #set ( $name = $i18n.getString( "site-renderer", $locale, "template.builtby" )  )
191                #set ( $name = "${name} Maven"  )
192            #end
193
194            #if( $item.img )
195                #set ( $img = $item.img )
196            #else
197                #set ( $img = "images/logos/maven-feather.png" )
198            #end
199
200            <a href="$href" title="$name" class="poweredBy">
201              #set ( $img = $PathTool.calculateLink( $img, $relativePath ) )
202              #set ( $img = $img.replaceAll( "\\", "/" ) )
203              <img  class="poweredBy"  
204                    alt="$name" 
205                    src="$img" 
206                    width="90"
207                    height="30"
208              />
209            </a>
210        #end
211        #if( $poweredBy.isEmpty() )
212          <a href="http://maven.apache.org/" title="$i18n.getString( "site-renderer", $locale, "template.builtby" ) Maven" class="poweredBy">
213            <img class="poweredBy" 
214                 alt="$i18n.getString( "site-renderer", $locale, "template.builtby" ) Maven" 
215                 src="$relativePath/images/logos/maven-feather.png" 
216                 width="90"
217                 height="30"
218                 border="1" />
219          </a>
220        #end
221    #else
222        <a href="http://maven.apache.org/" title="$i18n.getString( "site-renderer", $locale, "template.builtby" ) Maven" class="poweredBy">
223          <img class="poweredBy" 
224               alt="$i18n.getString( "site-renderer", $locale, "template.builtby" ) Maven" 
225               src="$relativePath/images/logos/maven-feather.png" 
226               width="90"
227               height="30"
228               border="1"
229               />
230        </a>
231    #end
232#end
233
234<html xmlns="http://www.w3.org/1999/xhtml">
235  <head>
236    <title>$title</title>
237    <style type="text/css" media="all">
238      @import url("$relativePath/css/site.css");
239    </style>
240    <link rel="stylesheet" href="$relativePath/css/print.css" type="text/css" media="print" />
241    #foreach( $author in $authors )
242      <meta name="author" content="$author" />
243    #end
244    <meta http-equiv="Content-Type" content="text/html; charset=${outputEncoding}" />
245    #if ( $decoration.body.head )
246      #foreach( $item in $decoration.body.head.getChildren() )
247        ## Workaround for DOXIA-150 due to a non-desired behaviour in p-u
248        ## @see org.codehaus.plexus.util.xml.Xpp3Dom#toString()
249        ## @see org.codehaus.plexus.util.xml.Xpp3Dom#toUnescapedString()
250        #set ( $documentHeader = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" )
251        #set ( $documentHeader = $documentHeader.replaceAll( "\\", "" ) )
252        #if ( $item.name == "script" )
253          $StringUtils.replace( $item.toUnescapedString(), $documentHeader, "" )
254        #else
255          $StringUtils.replace( $item.toString(), $documentHeader, "" )
256        #end
257      #end
258    #end
259  </head>
260  <body>
261	  <div class="headBox"></div>
262	  <div class="header">
263	  	<h1><a href="http://smppapi.sourceforge.net">smppapi</a></h1>
264	  	A Java implementation of the SMPP specification 
265	  </div>
266	  
267	  <div class="toolbarOuter">
268	  	<div class="toolbar toolbarTop">
269	       #mainMenu( $decoration.body.menus )
270	  	</div>
271	  	<div class="toolbar publishInfo">
272	  		<dl>
273	  			<dt>Last Published</dt>
274	  			<dd>#publishDate()</dd>
275	  			<dt>Version</dt>
276	  			<dd>${project.version}</dd>
277  			</dl>
278	  	</div>
279	  </div>
280	  
281	  <div class="contentOuter">
282	  	<div class="content mainContent">
283	      <div class="xright">#links( $decoration.body.links )</div>
284		  $bodyContent
285      </div>
286    </div>
287
288	<div class="contentOuter">
289	    <div class="content poweredBy">
290	    	&#169;#copyright()
291	    </div>
292	</div>
293  </body>
294</html>