Ejemplo n.º 1
0
 public function getSidebar()
 {
     $output = "";
     // TODO some go to tag link
     // TODO navigate this page too
     $output .= "<h2>Navigating statistics</h2>";
     $siblingTags = getSiblingTags($this->tag["position"]);
     if (!empty($siblingTags)) {
         $output .= "<p class='navigation'>";
         if (isset($siblingTags["previous"])) {
             $output .= "<span class='left'><a title='" . $siblingTags["previous"]["tag"] . " " . $siblingTags["previous"]["label"] . "' href='" . href("tag/" . $siblingTags["previous"]["tag"]) . "/statistics'>&lt;&lt; Previous tag</a></span>";
         }
         if (isset($siblingTags["next"])) {
             $output .= "<span class='right'><a title='" . $siblingTags["next"]["tag"] . " " . $siblingTags["next"]["label"] . "' href='" . href("tag/" . $siblingTags["next"]["tag"]) . "/statistics'>Next tag &gt;&gt;</a></span>";
         }
         $output .= "</p>";
     }
     $output .= "<h2>Dependency graphs</h2>";
     $output .= "<p style='margin-left: 1em'>" . printGraphLink($this->tag["tag"], "cluster", "cluster") . "<br>";
     $output .= printGraphLink($this->tag["tag"], "force", "force-directed") . "<br>";
     $output .= printGraphLink($this->tag["tag"], "collapsible", "collapsible") . "<br>";
     return $output;
 }
Ejemplo n.º 2
0
 public function getSidebar()
 {
     $value = "";
     $value .= "<h2>Navigating results</h2>";
     $value .= $this->printNavigation();
     $value .= "<h2>Your location</h2>";
     $value .= $this->printLocation();
     $value .= "<h2 id='citation-header' class='more'>How can you cite this tag?</h2>";
     $value .= $this->printCitation();
     $value .= "<h2>Extras</h2>";
     $value .= "<ul id='extras'>";
     $value .= "<li><a href='" . href("tag/" . $this->tag["tag"] . "/statistics") . "'>statistics</a></li>";
     // only print this when it makes sense
     if (!in_array($this->tag["type"], array("item", "equation", "section", "subsection", "chapter"))) {
         $value .= "<li><a href='" . href("tag/" . $this->tag["tag"] . "/history") . "'>history</a></li>";
     }
     if (in_array($this->tag["type"], array("section", "subsection", "chapter"))) {
         $value .= "<li id='dependency-graphs'><p>dependency graphs:<p>The dependency graphs of a " . $this->tag["type"] . " are not interesting, to see the dependency graphs of a tag in this section click on the identifier of a lemma, definition, etc.";
     } else {
         $value .= "<li id='dependency-graphs'>dependency graphs:<br><br>";
         $value .= printGraphLink($this->tag["tag"], "cluster", "cluster") . "<br>";
         $value .= printGraphLink($this->tag["tag"], "force", "force-directed") . "<br>";
         $value .= printGraphLink($this->tag["tag"], "collapsible", "collapsible") . "<br>";
         $value .= "</li>";
     }
     $value .= "</ul>";
     return $value;
 }