Пример #1
0
function topicTable($prow, $active = 0)
{
    global $Conf;
    $paperId = $prow ? $prow->paperId : -1;
    // get current topics
    $paperTopic = array();
    $tmap = $Conf->topic_map();
    if ($paperId > 0) {
        $result = Dbl::q("select topicId from PaperTopic where paperId={$paperId}");
        while ($row = edb_row($result)) {
            $paperTopic[$row[0]] = $tmap[$row[0]];
        }
    }
    $allTopics = $active < 0 ? $paperTopic : $tmap;
    if (count($allTopics) == 0) {
        return "";
    }
    $out = '<div class="ctable">';
    $i = 0;
    foreach ($tmap as $tid => $tname) {
        if (!isset($allTopics[$tid])) {
            continue;
        }
        $out .= '<div class="ctelt"><div class="ctelti">';
        $tname = '<span class="topic0">' . htmlspecialchars($tname) . '</span>';
        if ($paperId <= 0 || $active >= 0) {
            $out .= '<table><tr><td class="nw">' . Ht::checkbox_h("top{$tid}", 1, $active > 0 ? isset($_REQUEST["top{$tid}"]) : isset($paperTopic[$tid]), array("disabled" => $active < 0)) . "&nbsp;</td><td>" . Ht::label($tname) . "</td></tr></table>";
        } else {
            $out .= $tname;
        }
        $out .= "</div></div>\n";
        $i++;
    }
    return $out . "</div>";
}
Пример #2
0
if (!$newProfile && $Acct->isPC || $Me->privChair) {
    echo "<table><tr><td>Send mail on: &nbsp;</td>", "<td>", Ht::checkbox_h("watchcomment", 1, !!@$formcj->follow->reviews), "&nbsp;", Ht::label("Reviews and comments for authored or reviewed papers"), "</td></tr>", "<tr><td></td><td>", Ht::checkbox_h("watchcommentall", 1, !!@$formcj->follow->allreviews), "&nbsp;", Ht::label("Reviews and comments for <i>any</i> paper"), "</td></tr>";
    if ($Me->privChair) {
        echo "<tr><td></td><td>", Ht::checkbox_h("watchfinalall", 1, !!@$formcj->follow->allfinal), "&nbsp;", Ht::label("Updates to final versions"), "</td></tr>";
    }
    echo "</table>";
} else {
    echo Ht::checkbox_h("watchcomment", 1, !!@$formcj->follow->reviews), "&nbsp;", Ht::label("Send mail on new comments for authored or reviewed papers");
}
if ($newProfile || $Acct->contactId != $Me->contactId || $Me->privChair) {
    echo '<h3 class="profile">Roles</h3>', "\n", "<table><tr><td class=\"nw\">\n";
    foreach (array("chair" => "PC chair", "pc" => "PC member", "no" => "Not on the PC") as $k => $v) {
        echo Ht::radio_h("pctype", $k, $pcrole === $k, array("id" => "pctype_{$k}", "onchange" => "fold('account',\$\$('pctype_no').checked,1)")), "&nbsp;", Ht::label($v), "<br />\n";
    }
    echo "</td><td><span class='sep'></span></td><td class='nw'>";
    echo Ht::checkbox_h("ass", 1, !!@$formcj->roles->sysadmin), "&nbsp;</td>", "<td>", Ht::label("Sysadmin"), "<br/>", '<div class="hint">Sysadmins and PC chairs have full control over all site operations. Sysadmins need not be members of the PC. There’s always at least one administrator (sysadmin or chair).</div></td></tr></table>', "\n";
}
if ($newProfile || $Acct->isPC || $Me->privChair) {
    echo '<div class="fx1"><div class="g"></div>', "\n";
    echo '<h3 class="profile">Collaborators and other affiliations</h3>', "\n", "<div>Please list potential conflicts of interest. ", $Conf->message_html("conflictdef"), " List one conflict per line.\n    We use this information when assigning reviews.\n    For example: &ldquo;<tt>Ping Yen Zhang (INRIA)</tt>&rdquo;\n    or, for a whole institution, &ldquo;<tt>INRIA</tt>&rdquo;.</div>\n    <textarea name='collaborators' rows='5' cols='50'>", contact_value("collaborators"), "</textarea>\n";
    $topics = $Conf->topic_map();
    if (count($topics)) {
        echo '<div id="topicinterest"><h3 class="profile">Topic interests</h3>', "\n", "<div class='hint'>\n    Please indicate your interest in reviewing papers on these conference\n    topics. We use this information to help match papers to reviewers.</div>\n    <table class='topicinterest'>\n       <tr><td></td><th>Low</th><th style='width:2.2em'>-</th><th style='width:2.2em'>-</th><th style='width:2.2em'>-</th><th>High</th></tr>\n";
        $interests = array(-2, -1.5, -1, -0.5, 0, 1, 2, 3, 4);
        foreach ($topics as $id => $name) {
            echo "      <tr><td class=\"ti_topic\">", htmlspecialchars($name), "</td>";
            $ival = @(int) $formcj->topics->{$id};
            for ($xj = 0; $xj + 1 < count($interests) && $ival > $interests[$xj + 1]; $xj += 2) {
                /* nothing */
            }
            for ($j = 0; $j < count($interests); $j += 2) {
 function echo_editable_html(PaperOptionValue $ov, $reqv, PaperTable $pt)
 {
     $reqv = !!($reqv === null ? $ov->value : $reqv);
     $pt->echo_editable_option_papt($this, Ht::checkbox_h("opt{$this->id}", 1, $reqv) . "&nbsp;" . Ht::label(htmlspecialchars($this->name)));
     echo "</div>\n\n";
     Ht::stash_script("jQuery('#opt{$this->id}_div').click(function(e){if(e.target==this)jQuery(this).find('input').click();})");
 }
Пример #4
0
 function show($prow, $rrows, $rrow, &$options)
 {
     global $Conf, $Opt, $Me, $useRequest;
     if (!$options) {
         $options = array();
     }
     $editmode = defval($options, "edit", false);
     $reviewOrdinal = unparseReviewOrdinal($rrow);
     self::check_review_author_seen($prow, $rrow, $Me);
     if (!$editmode) {
         $rj = $this->unparse_review_json($prow, $rrow, $Me);
         if (get($options, "editmessage")) {
             $rj->message_html = $options["editmessage"];
         }
         $Conf->echoScript("review_form.add_review(" . json_encode($rj) . ");\n");
         return;
     }
     // From here on, edit mode.
     $forceShow = $Me->is_admin_force() ? "&amp;forceShow=1" : "";
     $reviewLinkArgs = "p={$prow->paperId}" . ($rrow ? "&amp;r={$reviewOrdinal}" : "") . "&amp;m=re" . $forceShow;
     $reviewPostLink = hoturl_post("review", $reviewLinkArgs);
     $reviewDownloadLink = hoturl("review", $reviewLinkArgs . "&amp;downloadForm=1" . $forceShow);
     echo Ht::form($reviewPostLink, array("class" => "revcard")), '<div class="aahc">', Ht::hidden_default_submit("default", "");
     if ($rrow) {
         echo Ht::hidden("version", defval($rrow, "reviewEditVersion", 0) + 1);
     }
     echo '<div class="revcard" id="r', $reviewOrdinal, '"><div class="revcard_head">';
     // Links
     if ($rrow) {
         echo '<div class="floatright"><a href="' . hoturl("review", "r={$reviewOrdinal}&amp;text=1" . $forceShow) . '" class="xx">', Ht::img("txt.png", "[Text]", "b"), "&nbsp;<u>Plain text</u></a>", "</div>";
     }
     echo "<h3>";
     if ($rrow) {
         echo '<a href="', hoturl("review", "r={$reviewOrdinal}" . $forceShow), '" class="q">Edit Review';
         if ($rrow->reviewSubmitted) {
             echo "&nbsp;#", $reviewOrdinal;
         }
         echo "</a>";
     } else {
         echo "Write Review";
     }
     echo "</h3>\n";
     $open = $sep = " <span class='revinfo'>";
     $xsep = " <span class='barsep'>·</span> ";
     $showtoken = $rrow && $Me->review_token_cid($prow, $rrow);
     $type = "";
     if ($rrow && $Me->can_view_review_round($prow, $rrow, null)) {
         $type = review_type_icon($rrow->reviewType);
         if ($rrow->reviewRound > 0 && $Me->can_view_review_round($prow, $rrow, null)) {
             $type .= "&nbsp;<span class=\"revround\" title=\"Review round\">" . htmlspecialchars($Conf->round_name($rrow->reviewRound, true)) . "</span>";
         }
     }
     if ($rrow && $Me->can_view_review_identity($prow, $rrow, null) && (!$showtoken || !Contact::is_anonymous_email($rrow->email))) {
         echo $sep, $rrow->reviewBlind ? "[" : "", Text::user_html($rrow), $rrow->reviewBlind ? "]" : "", " &nbsp;", $type;
         $sep = $xsep;
     } else {
         if ($type) {
             echo $sep, $type;
             $sep = $xsep;
         }
     }
     if ($showtoken) {
         echo $sep, "Review token ", encode_token((int) $rrow->reviewToken);
         $sep = $xsep;
     }
     if ($rrow && $rrow->reviewModified > 0 && $Me->can_view_review_time($prow, $rrow)) {
         echo $sep, "Updated ", $Conf->printableTime($rrow->reviewModified);
         $sep = $xsep;
     }
     if ($sep != $open) {
         echo "</span>\n";
     }
     if (defval($options, "editmessage")) {
         echo "<div class='hint'>", defval($options, "editmessage"), "</div>\n";
     }
     // download?
     echo '<hr class="c" />';
     echo "<table class='revoff'><tr>\n      <td><strong>Offline reviewing</strong> &nbsp;</td>\n      <td>Upload form: &nbsp; <input type='file' name='uploadedFile' accept='text/plain' size='30' />\n      &nbsp; ", Ht::submit("uploadForm", "Go"), "</td>\n    </tr><tr>\n      <td></td>\n      <td><a href='{$reviewDownloadLink}'>Download form</a>\n      <span class='barsep'>·</span>\n      <span class='hint'><strong>Tip:</strong> Use <a href='", hoturl("search"), "'>Search</a> or <a href='", hoturl("offline"), "'>Offline reviewing</a> to download or upload many forms at once.</span></td>\n    </tr></table></div>\n";
     // ready?
     $ready = $useRequest ? defval($_REQUEST, "ready") : !($rrow && $rrow->reviewModified && !$rrow->reviewSubmitted);
     // review card
     echo '<div class="revcard_body">';
     // administrator?
     $admin = $Me->allow_administer($prow);
     if ($rrow && !$Me->is_my_review($rrow) && $admin) {
         echo Ht::xmsg("info", "This isn’t your review, but as an administrator you can still make changes.");
     }
     // delegate?
     if ($rrow && !$rrow->reviewSubmitted && $rrow->contactId == $Me->contactId && $rrow->reviewType == REVIEW_SECONDARY) {
         $ndelegated = 0;
         foreach ($rrows as $rr) {
             if ($rr->reviewType == REVIEW_EXTERNAL && $rr->requestedBy == $rrow->contactId) {
                 $ndelegated++;
             }
         }
         if ($ndelegated == 0) {
             $t = "As a secondary reviewer, you can <a href=\"" . hoturl("assign", "p={$rrow->paperId}") . "\">delegate this review to an external reviewer</a>, but if your external reviewer declines to review the paper, you should complete this review yourself.";
         } else {
             if ($rrow->reviewNeedsSubmit == 0) {
                 $t = "A delegated external reviewer has submitted their review, but you can still complete your own if you’d like.";
             } else {
                 $t = "Your delegated external reviewer has not yet submitted a review.  If they do not, you should complete this review yourself.";
             }
         }
         echo Ht::xmsg("info", $t);
     }
     // top save changes
     if ($Me->timeReview($prow, $rrow) || $admin) {
         $buttons = $this->_review_buttons($prow, $rrow, "top", $reviewPostLink);
         echo Ht::actions($buttons, array("class" => "aab", "style" => "margin-top:0"));
     }
     // blind?
     if ($Conf->review_blindness() == Conf::BLIND_OPTIONAL) {
         echo '<div class="revet"><span class="revfn">', Ht::checkbox_h("blind", 1, $useRequest ? defval($_REQUEST, 'blind') : !$rrow || $rrow->reviewBlind), "&nbsp;", Ht::label("Anonymous review"), "</span><hr class=\"c\" /></div>\n", '<div class="revhint">', htmlspecialchars(Conf::$gShortName), " allows either anonymous or open review.  Check this box to submit your review anonymously (the authors won’t know who wrote the review).</div>\n", '<div class="g"></div>', "\n";
     }
     // form body
     $this->webFormRows($Me, $prow, $rrow, $useRequest);
     // review actions
     if ($Me->timeReview($prow, $rrow) || $admin) {
         $buttons = $this->_review_buttons($prow, $rrow, "bottom", $reviewPostLink);
         echo Ht::actions($buttons, array("class" => "aab", "style" => "margin-bottom:0"));
         if ($rrow && $rrow->reviewSubmitted && !$admin) {
             echo '<div class="hint">Only administrators can remove or unsubmit the review at this point.</div>';
         }
     }
     echo "</div></div></div></form>\n\n";
     Ht::stash_script('hiliter_children("form.revcard")', "form_revcard");
 }