Template:Editnotice load: Difference between revisions

From TEPwiki, Urth's Encyclopedia
Jump to navigation Jump to search
Content added Content deleted
(Adding "width: 100%;" to the notice divs, so (older?) Internet Explorers won't place the links for the group and page notices wrongly when empty notices.)
((New version from /test1.) Uses /core. Adds red create links for admins+accountcreators, and for users on user pages. And better placing and naming of links. And handles blanked notices. See talk.)
Line 1: Line 1:
<div class="editnotice-area" style="clear: both;"><!--
<div id="editnotice-area" class="editnotice-area" style="clear: both; width: 100%;"><!--
Namespace notice:
Namespace notice:
-->{{#ifeq: {{{notice action|}}} | view
-->{{#ifeq: {{{notice action|}}} | view
Line 7: Line 7:
}}
}}
}}<!--
}}<!--
Group notice:
Group and page notice:
-->{{editnotice load/core
-->{{#if: {{ns has subpages}}
| notice action = {{{notice action|}}}
| {{#ifexist: Template:Editnotices/Group/{{FULLROOTPAGENAME}}
| group allowed = {{ns has subpages}} <!--"yes" or empty string-->
| <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; width: 100%;"> {{Template:Editnotices/Group/{{FULLROOTPAGENAME}}| notice action={{{notice action|}}} }} </div>
| groupnotice = Template:Editnotices/Group/{{FULLROOTPAGENAME}}
| pagenotice =
<!--If on a user or user talk rootpage, then use /Editnotice,
else use normal protected notice-->
{{#switch: {{PAGENAME}}:::{{NAMESPACE}}
| {{BASEPAGENAME}}:::{{ns:User}}
| {{BASEPAGENAME}}:::{{ns:User talk}} = {{FULLPAGENAME}}/Editnotice
| #default = Template:Editnotices/Page/{{FULLPAGENAME}}
}}
}}
| userpage =
}}<!--
Page notice. Load user (talk) rootpage editnotices from
<!--If on a user or user talk rootpage, then "yes", else empty string-->
{{#switch: {{PAGENAME}}:::{{NAMESPACE}}
user space, rest from "Template:Editnotices/Page/".
-->{{#switch: {{PAGENAME}}:::{{NAMESPACE}}
| {{BASEPAGENAME}}:::{{ns:User}}
| {{BASEPAGENAME}}:::{{ns:User}}
| {{BASEPAGENAME}}:::{{ns:User talk}} = yes
| {{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; width: 100%;"> {{{{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; width: 100%;"> {{Template:Editnotices/Page/{{FULLPAGENAME}}| notice action={{{notice action|}}} }} </div>
}}
}}
}}<div style="clear: both;"></div> </div><noinclude>
}}<div style="clear: both;"></div> </div><noinclude>

Revision as of 16:27, 7 January 2010