function list_actions(Contact $user, $qreq, PaperList $pl, &$actions) { if (!$user->isPC || Navigation::page() === "reviewprefs") { return; } // tagtype cell $tagopt = array("a" => "Add", "d" => "Remove", "s" => "Define", "xxxa" => null, "ao" => "Add to order", "aos" => "Add to gapless order", "so" => "Define order", "sos" => "Define gapless order", "sor" => "Define random order"); $tagextra = array("id" => "placttagtype"); if ($user->privChair) { $tagopt["xxxb"] = null; $tagopt["da"] = "Clear twiddle"; $tagopt["cr"] = "Calculate rank"; $tagextra["onchange"] = "plactions_dofold()"; Ht::stash_script("plactions_dofold()", "plactions_dofold"); } // tag name cell $t = ""; if ($user->privChair) { $t .= '<span class="fx99"><a class="q" href="#" onclick="return fold(\'placttags\')">' . expander(null, 0) . "</a></span>"; } $t .= 'tag<span class="fn99">(s)</span> ' . Ht::entry("tag", $qreq->tag, ["size" => 15, "onfocus" => "autosub('tag',this)", "class" => "wantcrpfocus"]) . ' ' . Ht::submit("fn", "Go", ["value" => "tag", "onclick" => "return plist_submit.call(this)"]); if ($user->privChair) { $t .= "<div class='fx'><div style='margin:2px 0'>" . Ht::checkbox("tagcr_gapless", 1, $qreq->tagcr_gapless, array("style" => "margin-left:0")) . " " . Ht::label("Gapless order") . "</div>" . "<div style='margin:2px 0'>Using: " . Ht::select("tagcr_method", PaperRank::methods(), $qreq->tagcr_method) . "</div>" . "<div style='margin:2px 0'>Source tag: ~" . Ht::entry("tagcr_source", $qreq->tagcr_source, array("size" => 15)) . "</div></div>"; } $actions[] = [500, "tag", "Tag", "<b>:</b> " . Ht::select("tagfn", $tagopt, $qreq->tagfn, $tagextra) . " ", ["id" => "foldplacttags", "class" => "foldc fold99c", "content" => $t]]; }
function foldbutton($foldtype, $foldnum = 0, $content = "") { $foldnumid = $foldnum ? ",{$foldnum}" : ""; return '<a href="#" class="q" onclick="return fold(\'' . $foldtype . '\',null' . $foldnumid . ')">' . expander(null, $foldnum) . $content . '</a>'; }
private function echo_message_base($name, $description, $hint, $class) { global $Conf; $si = $this->si($name); $rows = $si ? $si->size : 0 ?: 10; $default = $Conf->message_default_html($name); $current = $this->curv($name, $default); $description = '<a class="q" href="#" onclick="return foldup(this,event)">' . expander(null, 0) . $description . '</a>'; echo '<div class="fold', $current == $default ? "c" : "o", '" data-fold="true">', '<div class="', $class, ' childfold" onclick="return foldup(this,event)">', $this->label($name, $description), ' <span class="f-cx fx">(HTML allowed)</span></div>', $hint, Ht::textarea($name, $current, $this->sjs($name, array("class" => "fx", "rows" => $rows, "cols" => 80))), '</div><div class="g"></div>', "\n"; }