Commit e1be4b8e authored by Kevin Atkinson's avatar Kevin Atkinson

Add tab for user visualizations in exp and project page.

parent f761efa7
......@@ -62,6 +62,13 @@ if ($EXPOSETEMPLATES) {
#
# For the Sajax Interface
#
$USER_VIS_URL = "http://$USERNODE/exp-vis/$pid/$eid/";
$HAVE_USER_VIS = 0;
$whocares = null;
if (CHECKURL($USER_VIS_URL, $whocares)) {
$HAVE_USER_VIS = 1;
}
function FreeNodeHtml()
{
global $this_user, $experiment;
......@@ -87,6 +94,7 @@ function ModifyAnno($newtext)
function Show($which, $arg1, $arg2)
{
global $experiment, $instance, $uid, $TBSUEXEC_PATH, $TBADMINGROUP;
global $USER_VIS_URL;
$pid = $experiment->pid();
$eid = $experiment->eid();
$html = "";
......@@ -227,6 +235,11 @@ function Show($which, $arg1, $arg2)
$html .= " onclick=\"SaveNS();\">";
$html .= "Save</button>\n";
}
elseif ($which == "uservis") {
ob_start();
$html .= "<iframe src=\"$USER_VIS_URL\" width=\"100%\" height=400 id=\"vis-iframe\"></iframe>";
ob_end_clean();
}
return $html;
}
......@@ -693,6 +706,12 @@ if ($instance) {
"id=\"li_anno\" onclick=\"Show('anno');\">".
"Annotation</a></li>\n";
}
if ($HAVE_USER_VIS) {
echo "<li>
<a href=\"#E\" class=topnavbar onfocus=\"this.hideFocus=true;\" ".
"id=\"li_uservis\" onclick=\"Show('uservis');\">".
"User Visualization</a></li>\n";
}
echo "</ul>\n";
echo "</div>\n";
echo "<div align=center id=topnavbarbottom>&nbsp</div>\n";
......
......@@ -109,6 +109,12 @@ if ($PUBSUPPORT) {
}
}
$vis_html = null;
$whocares = null;
if (CHECKURL("http://$USERNODE/proj-vis/$pid/", $whocares)) {
$vis_html = "<iframe src=\"http://$USERNODE/proj-vis/$pid/\" width=\"100%\" height=400 id=\"vis-iframe\"></iframe>";
}
#
# Show number of PCS
#
......@@ -200,6 +206,12 @@ if ($papers_html) {
"id=\"li_papers\" onclick=\"Show('papers');\">".
"Publications</a></li>\n";
}
if ($vis_html) {
echo "<li>
<a href=\"#G\" class=topnavbar onfocus=\"this.hideFocus=true;\" ".
"id=\"li_vis\" onclick=\"Show('vis');\">".
"Visualization</a></li>\n";
}
echo "</ul>\n";
echo "</div>\n";
echo "<div align=center id=topnavbarbottom>&nbsp</div>\n";
......@@ -223,6 +235,9 @@ if ($isadmin && $stats_html) {
if ($papers_html) {
echo "<div class=invisible id=\"div_papers\">$papers_html</div>";
}
if ($vis_html) {
echo "<div class=invisible id=\"div_vis\">$vis_html</div>";
}
SUBPAGEEND();
#
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment