i was blabling about XWiki.Results and asked about it. this is what i needed 
and asked:
(the code from the results so that i can see my results).(did not have this 
code)

#set($showdata = 0)
#set($formatDate = "yyyy MMMM dd, HH:mm")

## WARNING: Do not add any empty line inside the table element. This will 
potentially break 
## the Javascript we're using for filtering/sorting columns. It might work in 
FF but will break
## in other browsers like IE. This is because empty lines add <p 
class="paragraph"></p> elements
## when rendered.

<table id="searchTableUnique" class="grid sortable filterable doOddEven">
  <tr class="sortHeader">
    <th>Page</th>
    <th style="width:150px" class="selectFilter">Space</th>
    <th style="width:150px">Date</th>
    <th style="width:150px">Last Author</th>
    #if($isScored)
    <th style="width:150px">Score</th>
    #end
    #if($xwiki.hasAdminRights())
      <th style="width:210px" class="unsortable noFilter">Actions</th>
    #end
  </tr>
  #foreach ($item in $list)
    #set($troubi = "non")
      #if ($xwiki.hasAccessLevel("view", $context.user, 
"${context.database}:${item}"))
        #if ($item.class == "class java.lang.String")
          #set($bentrydoc = $xwiki.getDocument($item))
        #elseif ($item.class == "class 
com.xpn.xwiki.plugin.lucene.SearchResult")          
          #set($bentrydoc = $item)
        #end
        #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))
        #set($ptitle = $bentrydoc.getDisplayTitle())
        <tr><td style="text-align:left">          
          ## LUCENE : entries are typed
          #if ($bentrydoc.type)
            #if ($bentrydoc.type == "attachment")
            <a href="${bentrydoc.url}" target="_blank"><img 
src="${xwiki.getSkinFile("icons/search/disk.png")}" ALT="download" /> 
${bentrydoc.filename}</a>\\
        Attachment of 
            #end
          #end
          #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) )
              [$ptitle>${bentrydoc.web}.$bentrydoc.name] <em>- 1 new 
comment</em>
              #set($troubi ="oui")
              #set($desc = $cobj.getXWikiObject().get("comment").value)
            #else
              [$bentrydoc.name>${bentrydoc.web}.$bentrydoc.name] #if ($ptitle 
!= $bentrydoc.name) <em>- $ptitle</em>#end
            #end
          #else  
            #set($comment = "")  
            
[$bentrydoc.name>${bentrydoc.web}.$bentrydoc.name.replaceAll("@","%40")] #if 
($ptitle != $bentrydoc.name) <em>- $ptitle</em>#end
          #end   
        </td><td style="text-align:left">
          [$bentrydoc.web>${bentrydoc.web}.WebHome]
        </td><td style="text-align:left">          
          $xwiki.formatDate($bentrydoc.date,"yyyy MMM dd") at 
$xwiki.formatDate($bentrydoc.date,"HH:mm")</td><td style="text-align:center">
          #if($troubi =="oui")
            #set($createur = $xwiki.getUserName($cobj.author)   )
          #end
          #if ($createur == "XWikiGuest")
            Guest
          #else
            $createur
          #end
        </td>
        #if ($isScored)
        <td style="text-align:left">
          #set($resval=$bentrydoc.score*100)
          #set($starurl=$xwiki.getSkinFile("icons/search/star.png"))
          #set($star = "<img src='$starurl' alt='$resval' />")
          <span class="hidden">$bentrydoc.score</span>
          #if($resval>10) $star #end
          #if($resval>20) $star #end
          #if($resval>40) $star #end
          #if($resval>60) $star #end
          #if($resval>90) $star #end
          #set ($perc = $resval.toString())          
          ${perc.substring(0, $perc.indexOf("."))}%        
        </td>
          #set ($bentrydoc = 
$xwiki.getDocument("${bentrydoc.web}.${bentrydoc.name}"))
        #end
        #if($xwiki.hasAdminRights())
          <td>
            <a href="$xwiki.getURL("XWiki.CopyDocument", "view", 
"sourcedoc=${bentrydoc.fullName}")">Copy</a> - <a 
href="$bentrydoc.getURL("delete")">Delete</a> - <a 
href="$bentrydoc.getURL("view", "xpage=rename&step=1")">Rename</a> - <a 
href="$bentrydoc.getURL("edit", "editor=rights")">Rights</a>
          </td>
        #end
      </tr>
    #end
  #end
</table>






Take care ,
    Gabriela Radu :)
www.gabrielaradu.com


       
---------------------------------
Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  Try it now.
_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to