Created
May 7, 2012 13:28
-
-
Save coreymcmahon/2627750 to your computer and use it in GitHub Desktop.
The view code for displaying a list of users - http://www.symfonycentral.com/symfony-does-validation.html
This file contains 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
<h1>Users</h1> | |
{% if users|length == 0 %} | |
{# No users to display... #} | |
<p>Could not find any users :(</p> | |
{% else %} | |
<table> | |
<thead> | |
<td>Username</td> | |
<td>Email address</td> | |
<td>Password</td> | |
</thead> | |
{% for user in users %} | |
<tr> | |
<td>{{ user.username }}</td> | |
<td>{{ user.email }}</td> | |
{# Of course we'd never show passwords in plain-text #} | |
<td>********</td> | |
</tr> | |
{% endfor %} | |
</table> | |
{% endif %} | |
<button onclick="window.location = '{{ path('user_create') }}'; return false;">Add some!</button> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment