Skip to content

Commit

Permalink
before week 5 (ServerPages)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dierk Koenig committed Oct 16, 2024
1 parent a551576 commit 2065396
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
19 changes: 19 additions & 0 deletions grails-app/taglib/rooms/DecorationTagLib.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package rooms

class DecorationTagLib {
static defaultEncodeAs = 'raw'
static namespace = "rooms"

def decorate = { attributes, body ->
String grade = attributes.grade
def decor = "<img src='http://2.bp.blogspot.com/";
switch (grade) {
case ["1","2","3"] : decor += "-rnfZUujszZI/UZEFYJ269-I/AAAAAAAADnw/BbB-v_QWo1w/s1600/facebook-frown-emoticon.png'>"; break
case ["4","5","6"] : decor += "-qODY1kxipZ0/Tv5dwDFFntI/AAAAAAAAAjM/cLXT6KEp-bE/s400/sunglasses%2Bemoticon.png'>"; break
default: decor = ""
}
out << decor
out << body()
out << decor
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import spock.lang.Ignore
* See http://www.gebish.org/manual/current/ for more instructions
*/
@Integration
@Ignore
class InPlaceCalculatorSpec extends GebSpec {

void "Calculate in place with a self-refreshing view"() {
Expand Down

0 comments on commit 2065396

Please sign in to comment.