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
Hide line numbers
1: {{velocity}} 2: #set($obj = $doc.getObject("XWiki.XWikiUsers")) 3: #if(!$obj) 4: = $msg.get('xe.admin.users.sheet') = 5: 6: {{info}}$msg.get('xe.admin.users.applyonusers'){{/info}}## 7: #else 8: {{html clean="false" wiki="true"}} 9: $xwiki.ssx.use("XWiki.XWikiUserSheet")## 10: <div class="#if($context.action == 'view')half #{else}full #{end}column"> 11: <div class="watchlistManagement"> 12: #if($xcontext.action == 'view' && $hasEdit) 13: <div class="editProfileCategory"><a href="$doc.getURL('inline', 'category=watchlist')"><span class="hidden">$msg.get('platform.core.profile.category.watchlist.edit')</span></a></div> 14: #end 15: <h1>$msg.get('platform.core.profile.section.watchlistManagement')</h1> 16: <dl> 17: <dt class="label"><label>$msg.get('platform.core.profile.watchlist.notifier')</label></dt> 18: #set($notifiers = $xwiki.searchDocuments(", BaseObject obj where doc.fullName=obj.name and obj.className='XWiki.WatchListJobClass'")) 19: #set($currentNotifier = $doc.getObject('XWiki.WatchListClass').getProperty('interval').getValue()) 20: <dd> 21: #if($xcontext.action=='view') 22: #if("$!currentNotifier" != "") 23: $xwiki.getDocument($currentNotifier).getDisplayTitle() 24: #end 25: #else 26: <select name="XWiki.WatchListClass_0_interval"> 27: <option value=""> </option> 28: #foreach($notifier in $notifiers) 29: <option value="$notifier"#if($notifier==$currentNotifier) selected="selected"#end>$xwiki.getDocument($notifier).getDisplayTitle()</option> 30: #end 31: </select> 32: #end 33: </dd> 34: </dl> 35: </div> 36: </div> 37: #if ($xcontext.action == 'view') 38: <div class="half column"> 39: <div class="watchlistRss"> 40: <h1>$msg.get('watchlist.staytuned.rss')</h1> 41: <a id="watchlistRssLink" rel="_blank" href="$xwiki.getURL("XWiki.WatchListRss", "view", "xpage=plain&outputSyntax=plain")">$msg.get("watchlist.staytuned.rss.info")</a> 42: </div> 43: #end 44: #if ($xcontext.action == 'view') 45: <div class="watchlistElements"> 46: <h1>$msg.get('platform.core.profile.section.watchlistElements')</h1> 47: #set($collist = ["type", "wiki","space", "document", "actions"]) 48: #set($colprops = { 49: "type": { "sortable":false }, 50: "wiki": { "sortable":false }, 51: "space": { "sortable":false }, 52: "document": { "sortable":false }}) 53: #set($options = { "resultPage" : "XWiki.XWikiUserWatchListLiveTableResults", 54: "rowCount": 10, 55: "description": "This table lists all watched elements.", 56: "translationPrefix": "watchlist.table.", 57: "callback": "function (row, i, table) { 58: var tr = new Element('tr'); 59: tr.insert(new Element('td').insert(new Element('span').addClassName(row.type + 'WatchlistType'))); 60: tr.insert(new Element('td').insert(new Element('a', { href : row.wikiUrl}).update(row.wikiName))); 61: if (row.spaceUrl != '') { 62: tr.insert(new Element('td').insert(new Element('a', { href : row.spaceUrl}).update(row.spaceName))); 63: } else { 64: tr.insert(new Element('td').update(row.spaceName)); 65: } 66: if (row.pageUrl != '') { 67: tr.insert(new Element('td').insert(new Element('a', { href : row.pageUrl}).update(row.pageName))); 68: } else { 69: tr.insert(new Element('td').update(row.pageName)); 70: } 71: var deleteLink = new Element('a', { 72: href : row.deleteUrl 73: }); 74: deleteLink.insert(new Element('img', { 75: 'src' : '${xwiki.getSkinFile('icons/silk/cross.gif')}' 76: })); 77: deleteLink.observe('click', function(event) { 78: Event.stop(event); 79: if (row.deleteUrl.indexOf('/') == 0) { 80: // DeleteURL is from the same domain 81: var surl = row.deleteUrl; 82: var myAjax = new Ajax.Request( 83: surl, 84: { 85: method: 'get', 86: onComplete: function(transport) { 87: this.clearCache(); 88: this.showRows(this.currentOffset, this.limit); 89: }.bind(this) 90: } 91: ); 92: } else { 93: // 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. 94: var separator = (row.deleteUrl.indexOf('?') == -1) ? '?' : '&'; 95: window.location = row.deleteUrl + separator + 'xredirect=' + window.location; 96: } 97: }.bind(this)); 98: tr.insert(new Element('td').insert(deleteLink)); 99: return tr; 100: }" }) 101: #livetable("mywatchlist" $collist $colprops $options) 102: </div> 103: </div> 104: #end 105: <div class="clearfloats"> </div> 106: {{/html}}## 107: #end 108: {{/velocity}}
Quick Links
L3D Calendar
Wiki Dashboard
Document Index
Blog
Sandbox