mirror of
https://github.com/silverstripe/silverstripe-testsession
synced 2024-10-22 14:06:00 +02:00
UNFINISHED Bootstrap theme
This commit is contained in:
parent
bb9994ddca
commit
35872c34c0
@ -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')
|
||||
)
|
||||
);
|
||||
|
||||
|
9
templates/Layout/TestSession_end.ss
Normal file
9
templates/Layout/TestSession_end.ss
Normal 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>
|
19
templates/Layout/TestSession_inprogress.ss
Normal file
19
templates/Layout/TestSession_inprogress.ss
Normal 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
|
2
templates/Layout/TestSession_start.ss
Normal file
2
templates/Layout/TestSession_start.ss
Normal 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
14
templates/TestSession.ss
Normal 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>
|
@ -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>
|
@ -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>
|
||||
|
||||
|
@ -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>
|
Loading…
Reference in New Issue
Block a user