Allgemeine Aktionen:
Anmelden
Registrieren
Start ▼: Wiki Verzeichnis
»
Bereich: XWiki
»
Seite: XWikiGroupSheet
default
Aktionen:
Exportieren ▼: Als PDF exportieren Als RTF exportieren Als HTML exportieren
Weitere Aktionen ▼: Druckvorschau Zeige den Quellcode
Willkommen bei bytebang » XWiki Bereich » Data types » XWiki Group Class » XWikiGroupSheet

# Wiki-Quellcode von XWikiGroupSheet

Zuletzt geändert von Administrator am 2014/06/29 19:28
Anhänge (0) · Information
Zeilennummern verstecken 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}}

(c) 2025, by bytebang e.U. - Impressum - Datenschutz / Nutzungsbedingungen
-