Finishing updates to make PHPCI use Bootstrap v3, as per issue #99
This commit is contained in:
parent
a053c44b75
commit
eac86ff2bd
|
@ -262,13 +262,15 @@ class ProjectController extends \PHPCI\Controller
|
|||
$field->setPattern('^(github|bitbucket|remote|local)');
|
||||
$field->setOptions($options);
|
||||
$field->setLabel('Where is your project hosted?');
|
||||
$field->setClass('col-lg-4 form-control');
|
||||
$field->setClass('form-control');
|
||||
$field->setContainerClass('form-group');
|
||||
$form->addField($field);
|
||||
|
||||
if (isset($_SESSION['github_token'])) {
|
||||
$field = new Form\Element\Select('github');
|
||||
$field->setLabel('Choose a Github repository:');
|
||||
$field->setClass('col-lg-4 form-control');
|
||||
$field->setClass('form-control');
|
||||
$field->setContainerClass('form-group');
|
||||
$field->setOptions($this->getGithubRepositories());
|
||||
$form->addField($field);
|
||||
}
|
||||
|
@ -302,19 +304,22 @@ class ProjectController extends \PHPCI\Controller
|
|||
$field->setRequired(true);
|
||||
$field->setValidator($referenceValidator);
|
||||
$field->setLabel('Repository Name / URL (Remote) or Path (Local)');
|
||||
$field->setClass('col-lg-4 form-control');
|
||||
$field->setClass('form-control');
|
||||
$field->setContainerClass('form-group');
|
||||
$form->addField($field);
|
||||
|
||||
$field = new Form\Element\Text('title');
|
||||
$field->setRequired(true);
|
||||
$field->setLabel('Project Title');
|
||||
$field->setClass('col-lg-4 form-control');
|
||||
$field->setClass('form-control');
|
||||
$field->setContainerClass('form-group');
|
||||
$form->addField($field);
|
||||
|
||||
$field = new Form\Element\TextArea('key');
|
||||
$field->setRequired(false);
|
||||
$field->setLabel('Private key to use to access repository (leave blank for local and/or anonymous remotes)');
|
||||
$field->setClass('col-lg-7 form-control');
|
||||
$field->setClass('form-control');
|
||||
$field->setContainerClass('form-group');
|
||||
$field->setRows(6);
|
||||
$form->addField($field);
|
||||
|
||||
|
|
|
@ -48,12 +48,14 @@ class SessionController extends \PHPCI\Controller
|
|||
$email->setLabel('Email Address');
|
||||
$email->setRequired(true);
|
||||
$email->setContainerClass('form-group');
|
||||
$email->setClass('form-control');
|
||||
$form->addField($email);
|
||||
|
||||
$pwd = new b8\Form\Element\Password('password');
|
||||
$pwd->setLabel('Password');
|
||||
$pwd->setRequired(true);
|
||||
$pwd->setContainerClass('form-group');
|
||||
$pwd->setClass('form-control');
|
||||
$form->addField($pwd);
|
||||
|
||||
$pwd = new b8\Form\Element\Submit();
|
||||
|
|
|
@ -135,25 +135,29 @@ class UserController extends \PHPCI\Controller
|
|||
$field = new Form\Element\Email('email');
|
||||
$field->setRequired(true);
|
||||
$field->setLabel('Email Address');
|
||||
$field->setClass('span4');
|
||||
$field->setClass('form-control');
|
||||
$field->setContainerClass('form-group');
|
||||
$form->addField($field);
|
||||
|
||||
$field = new Form\Element\Text('name');
|
||||
$field->setRequired(true);
|
||||
$field->setLabel('Name');
|
||||
$field->setClass('span4');
|
||||
$field->setClass('form-control');
|
||||
$field->setContainerClass('form-group');
|
||||
$form->addField($field);
|
||||
|
||||
$field = new Form\Element\Password('password');
|
||||
$field->setRequired(true);
|
||||
$field->setLabel('Password' . ($type == 'edit' ? ' (leave blank to keep current password)' : ''));
|
||||
$field->setClass('span4');
|
||||
$field->setClass('form-control');
|
||||
$field->setContainerClass('form-group');
|
||||
$form->addField($field);
|
||||
|
||||
$field = new Form\Element\Checkbox('admin');
|
||||
$field->setRequired(false);
|
||||
$field->setCheckedValue(1);
|
||||
$field->setLabel('Is this user an administrator?');
|
||||
$field->setContainerClass('form-group');
|
||||
$form->addField($field);
|
||||
|
||||
$field = new Form\Element\Submit();
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="col-lg-8">
|
||||
<?php print str_replace(array('span7', 'control-group'), array('col-lg-7', 'form-group'), $form); ?>
|
||||
<?php print $form; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -3,25 +3,23 @@
|
|||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="span3">
|
||||
<div class="well" style="padding: 8px 0">
|
||||
<ul class="nav nav-list">
|
||||
<div class="col-lg-3">
|
||||
<ul class="nav nav-pills nav-stacked">
|
||||
<li><a href="<?= PHPCI_URL ?>"><i class="icon-home"></i> Dashboard</a></li>
|
||||
<li><a href="<?= PHPCI_URL ?>user"><i class="icon-user"></i> Users</a></li>
|
||||
<li class="active"><a href="<?= PHPCI_URL ?>user"><i class="icon-user"></i> Users</a></li>
|
||||
<?php if($this->User()->getIsAdmin()): ?>
|
||||
<li><a href="<?= PHPCI_URL ?>user/add"><i class="icon-plus-sign"></i> Add User</a></li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="span9">
|
||||
<div class="col-lg-9">
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Email Address</th>
|
||||
<th>Name</th>
|
||||
<th>Administrator</th>
|
||||
<th style="width: 1%"></th>
|
||||
<th style="width: 100px"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -47,8 +45,8 @@
|
|||
<td>
|
||||
<?php if($this->User()->getIsAdmin()): ?>
|
||||
<div class="btn-group">
|
||||
<a class="btn" href="<?= PHPCI_URL ?>user/edit/<?php print $user->getId(); ?>">Edit</a>
|
||||
<button class="btn dropdown-toggle" data-toggle="dropdown">
|
||||
<a class="btn btn-default btn-small" href="<?= PHPCI_URL ?>user/edit/<?php print $user->getId(); ?>">Edit</a>
|
||||
<button class="btn btn-default btn-small dropdown-toggle" data-toggle="dropdown">
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="span4">
|
||||
<div class="col-lg-4">
|
||||
<div class="well" style="">
|
||||
<?php if($type == 'add'): ?>
|
||||
<p>Fill in the form to the right to add a new user.</p>
|
||||
|
@ -12,7 +12,7 @@
|
|||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="span8">
|
||||
<div class="col-lg-8">
|
||||
<?php print $form; ?>
|
||||
</div>
|
||||
</div>
|
|
@ -43,29 +43,6 @@ $conf['b8']['view']['path'] = dirname(__FILE__) . '/PHPCI/View/';
|
|||
|
||||
$config = new b8\Config($conf);
|
||||
|
||||
if (file_exists(APPLICATION_PATH . 'config.php')) {
|
||||
require(APPLICATION_PATH . 'config.php');
|
||||
|
||||
$conf = $config->get(null);
|
||||
unset($conf['b8']['app']);
|
||||
unset($conf['b8']['view']);
|
||||
|
||||
$conf['phpci']['url'] = $conf['install_url'];
|
||||
|
||||
if (isset($conf['github_app'])) {
|
||||
$conf['phpci']['github'] = $conf['github_app'];
|
||||
}
|
||||
|
||||
unset($conf['install_url']);
|
||||
unset($conf['github_app']);
|
||||
|
||||
$dumper = new Symfony\Component\Yaml\Dumper();
|
||||
$yaml = $dumper->dump($conf);
|
||||
|
||||
file_put_contents(APPLICATION_PATH . 'PHPCI/config.yml', $yaml);
|
||||
unlink(APPLICATION_PATH . 'config.php');
|
||||
}
|
||||
|
||||
if (file_exists(APPLICATION_PATH . 'PHPCI/config.yml')) {
|
||||
$config->loadYaml(APPLICATION_PATH . 'PHPCI/config.yml');
|
||||
|
||||
|
|
Loading…
Reference in a new issue