Changes for page Photos
Last modified by Ludovic Dubost on 2020/07/08 20:03
Change comment:
Document converted from syntax xwiki/1.0 to syntax xwiki/2.1
Summary
-
Page properties (3 modified, 0 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. pmasson1 +XWiki.ldubost - Syntax
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki 1.01 +XWiki 2.1 - Content
-
... ... @@ -1,8 +1,9 @@ 1 - 1Photo Albums1 += Photo Albums = 2 2 3 -{table} 4 -Photo|Title|Description|Comments 5 -#set ($sql = ", BaseObject as obj where obj.name=doc.fullName and obj.className='XWiki.PhotoAlbumClass' and obj.name <> 'XWiki.PhotoAlbumClassTemplate' order by doc.creationDate desc") 3 +{{velocity filter="none"}} 4 +{{html clean="false" wiki="true"}} 5 +|=Photo|=Title|=Description|=Comments 6 +|#set ($sql = ", BaseObject as obj where obj.name=doc.fullName and obj.className='XWiki.PhotoAlbumClass' and obj.name <> 'XWiki.PhotoAlbumClassTemplate' order by doc.creationDate desc") 6 6 #foreach ($item in $xwiki.searchDocuments($sql)) 7 7 #set($bentrydoc = $xwiki.getDocument($item)) 8 8 #set($comments = $bentrydoc.getComments()) ... ... @@ -17,15 +17,15 @@ 17 17 #set($bentryobj = $bentrydoc.getObject("XWiki.PhotoAlbumClass",0)) 18 18 #if($bentrydoc.attachmentList.size()>0) 19 19 #set($attach = $bentrydoc.attachmentList.get(0)) 20 -<img src="$bentrydoc.getAttachmentURL($attach.filename,"download", "height=50")" height="50" alt="$!{bentrydoc.display("title","view",$bentryobj)}" />|[$!{bentrydoc.display("title","view",$bentryobj)}>$item] | $!bentrydoc.display("description", "view", $bentryobj) | $!comment 21 -#else 22 -[No photo>$item]|[$!{bentrydoc.display("title","view",$bentryobj)}>$item] | $!bentrydoc.display("description","view",$bentryobj) | $!comment 21 +<img src="$bentrydoc.getAttachmentURL($attach.filename,"download", "height=50")" height="50" alt="$!{bentrydoc.display("title","view",$bentryobj)}" />|[[$!{bentrydoc.display("title","view",$bentryobj)}>>$item]]|$!bentrydoc.display("description", "view", $bentryobj)|$!comment 22 +|#else 23 +[[No photo>>$item]]|[[$!{bentrydoc.display("title","view",$bentryobj)}>>$item]]|$!bentrydoc.display("description","view",$bentryobj)|$!comment 24 +|#end 23 23 #end 24 -#end 25 -{table} 26 26 27 -1.1 Add an Album 28 28 28 +== Add an Album == 29 + 29 29 <form action="" id="newdoc"> 30 30 <div> 31 31 <input type="hidden" name="form_token" value="$!{services.csrf.getToken()}" /> ... ... @@ -38,3 +38,5 @@ 38 38 </div> 39 39 </form> 40 40 42 +{{/html}} 43 +{{/velocity}}