-
-
Save vlad-shatskyi/4740980 to your computer and use it in GitHub Desktop.
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
<table style="float: left; margin-left: 20px;"> | |
<% if @user == current_user %> | |
<caption>My Holidays</caption> | |
<thead> | |
<tr> | |
<th>Start Date</th> | |
<th>End Date</th> | |
<th>Description</th> | |
<th>State</th> | |
<th>Type</th> | |
<th>Cancel</th> | |
</tr> | |
</thead> | |
<% current_user.holidays.each do |holiday| %> | |
<tr> | |
<td> | |
<% holiday.start_at.strftime("%d %B %Y") %></td> | |
<td> | |
<% holiday.end_at.strftime("%d %B %Y") %></td> | |
<td> | |
<% holiday.description %></td> | |
<td> | |
<% holiday.state %></td> | |
<td> | |
<% holiday.type.try(:name) %></td> | |
</tr> | |
<% end %> | |
<% if current_user.holidays.empty? %> | |
<tr> | |
<td>No bookings found</td> | |
</tr> | |
<% end %> | |
</thead> | |
</table> | |
<% end %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment