Created
September 8, 2011 16:19
-
-
Save guillaumebort/1203802 to your computer and use it in GitHub Desktop.
Sample Play template used from Java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@(user:models.User, accounts:java.util.List[models.Account]) | |
<h1>User @user.name has @accounts.size @("account".pluralize(accounts))</h1> | |
@for(account <- accounts) { | |
<h2>Account @accounts.number</h2> | |
@if(account.messages.isEmpty) { | |
<p>No messages for this account.</p> | |
} else { | |
<ul> | |
@for(msg <- account.messages) { | |
<li>@msg</li> | |
} | |
</ul> | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment