General Actions:
Log-in
Wiki:
L3D's Wiki
▼
:
Document Index
»
Space:
XWiki
▼
:
Document Index
»
Page:
XWikiUserWatchListSheet
Search
Page Actions:
Export
▼
:
Export as PDF
Export as RTF
Export as HTML
More actions
▼
:
Print preview
View Source
XWikiUsers
»
XWikiUserSheet
»
XWikiUserWatchListSheet
Wiki source code of
XWikiUserWatchListSheet
Last modified by
Administrator
on 2011/03/02 17:34
Content
·
Comments
(0)
·
Attachments
(0)
·
History
·
Information
Show line numbers
{{velocity}} #set($obj = $doc.getObject("XWiki.XWikiUsers")) #if(!$obj) = $msg.get('xe.admin.users.sheet') = {{info}}$msg.get('xe.admin.users.applyonusers'){{/info}}## #else {{html clean="false" wiki="true"}} $xwiki.ssx.use("XWiki.XWikiUserSheet")## <div class="#if($context.action == 'view')half #{else}full #{end}column"> <div class="watchlistManagement"> #if($xcontext.action == 'view' && $hasEdit) <div class="editProfileCategory"><a href="$doc.getURL('inline', 'category=watchlist')"><span class="hidden">$msg.get('platform.core.profile.category.watchlist.edit')</span></a></div> #end <h1>$msg.get('platform.core.profile.section.watchlistManagement')</h1> <dl> <dt class="label"><label>$msg.get('platform.core.profile.watchlist.notifier')</label></dt> #set($notifiers = $xwiki.searchDocuments(", BaseObject obj where doc.fullName=obj.name and obj.className='XWiki.WatchListJobClass'")) #set($currentNotifier = $doc.getObject('XWiki.WatchListClass').getProperty('interval').getValue()) <dd> #if($xcontext.action=='view') #if("$!currentNotifier" != "") $xwiki.getDocument($currentNotifier).getDisplayTitle() #end #else <select name="XWiki.WatchListClass_0_interval"> <option value=""> </option> #foreach($notifier in $notifiers) <option value="$notifier"#if($notifier==$currentNotifier) selected="selected"#end>$xwiki.getDocument($notifier).getDisplayTitle()</option> #end </select> #end </dd> </dl> </div> </div> #if ($xcontext.action == 'view') <div class="half column"> <div class="watchlistRss"> <h1>$msg.get('watchlist.staytuned.rss')</h1> <a id="watchlistRssLink" rel="_blank" href="$xwiki.getURL("XWiki.WatchListRss", "view", "xpage=plain&outputSyntax=plain")">$msg.get("watchlist.staytuned.rss.info")</a> </div> #end #if ($xcontext.action == 'view') <div class="watchlistElements"> <h1>$msg.get('platform.core.profile.section.watchlistElements')</h1> #set($collist = ["type", "wiki","space", "document", "actions"]) #set($colprops = { "type": { "sortable":false }, "wiki": { "sortable":false }, "space": { "sortable":false }, "document": { "sortable":false }}) #set($options = { "resultPage" : "XWiki.XWikiUserWatchListLiveTableResults", "rowCount": 10, "description": "This table lists all watched elements.", "translationPrefix": "watchlist.table.", "callback": "function (row, i, table) { var tr = new Element('tr'); tr.insert(new Element('td').insert(new Element('span').addClassName(row.type + 'WatchlistType'))); tr.insert(new Element('td').insert(new Element('a', { href : row.wikiUrl}).update(row.wikiName))); if (row.spaceUrl != '') { tr.insert(new Element('td').insert(new Element('a', { href : row.spaceUrl}).update(row.spaceName))); } else { tr.insert(new Element('td').update(row.spaceName)); } if (row.pageUrl != '') { tr.insert(new Element('td').insert(new Element('a', { href : row.pageUrl}).update(row.pageName))); } else { tr.insert(new Element('td').update(row.pageName)); } var deleteLink = new Element('a', { href : row.deleteUrl }); deleteLink.insert(new Element('img', { 'src' : '${xwiki.getSkinFile('icons/silk/cross.gif')}' })); deleteLink.observe('click', function(event) { Event.stop(event); if (row.deleteUrl.indexOf('/') == 0) { // DeleteURL is from the same domain var surl = row.deleteUrl; var myAjax = new Ajax.Request( surl, { method: 'get', onComplete: function(transport) { this.clearCache(); this.showRows(this.currentOffset, this.limit); }.bind(this) } ); } else { // DeleteURL is from another domain, which prevents an AJAX request to be used here. We make a browser request and use xredirect to come back to the current page. var separator = (row.deleteUrl.indexOf('?') == -1) ? '?' : '&'; window.location = row.deleteUrl + separator + 'xredirect=' + window.location; } }.bind(this)); tr.insert(new Element('td').insert(deleteLink)); return tr; }" }) #livetable("mywatchlist" $collist $colprops $options) </div> </div> #end <div class="clearfloats"> </div> {{/html}}## #end {{/velocity}}
Quick Links
L3D Calendar
Wiki Dashboard
Document Index
Blog
Sandbox