UNFINISHED Bootstrap theme

This commit is contained in:
Ingo Schommer 2014-05-06 20:49:15 +12:00
parent bb9994ddca
commit 35872c34c0
8 changed files with 52 additions and 87 deletions

View File

@ -44,7 +44,10 @@ class TestSessionController extends Controller {
);
if(!$canAccess) return Security::permissionFailure($this);
Requirements::css('//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css');
Requirements::css('//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap-theme.min.css');
Requirements::javascript('framework/thirdparty/jquery/jquery.js');
Requirements::javascript('//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js');
Requirements::javascript('testsession/javascript/testsession.js');
}
@ -54,9 +57,9 @@ class TestSessionController extends Controller {
public function index() {
if($this->environment->isRunningTests()) {
return $this->renderWith('TestSession_inprogress');
return $this->renderWith('TestSession', 'TestSession_inprogress');
} else {
return $this->renderWith('TestSession_start');
return $this->renderWith(array('TestSession', 'TestSession_start'));
}
}
@ -109,7 +112,7 @@ class TestSessionController extends Controller {
$this->environment->loadFixtureIntoDb($fixtureFile);
}
return $this->renderWith('TestSession_inprogress');
return $this->renderWith('TestSession', 'TestSession_inprogress');
}
/**
@ -161,7 +164,8 @@ class TestSessionController extends Controller {
'StartForm',
$fields,
new FieldList(
new FormAction('start', 'Start Session')
FormAction::create('start', 'Start Session')
->addExtraClass('btn btn-primary btn-lg')
)
);

View File

@ -0,0 +1,9 @@
<p>Test session ended.</p>
<ul>
<li>
<a id="home-link" href="$BaseHref">Return to your site</a>
</li>
<li>
<a id="start-link" href="$Link">Start a new test session</a>
</li>
</ul>

View File

@ -0,0 +1,19 @@
<!-- SUCCESS: DBNAME=$DatabaseName -->
<p>
Test session in progress.
<a id="end-session" href="$Link(end)">Click here to end it.</a>
</p>
<p>Where would you like to start?</p>
<ul>
<li>
<a id="home-link" href="$BaseHref">Homepage - published site</a>
</li>
<li>
<a id="draft-link" href="$BaseHref/?stage=Stage">Homepage - draft site</a>
</li>
<li>
<a id="admin-link" href="$BaseHref/admin/">CMS Admin</a>
</li>
</ul>
<% include TestSession_State %>
$ProgressForm

View File

@ -0,0 +1,2 @@
<p>A test session will create a "blank slate" that you can run manual acceptance tests against</p>
$StartForm

14
templates/TestSession.ss Normal file
View File

@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<% base_tag %>
$MetaTags
</head>
<body>
<div class="container">
<h1>SilverStripe TestSession</h1>
$Layout
</div>
</body>
</html>

View File

@ -1,26 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<% base_tag %>
$MetaTags
<% require css('framework/css/debug.css') %>
<% require css('testsession/css/styles.css') %>
</head>
<body>
<div class="info">
<h1>SilverStripe TestSession</h1>
</div>
<div class="content">
<p>Test session ended.</p>
<ul>
<li>
<a id="home-link" href="$BaseHref">Return to your site</a>
</li>
<li>
<a id="start-link" href="$Link">Start a new test session</a>
</li>
</ul>
</div>
</body>
</html>

View File

@ -1,38 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<% base_tag %>
$MetaTags
<% require css('framework/css/debug.css') %>
<% require css('testsession/css/styles.css') %>
</head>
<body>
<div class="info">
<h1>SilverStripe TestSession</h1>
</div>
<div class="content">
<!-- SUCCESS: DBNAME=$DatabaseName -->
<p>
Test session in progress.
<a id="end-session" href="$Link(end)">Click here to end it.</a>
</p>
<p>Where would you like to start?</p>
<ul>
<li>
<a id="home-link" href="$BaseHref">Homepage - published site</a>
</li>
<li>
<a id="draft-link" href="$BaseHref/?stage=Stage">Homepage - draft site</a>
</li>
<li>
<a id="admin-link" href="$BaseHref/admin/">CMS Admin</a>
</li>
</ul>
<% include TestSession_State %>
$ProgressForm
</div>
</body>
</html>

View File

@ -1,19 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<% base_tag %>
$MetaTags
<% require css('framework/css/debug.css') %>
<% require css('testsession/css/styles.css') %>
</head>
<body>
<div class="info">
<h1>SilverStripe TestSession</h1>
</div>
<div class="content">
<p>Start a new test session</p>
$StartForm
</div>
</body>
</html>