
<%inherit file="base.mako"/>

<h1>${c.user.username}'s messages</h1>
<%include file="nav3.mako" />

% if c.user.inbox_mails:
  <h2>New messages</h2>
  <table>
    <tr>
      <th>Subject</th>
      <th>From</th>
      <th>Date</th>
      <th>Status</th>
      <th>Important</th>
      <th>Replied</th>
    </tr>

 % for gazmail in c.user.inbox_mails:

   <tr ${gazmail.reader_status=="new" and 'class="new_mail"' or ''}>
     <td><a href="${h.url_for(controller='gazmail', action='message_read', msg_id=gazmail.id)}">${gazmail.subject}</a></td>
     <td><a href="${h.url_for(controller='visitor', action='user_profile', username=gazmail.from_user.username)}"
	    >${gazmail.from_user.username}</a></td>
     <td>${h.pretty_date(gazmail.creat_date)}</td>
     <td>${gazmail.reader_status}</td>
     <td>${h.pretty_bool(gazmail.is_important)}</td>
     <td>${h.pretty_bool(gazmail.is_replied)}</td>
   </tr>

 % endfor 

  </table>

% else:
  <p>You have messages.</p>
% endif
