Author: jvdrean
Date: 2008-02-27 16:38:09 +0100 (Wed, 27 Feb 2008)
New Revision: 8036
Removed:
xwiki-platform/web/branches/xwiki-web-1.3/standard/src/main/webapp/templates/watchlist.vm
Modified:
xwiki-platform/web/branches/xwiki-web-1.3/standard/src/main/webapp/templates/menuview.vm
Log:
XWIKI-2125 : It should be possible to enable/disable the watchlist feature by
wiki
Modified:
xwiki-platform/web/branches/xwiki-web-1.3/standard/src/main/webapp/templates/menuview.vm
===================================================================
---
xwiki-platform/web/branches/xwiki-web-1.3/standard/src/main/webapp/templates/menuview.vm
2008-02-27 15:28:32 UTC (rev 8035)
+++
xwiki-platform/web/branches/xwiki-web-1.3/standard/src/main/webapp/templates/menuview.vm
2008-02-27 15:38:09 UTC (rev 8036)
@@ -87,7 +87,7 @@
## We're disabling the Watchlist menu for now since the Watchlist doesn't work
yet in multiwiki
## mode. Remove when http://jira.xwiki.org/jira/browse/XPWATCHLIST-4 is fixed.
#if (!$xwiki.isVirtual())
- #if ($xwiki.watchlist && $context.user != "XWiki.XWikiGuest" &&
!$doc.isNew())
+ #if ($xwiki.watchlist && $context.user != "XWiki.XWikiGuest" &&
!$doc.isNew() && $xwiki.exists("XWiki.WatchListManager"))
<script type="text/javascript">
//<![CDATA[
function reloadActionMenu()
@@ -134,7 +134,7 @@
#submenuitem("javascript:watchlist('removespace')"
$msg.get("core.menu.watchlist.remove.space"))
#end
#submenuseparator()
- #submenuitem($crtUserDoc.getURL("view", "xpage=watchlist")
$msg.get("core.menu.watchlist.management"))
+ #submenuitem($xwiki.getURL("XWiki.WatchListManager", "view")
$msg.get("core.menu.watchlist.management"))
#xwikitopmenuentryend()
#end
#end
Deleted:
xwiki-platform/web/branches/xwiki-web-1.3/standard/src/main/webapp/templates/watchlist.vm
===================================================================
---
xwiki-platform/web/branches/xwiki-web-1.3/standard/src/main/webapp/templates/watchlist.vm
2008-02-27 15:28:32 UTC (rev 8035)
+++
xwiki-platform/web/branches/xwiki-web-1.3/standard/src/main/webapp/templates/watchlist.vm
2008-02-27 15:38:09 UTC (rev 8036)
@@ -1,137 +0,0 @@
-###
-### User's watchlist
-###
-###
-#template("startpage.vm")
-<div class="minwidthb"></div>
-<div class="main layoutsubsection">
-<h5 class="heading-1">$msg.get("watchlist.title",
[$xwiki.getUserName($doc.fullName, false)])</h5>
-#if($doc.getObject("XWikiUsers", 0))
-#set($i = $context.user.indexOf(":")+1)
-#set($isMyProfile = $context.user.substring($i) == $doc.fullName)
-#if ($isMyProfile || $hasAdmin)
-#if ($request.removedocument || $request.removespace)
- #set ($el = "")
- #if ($isMyProfile)
- #if ($request.removedocument)
- #set ($el = $request.removedocument)
- #set ($ret = $xwiki.watchlist.removeDocument($request.removedocument))
- #else
- #set ($el = $request.removespace)
- #set ($ret = $xwiki.watchlist.removeSpace($request.removespace))
- #end
- #else
- #if ($request.removedocument)
- #set ($el = $request.removedocument)
- #set ($ret = $xwiki.watchlist.removeDocumentForUser($doc.fullName,
$request.removedocument))
- #else
- #set ($el = $request.removespace)
- #set ($ret = $xwiki.watchlist.removeSpaceForUser($doc.fullName,
$request.removespace))
- #end
- #end
- #if ($ret == true)
- #info($msg.get("watchlist.delete.ok", [$el]))
- #else
- #error($msg.get("watchlist.delete.ko", [$el]))
- #end
-#elseif ($request.removespace)
-#end
- ##
- ## Info
- ##
- <h2 class="heading-1-1">$msg.get("watchlist.staytuned")</h2>
- ##
- ## Notifications
- ##
- <div class="padded">
- <div style="width:48%;float:left;">
- <h5 class="heading-1-1-1">$msg.get("watchlist.staytuned.email")</h5>
- $msg.get("watchlist.staytuned.email.info")<br/>
- <br/>
- <form action="$doc.getURL("save")" method="post">
- $msg.get("watchlist.staytuned.email.frequency") :
- #set ($iVal = $doc.display("interval", "view"))
- #set ($sel = "selected=\"selected\"")
- <select size="1" name="XWiki.WatchListClass_0_interval"
id="XWiki.WatchListClass_0_interval">
- <option label="never" value="0" #if ($iVal == "never") $sel
#end>never</option>
- <option label="hourly" value="1" #if ($iVal == "hourly") $sel
#end>hourly</option>
- <option label="daily" value="2" #if ($iVal == "daily") $sel
#end>daily</option>
- <option label="weekly" value="3" #if ($iVal == "weekly") $sel
#end>weekly</option>
- <option label="monthly" value="4" #if ($iVal == "monthly")
$sel #end>monthly</option>
- </select>
- <input type="hidden" name="xredirect" id="xredirect"
value="$doc.getURL("view", "xpage=watchlist")">
- <input type="submit"
value="$msg.get("watchlist.staytuned.email.frequency.save")" class="button"/>
- </div>
- </form>
- <div style="width:48%;float:right;">
- <h5 class="heading-1-1-1">$msg.get("watchlist.staytuned.rss")</h5>
- <a target="_blank" href="$doc.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/>
- <br/>
- </div>
- <div style="clear:both;"></div>
- </div>
- ##
- ## Watched elements
- ##
- <div class="padded">
- ##
- ## Pages
- ##
- <h5 class="heading-1-1">$msg.get("watchlist.elements")</h5>
- <h5 class="heading-1-1-1">$msg.get("watchlist.pages")</h5>
- <table id="searchTable" class="grid sortable filterable doOddEven">
- <tr class="sortHeader">
- <th>$msg.get("watchlist.page")</th>
- <th style="width:140px"
class="selectFilter">$msg.get("watchlist.space")</th>
- <th style="width:180px" class="unsortable
noFilter">$msg.get("watchlist.actions")</th>
- </tr>
- #set ($wlist = $xwiki.watchlist.getWatchedDocuments())
- #foreach($item in $wlist)
- #if ($item != "")
- <tr>
- #set ($idoc = $xwiki.getDocument($item))
- #if (!$idoc.isNew())
- <td><a
href="$idoc.getURL()">$idoc.getDisplayTitle().replaceAll("[^\\.,:]+:",
"")</a></td>
- <td>$idoc.web</td>
- <td><a href="$doc.getURL("view",
"xpage=watchlist&removedocument=${item}")"
title="$msg.get("watchlist.delete.tooltip")">$msg.get("watchlist.delete")</a></td>
- #else
- #if ($isMyProfile)
- #set ($ret = $xwiki.watchlist.removeDocument($item))
- #else
- #set ($ret =
$xwiki.watchlist.removeDocumentForUser($doc.fullName, $item))
- #end
- #end
- </tr>
- #end
- #end
- </table>
- ##
- ## Spaces
- ##
- <h5 class="heading-1-1-1">$msg.get("watchlist.spaces")</h5>
- <table id="searchTable" class="grid sortable doOddEven">
- <tr class="">
- <th>$msg.get("watchlist.space")</th>
- <th style="width:180px" class="unsortable
noFilter">$msg.get("watchlist.actions")</th>
- </tr>
- #set ($wlist = $xwiki.watchlist.getWatchedSpaces())
- #foreach($item in $wlist)
- #if ($item != "")
- <tr>
- <td>$item.replaceAll("[^\\.,:]+:", "")</td>
- <td><a href="$doc.getURL("view",
"xpage=watchlist&removespace=${item}")"
title="$msg.get("watchlist.delete.tooltip")">$msg.get("watchlist.delete")</a></td>
- </tr>
- #end
- #end
- </table>
- </div>
-#else
-#xwikimessageboxstart($msg.get("error") $msg.get("notallowed"))
-#xwikimessageboxend()
-#end
-#else
-#xwikimessageboxstart($msg.get("watchlist") $msg.get("notauser"))
-#xwikimessageboxend()
-#end
-</div>
-#template("endpage.vm")
\ No newline at end of file
_______________________________________________
notifications mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/notifications