Template:Ambox: Difference between revisions

update to use Ambox/core
(add style="vertical-align:middle;" to imageright)
(update to use Ambox/core)
Line 1: Line 1:
<table class="metadata plainlinks ambox
{{#ifeq:{{{subst}}}|SUBST
{{#switch:{{{type|}}}
|{{#if:{{{name|}}}
| speedy    = ambox-speedy
  |{{Error|Template {{Tlx|{{{name}}}}} has been incorrectly substituted.}}
| delete    = ambox-delete
}}[[Category:Pages with incorrectly substituted templates]]
| content    = ambox-content
}}{{#ifeq:{{{small}}}|left
| style     = ambox-stylex
|{{Ambox/core
| move       = ambox-move
  |small     = left
| protection = ambox-protection
  |type       = {{{type|}}}
| notice    <!-- notice = default -->
  |image      = {{#if:{{{smallimage|}}}
| #default   = ambox-notice
  |{{{smallimage}}}
}}" style="{{{style|}}}">
  |{{{image|}}}
<tr>
  }}
{{#ifeq:{{{image|}}}|none
  |imageright = {{#if:{{{smallimageright|}}}
| <!-- No image. Cell with some width or padding necessary for text cell to have 100% width. --><td style="border: none; padding: 1px;"></td>
  |{{{smallimageright}}}
| <td class="ambox-image" style="vertical-align:middle;"><div style="width: 52px;">
  |{{{imageright|}}}
  {{#ifeq:{{{image|}}}|blank
  }}
   | &nbsp;
   |class      = {{{class|}}}
   | {{#if:{{{image|}}}
  |style     = {{{style|}}}
    | {{{image}}}
  |textstyle  = {{{textstyle|}}}
    | {{#switch:{{{type|}}}
  |text      = {{#if:{{{smalltext|}}}
      | speedy    = [[Image:Ambox speedy deletion.png|40x40px]]
  |{{{smalltext}}}
      | delete    = [[Image:Deletion icon.svg.png|40x40px]]
  |{{{text}}}
      | content    = <!--[[Image:Ambox content.png|40x40px]]-->
  }}
      | style      = [[Image:Ambox style.png|40x40px]]
}}
      | move      = [[Image:Ambox move.png|40x40px]]
|{{Ambox/core
      | protection = [[Image:Ambox protection.png|40x40px]]
  |type      = {{{type|}}}
      | notice    <!-- notice = default -->
  |image      = {{{image|}}}
      | #default  = [[Image:Information icon.png|40x40px]]
  |imageright = {{{imageright|}}}
      }}
  |class     = {{{class|}}}
  |style     = {{{style|}}}
  |textstyle  = {{{textstyle|}}}
  |text      = {{{text}}}
  |date      = {{#ifeq:{{FULLROOTPAGENAME}}|Template:{{PAGENAME:{{{name}}}}}
  |{{#ifeq:{{{date|¬}}}|¬||{{CURRENTMONTHNAME}} {{CURRENTYEAR}}}}
  |{{{date|}}}
   }}
}}
}}{{Category handler
|main={{Ambox/category
   |cat={{{cat|{{{category|}}}}}}  
  |all={{{all|}}}
  |cat2={{{cat2|{{{category2|}}}}}}  
  |all2={{{all2|}}}
  |cat3={{{cat3|{{{category3|}}}}}}
  |all3={{{all3|}}}
  |date={{{date|}}}
}}
|template={{#ifeq:{{BASEPAGENAME}}|{{SUBPAGENAME}}|<!--We are on a rootpage, not a /doc or /sandbox page-->{{#ifeq:{{{nocat|}}}|true
    | <!--Don't categorise-->
    | [[Category:Article message boxes|{{BASEPAGENAME}}]]
     }}
     }}
   }}</div></td>
   }}
}}
}}{{#ifeq:{{FULLPAGENAME}}|Template:{{PAGENAME:{{{name}}}}}
<td class="ambox-text" style="{{{textstyle|}}}; vertical-align:middle;"> {{{text}}} </td>
|{{#ifeq:{{{doc}}}|no|
{{#if:{{{imageright|}}}
   |{{Documentation}}<!-- Transclude documentation on template page -->
| <td class="ambox-imageright" style="vertical-align:middle;"><div style="width: 52px;"> {{{imageright}}} </div></td>
}}
}}
</tr>
</table><!-- Detect and report usage with faulty "type" parameter:
-->{{#switch:{{{type|}}}
|  <!-- No type fed, is also valid input -->
| speedy
| delete
| content
| style
| move
| protection
| notice    =    <!-- Do nothing, valid "type" -->
| #default   = [[Category:Ambox templates using deprecated types|{{main other|Main:}}{{FULLPAGENAME}}]]<!-- Sort on namespace -->
}}<noinclude>
}}<noinclude>
{{Documentation}}
{{Documentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>
</noinclude>
90,866

edits