Commit 93eccf05 authored by Robert Ricci's avatar Robert Ricci

Factor spitting collapsible divs into a new function

Since we have two now, might as well
parent 7fe166a1
...@@ -530,18 +530,7 @@ function RedirectLoginPage() ...@@ -530,18 +530,7 @@ function RedirectLoginPage()
function SpitAboutApt() function SpitAboutApt()
{ {
?> SpitCollapsiblePanel("aboutapt","What is Apt?",<<<'ENDBODY'
<div class="panel panel-info">
<div class="panel-heading">
<h5><a data-toggle="collapse" href="#aboutapt">What is Apt? <span class="glyphicon glyphicon-chevron-right pull-right"></span></a></h5>
</div>
<div id="aboutapt" class="panel-collapse collapse">
<div class="panel-body">
<p> <p>
Apt is a testbed facility built around <em>profiles</em>. Apt is a testbed facility built around <em>profiles</em>.
A profile describes an <em>experiment</em>; when you instantiate a profile, A profile describes an <em>experiment</em>; when you instantiate a profile,
...@@ -576,11 +565,31 @@ Apt is funded by the National Science Foundation under award CNS-1338155 and ...@@ -576,11 +565,31 @@ Apt is funded by the National Science Foundation under award CNS-1338155 and
<p> <p>
For help, bug reports, or other questions, come join the <a href="https://groups.google.com/forum/#!forum/apt-users">Discussion Forum</a> For help, bug reports, or other questions, come join the <a href="https://groups.google.com/forum/#!forum/apt-users">Discussion Forum</a>
</p> </p>
ENDBODY
);
}
function SpitCollapsiblePanel($id, $title, $body) {
?>
<div class="panel panel-info">
<div class="panel-heading">
<h5><a data-toggle="collapse" href="#<?php echo $id; ?>"><?php echo $title; ?><span class="glyphicon glyphicon-chevron-right pull-right"></span></a></h5>
</div>
<div id="<?php echo $id; ?>" class="panel-collapse collapse">
<div class="panel-body">
<?php echo $body; ?>
</div> <!-- Panel body --> </div> <!-- Panel body -->
</div> <!-- Collapser --> </div> <!-- Collapser -->
</div> <!-- Panel --> </div> <!-- Panel -->
<? <?php
} }
?> ?>
...@@ -293,21 +293,11 @@ function SPITFORM($formfields, $showverify, $errors) ...@@ -293,21 +293,11 @@ function SPITFORM($formfields, $showverify, $errors)
# Spit information about Apt accounts # Spit information about Apt accounts
# #
function SPITABOUTACCT() { function SPITABOUTACCT() {
?>
<div class="panel panel-info">
<div class="panel-heading">
<h5><a data-toggle="collapse" href="#aboutacct">Do I Need An Account? <span class="glyphicon glyphicon-chevron-right pull-right"></span></a></h5>
</div>
<div id="aboutacct" class="panel-collapse collapse">
<div class="panel-body"> SpitCollapsiblePanel("aboutacct","Do I need an account?",<<<'ENDBODY'
<p>Maybe!</p> <p>Maybe!</p>
</div> ENDBODY
</div> );
</div>
<?php
} }
if (isset($finished) && $finished) { if (isset($finished) && $finished) {
......
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