         return actions
 
     template: (ctx) ->
-        @$el.html ctx.message
-
-        $actions = $ '<div>'
-        $actions.addClass actions
+        $message = "<div class='message alert #{ opts.type } alert-#{ opts.type }'>#{ opts.message }</div>"
+
+        $actions = $ '<div class="actions">'
         for action in ctx.actions
             $action = $ '<span>'
             $action.attr 'data-action', action.name

$ = jQuery

class Message extends Backbone.View
    className: 'message alert'
    
    defaults:
        hideAfter: 10
        scroll: true

   
            $actions.append $action

        $message.append $actions
            
        $message

    render: ->
        if @rendered
            return
