Template:Mbox

From GoodRelations Wiki
Jump to: navigation, search
{{#ifeq: {{{type|}}} | note |
    <div class="mbox box-info"> <i class="glyphicon glyphicon-info-sign"></i> |
    {{#ifeq: {{{type|}}} | tip |
        <div class="mbox box-info"> <i class="glyphicon glyphicon-thumbs-up"></i> |
        {{#ifeq: {{{type|}}} | warning |
            <div class="mbox box-warning"> <i class="glyphicon glyphicon-warning-sign"></i> |
            <div class="mbox"> {{#if:{{{icon|}}}|<div class="mbox_icon">{{{icon}}}</div>}}
        }}
    }}
}}
<div class="mbox_message">{{#if:{{{short|}}}|<b>{{{short}}}:</b>}} {{{message}}}</div>
<div style="clear:both"></div>
</div>

Usage:

{{mbox
| icon = # only works if type is not specified
| short =
| message =
| type = ( note | tip | warning )
}}