예제 #1
0
 function render($sv)
 {
     global $Conf;
     // Tags
     $tagger = new Tagger();
     echo "<h3 class=\"settings\">Tags</h3>\n";
     echo "<table class=\"secondary-settings\"><tbody>";
     $sv->set_oldv("tag_chair", join(" ", array_keys(TagInfo::chair_tags())));
     $sv->echo_entry_row("tag_chair", "Chair-only tags", "PC members can view these tags, but only administrators can change them.");
     $sv->set_oldv("tag_sitewide", join(" ", array_keys(TagInfo::sitewide_tags())));
     if ($sv->newv("tag_sitewide") || $Conf->has_any_manager()) {
         $sv->echo_entry_row("tag_sitewide", "Site-wide tags", "Chairs and administrators can view and change these tags for every paper.");
     }
     $sv->set_oldv("tag_approval", join(" ", array_keys(TagInfo::approval_tags())));
     $sv->echo_entry_row("tag_approval", "Approval voting tags", "<a href=\"" . hoturl("help", "t=votetags") . "\">What is this?</a>");
     $x = [];
     foreach (TagInfo::vote_tags() as $n => $v) {
         $x[] = "{$n}#{$v}";
     }
     $sv->set_oldv("tag_vote", join(" ", $x));
     $sv->echo_entry_row("tag_vote", "Allotment voting tags", "“vote#10” declares an allotment of 10 votes per PC member. <span class=\"barsep\">·</span> <a href=\"" . hoturl("help", "t=votetags") . "\">What is this?</a>");
     $sv->set_oldv("tag_rank", $Conf->setting_data("tag_rank", ""));
     $sv->echo_entry_row("tag_rank", "Ranking tag", "The <a href='" . hoturl("offline") . "'>offline reviewing page</a> will expose support for uploading rankings by this tag. <span class='barsep'>·</span> <a href='" . hoturl("help", "t=ranking") . "'>What is this?</a>");
     echo "</tbody></table>";
     echo "<div class='g'></div>\n";
     $sv->echo_checkbox('tag_seeall', "PC can see tags for conflicted papers");
     preg_match_all('_(\\S+)=(\\S+)_', $Conf->setting_data("tag_color", ""), $m, PREG_SET_ORDER);
     $tag_colors = array();
     foreach ($m as $x) {
         $tag_colors[TagInfo::canonical_color($x[2])][] = $x[1];
     }
     $tag_colors_rows = array();
     foreach (explode("|", TagInfo::BASIC_COLORS) as $k) {
         if ($sv->use_req()) {
             $v = defval($sv->req, "tag_color_{$k}", "");
         } else {
             if (isset($tag_colors[$k])) {
                 $v = join(" ", $tag_colors[$k]);
             } else {
                 $v = "";
             }
         }
         $tag_colors_rows[] = "<tr class='k0 {$k}tag'><td class='lxcaption'></td><td class='lxcaption taghl'>{$k}</td><td class='lentry' style='font-size: 10.5pt'><input type='text' name='tag_color_{$k}' value=\"" . htmlspecialchars($v) . "\" size='40' /></td></tr>";
         /* MAINSIZE */
     }
     preg_match_all('_(\\S+)=(\\S+)_', $Conf->setting_data("tag_badge", ""), $m, PREG_SET_ORDER);
     $tag_badges = array();
     foreach ($m as $x) {
         $tag_badges[$x[2]][] = $x[1];
     }
     foreach (["black" => "black label", "red" => "red label", "green" => "green label", "blue" => "blue label", "white" => "white label"] as $k => $desc) {
         if ($sv->use_req()) {
             $v = defval($sv->req, "tag_badge_{$k}", "");
         } else {
             if (isset($tag_badges[$k])) {
                 $v = join(" ", $tag_badges[$k]);
             } else {
                 $v = "";
             }
         }
         $tag_colors_rows[] = "<tr class='k0'><td class='lxcaption'></td><td class='lxcaption'><span class='badge {$k}badge' style='margin:0'>{$desc}</span><td class='lentry' style='font-size:10.5pt'><input type='text' name='tag_badge_{$k}' value=\"" . htmlspecialchars($v) . "\" size='40' /></td></tr>";
         /* MAINSIZE */
     }
     echo Ht::hidden("has_tag_color", 1), '<h3 class="settings g">Styles and colors</h3>', "<div class='hint'>Papers and PC members tagged with a style name, or with one of the associated tags, will appear in that style in lists.</div>", "<div class='smg'></div>", "<table id='foldtag_color'><tr><th colspan='2'>Style name</th><th>Tags</th></tr>", join("", $tag_colors_rows), "</table>\n";
     echo '<h3 class="settings g">Tracks</h3>', "\n";
     echo "<div class='hint'>Tracks control the PC members allowed to view or review different sets of papers. <span class='barsep'>·</span> <a href=\"" . hoturl("help", "t=tracks") . "\">What is this?</a></div>", Ht::hidden("has_tracks", 1), "<div class=\"smg\"></div>\n";
     $this->do_track($sv, "", 0);
     $tracknum = 2;
     $trackj = $Conf->setting_json("tracks") ?: (object) array();
     // existing tracks
     foreach ($trackj as $trackname => $x) {
         if ($trackname !== "_") {
             $this->do_track($sv, $trackname, $tracknum);
             ++$tracknum;
         }
     }
     // new tracks (if error prevented saving)
     if ($sv->use_req()) {
         for ($i = 1; isset($sv->req["name_track{$i}"]); ++$i) {
             $trackname = trim($sv->req["name_track{$i}"]);
             if (!isset($trackj->{$trackname})) {
                 $this->do_track($sv, $trackname, $tracknum);
                 ++$tracknum;
             }
         }
     }
     // catchall track
     $this->do_track($sv, "_", 1);
     echo Ht::button("Add track", array("onclick" => "settings_add_track()"));
 }
