read-ness column on PM table, for sorting

This commit is contained in:
Shish 2013-02-09 10:35:59 +00:00
parent 4366d3e3e9
commit ffdca16b30

View File

@ -6,7 +6,7 @@ class PrivMsgTheme extends Themelet {
$html = " $html = "
<table id='pms' class='zebra sortable'> <table id='pms' class='zebra sortable'>
<thead><tr><th>Subject</th><th>From</th><th>Date</th><th>Action</th></tr></thead> <thead><tr><th>R?</th><th>Subject</th><th>From</th><th>Date</th><th>Action</th></tr></thead>
<tbody>"; <tbody>";
$n = 0; $n = 0;
foreach($pms as $pm) { foreach($pms as $pm) {
@ -18,14 +18,21 @@ class PrivMsgTheme extends Themelet {
$pm_url = make_link("pm/read/".$pm->id); $pm_url = make_link("pm/read/".$pm->id);
$del_url = make_link("pm/delete"); $del_url = make_link("pm/delete");
$h_date = html_escape($pm->sent_date); $h_date = html_escape($pm->sent_date);
if(!$pm->is_read) $h_subject = "<b>$h_subject</b>"; $readYN = "Y";
$html .= "<tr><td><a href='$pm_url'>$h_subject</a></td> if(!$pm->is_read) {
$h_subject = "<b>$h_subject</b>";
$readYN = "N";
}
$html .= "<tr>
<td>$readYN</td>
<td><a href='$pm_url'>$h_subject</a></td>
<td><a href='$from_url'>$h_from</a></td><td>$h_date</td> <td><a href='$from_url'>$h_from</a></td><td>$h_date</td>
<td><form action='$del_url' method='POST'> <td><form action='$del_url' method='POST'>
<input type='hidden' name='pm_id' value='{$pm->id}'> <input type='hidden' name='pm_id' value='{$pm->id}'>
".$user->get_auth_html()." ".$user->get_auth_html()."
<input type='submit' value='Delete'> <input type='submit' value='Delete'>
</form></td></tr>"; </form></td>
</tr>";
} }
$html .= " $html .= "
</tbody> </tbody>