$new_tag)
* $is_admin = whether things like "add new alias" should be shown
*/
public function display_aliases(Page $page, $aliases, $is_admin, $pageNumber, $totalPages) {
if($is_admin) {
$action = "
Action | ";
$add = "
";
}
else {
$action = "";
$add = "";
}
$h_aliases = "";
$n = 0;
foreach($aliases as $old => $new) {
$h_old = html_escape($old);
$h_new = html_escape($new);
$oe = ($n++ % 2 == 0) ? "even" : "odd";
$h_aliases .= "$h_old | $h_new | ";
if($is_admin) {
$h_aliases .= "
|
";
}
$h_aliases .= "
";
}
$html = "
From | To | $action
$h_aliases
$add
Download as CSV
";
$bulk_html = "
";
$page->set_title("Alias List");
$page->set_heading("Alias List");
$page->add_block(new NavBlock());
$page->add_block(new Block("Aliases", $html));
if($is_admin) {
$page->add_block(new Block("Bulk Upload", $bulk_html, "main", 51));
}
$this->display_paginator($page, "alias/list", null, $pageNumber, $totalPages);
}
}
?>