General Actions:
Log-in
Wiki:
L3D's Wiki
▼
:
Document Index
»
Space:
XWiki
▼
:
Document Index
»
Page:
WatchListManager
Search
Page Actions:
Export
▼
:
Export as PDF
Export as RTF
Export as HTML
More actions
▼
:
Print preview
View Source
Welcome to your wiki
»
XWiki Space
»
Watchlist for
Wiki source code of
Watchlist for
Last modified by
Administrator
on 2008/02/27 07:25
Content
·
Comments
(0)
·
Attachments
(0)
·
History
·
Information
Hide line numbers
1: ### 2: ### User's watchlist 3: ### 4: ### 5: #if ($request.user) 6: #set ($udoc = $xwiki.getDocument($request.user)) 7: #if ($udoc.getObjects("XWiki.XWikiUsers").size() > 0) 8: #set ($profileDoc = $udoc) 9: #set ($isMyProfile = false) 10: #else 11: #xwikimessageboxstart($msg.get("watchlist") $msg.get("notauser")) 12: #xwikimessageboxend() 13: #end 14: #else 15: #set ($profileDoc = $crtUserDoc) 16: #set ($isMyProfile = true) 17: #end 18: #if ($profileDoc) 19: 1 $msg.get("watchlist.title", [$xwiki.getUserName($profileDoc.fullName, false)]) 20: <br/> 21: #if ($request.removedocument || $request.removespace) 22: #set ($el = "") 23: #if ($isMyProfile) 24: #if ($request.removedocument) 25: #set ($el = $request.removedocument) 26: #set ($ret = $xwiki.watchlist.removeDocument($request.removedocument)) 27: #else 28: #set ($el = $request.removespace) 29: #set ($ret = $xwiki.watchlist.removeSpace($request.removespace)) 30: #end 31: #else 32: #if ($request.removedocument) 33: #set ($el = $request.removedocument) 34: #set ($ret = $xwiki.watchlist.removeDocumentForUser($profileDoc.fullName, $request.removedocument)) 35: #else 36: #set ($el = $request.removespace) 37: #set ($ret = $xwiki.watchlist.removeSpaceForUser($profileDoc.fullName, $request.removespace)) 38: #end 39: #end 40: #if ($ret == true) 41: #info($msg.get("watchlist.delete.ok", [$el])) 42: #else 43: #error($msg.get("watchlist.delete.ko", [$el])) 44: #end 45: #elseif ($request.removespace) 46: #end 47: ## 48: ## Info 49: ## 50: 1.1 $msg.get("watchlist.staytuned") 51: ## 52: ## Notifications 53: ## 54: <div class="padded"> 55: <div style="width:48%;float:left;"> 56: <h3>$msg.get("watchlist.staytuned.email")</h3> 57: $msg.get("watchlist.staytuned.email.info")<br/> 58: <br/> 59: <form action="$profileDoc.getURL("save")" method="post"> 60: $msg.get("watchlist.staytuned.email.frequency") : 61: #set ($iVal = $profileDoc.display("interval", "view")) 62: #set ($sel = "selected=\"selected\"") 63: <select size="1" name="XWiki.WatchListClass_0_interval" id="XWiki.WatchListClass_0_interval"> 64: <option label="never" value="0" #if ($iVal == "never") $sel #end>never</option> 65: <option label="hourly" value="1" #if ($iVal == "hourly") $sel #end>hourly</option> 66: <option label="daily" value="2" #if ($iVal == "daily") $sel #end>daily</option> 67: <option label="weekly" value="3" #if ($iVal == "weekly") $sel #end>weekly</option> 68: <option label="monthly" value="4" #if ($iVal == "monthly") $sel #end>monthly</option> 69: </select> 70: <input type="hidden" name="xredirect" id="xredirect" value="$doc.getURL("view")"> 71: <input type="submit" value="$msg.get("watchlist.staytuned.email.frequency.save")" class="button"/> 72: </div> 73: </form> 74: <div style="width:48%;float:right;"> 75: <h3>$msg.get("watchlist.staytuned.rss")</h3> 76: <a target="_blank" href="$profileDoc.getURL("view", "xpage=watchlistrss")" style="padding-left:16px;background:url($xwiki.getSkinFile("icons/black-rss-mini2.png")) left no-repeat;font-weight:bold;">$msg.get("watchlist.staytuned.rss.info")</a><br/> 77: <br/> 78: </div> 79: <div style="clear:both;"></div> 80: </div> 81: ## 82: ## Watched elements 83: ## 84: <div class="padded"> 85: ## 86: ## Pages 87: ## 88: 1.1 $msg.get("watchlist.elements") 89: <h3>$msg.get("watchlist.pages")</h3> 90: <table id="searchTable" class="grid sortable filterable doOddEven"> 91: <tr class="sortHeader"> 92: <th>$msg.get("watchlist.page")</th> 93: <th style="width:140px" class="selectFilter">$msg.get("watchlist.space")</th> 94: <th style="width:180px" class="unsortable noFilter">$msg.get("watchlist.actions")</th> 95: </tr> 96: #set ($wlist = $xwiki.watchlist.getWatchedDocuments()) 97: #foreach($item in $wlist) 98: #if ($item != "") 99: <tr> 100: #set ($idoc = $xwiki.getDocument($item)) 101: #if (!$idoc.isNew()) 102: <td><a href="$idoc.getURL()">$idoc.getDisplayTitle().replaceAll("[^\\.,:]+:", "")</a></td> 103: <td>$idoc.space</td> 104: <td><a href="$doc.getURL("view", "removedocument=${item}")" title="$msg.get("watchlist.delete.tooltip")">$msg.get("watchlist.delete")</a></td> 105: #else 106: #if ($isMyProfile) 107: #set ($ret = $xwiki.watchlist.removeDocument($item)) 108: #else 109: #set ($ret = $xwiki.watchlist.removeDocumentForUser($profileDoc.fullName, $item)) 110: #end 111: #end 112: </tr> 113: #end 114: #end 115: </table> 116: ## 117: ## Spaces 118: ## 119: <h3>$msg.get("watchlist.spaces")</h3> 120: <table id="searchTable" class="grid sortable doOddEven"> 121: <tr class=""> 122: <th>$msg.get("watchlist.space")</th> 123: <th style="width:180px" class="unsortable noFilter">$msg.get("watchlist.actions")</th> 124: </tr> 125: #set ($wlist = $xwiki.watchlist.getWatchedSpaces()) 126: #foreach($item in $wlist) 127: #if ($item != "") 128: <tr> 129: <td>$item.replaceAll("[^\\.,:]+:", "")</td> 130: <td><a href="$doc.getURL("view", "removespace=${item}")" title="$msg.get("watchlist.delete.tooltip")">$msg.get("watchlist.delete")</a></td> 131: </tr> 132: #end 133: #end 134: </table> 135: </div> 136: #end
Quick Links
L3D Calendar
Wiki Dashboard
Document Index
Blog
Sandbox