예제 #2
0
function tags()
{
    global $Conf, $Me;
    // get current tag settings
    $chairtags = "";
    $votetags = "";
    $conflictmsg1 = "";
    $conflictmsg2 = "";
    $conflictmsg3 = "";
    $setting = "";
    if ($Me->isPC) {
        $ct = array_keys(TagInfo::chair_tags());
        if (count($ct)) {
            sort($ct);
            $chairtags = " (currently ";
            foreach ($ct as $c) {
                $chairtags .= "“<a href=\"" . hoturl("search", "q=%23{$c}") . "\">{$c}</a>”, ";
            }
            $chairtags = substr($chairtags, 0, strlen($chairtags) - 2) . ")";
        }
        $votetags = _currentVoteTags();
        if ($Me->privChair) {
            $setting = "  (<a href='" . hoturl("settings", "group=tags") . "'>Change this setting</a>)";
        }
        if ($Conf->setting("tag_seeall") > 0) {
            $conflictmsg3 = "Currently PC members can see tags for any paper, including conflicts.";
        } else {
            $conflictmsg1 = " or conflicted PC members";
            $conflictmsg2 = "  However, since PC members currently can’t see tags for conflicted papers, each PC member might see a different list." . $setting;
            $conflictmsg3 = "They are currently hidden from conflicted PC members&mdash;for instance, if a PC member searches for a tag, the results will never include conflicts.";
        }
    }
    _subhead("", "\n<p>PC members and administrators can attach tag names to papers.\nIt’s easy to add and remove tags and to list all papers with a given tag,\nand <em>ordered</em> tags preserve a particular paper order.\nTags also affect color highlighting in paper lists.</p>\n\n<p>Tags are generally visible to the PC.\nThey are never shown to authors{$conflictmsg1}.\n<em>Twiddle tags</em>, with names like “#~tag”, are visible only\nto their creators.  Tags with two twiddles, such as “#~~tag”, are\nvisible only to PC chairs.</p>");
    _subhead("Finding tags", "\n<p>A paper’s tags are shown like this on the paper page:</p>\n\n<div class='pspcard_container' style='position:static'><div class='pspcard'><div class='pspcard_body'>\n<div class='psc psc1'>\n <div class='pst'>\n  <span class='psfn'>Tags</span>\n  <span class='pstedit'><a class='xx'><span style='display:inline-block;position:relative;width:15px'>" . Ht::img("edit.png", "[Edit]", "bmabs") . "</span>&nbsp;<u class='x'>Edit</u></a></span>\n  <hr class='c' /></div>\n<div class='psv'><div class='taghl'>#earlyaccept</div></div></div>\n</div></div></div><hr class='c' />\n\n<p>To find all papers with tag “#discuss”:&nbsp; " . _searchForm("#discuss") . "</p>\n\n<p>You can also search with “" . _searchLink("show:tags") . "” to see each\npaper’s tags, or “" . _searchLink("show:#tagname") . "” to see a particular tag\nas a column.</p>\n\n<p>Tags are only shown to PC members and administrators.\n{$conflictmsg3}{$setting}\nAdditionally, twiddle tags, which have names like “#~tag”, are\nvisible only to their creators; each PC member has an independent set.\nTags are not case sensitive.</p>");
    _subhead("<a name='changing'>Changing tags</a>", "\n<p>To change a paper’s tags, go to the paper page and select the Tags box’s " . Ht::img("edit.png", "[Edit]") . "&nbsp;Edit\nlink. Then enter one or more alphanumeric tags separated by spaces.</p>\n\n<p>" . Ht::img("extagsset.png", "[Tag entry on review screen]") . "</p>\n\n<p>To set tags from\n<a href='" . hoturl("search") . "'>search</a>, you can select papers and\nuse the action area:</p>\n\n<p>" . Ht::img("extagssearch.png", "[Setting tags on the search page]") . "</p>\n\n<p><b>Add</b> adds tags to the selected papers, <b>Remove</b> removes tags\nfrom the selected papers, and <b>Define</b> adds the tag to the selected\npapers and removes it from all others.  The chair-only <b>Clear twiddle</b>\naction removes a tag and all users’ matching twiddle tags.</p></li>\n\n<p>You can also edit tags directly on the search page. Search for “" . _searchLink("edit:tag:tagname") . "” to\nget a column of checkboxes; checked papers are given the “#tagname” tag.\nSearch for “" . _searchLink("edit:tagval:tagname") . "” to set <a\nhref='#values'>tag values</a>. Or search for “" . _searchLink("edit:tags") . "” to edit papers’ full tag lists.</p>\n\n<p>Finally, the chair may upload tag assignments using the <a href='" . hoturl("bulkassign") . "'>bulk assignment page</a>.</p>\n\n<p>Although any PC member can view or search\nmost tags, certain tags may be changed only by PC chairs{$chairtags}.  {$setting}</p>");
    _subhead("<a id='values'>Tag values and discussion orders</a>", "\n<p>Tags have optional numeric values, which are displayed as\n“#tag#100”. Search for “" . _searchLink("order:tag") . "” to sort tagged\npapers by value. You can also search for specific values with search terms\nlike “" . _searchLink("#discuss#2") . "” or “" . _searchLink("#discuss>1") . "”.</p>\n\n<p>It’s common to assign increasing tag values to a set of papers.  Do this\nusing the <a href='" . hoturl("search") . "'>search screen</a>.  Search for the\npapers you want, sort them into the right order, select their checkboxes, and\nchoose <b>Define order</b> in the tag action area.  If no sort gives what\nyou want, search for the desired paper numbers in order—for instance,\n“" . _searchLink("4 1 12 9") . "”—then <b>Select all</b> and <b>Define\norder</b>. To add new papers at the end of an existing discussion order, use\n<b>Add to order</b>. To insert papers into an existing order, use <b>Add to\norder</b> with a tag value; for example, to insert starting at value 5, use\n<b>Add to order</b> with “#tag#5”.  The rest of the order is renumbered to\naccomodate the insertion.</p>\n\n<p>Even easier, you can <em>drag</em> papers into order using a search like “" . _searchLink("editsort:#tag") . "”.</p>\n\n<p><b>Define order</b> might assign values “#tag#1”,\n“#tag#3”, “#tag#6”, and “#tag#7”\nto adjacent papers.  The gaps make it harder to infer\nconflicted papers’ positions.  (Any given gap might or might not hold a\nconflicted paper.)  The <b>Define gapless order</b> action assigns\nstrictly sequential values, like “#tag#1”,\n“#tag#2”, “#tag#3”, “#tag#4”.\n<b>Define order</b> is better for most purposes.</p>\n\n<p>The <a href=\"" . hoturl("autoassign", "a=discorder") . "\">autoassigner</a>\nhas special support for creating discussion orders. It tries to group papers\nwith similar PC conflicts, which can make the meeting run smoother.</p>");
    _subhead("Tag colors", "\n<p>The tag names “red”, “orange”, “yellow”,\n“green”, “blue”, “purple”, and\n“gray” act as highlight colors. For example, papers tagged with\n“#red” will appear red in paper lists (for people who can see that\ntag).  Tag a paper “#~red” to make it red on your displays, but not\nothers’. Other styles are available; try\n“#bold”, “#italic”, “#big”, “#small”, and “#dim”. System administrators can <a\nhref='" . hoturl("settings", "group=tags") . "'>associate other tags with colors</a>\nso that, for example, “" . _searchLink("#reject") . "” papers show up as\ngray.</p>");
    _subhead("Using tags", "\n<p>Here are some example ways to use tags.</p>\n\n<ul>\n\n<li><strong>Skip low-ranked submissions at the PC meeting.</strong> Mark\nlow-ranked submissions with tag “#nodiscuss”, then ask the PC to " . _searchLink("#nodiscuss", "search for “#nodiscuss”") . " (“" . _searchLink("tag:nodiscuss") . "” also works). PC members can check the list\nfor papers they’d like to discuss anyway. They can email the chairs about\nsuch papers, or, even easier, add a “#discussanyway” tag. (You might make the\n“#nodiscuss” tag chair-only so an evil PC member couldn’t add it to a\nhigh-ranked paper, but it’s usually better to trust the PC.)</li>\n\n<li><strong>Mark controversial papers that would benefit from additional review.</strong>\n PC members could add the “#controversy” tag when the current reviewers disagree.\n A <a href='" . hoturl("search", "q=%23controversy") . "'>search</a> shows where the PC thinks more review is needed.</li>\n\n<li><strong>Mark PC-authored papers for extra scrutiny.</strong>\n First, <a href='" . hoturl("search", "t=s&amp;qt=au") . "'>search for PC members’ last names in author fields</a>.\n Check for accidental matches and select the papers with PC members as authors, then use the action area below the search list to add the tag “#pcpaper”.\n A <a href='" . hoturl("search", "t=s&amp;qx=%23pcpaper") . "'>search</a> shows papers without PC authors.\n (Since PC members can see whether a paper is tagged “#pcpaper”, you may want to delay defining the tag until just before the meeting.)</li>\n\n<li><strong>Vote for papers.</strong>\n The chair can define special voting tags{$votetags}{$setting}.\n Each PC member is assigned an allotment of votes to distribute among papers.\n For instance, if “#v” were a voting tag with an allotment of 10, then a PC member could assign 5 votes to a paper by adding the twiddle tag “#~v#5”.\n The system automatically sums PC members’ votes into the public “#v” tag.\n To search for papers by vote count, search for “<a href='" . hoturl("search", "t=s&amp;q=rorder:v") . "'>rorder:v</a>”. (<a href='" . hoturl("help", "t=votetags") . "'>Learn more</a>)</li>\n\n<li><strong>Rank papers.</strong>\n Each PC member can set tags indicating their preference ranking for papers.\n For instance, a PC member’s favorite paper would get tag “#~rank#1”, the next favorite “#~rank#2”, and so forth.\n The chair can then combine these rankings into a global preference order using a Condorcet method.\n (<a href='" . hoturl("help", "t=ranking") . "'>Learn more</a>)</li>\n\n<li><strong>Define a discussion order for the PC meeting.</strong>\n Publishing the order lets PC members prepare to discuss upcoming papers.\n Define an ordered tag such as “#discuss”, then ask the PC to <a href='" . hoturl("search", "q=order:discuss") . "'>search for “order:discuss”</a>.\n The PC can now see the order and use quick links to go from paper to paper.{$conflictmsg2}</li>\n\n<li><strong>Mark tentative decisions during the PC meeting</strong> either\n using decision selectors or, perhaps, “#accept” and\n “#reject” tags.</li>\n\n</ul>");
}