一般动作
登录
Wiki: BROPEN ▼: Document Index
»
Space: XWiki ▼: Document Index
»
Page: XWikiGroupSheet
搜索
default
页面动作
导出 ▼: 以PDF格式导出 以RTF格式导出 以HTML格式导出
更多动作 ▼: 打印预览 察看源码
欢迎进入Wiki » XWiki空间 » Data types » XWiki Group Class » XWikiGroupSheet

# Wiki源代码XWikiGroupSheet

在2013-10-01 11:52上被Administrator修改
评论 (0) · 附件 (0) · 记录 · 信息
隐藏行号 1: {{velocity output="false"}} 2: #set($groupDoc = $doc) 3: #if($doc.fullName == 'Main.UserDirectory') 4: #set($groupDoc = $xwiki.getDocument('XWiki.XWikiAllGroup')) 5: #end 6: #macro(hasGroupRight $right $hasGroupRight) 7: #set($result = $xwiki.hasAccessLevel($right, $xcontext.user, $doc.fullName) && $doc.getObject('XWiki.XWikiGroups', false)) 8: #set($hasGroupRight = $NULL) 9: #setVariable("$hasGroupRight" $result) 10: #end 11: #hasGroupRight('edit' $hasEditGroupRight) 12: #hasGroupRight('delete' $hasDeleteGroupRight) 13: {{/velocity}} 14: 15: {{velocity}} 16: ## Keep testing the inline action for backward compatibility with existing groups. 17: #if(($xcontext.action == 'edit' || $xcontext.action == 'inline') && $hasEditGroupRight) 18: {{html}} 19: #if ($request.xpage == 'plain') 20: ## AJAX request. 21: #set ($wrapperTag = 'form') 22: <form class="xform" action="$doc.getURL('preview')"> 23: <input type="hidden" name="form_token" value="$!services.csrf.getToken()" /> 24: #else 25: #userPicker_import() 26: #set ($discard = $xwiki.jsx.use('XWiki.XWikiGroupSheet')) 27: ## The form is generated in the edit template. 28: <div class="xform"> 29: #set ($wrapperTag = 'div') 30: #end 31: <dl> 32: <dt><label for="userInput">$services.localization.render('xe.admin.groups.addUser')</label></dt> 33: <dd> 34: <input id="userInput" type="text" name="name" class="suggestUsers#if (!$xcontext.isMainWiki()) withScope#end multipleSelection" /> 35: </dd> 36: <dt><label for="groupInput">$services.localization.render('xe.admin.groups.addGroup')</label></dt> 37: <dd> 38: <input id="groupInput" type="text" name="name" class="suggestGroups#if (!$xcontext.isMainWiki()) withScope#end multipleSelection" /> 39: </dd> 40: </dl> 41: <div class="buttons"> 42: <span class="buttonwrapper"> 43: <button type="submit" id="addMembers" name="xpage" value="adduorg">$services.localization.render('xe.admin.groups.addUser.submit')</button> 44: </span> 45: </div> 46: </$wrapperTag> 47: {{/html}}## 48: #end 49: #set($columnOptions = { 50: "member" : {'link': 'auto', 'type': 'text'}, 51: '_avatar' : { 'type' : 'none', 'link' : 'field', 'html' : 'true', 'sortable' : false }, 52: "_actions" : { 53: 'actions': ['delete'], 54: 'actionCallbacks': {'delete': 'table.deleteRow(i);'}, 55: 'ajaxActions': {'delete': true} 56: } 57: }) 58: ## Keep testing the inline action for backward compatibility with existing groups. 59: #if(($xcontext.action == 'edit' || $xcontext.action == 'inline') && $hasDeleteGroupRight) 60: #set($columns = ['_avatar', 'member', '_actions']) 61: #else 62: #set($columns = ['_avatar', 'member']) 63: #end 64: #livetable('groupusers', $columns, $columnOptions, { 65: 'url' : $groupDoc.getURL('view', 'xpage=getgroupmembers'), 66: 'translationPrefix' : 'xe.admin.groups.', 67: 'javascriptName' : 'editgrouptable' 68: }) 69: {{/velocity}}

# 快速链接

- 首页
- 新闻动态
- FAQ

Copyright © 2013 北京博瑞开源软件有限公司
京ICP备12048974号