Jump to content

Template:Editnotice load: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
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.
ok its been 5 years of this temporary fix - lets see what breaks
 
(7 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{#if: {{Editnotice load/content
<div class="editnotice-area" style="clear: both;"><!--
Namespace notice:
| 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
}}<!--
Group notice:
| notice action = {{{notice action|}}}
}}<div style="clear: both;"></div></div>
-->{{#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}}

Latest revision as of 13:24, 8 July 2022