Changes for page Photos
Last modified by Ludovic Dubost on 2020/07/08 20:03
Change comment:
Rollback to version 1.1
Summary
-
Page properties (3 modified, 0 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. ldubost1 +XWiki.pmasson - Syntax
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki 2.11 +XWiki 1.0 - Content
-
... ... @@ -1,9 +1,8 @@ 1 - =Photo Albums=1 +1 Photo Albums 2 2 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") 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") 7 7 #foreach ($item in $xwiki.searchDocuments($sql)) 8 8 #set($bentrydoc = $xwiki.getDocument($item)) 9 9 #set($comments = $bentrydoc.getComments()) ... ... @@ -18,15 +18,15 @@ 18 18 #set($bentryobj = $bentrydoc.getObject("XWiki.PhotoAlbumClass",0)) 19 19 #if($bentrydoc.attachmentList.size()>0) 20 20 #set($attach = $bentrydoc.attachmentList.get(0)) 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 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 25 25 #end 24 +#end 25 +{table} 26 26 27 +1.1 Add an Album 27 27 28 -== Add an Album == 29 - 30 30 <form action="" id="newdoc"> 31 31 <div> 32 32 <input type="hidden" name="form_token" value="$!{services.csrf.getToken()}" /> ... ... @@ -39,5 +39,3 @@ 39 39 </div> 40 40 </form> 41 41 42 -{{/html}} 43 -{{/velocity}}