Difference between revisions of "Template:Editnotice load/core"

From blackwiki
Jump to navigation Jump to search
imported>Davidgothberg
(Back to version previous version 14:38, 7 January 2010 , to test the IE bug again.)
imported>Amalthea
(replace NAMESPACEID with NAMESPACENUMBER -- magic work does the exact same work, if no parameter is given.)
 
(8 intermediate revisions by 5 users not shown)
Line 20: Line 20:
 
| group =  
 
| group =  
 
   <!--We have a group notice, but no page notice-->
 
   <!--We have a group notice, but no page notice-->
   <div class="editnotice-link" style="clear: both; float: right; margin: 0px 0.8em; padding: 0; line-height: 1em;"> <small>[[{{{groupnotice|}}}|Group notice]] <span class="{{#if: {{{userpage|}}} || sysop-show accountcreator-show }}" style="{{#if: {{{userpage|}}} || display: none; }}">&nbsp; [[{{{pagenotice|}}}|Page notice]]</span></small> </div>
+
   <div class="editnotice-link" style="clear: both; float: right; margin: 0px 0.8em; padding: 0; line-height: 1em;"> <small>[[{{{groupnotice|}}}|Group notice]] <span class="editnotice-redlink {{#if: {{{ownuserpage|}}} || sysop-show templateeditor-show extendedmover-show }}" style="{{#if: {{{ownuserpage|}}} || display: none; }}">&nbsp; [[{{{pagenotice|}}}|Page notice]]</span></small> </div>
   <div class="editnotice-group" style="clear: both;"> {{ {{{groupnotice|}}} | notice action={{{notice action|}}} }} </div>
+
   <div class="editnotice-group" style="clear: both; width: 100%;"> {{ {{{groupnotice|}}} | notice action={{{notice action|}}} }} </div>
  
 
| page =  
 
