private function _footer($ncol, $extra) { global $Conf; if ($this->count == 0) { return ""; } $revpref = $this->table_type == "editReviewPreference"; $lllgroups = SearchAction::list_all_actions($this->contact, $this->qreq, $this); // Upload preferences (review preferences only) if ($revpref) { $lllgroups[] = [100, "uploadpref", "Upload", "<b> preference file:</b> " . "<input class=\"wantcrpfocus\" type='file' name='uploadedFile' accept='text/plain' size='20' tabindex='6' onfocus='autosub(\"uploadpref\",this)' /> " . Ht::submit("fn", "Go", ["value" => "uploadpref", "tabindex" => 6, "onclick" => "return plist_submit.call(this)", "data-plist-submit-all" => 1])]; } // Set preferences (review preferences only) if ($revpref) { $lllgroups[] = [200, "setpref", "Set preferences", "<b>:</b> " . Ht::entry("pref", "", array("class" => "wantcrpfocus", "size" => 4, "tabindex" => 6, "onfocus" => 'autosub("setpref",this)')) . " " . Ht::submit("fn", "Go", ["value" => "setpref", "tabindex" => 6, "onclick" => "return plist_submit.call(this)"])]; } usort($lllgroups, function ($a, $b) { return $a[0] - $b[0]; }); $whichlll = 1; foreach ($lllgroups as $i => $lllg) { if ($this->qreq->fn == $lllg[1] || $this->atab == $lllg[1]) { $whichlll = $i + 1; } } // Linelinks container $foot = " <tr class=\"pl_footrow\">"; if (!$this->viewmap->columns) { $foot .= '<td class="pl_footselector">' . Ht::img("_.gif", "^^", "placthook") . "</td>"; --$ncol; } $foot .= '<td id="plact" class="pl_footer linelinks' . $whichlll . '" colspan="' . $ncol . '">'; $foot .= "<table><tbody><tr>\n" . ' <td class="pl_footer_desc"><b>Select papers</b> (or <a href="' . selfHref(["selectall" => 1]) . '#plact" onclick="return papersel(true)">select all ' . $this->count . "</a>), then </td>\n" . " </tr></tbody></table>"; foreach ($lllgroups as $i => $lllg) { $x = $i + 1; $foot .= "<table><tbody><tr>\n" . " <td class=\"pl_footer_desc lll{$x}\"><a href=\"" . selfHref(["atab" => $lllg[1]]) . "#plact\" onclick=\"return crpfocus('plact',this)\">" . $lllg[2] . "</a></td>\n"; for ($j = 3; $j < count($lllg); ++$j) { $cell = is_array($lllg[$j]) ? $lllg[$j] : ["content" => $lllg[$j]]; $class = isset($cell["class"]) ? "lld{$x} " . $cell["class"] : "lld{$x}"; $foot .= " <td class=\"{$class}\""; if (isset($cell["id"])) { $foot .= " id=\"" . $cell["id"] . "\""; } $foot .= ">" . $cell["content"] . "</td>\n"; } if ($i < count($lllgroups) - 1) { $foot .= " <td> <span class='barsep'>·</span> </td>\n"; } $foot .= " </tr></tbody></table>"; } $foot .= $extra . "<hr class=\"c\" /></td>\n </tr>\n"; return $foot; }