Author: sdumitriu
Date: 2008-02-13 16:24:20 +0100 (Wed, 13 Feb 2008)
New Revision: 7588

Added:
   xwiki-platform/web/trunk/standard/src/main/webapp/templates/watchlist.vm
Removed:
   
xwiki-platform/skins/trunk/albatross/src/main/resources/albatross/watchlist.vm
Log:
XWIKI-2114: Upgrade the default templates


Deleted: 
xwiki-platform/skins/trunk/albatross/src/main/resources/albatross/watchlist.vm
===================================================================
--- 
xwiki-platform/skins/trunk/albatross/src/main/resources/albatross/watchlist.vm  
    2008-02-13 15:23:29 UTC (rev 7587)
+++ 
xwiki-platform/skins/trunk/albatross/src/main/resources/albatross/watchlist.vm  
    2008-02-13 15:24:20 UTC (rev 7588)
@@ -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()</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</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

Copied: 
xwiki-platform/web/trunk/standard/src/main/webapp/templates/watchlist.vm (from 
rev 7587, 
xwiki-platform/skins/trunk/albatross/src/main/resources/albatross/watchlist.vm)
===================================================================
--- xwiki-platform/web/trunk/standard/src/main/webapp/templates/watchlist.vm    
                        (rev 0)
+++ xwiki-platform/web/trunk/standard/src/main/webapp/templates/watchlist.vm    
2008-02-13 15:24:20 UTC (rev 7588)
@@ -0,0 +1,137 @@
+###
+### 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()</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</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

Reply via email to