| page =  
 
   <!--We have a page notice, but no group notice-->
 
   <!--We have a page notice, but no group notice-->
 
   <div class="editnotice-link" style="clear: both; float: right; margin: 0px 0.8em; padding: 0; line-height: 1em;"> <small>{{#if: {{{group allowed|}}}
 
   <div class="editnotice-link" style="clear: both; float: right; margin: 0px 0.8em; padding: 0; line-height: 1em;"> <small>{{#if: {{{group allowed|}}}
   | <span class="sysop-show accountcreator-show" style="display: none;">[[{{{groupnotice|}}}|Group notice]] &nbsp;</span>
+
   | <span class="editnotice-redlink sysop-show templateeditor-show extendedmover-show" style="display: none;">[[{{{groupnotice|}}}|Group notice]] &nbsp;</span>
 
   }} [[{{{pagenotice|}}}|Page notice]]</small> </div>
 
   }} [[{{{pagenotice|}}}|Page notice]]</small> </div>
   <div {{#if: {{{userpage|}}} | id="editnotice-ns-{{NAMESPACEID}}" }} class="editnotice-page" style="clear: both;"> {{ {{{pagenotice|}}} | notice action={{{notice action|}}} }} </div>
+
   <div {{#if: {{{userpage|}}} | id="editnotice-ns-{{NAMESPACENUMBER}}" }} class="editnotice-page" style="clear: both; width: 100%;"> {{ {{{pagenotice|}}} | notice action={{{notice action|}}} }} </div>
  
 
| grouppage =  
 
| grouppage =  
 
   <!--We have both a group notice and a page notice-->
 
   <!--We have both a group notice and a page notice-->
 
   <div class="editnotice-link" style="clear: both; float: right; margin: 0px 0.8em; padding: 0; line-height: 1em;"> <small>[[{{{groupnotice|}}}|Group notice]]</small> </div>
 
   <div class="editnotice-link" style="clear: both; float: right; margin: 0px 0.8em; padding: 0; line-height: 1em;"> <small>[[{{{groupnotice|}}}|Group notice]]</small> </div>
   <div class="editnotice-group" style="clear: both;"> {{ {{{groupnotice|}}} | notice action={{{notice action|}}} }} </div>
+
   <div class="editnotice-group" style="clear: both; width: 100%;"> {{ {{{groupnotice|}}} | notice action={{{notice action|}}} }} </div>
 
   <div class="editnotice-link" style="clear: both; float: right; margin: 0px 0.8em; padding: 0; line-height: 1em;"> <small>[[{{{pagenotice|}}}|Page notice]]</small> </div>
 
   <div class="editnotice-link" style="clear: both; float: right; margin: 0px 0.8em; padding: 0; line-height: 1em;"> <small>[[{{{pagenotice|}}}|Page notice]]</small> </div>
   <div {{#if: {{{userpage|}}} | id="editnotice-ns-{{NAMESPACEID}}" }} class="editnotice-page" style="clear: both;"> {{ {{{pagenotice|}}} | notice action={{{notice action|}}} }} </div>
+
   <div {{#if: {{{userpage|}}} | id="editnotice-ns-{{NAMESPACENUMBER}}" }} class="editnotice-page" style="clear: both; width: 100%;"> {{ {{{pagenotice|}}} | notice action={{{notice action|}}} }} </div>
  
 
| #default =  
 
| #default =  
   <!--We have no group and no page notice-->
+
   <!-- See [[Template:Editnotice_load/notext]] and [[MediaWiki:Editnotice-notext]] for the display of the red link. This must remain empty. -->
  {{#if: {{{group allowed|}}}
 
  | {{#if: {{{userpage|}}}
 
    | <!--On a user rootpage-->
 
      <div class="editnotice-link" style="clear: both; float: right; margin: 0px 0.8em; padding: 0; line-height: 1em;"> <small><span class="sysop-show accountcreator-show" style="display: none;">[[{{{groupnotice|}}}|Group notice]] &nbsp;</span> [[{{{pagenotice|}}}|Page notice]]</small> </div>
 
    | <!--On any other page, and group notices allowed-->
 
      <div class="editnotice-link sysop-show accountcreator-show" style="clear: both; float: right; margin: 0px 0.8em; padding: 0; line-height: 1em; display: none;"> <small>[[{{{groupnotice|}}}|Group notice]] &nbsp; [[{{{pagenotice|}}}|Page notice]]</small> </div>
 
    }}
 
  | <!--Group notices not allowed, so also not in user space-->
 
    <div class="editnotice-link sysop-show accountcreator-show" style="clear: both; float: right; margin: 0px 0.8em; padding: 0; line-height: 1em; display: none;"> <small>[[{{{pagenotice|}}}|Page notice]]</small> </div>
 
  }}
 
 
 
 
}}<noinclude>
 
}}<noinclude>
  

Latest revision as of 21:08, 14 September 2019


50px Template documentation[view] [edit] [history] [purge]

This is the {{editnotice load/core}} sub-template.

Do not use this template directly, use {{editnotice load}} instead.

This template is called from {{editnotice load}}. It holds parts of the code for {{editnotice load}}, while {{editnotice load}} does parameter preprocessing. Thus simplifying the code.

This template is used by the editnotice system.

Technical details

This sub-template handles the loading of the group and page notices, and the links to them. This template currently expects these parameters:

{{editnotice load/core
| notice action = {{{notice action|}}}   <!--"view" or empty string-->
| group allowed = {{ns has subpages}}   <!--"yes" or empty string-->
| groupnotice =  <!--The possible group notice pagename-->
| pagenotice =  <!--The possible page notice pagename-->
| userpage =   <!--"yes" if a user editable userpage notice, else empty string-->
| ownuserpage =   <!--"yes" if the user is on his own 
                  user or user talk rootpage, else empty string-->
}}

For more documentation see {{editnotice load}}.

it:Template:Editnotice load/core