[from now] 2012/07/21 16:02:20

diff --git a/.gitignore b/.gitignore
index 5804970..c9a9297 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,6 +10,7 @@ atlassian-ide-plugin.xml
 *.log
 out
 target
+/plugins
 web-app/plugins
 web-app/WEB-INF/classes
 test/reports
diff --git a/grails-app/taglib/twitter/bootstrap/AlertsTagLib.groovy b/grails-app/taglib/twitter/bootstrap/AlertsTagLib.groovy
index f1db4b5..e769ecd 100644
--- a/grails-app/taglib/twitter/bootstrap/AlertsTagLib.groovy
+++ b/grails-app/taglib/twitter/bootstrap/AlertsTagLib.groovy
@@ -3,10 +3,28 @@ package twitter.bootstrap
 class AlertsTagLib {

     static namespace = "bootstrap"
+    static final ALLOWED_CONTEXTS = ['error', 'danger', 'success', 'info', 'message']

+    /**
+     * Creates alert for Twitter Bootstrap.
+     *
+     * @attr context Add optional classes to change an alert's connotation
+     */
     Closure alert = { attrs, body ->
         def writer = out
-        writer << '<div class="alert">'
+
+        if (attrs.context != null && ALLOWED_CONTEXTS.every { it != attrs.context }) {
+            throwTagError('Attribute [context] allowed ' + ALLOWED_CONTEXTS + ' in tag [alert]')
+        }
+
+        def context = attrs.context ?: ''
+        def alertClass = 'alert'
+
+        if (context != '') {
+            alertClass += " alert-${context}"
+        }
+
+        writer << '<div class="' + alertClass + '">'
         writer << body()
         writer << '</div>'
     }
diff --git a/src/templates/scaffolding/create.gsp b/src/templates/scaffolding/create.gsp
index 331082c..165211d 100644
--- a/src/templates/scaffolding/create.gsp
+++ b/src/templates/scaffolding/create.gsp
@@ -35,7 +35,7 @@
                 <h1><g:message code="default.create.label" args="[entityName]"/></h1>
             </div>
             <g:if test="\${flash.message}">
-                <bootstrap:alert>\${flash.message}</bootstrap:alert>
+                <bootstrap:alert context="success">\${flash.message}</bootstrap:alert>
             </g:if>
             <g:hasErrors bean="\${${propertyName}}">
                 <ul class="errors" role="alert">
diff --git a/src/templates/scaffolding/list.gsp b/src/templates/scaffolding/list.gsp
index 0a8e036..c3e0ba4 100644
--- a/src/templates/scaffolding/list.gsp
+++ b/src/templates/scaffolding/list.gsp
@@ -36,7 +36,7 @@
                 <h1><g:message code="default.list.label" args="[entityName]"/></h1>
             </div>
             <g:if test="\${flash.message}">
-                <bootstrap:alert>\${flash.message}</bootstrap:alert>
+                <bootstrap:alert context="success">\${flash.message}</bootstrap:alert>
             </g:if>
             <table class="table table-striped table-bordered table-condensed">
                 <thead>
diff --git a/src/templates/scaffolding/show.gsp b/src/templates/scaffolding/show.gsp
index 6703b26..5683fe0 100644
--- a/src/templates/scaffolding/show.gsp
+++ b/src/templates/scaffolding/show.gsp
@@ -36,7 +36,7 @@
                 <h1><g:message code="default.show.label" args="[entityName]"/></h1>
             </div>
             <g:if test="\${flash.message}">
-                <bootstrap:alert>\${flash.message}</bootstrap:alert>
+                <bootstrap:alert context="success">\${flash.message}</bootstrap:alert>
             </g:if>
             <ol class="property-list ${domainClass.propertyName}">
                 <%