$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 = " ".make_form(make_link("alias/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 .= " ".make_form(make_link("alias/remove"))." "; } $h_aliases .= ""; } $html = " $action$h_aliases$add
FromTo

Download as CSV

"; $bulk_html = " ".make_form(make_link("alias/import"), $multipart=True)." "; $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); } } ?>