function actionBar($mode = null, $prow = null) { global $Me, $Conf; $forceShow = $Me->is_admin_force() ? "&forceShow=1" : ""; $paperArg = "p=*"; $xmode = array(); $listtype = "p"; $goBase = "paper"; if ($mode == "assign") { $goBase = "assign"; } else { if ($mode == "re") { $goBase = "review"; } else { if ($mode == "account") { $listtype = "u"; if ($Me->privChair) { $goBase = "profile"; } else { $prow = null; } } else { if ($wantmode = defval($_REQUEST, "m", defval($_REQUEST, "mode"))) { $xmode["m"] = $wantmode; } } } } $quicklinks_txt = ""; if ($prow) { $id = $listtype === "u" ? $prow->contactId : $prow->paperId; $quicklinks_txt = quicklinks($id, $goBase, $xmode, $listtype); } // collect actions $x = '<table class="vbar"><tr>'; if ($quicklinks_txt) { $x .= $quicklinks_txt; } if ($quicklinks_txt && $Me->privChair && $listtype == "p") { $x .= " <td id=\"trackerconnect\" class=\"nw\"><a id=\"trackerconnectbtn\" href=\"#\" onclick=\"return hotcrp_deadlines.tracker(1)\" class=\"btn btn-default hottooltip\" data-hottooltip=\"Start meeting tracker\">☟</a><td>\n"; } $x .= " <td class='gopaper nw'>" . goPaperForm($goBase, $xmode) . "</td>\n"; return $x . "</tr></table>"; }
function actionBar($mode = "", $prow = null) { global $Me, $Conf, $CurrentList; $forceShow = $Me->is_admin_force() ? "&forceShow=1" : ""; $goBase = "paper"; $paperArg = "p=*"; $xmode = array(); $listtype = "p"; if ($mode == "assign") { $goBase = "assign"; } else { if ($mode == "r" || $mode == "re" || $mode == "review") { $goBase = "review"; } else { if ($mode == "c" || $mode == "comment") { $goBase = "comment"; } else { if ($mode == "contactauthors") { $goBase = "contactauthors"; } else { if ($mode == "account") { $listtype = "u"; if ($Me->privChair) { $goBase = "profile"; } else { $prow = null; } } else { if ($mode == "" && $Me->isPC && $Conf->setting("rev_open")) { $goBase = "review"; } else { if ($wantmode = defval($_REQUEST, "m", defval($_REQUEST, "mode"))) { $xmode["m"] = $wantmode; } } } } } } } $listarg = $forceShow; $quicklinks_txt = ""; if ($prow) { $id = $listtype === "u" ? $prow->email : $prow->paperId; $quicklinks_txt = quicklinks($id, $goBase, $xmode, $listtype); if (isset($CurrentList) && $CurrentList > 0) { $listarg .= "&ls={$CurrentList}"; } } // collect actions $x = "<div class='nvbar'><table class='vbar'><tr><td class='spanner'></td>\n"; if ($quicklinks_txt) { $x .= " <td class='quicklinks nowrap'>" . $quicklinks_txt . "</td>\n"; } $x .= " <td class='gopaper nowrap'>" . goPaperForm($goBase, $xmode) . "</td>\n"; return $x . "</tr></table></div>"; }