<tal:statusmsg tal:define="messages view/messages"
               tal:repeat="message messages">

  <div class="alert alert-info"
       tal:define="mtype message/type | nothing;
                   mapping python:{'error': 'danger'};
                   facility python:mapping.get(mtype, mtype);"
       tal:attributes="class string:alert alert-dismissible alert-${facility};">

    <button type="button" class="close" data-dismiss="alert" aria-label="Close">
      <span aria-hidden="true">&times;</span>
    </button>

    <strong i18n:translate="" tal:content="python:mtype.capitalize()">
      Info
    </strong>
    <span class="content"
          tal:replace="message/message | nothing" i18n:translate="">
      The status message.
    </span>
  </div>

</tal:statusmsg>
