%TMPL:INCLUDE{"view"}%
%TMPL:DEF{"sidebar"}%%TMPL:END%
%TMPL:DEF{"breadcrumbs::tail"}%%IF{"$'URLPARAM{group}'!=''" then="%TMPL:P{"sep"}%<a href='%SCRIPTURLPATH{"view"}%/%WEB%/%TOPIC%?group=%URLPARAM{"group"}%'>%URLPARAM{"group"}%</a>"}%%TMPL:END%
%TMPL:DEF{"wikigroups::javascript"}%%JQREQUIRE{"form, blockui, validate, wikiword"}%%ADDTOZONE{ "script" id="WIKIGROUPS::JAVASCRIPT" requires="JQUERYPLUGIN::VALIDATE, JQUERYPLUGIN::WIKIWORD, JQUERYPLUGIN::FORM, JQUERYPLUGIN::BLOCKUI" text="<script class='$id' src='%PUBURLPATH%/%SYSTEMWEB%/NatSkin/build/groups.js'></script>" }%%TMPL:END%
%TMPL:DEF{"title"}%<noautolink>%HTMLTITLE{ separator=" %TMPL:P{"titlesep"}% " format="%URLPARAM{"group" default="%TOPIC%"}%$sep$webtitle$wikitoolname" }%</noautolink>%TMPL:END%
%TMPL:DEF{"content"}%<noautolink>%IF{"$'URLPARAM{group}' != ''" then="$percntTMPL:P{\"displaygroup\" group=\"$percntURLPARAM{group}$percnt\"}$percnt" else="$percntTMPL:P{\"listgroups\"}$percnt" }%</noautolink>%TMPL:END%
%TMPL:DEF{"listgroups"}%<h1 > %TOPICTITLE% </h1> %TMPL:P{context="authenticated" "creategroup"}% %MAKEINDEX{"%GROUPINFO%" header="$anchors$n" sort="nocase" format="$percntIF{\"istopic '%WEB%.$item'\" then=\"[[%WEB%.$item]]\" else=\"[[%WEB%.%TOPIC%?group=$item][$item]]\" }$percnt" footer="<p><span class='foswikiAlert'>$count</span> groups found</p>" }% %TMPL:P{"wikigroups::javascript"}%%TMPL:END%
%TMPL:DEF{"grouptemplate"}%%IF{ "istopic '%USERSWEB%.GroupTemplate'" then="%USERSWEB%.GroupTemplate" else="%IF{ "istopic '%SYSTEMWEB%.GroupTemplate'" then="%SYSTEMWEB%.GroupTemplate" }%" }%%TMPL:END%
%TMPL:DEF{"creategroup"}% %TWISTY{ link="%BUTTON{"%MAKETEXT{"New group"}%" icon="fa-users"}%" mode="div" }% <form class="createGroupForm jqValidate" action="%SCRIPTURLPATH{"save"}%/%WEB%" method="post"> <input type="hidden" name="onlynewtopic" value="on" /> <input type="hidden" name="onlywikiname" value="off" /> <input type="hidden" name="topicparent" value="%BASETOPIC%" /> <input type="hidden" name="templatetopic" value="%TMPL:P{"grouptemplate"}%" /> <input type="hidden" name="topic" value="" class="jqWikiWord" data-source="#groupName" data-suffix="Group" data-transliterate="true" /> <input type="hidden" name="Set+ALLOWTOPICCHANGE" value="" class="allowTopicChange" /> <input type="hidden" name="Set+PERMSET_CHANGE_DETAILS" value="" class="allowTopicChange" /> <input type="hidden" name="Set+PERMSET_CHANGE" value="details" /> <div class="foswikiFormSteps"> <div class="foswikiFormStep "> <h3>%MAKETEXT{"Group name"}%</h3> <input type="text" name="TopicTitle" id="groupName" size="30" class="foswikiInputField required" value="%URLPARAM{"groupname"}%" /> </div> <div class="foswikiFormStep"> %BUTTON{"%MAKETEXT{"Submit"}%" icon="fa-check" type="submit"}%%CLEAR% </div> </div> </form> %ENDTWISTY%%TMPL:END%
%TMPL:DEF{"displaygroup"}%%IF{"istopic '%USERSWEB%.%group%'" then="$percntTMPL:P{\"displaygroup::intern\" group=\"%group%\"}$percnt" else="$percntTMPL:P{\"displaygroup::extern\" group=\"%group%\"}$percnt" }%%TMPL:END%
%TMPL:DEF{"displaygroup::intern"}%<h1 >[[%USERSWEB%.%group%]]</h1> %IF{ "'%DISPLAYREVISIONINFO{default="on"}%'='on'" then="$percntTMPL:P{\"revinfo::impl\"}$percnt" }% %INCLUDE{"%WEB%.%group%" warn="off"}%<!-- --> %IF{"'%USERSWEB%.%group%' allows 'change' and '%group%' != 'NobodyGroup'" then="$percntTMPL:P{\"editablegroup\" group=\"%group%\"}$percnt" else="$percntTMPL:P{\"noneditablegroup\" group=\"%group%\"}$percnt" }% %TMPL:P{"wikigroups::accessrights"}% %TMPL:P{"wikigroups::javascript"}%%TMPL:END%
%TMPL:DEF{"displaygroup::extern"}%<h1 ><nop>%group%</h1> %TMPL:P{"noneditablegroup" group="%group%"}% %TMPL:END%
%TMPL:DEF{"editablegroup"}% %TWISTYBUTTON{id="add" mode="span" link="%BUTTON{"%MAKETEXT{"Add member"}%" icon="fa-plus" class="addButton"}%"}% %BUTTON{"%MAKETEXT{"Remove members"}%" icon="fa-trash" class="removeButton" style="display:none"}% %CLEAR% %TWISTYTOGGLE{id="add"}% <form class='addMemberForm' action='%SCRIPTURLPATH{"save"}%/%WEB%/%group%' method='post'> <input type='hidden' name='groupname' value='%group%' /> <input type='hidden' name='Set+GROUP' value='%GROUP{default=""}%' class="groupMembers" /> <div class='foswikiFormSteps'> <div class='foswikiFormStep'> <h3>%MAKETEXT{"Add users or groups to this group"}%</h3> %RENDERFOREDIT{ form="%SYSTEMWEB%.MoreFormfieldsPlugin" field="UserOrGroup" UserOrGroup_name="username" UserOrGroup_type="userorgroup+multi" UserOrGroup_values="exclude=\"%TOPIC%\"" header="" footer="" }% </div> <div class='foswikiFormStep'> %BUTTON{"%MAKETEXT{"Submit"}%" icon="fa-plus" type="submit"}% %CLEAR% </div> </div> </form> %ENDTWISTY% %FORMATLIST{ "%FORMATLIST{"%GROUPINFO{"%group%" format="$wikiname" separator=", " expand="0"}%" format="($percntGETTOPICTITLE{\"$1\"}$percnt);$1" separator="$n" }%" header="<form class='removeMemberForm' action='%SCRIPTURLPATH{"save"}%/%WEB%/%group%' method='post'> <input type='hidden' name='Set+GROUP' value='%GROUP%' class='groupMembers' /> <div class='foswikiPageForm'> <table class='foswikiLayoutTable'> <tr><th>#</th><th>%MAKETEXT{"Name"}%</th><th>%MAKETEXT{"Select"}%</th></tr>" format="<tr> <td> $index. </td> <td> $percntIF{\"istopic '%USERSWEB%.$2'\" then=\"[[%USERSWEB%.$2]] $percntIF{\"'$percntUSERINFO{\"$2\" format=\"$isgroup\"}$percnt'='true'\" then=\" (%MAKETEXT{"group"}%)\"}$percnt\" else=\"$percntIF{\"'$percntUSERINFO{\"$2\" format=\"$isgroup\"}$percnt'='true'\" then=\"<a href='%SCRIPTURLPATH{"view"}%/%USERSWEB%/WikiGroups?group=$2'>$2</a> (%MAKETEXT{"group"}%)\" else=\"<nop>$2\" }$percnt\" }$percnt </td> <td align='right'><input type='checkbox' name='username' value='$2' class='foswikiCheckbox' autocomplete='off' /></td> </tr>" separator="$n" footer="</table></div>" sort="on" casesensitive="off" pattern="\((.*)\);(.*)" split="\n" }% </form> %TMPL:END%
%TMPL:DEF{"noneditablegroup"}%%FORMATLIST{ "%FORMATLIST{"%GROUPINFO{"%group%" format="$wikiname" separator=", " expand="0"}%" format="($percntGETTOPICTITLE{\"$1\"}$percnt);$1" separator="$n" }%" header="<ol>" footer="</ol>" format="<li>$percntIF{\"istopic '%USERSWEB%.$2'\" then=\"[[%USERSWEB%.$2]] $percntIF{\"'$percntUSERINFO{\"$2\" format=\"$isgroup\"}$percnt'='true'\" then=\" (%MAKETEXT{"group"}%)\"}$percnt\" else=\"$percntIF{\"'$percntUSERINFO{\"$2\" format=\"$isgroup\"}$percnt'='true'\" then=\"<a href='%SCRIPTURLPATH{"view"}%/%USERSWEB%/WikiGroups?group=$2'>$2</a> (%MAKETEXT{"group"}%)\" else=\"<nop>$2\" }$percnt\" }$percnt</li>" separator="$n" expand="0" sort="on" pattern="\((.*)\);(.*)" split="\n" }%%TMPL:END%
%TMPL:DEF{"wikigroups::accessrights"}%%MAKETEXT{"Write access for this group:"}% <noautolink> %FORMATLIST{ "$percntALLOWTOPICCHANGE{default=\"\"}$percnt" pattern="^(?:.*\.)?(.*?)$" format="$percntIF{\"istopic '%USERSWEB%.$1'\" then=\"[[%USERSWEB%.$1]]\" else=\"$percntIF{\"'$percntUSERINFO{\"$1\" format=\"$isgroup\"}$percnt'='true'\" then=\"<a href='%SCRIPTURLPATH{"view"}%/%USERSWEB%/WikiGroups?group=$1'>$1</a> (%MAKETEXT{"group"}%)\" else=\"<nop>$1\" }$percnt\" }$percnt" }%</noautolink> %TMPL:END%