Created
January 5, 2018 17:54
-
-
Save slmanju/ba28d311c8ebcc5f88aa1ccc4b79f7f4 to your computer and use it in GitHub Desktop.
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Employee List</title> | |
| <link rel='stylesheet' href='/stylesheets/style.css' /> | |
| </head> | |
| <body> | |
| <div class="container"> | |
| <h3><a href="/employees/create">Create Employee</a></h3> | |
| <h1>Employee List</h1> | |
| <% if (employees.length > 0) { %> | |
| <table> | |
| <thead> | |
| <tr> | |
| <th>Username</th> | |
| <th>Email</th> | |
| </tr> | |
| </thead> | |
| <tbody> | |
| <% for(var i = 0; i < employees.length; i++) { %> | |
| <tr> | |
| <td><a href="/employees/show/<%= employees[i]._id%>"><%= employees[i].username %></a></td> | |
| <td><%= employees[i].email %></td> | |
| </tr> | |
| <% } %> | |
| </tbody> | |
| </table> | |
| <% } else { %> | |
| <div>No employees found.</div> | |
| <% } %> | |
| </div> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment