Difference between revisions of "Template:Ambox/core"

From Self-sufficiency
Jump to: navigation, search
m (1 revision)
(core breakout)
(15 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<table class="metadata plainlinks ambox {{#switch:{{{small|}}}
+
<table class="metadata plainlinks ambox {{#switch:{{{small|}}}|left=mbox-small-left}}
| left = mbox-small-left
+
{{#switch:{{{type|}}}
}} {{#switch:{{{type|}}}
+
 
| speedy    = ambox-speedy
 
| speedy    = ambox-speedy
 
| delete    = ambox-delete
 
| delete    = ambox-delete
Line 12: Line 11:
 
}}" style="{{{style|}}}">
 
}}" style="{{{style|}}}">
 
<tr>
 
<tr>
{{#switch:{{{image|}}}
+
{{#ifeq:{{{image|}}}|none
| blank    <!-- Fall back to "none", since deprecated. -->
+
| <!-- No image. Cell with some width or padding necessary for text cell to have 100% width. -->{{td}}
| none = <td class="mbox-empty-cell"></td>  <!-- No image. Cell with some width or padding necessary for text cell to have 100% width. -->
+
| <td class="mbox-image"><div style="width: 52px;">
| #default =
+
  {{#ifeq:{{{image|}}}|blank
  <td class="mbox-image">{{
+
    | &nbsp;
  #switch:{{{small|}}}
+
    | {{#if:{{{image|}}}
  | left = <!-- Don't use the DIV -->
+
      | {{{image}}}
  | #default = <div style="width: 52px;">
+
      | {{#switch:{{{type|}}}
  }}
+
          | speedy    = [[Image:Ambox speedy deletion.png|40x40px]]
  {{#if:{{{image|}}}
+
          | delete    = [[Image:Ambox deletion.png|40x40px]]
  | {{{image}}}
+
          | content    = [[Image:Ambox content.png|40x40px]]
  | [[File:{{#switch:{{{type|}}}
+
          | style      = [[Image:Ambox style.png|40x40px]]
    | speedy    = Ambox speedy deletion.png
+
          | move      = [[Image:Ambox move.png|40x40px]]
    | delete    = Ambox deletion.png
+
          | protection = [[Image:Ambox protection.png|40x40px]]
    | content    = Ambox content.png
+
          | notice     <!-- notice = default -->
    | style      = Edit-clear.svg
+
          | #default  = [[Image:Ambox notice.png|40x40px]]
    | move      = Ambox move.png
+
        }}
    | protection = Ambox protection.png
+
       }}
    | notice         <!-- notice = default -->
+
  }}</div></td>
    | #default  = Ambox notice.png
+
    }} | {{#switch:{{{small|}}}
+
      | left = 20x20px
+
      | #default = 40x40px
+
       }} |link=|alt=]]
+
  }}{{#switch:{{{small|}}}
+
  | left = <!-- Don't use the /DIV -->
+
  | #default = </div>  
+
  }}</td>
+
 
}}
 
}}
 
<td class="mbox-text" style="{{{textstyle|}}}"> {{{text}}} </td>
 
<td class="mbox-text" style="{{{textstyle|}}}"> {{{text}}} </td>
Line 45: Line 35:
 
| {{#ifeq:{{{imageright|}}}|none
 
| {{#ifeq:{{{imageright|}}}|none
 
   | <!-- No image. -->
 
   | <!-- No image. -->
   | <td class="mbox-imageright">{{#switch:{{{small|}}}
+
   | <td class="mbox-imageright"> {{{imageright}}} </td>
    | left = {{{imageright}}}
+
    | #default = <div style="width: 52px;"> {{{imageright}}} </div>
+
    }}</td>
+
 
   }}
 
   }}
 
}}
 
}}
 
</tr>
 
</tr>
</table><!--  
+
</table><!-- Detect and report usage with faulty "type" parameter:
Detect and report usage with faulty "type" parameter:
+
 
-->{{#switch:{{{type|}}}
 
-->{{#switch:{{{type|}}}
 
|  <!-- No type fed, is also valid input -->
 
|  <!-- No type fed, is also valid input -->
Line 64: Line 50:
 
| notice    = <!-- Do nothing, valid "type" -->
 
| notice    = <!-- Do nothing, valid "type" -->
 
| #default  = <div style="text-align: center;">This message box is using an invalid "type={{{type|}}}" parameter and needs fixing.</div>[[Category:Wikipedia message box parameter needs fixing|{{main other|Main:}}{{FULLPAGENAME}}]]<!-- Sort on namespace -->
 
| #default  = <div style="text-align: center;">This message box is using an invalid "type={{{type|}}}" parameter and needs fixing.</div>[[Category:Wikipedia message box parameter needs fixing|{{main other|Main:}}{{FULLPAGENAME}}]]<!-- Sort on namespace -->
}}<!--
 
Detect and report usage of deprecated "image=blank":
 
-->{{#switch:{{{image|}}}
 
| blank = [[Category:Wikipedia message box parameter needs fixing|{{main other|Main:}}{{FULLPAGENAME}}]]<!-- Sort on namespace -->
 
 
}}<noinclude>
 
}}<noinclude>
{{pp-template}}
+
 
{{documentation}}
+
{{pp-template|small=yes}}
 +
{{Documentation}}
 
<!-- Add categories and interwikis to the /doc subpage, not here! -->
 
<!-- Add categories and interwikis to the /doc subpage, not here! -->
 
</noinclude>
 
</noinclude>

Revision as of 15:01, 10 March 2009