Template:Protected/sandbox: Difference between revisions
Template page
More actions
Add support for Cascading Protection |
Add support for separate `upload` and `edit` protection icons |
||
| Line 15: | Line 15: | ||
| sysop= | | sysop= | ||
{{#ifeq:{{{icon}}}|no||<indicator name="protected">[[File:Full-protection-shackle-block.svg|20px|link=Special:MyLanguage/Commons: | {{#ifeq:{{{icon}}}|no||<indicator name="protected">[[File:Full-protection-shackle-block.svg|20px|link=Special:MyLanguage/Commons:FULL|{{ {{tSwitch|protected/text}}|img-text1}}]]</indicator>}}<!-- | ||
-->{{Autotranslate | -->{{Autotranslate | ||
<!-- Autotranslate parameters: --> | <!-- Autotranslate parameters: --> | ||
| Line 28: | Line 28: | ||
| templateeditor= | | templateeditor= | ||
<indicator name="protected">[[File:Template-protection-shackle-brackets 2.svg|20px|link=Special:MyLanguage/Commons: | <indicator name="protected">[[File:Template-protection-shackle-brackets 2.svg|20px|link=Special:MyLanguage/Commons:TP|{{ {{tSwitch|protected/text}}|img-text1}}]]</indicator> | ||
| autoconfirmed= | | autoconfirmed= | ||
<indicator name="protected">[[File:Semi-protection-shackle.svg|20px|link=Special:MyLanguage/Commons: | <indicator name="protected">[[File:Semi-protection-shackle.svg|20px|link=Special:MyLanguage/Commons:SEMI|{{ {{tSwitch|protected/text}}|img-text2}}]]</indicator> | ||
| #default= | | #default= | ||
{{#ifeq:{{NAMESPACE}}|{{{demo-ns|{{ns:6}}}}} | {{#ifeq:{{NAMESPACE}}|{{{demo-ns|{{ns:6}}}}}|| | ||
| {{#switch:{{{demo-upload|{{PROTECTIONLEVEL:upload}}}}} | {{ifsandbox||{{error|message={{ {{tSwitch|protected/text}}|error-text}}|tag=div}}<!-- | ||
-->{{#if:{{{demo-edit|}}}{{{demo-upload|}}}||{{{category|[[Category:Unprotected pages using protection templates]]}}}}}}} | |||
}} | |||
}}{{#ifeq:{{NAMESPACE}}|{{{demo-ns|{{ns:6}}}}} | |||
| {{#switch:{{{demo-upload|{{PROTECTIONLEVEL:upload}}}}} | |||
| {{#if:{{{demo-edit|{{PROTECTIONLEVEL:edit}}}}}|{{{demo-edit|{{PROTECTIONLEVEL:edit}}}}}|^}} = | |||
<!-- don't add the upload protection shackle when {{PROTECTIONLEVEL:upload}} == {{PROTECTIONLEVEL:edit}} --> | |||
| sysop= | | cascade-sysop | sysop | templateeditor = | ||
<indicator name="protected">[[File:Upload-protection-shackle.svg|20px|link=Special:MyLanguage/Commons:Protection policy||{{ {{tSwitch|protected/text}}|img-text3}}]]</indicator>{{#if:{{{demo-edit|}}}{{{demo-upload|}}}||{{{category|[[Category:Upload protected files]]}}} }} | {{#switch:{{{demo-edit|{{#if:{{CASCADINGSOURCES}}|cascade-sysop|{{PROTECTIONLEVEL:edit}}}}}}} | ||
| cascade-sysop | sysop= | |||
<!-- only add the upload protection shackle when not also fully protected from editing --> | |||
| #default= | |||
<indicator name="protected-upload">[[File:Upload-protection-shackle.svg|20px|link=Special:MyLanguage/Commons:Protection policy||{{ {{tSwitch|protected/text}}|img-text3}}]]</indicator>{{#if:{{{demo-edit|}}}{{{demo-upload|}}}||{{{category|[[Category:Upload protected files]]}}} }} | |||
}} | |||
| autoconfirmed= | | autoconfirmed= | ||
<indicator name="protected">[[File:Semi-protection-shackle.svg|20px|link=Special:MyLanguage/Commons:Protection policy||{{ {{tSwitch|protected/text}}|img-text4}}]]</indicator> | {{#switch:{{{demo-edit|{{#if:{{CASCADINGSOURCES}}|cascade-sysop|{{PROTECTIONLEVEL:edit}}}}}}} | ||
| cascade-sysop | sysop | |||
| templateeditor | autoconfirmed= | |||
<!-- only add the upload semi-protection shackle when not also protected from editing --> | |||
| #default= | |||
<indicator name="protected-upload">[[File:Semi-protection-shackle.svg|20px|link=Special:MyLanguage/Commons:Protection policy||{{ {{tSwitch|protected/text}}|img-text4}}]]</indicator> | |||
}} | |||
| #default={{ifsandbox||{{error|message={{ {{tSwitch|protected/text}}|error-text}}|tag=div}}<!-- | |||
-->{{#if:{{{demo-edit|}}}{{{demo-upload|}}}||{{{category|[[Category:Unprotected pages using protection templates]]}}}}}}} | |||
}} | }} | ||
}}</includeonly></onlyinclude> | }}</includeonly></onlyinclude> | ||
{{Documentation/sandbox}} | {{Documentation/sandbox}} | ||
<!-- Add categories to the /doc subpage and interwikis in Wikidata, not here! --> | <!-- Add categories to the /doc subpage and interwikis in Wikidata, not here! --> | ||