Template:Bmbox: Difference between revisions

From BetaArchive Wiki
en.wikibooks>Davidgothberg
(Planned fixes: Using new CSS class names (deployed for 30 days now). Fixing the empty "image=" parameter bug and the padding for the image=none case. And some other cleanup. (Tested in sandbox.))
en.wikibooks>John Vandenberg
Line 1: Line 1:
<table class="metadata plainlinks ambox  
<table style="{{{style|}}}" class="metadata plainlinks ambox {{#switch:{{{type|}}}
{{#switch:{{{type|}}}
  | serious  = ambox-serious
| speedy    = ambox-speedy
  | content = ambox-content
| delete        <!-- delete = serious -->
  | style   = ambox-style
| serious    = ambox-delete
  | merge   = ambox-merge
| content   = ambox-content
  | notice  = ambox-notice
| style     = ambox-style
  | #default = ambox-notice
| move          <!-- move = merge -->
}}">
| merge     = ambox-move
| protection = ambox-protection
| notice       <!-- notice = default -->
| #default   = ambox-notice
}}" style="{{{style|}}}">
<tr>
<tr>
{{#ifeq:{{{image|}}}|none
<td class="ambox-image">
| <!-- No image. Cell with some width or padding necessary for text cell to have 100% width. --><td style="border: none; padding: 1px;"></td>
{{#ifeq:{{{image}}}|none
| <td class="ambox-image"><div style="width: 52px;">
  | <!-- no image cell; empty cell necessary for text cell to have 100% width -->
  {{#ifeq:{{{image|}}}|blank
  | <div style="width:52px;"> {{#switch:{{{image|{{{type|}}}}}}
  | &nbsp;
     | serious  = [[Image:Stop hand nuvola.svg|40px]]
  | {{#if:{{{image|}}}
    | content  = [[Image:Emblem-important.svg|40px]]
    | {{{image}}}
    | style   = [[Image:Broom icon.svg|40px]]
     | {{#switch:{{{type|}}}
    | merge    = [[Image:Merge-split-transwiki default.svg]]
      | speedy    = [[Image:Ambox speedy deletion.png|40x40px]]
    | notice  = [[Image:Info non-talk.png|40px]]
      | delete
    | blank    = [[Image:No image.svg]]
      | serious    = [[Image:Ambox deletion.png|40x40px]]
    | #default = {{{image|[[Image:Info non-talk.png|40px]]}}}
      | content   = [[Image:Ambox content.png|40x40px]]
   }}</div>
      | style      = [[Image:Ambox style.png|40x40px]]
}}</td>
      | move
<td class="ambox-text">{{{text}}}</td>
      | merge      = [[Image:Ambox move.png|40x40px]]
{{#if:{{{imageright|}}}|
      | protection = [[Image:Ambox protection.png|40x40px]]
  <td class="ambox-imageright"><div style="width:52px;"> {{{imageright}}} </div></td>
      | notice          <!-- notice = default -->
      | #default   = [[Image:Ambox notice.png|40x40px]]
      }}
    }}
   }}</div></td>
}}
<td class="ambox-text" style="{{{textstyle|}}}"> {{{text}}} </td>
{{#if:{{{imageright|}}}
| <td class="ambox-imageright"><div style="width: 52px;"> {{{imageright}}} </div></td>
}}
}}
</tr>
</tr>
</table><noinclude>
</table>
 
<noinclude>
{{pp-template|small=yes}}
[[mk:Шаблон:Ambox]]
{{Documentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>
</noinclude>

Revision as of 14:36, 15 July 2008