Template:Editnotice load: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
(Adding "view" links, and some "clear:both;" so notices can't flow into next section. Forwarding "notice action=view" and don't show namespace-notice when "viewing" a protected page. See talk page.) |
m (16 revisions imported from wikipedia:Template:Editnotice_load) |
||
(8 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
{{#if: {{Editnotice load/content |
|||
⚫ | |||
| notice action = {{{notice action|}}} |
|||
⚫ | |||
-->{{#ifeq: {{{notice action|}}} | view |
|||
We unfortunately have to call /content twice so that the editnotice-area and clear elements |
|||
| <!--"Viewing the source" of a protected page, don't show namespace notice--> |
|||
are only output if there is at least one actual edit notice. This ensures the software can determine |
|||
| {{#ifexist: Template:Editnotices/Namespace/{{#if:{{NAMESPACE}}|{{NAMESPACE}}|Main}} |
|||
whether or not a page has edit notices (for the API, WikiEditor, VisualEditor and others). And to ensure |
|||
| <div class="editnotice-namespace"> {{Template:Editnotices/Namespace/{{#if:{{NAMESPACE}}|{{NAMESPACE}}|Main}}}} </div> |
|||
MediaWiki:Editnotice-notext gets shown when appropiate. |
|||
}} |
|||
--><div id="editnotice-area" class="editnotice-area mw-parser-output" style="clear: both; width: 100%;">{{Editnotice load/content |
|||
⚫ | |||
| notice action = {{{notice action|}}} |
|||
⚫ | |||
-->{{#if: {{ns has subpages}} |
|||
}}<noinclude> |
|||
| {{#ifexist: Template:Editnotices/Group/{{FULLROOTPAGENAME}} |
|||
| <div class="editnotice-group-link" style="clear: both; float: right; margin: 0px 0.8em; padding: 0; font-size: 88%; line-height: 1em;"> [[Template:Editnotices/Group/{{FULLROOTPAGENAME}}|view]] </div> |
|||
<div class="editnotice-group" style="clear: both;"> {{Template:Editnotices/Group/{{FULLROOTPAGENAME}}| notice action={{{notice action|}}} }} </div> |
|||
}} |
|||
}}<!-- |
|||
Page notice. Load user (talk) rootpage editnotices from |
|||
user space, rest from "Template:Editnotices/Page/". |
|||
-->{{#switch: {{PAGENAME}}:::{{NAMESPACE}} |
|||
| {{BASEPAGENAME}}:::{{ns:User}} |
|||
| {{BASEPAGENAME}}:::{{ns:User talk}} = |
|||
{{#ifexist: {{FULLPAGENAME}}/Editnotice |
|||
| <div class="editnotice-page-link" style="clear: both; float: right; margin: 0px 0.8em; padding: 0; font-size: 88%; line-height: 1em;"> [[{{FULLPAGENAME}}/Editnotice|view]] </div> |
|||
<div id="editnotice-ns-{{NAMESPACEID}}" class="editnotice-page" style="clear: both;"> {{{{FULLPAGENAME}}/Editnotice| notice action={{{notice action|}}} }} </div> |
|||
}} |
|||
| #default = |
|||
{{#ifexist: Template:Editnotices/Page/{{FULLPAGENAME}} |
|||
| <div class="editnotice-page-link" style="clear: both; float: right; margin: 0px 0.8em; padding: 0; font-size: 88%; line-height: 1em;"> [[Template:Editnotices/Page/{{FULLPAGENAME}}|view]] </div> |
|||
<div class="editnotice-page" style="clear: both;"> {{Template:Editnotices/Page/{{FULLPAGENAME}}| notice action={{{notice action|}}} }} </div> |
|||
}} |
|||
}}<div style="clear: both;"></div> </div><noinclude> |
|||
{{documentation}} |
{{documentation}} |