Wiki source code of XWikiGroupSheet
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 1 | {{velocity}} | ||
| 2 | {{html clean="false"}} | ||
| 3 | #set ($discard = $xwiki.ssx.use('XWiki.XWikiGroupSheet')) | ||
| 4 | ## Keep testing the inline action for backward compatibility with existing groups. | ||
| 5 | #if ($xcontext.action == 'edit' || $xcontext.action == 'inline') | ||
| 6 | #if ($request.xpage == 'plain') | ||
| 7 | ## AJAX request. | ||
| 8 | #set ($wrapperTag = 'form') | ||
| 9 | <form class="xform" action="$doc.getURL('preview')"> | ||
| 10 | <input type="hidden" name="form_token" value="$!services.csrf.token" /> | ||
| 11 | #else | ||
| 12 | #set ($discard = $xwiki.jsx.use('XWiki.XWikiGroupSheet')) | ||
| 13 | ## The form is generated in the edit template. | ||
| 14 | #set ($wrapperTag = 'div') | ||
| 15 | <div class="xform"> | ||
| 16 | #end | ||
| 17 | <dl> | ||
| 18 | <dt><label for="userInput">$services.localization.render('xe.admin.groups.addUser')</label></dt> | ||
| 19 | <dd> | ||
| 20 | #set ($parameters = {'id': 'userInput', 'name': 'name'}) | ||
| 21 | #userPicker(true $parameters) | ||
| 22 | </dd> | ||
| 23 | <dt><label for="groupInput">$services.localization.render('xe.admin.groups.addGroup')</label></dt> | ||
| 24 | <dd> | ||
| 25 | #set ($parameters = {'id': 'groupInput', 'name': 'name'}) | ||
| 26 | #groupPicker(true $parameters) | ||
| 27 | </dd> | ||
| 28 | </dl> | ||
| 29 | <div class="buttons"> | ||
| 30 | <span class="buttonwrapper"> | ||
| 31 | <button type="submit" id="addMembers" name="xpage" value="adduorg"> | ||
| 32 | $services.localization.render('xe.admin.groups.addUser.submit') | ||
| 33 | </button> | ||
| 34 | </span> | ||
| 35 | </div> | ||
| 36 | </$wrapperTag> | ||
| 37 | #end | ||
| 38 | #set ($properties = ['member', 'type']) | ||
| 39 | #if (!$xcontext.isMainWiki() && $services.wiki.user.userScope != 'LOCAL_ONLY') | ||
| 40 | #set ($discard = $properties.add('scope')) | ||
| 41 | #end | ||
| 42 | ## Keep testing the inline action for backward compatibility with existing groups. | ||
| 43 | #if ($xcontext.action == 'edit' || $xcontext.action == 'inline') | ||
| 44 | #set ($discard = $properties.add('_actions')) | ||
| 45 | #end | ||
| 46 | <div class="medium-avatars"> | ||
| 47 | #set ($sourceParameters = { | ||
| 48 | 'template': 'getgroupmembers.vm', | ||
| 49 | 'translationPrefix': 'xe.admin.groups.', | ||
| 50 | '$doc': $doc.documentReference | ||
| 51 | }) | ||
| 52 | $services.liveData.render({ | ||
| 53 | 'id': 'groupusers', | ||
| 54 | 'source': 'liveTable', | ||
| 55 | 'properties': $stringtool.join($properties, ','), | ||
| 56 | 'sourceParameters': $escapetool.url($sourceParameters) | ||
| 57 | }, { | ||
| 58 | 'meta': { | ||
| 59 | 'propertyDescriptors': [ | ||
| 60 | { | ||
| 61 | 'id': 'member', | ||
| 62 | 'displayer': 'html', | ||
| 63 | 'editable': false | ||
| 64 | } | ||
| 65 | ], | ||
| 66 | 'actions': [ | ||
| 67 | { | ||
| 68 | 'id': 'edit', | ||
| 69 | 'allowProperty': '-' | ||
| 70 | }, { | ||
| 71 | 'id': 'delete', | ||
| 72 | 'async': { | ||
| 73 | 'httpMethod': 'POST', | ||
| 74 | 'loadingMessage': $services.localization.render('administration.section.groups.deleteUserFromGroup.loading'), | ||
| 75 | 'successMessage': $services.localization.render('administration.section.groups.deleteUserFromGroup.success'), | ||
| 76 | 'failureMessage': $services.localization.render('administration.section.groups.deleteUserFromGroup.failure') | ||
| 77 | } | ||
| 78 | } | ||
| 79 | ] | ||
| 80 | } | ||
| 81 | }) | ||
| 82 | </div> | ||
| 83 | {{/html}} | ||
| 84 | {{/velocity}} |