{{ extends "layouts/profile" }}
{{ import "layouts/partials/menu/profile" }}
{{block title()}}{{  T("profile_edit_page", User.Username) }}{{end}}
{{ block profile_navigation()}}{{ yield profile_menu(route="profile") }}{{end}}
{{block profile_content()}}
<table class="notification-table">
  <thead>
	<tr>
	  <th class="notification-status">{{T("status")}}</th>
	  <th class="notification-event">Event</th>
	  <th class="notification-date">{{T("date")}}</th>
	</tr>
  </thead>
  <tbody>
  {{if len(User.Notifications) == 0}}
  <tr><td colspan="3">{{T("no_notifications")}}</td></tr>
  {{end}}
  {{ range User.Notifications }}
	  <tr>
		<td class="notification-status {{ if !.Read }}notification-unread{{end}}">{{if .Read}}{{T("read")}}{{else}}{{T("unread")}}{{end}}</td>
		<td class="notification-event">
			<a href="{{ .URL }}?notif">{{ .Content }}</a>
		</td>
		{{if !.Date.IsZero()}}
		<td class="notification-date date-full" title="{{formatDate(.Date, false)}}">{{formatDate(.Date, false)}}</td>
		{{else}}
		<td class="notification-date">{{T("unknown")}}</td>
		{{end}}
	  </tr>
	{{end}}	
	</tbody>
</table>
<div id="clear-notification">
  <hr/>
<a href="/notifications?read_all" class="btn-grey form-input" style="float: left;"> {{  T("mark_notifications_as_read") }}</a>
  <a href="/notifications?clear_all" class="btn-red form-input"> {{  T("clear_all_notifications") }}</a>
  <a href="/notifications?clear" class="btn-green form-input"> {{  T("clear_notifications") }}</a>
</div>
{{end}}
