Wiki source code of News

Version 9.1 by Thomas Mortagne on 2007/12/06

Show last authors
1 #includeMacros("Main.Macros")
2 #set($wikinames = ["wwwdev", "code", "enterprise", "manager", "watch", "platform"])
3 <div>
4 <div id="webhomeblogdisplay" style="float:left; width: 50%;">
5 <div style="padding-right:20px;">
6 <h2 class="heading-1-1-1">Blog <a href="$xwiki.getURL("Main.BlogRss", "view", "xpage=rdf")" style=""><img src="$xwiki.getSkinFile("icons/black-rss.png")" alt="rss icon"/></a></h2>
7 #set($nbstart = $request.nbstart)
8 #set($category = "")
9 #set($nbitems = "5")
10 #includeMacros("Blog.Macros")
11 </div>
12 </div>
13 <div id="webhomeNewsdisplay" style="float:left; width: 50%;">
14 <div style="padding-left: 20px;">
15 <h2 class="heading-1-1-1">Recent changes <a href="$xwiki.getURL("Main.WebRss", "view", "xpage=rdf")" style=""><img src="$xwiki.getSkinFile("icons/black-rss.png")" alt="rss icon"/></a></h2>
16 #if(!$xwiki.hasMinorEdit() || $request.getParameter("showminor"))
17 #set ($sql = "where 1=1 order by doc.date desc")
18 #else
19 #set ($sql = ", XWikiRCSNodeInfo as ni where doc.id=ni.id.docId and ni.id.version2=1 group by doc.web, doc.name order by max(ni.date) desc")
20 #end
21 #set($showdata = 1)
22 #if(!$nb)
23 #set($nb = 30)
24 #end
25 #set($formatDate = "yyyy MMMM dd, HH:mm")
26 #getDocumentsModifs($list $sql $wikinames $nb)
27 <ul>
28 #foreach ($bentrydoc in $list)
29 #set($troubi ="non")
30 #if ($xwiki.hasAccessLevel("view", $context.user, $bentrydoc.prefixedFullName))
31 #set($cclass = $xwiki.getDocument("XWiki.XWikiComments").getxWikiClass())
32 #set($comment = $cclass.newObject())
33 #if($xwiki.getWebPreferenceAsInt("commentsorder",1)==0)
34 #set($comments = $bentrydoc.getComments())
35 #else
36 #set($comments = $bentrydoc.getComments(false))
37 #end
38 #set($createur = $xwiki.getUserName($bentrydoc.author))
39 <li>
40 #if($comments.size()>0)
41 #set($i = 0)
42 #set($cobj = $comments.get($i))
43 #set($comment = $bentrydoc.display("comment", "view", $cobj))
44 #set($date = $cobj.getXWikiObject().get("date").value)
45 #if($date)
46 #set($date2 = $!xwiki.formatDate($date,"yyyy MM dd HH:mm:ss"))
47 #end
48 #if($bentrydoc)
49 #set($date1 = $!xwiki.formatDate($!bentrydoc.date,"yyyy MM dd HH:mm:ss") )
50 #end
51 #if($date1.equals($date2) )
52 [$bentrydoc.name>$bentrydoc.prefixedFullName] <em>- 1 new comment</em>
53 #set($troubi ="oui")
54 #set($desc = $cobj.getXWikiObject().get("comment").value)
55 #else
56 [$bentrydoc.name in $bentrydoc.web>$bentrydoc.prefixedFullName]
57 #end
58 #else
59 #set($comment = "")
60 [$bentrydoc.name in $bentrydoc.web>$bentrydoc.prefixedFullName.replaceAll("@","%40")]
61 #end
62 $xwiki.formatDate($bentrydoc.date,"yyyy MMM dd") at $xwiki.formatDate($bentrydoc.date,"HH:mm")
63 #if($troubi =="oui")
64 #set($createur = $xwiki.getUserName($cobj.author))
65 #end
66 #if ($createur == "XWikiGuest")
67 Guest
68 #else
69 $createur
70 #end
71 </li>
72 #end
73 #end
74 </ul>
75 #if($xwiki.hasMinorEdit())
76 #if($request.getParameter("showminor"))
77 <a href="$xwiki.getURL($tdoc.getFullName(), "view", "")">Hide minor edits</a>
78 #else
79 <a href="$xwiki.getURL($tdoc.getFullName(), "view", "showminor")">Show minor edits</a>
80 #end
81 #end
82 </div>
83 </div>
84 <div style="clear:both; margin-bottom: 40px;"><!-- --></div>
85 </div>

Get Connected