Nyt
Administrator
2008/09/05 17:23

Indholdsfortegnelse

1 Nyt
Her er de seneste ændringer i Blog og i dokumenter.
<div>
  <div id=”webhomeblogdisplay” style=”float:left; width: 49.9%;”>
    <div style=”padding-right:20px;”>
      <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>
      #set($nbstart = $request.nbstart)
      #set($category = “”)
      #set($nbitems = “3”)
      #includeMacros(”Blog.Macros”)
    </div>
  </div>
  <div id=”webhomeNewsdisplay” style=”float:left; width: 50.1%;”>
    <div style=”padding-left: 20px;”>
      <h2 class=”heading-1-1-1”>Seneste ændringer <a href=”$xwiki.getURL(”Main.WebRss”, “view”, “xpage=rdf”)” style=””><img src=”$xwiki.getSkinFile(”icons/black-rss.png”)” alt=”rss icon”/></a></h2>
      #if(!$xwiki.hasMinorEdit() || $request.getParameter(”showminor”))
        #set ($sql = “where 1=1 order by doc.date desc”)
      #else
        #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”)
      #end
      #set($showdata = 1)
      #if(!$nb)
        #set($nb = 30)
      #end
      #set($formatDate = “yyyy MMMM dd, HH:mm”)
      #set ($list = $xwiki.searchDocuments($sql , $nb , 0))
      <ul>
        #foreach ($item in $list)
          #set($troubi =”non”)
          #if ($xwiki.hasAccessLevel(”view”, $context.user, “${ context.database} :${ item} ”))
            #set($bentrydoc = $xwiki.getDocument($item))
            #set($cclass = $xwiki.getDocument(”XWiki.XWikiComments”).getxWikiClass())
            #set($comment = $cclass.newObject())
            #if($xwiki.getWebPreferenceAsInt(”commentsorder”,1)==0)
              #set($comments = $bentrydoc.getComments())
            #else
              #set($comments = $bentrydoc.getComments(false))
            #end
            #set($createur = $xwiki.getUserName($bentrydoc.author))
            <li>
              #if($comments.size()>0)  
                #set($i = 0)  
                #set($cobj = $comments.get($i))  
                #set($comment = $bentrydoc.display(”comment”, “view”, $cobj))  
                #set($date = $cobj.getXWikiObject().get(”date”).value)
                #if($date)
                  #set($date2 = $!xwiki.formatDate($date,”yyyy MM dd HH:mm:ss”))
                #end
                #if($bentrydoc)
                  #set($date1 = $!xwiki.formatDate($!bentrydoc.date,”yyyy MM dd HH:mm:ss”) )
                #end
                #if($date1.equals($date2) )
                  [$bentrydoc.name>${ bentrydoc.web} .$bentrydoc.name] <em>- 1 ny kommentar</em>
                  #set($troubi =”oui”)
                  #set($desc = $cobj.getXWikiObject().get(”comment”).value)
                #else
                  [$bentrydoc.name i $bentrydoc.web>${ bentrydoc.web} .$bentrydoc.name]
                #end
              #else  
                #set($comment = “”)  
                [$bentrydoc.name i $bentrydoc.web>${ bentrydoc.web} .$bentrydoc.name.replaceAll(”@”,”%40”)]
              #end   
              $xwiki.formatDate($bentrydoc.date,”yyyy MMM dd”) at $xwiki.formatDate($bentrydoc.date,”HH:mm”)
              #if($troubi ==”oui”)
                #set($createur = $xwiki.getUserName($cobj.author))
              #end
              #if ($createur == “XWikiGuest”)
                Gæst
              #else
                $createur
              #end
            </li>
          #end
        #end
      </ul>
      #if($xwiki.hasMinorEdit())
        #if($request.getParameter(”showminor”))
          <a href=”$xwiki.getURL($tdoc.getFullName(), “view”, “”)”>Skjul småændringer</a>
        #else
          <a href=”$xwiki.getURL($tdoc.getFullName(), “view”, “showminor”)”>Vis småændringer</a>
        #end
      #end
    </div>
  </div>
  <div style=”clear:both; margin-bottom: 40px;”><! ></div>
</div>