Settings UI cleanup
This commit is contained in:
parent
ddd46ba9ad
commit
28292967a8
2 changed files with 55 additions and 59 deletions
|
|
@ -41,7 +41,6 @@ class SettingsController extends Controller
|
|||
$this->view->settings = $this->settings;
|
||||
|
||||
$emailSettings = array();
|
||||
|
||||
if (isset($this->settings['phpci']['email_settings'])) {
|
||||
$emailSettings = $this->settings['phpci']['email_settings'];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,76 +28,73 @@
|
|||
</p>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="box">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h3 class="title">Github Application</h3>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><h3 class="panel-title">Github Application</h3></div>
|
||||
<div class="panel-body">
|
||||
|
||||
<?php
|
||||
$id = null;
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<?php
|
||||
$id = null;
|
||||
|
||||
if (isset($settings['phpci']['github']['id'])) {
|
||||
$id = $settings['phpci']['github']['id'];
|
||||
}
|
||||
if (isset($settings['phpci']['github']['id'])) {
|
||||
$id = $settings['phpci']['github']['id'];
|
||||
}
|
||||
|
||||
$returnTo = PHPCI_URL . 'settings/github-callback';
|
||||
$githubUri = 'https://github.com/login/oauth/authorize?client_id='.$id.'&scope=repo&redirect_uri=' . $returnTo;
|
||||
?>
|
||||
<?php if (!empty($id) && empty($settings['phpci']['github']['token'])): ?>
|
||||
<p class="alert alert-warning clearfix">
|
||||
Before you can start using Github, you need to <a href="<?php echo $githubUri; ?>">sign in</a> and grant PHPCI access to your account.
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
$returnTo = PHPCI_URL . 'settings/github-callback';
|
||||
$githubUri = 'https://github.com/login/oauth/authorize?client_id='.$id.'&scope=repo&redirect_uri=' . $returnTo;
|
||||
?>
|
||||
<?php if (!empty($id) && empty($settings['phpci']['github']['token'])): ?>
|
||||
<p class="alert alert-warning clearfix">
|
||||
Before you can start using Github, you need to <a href="<?php echo $githubUri; ?>">sign in</a> and grant PHPCI access to your account.
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (!empty($id) && !empty($settings['phpci']['github']['token'])): ?>
|
||||
<p class="alert alert-success">
|
||||
PHPCI is successfully linked to Github account
|
||||
<strong>
|
||||
<a href="<?php echo $githubUser['html_url']; ?>"><?php echo $githubUser['name']; ?></a>
|
||||
</strong>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php if (!empty($id) && !empty($settings['phpci']['github']['token'])): ?>
|
||||
<p class="alert alert-success">
|
||||
PHPCI is successfully linked to Github account
|
||||
<strong>
|
||||
<a href="<?php echo $githubUser['html_url']; ?>"><?php echo $githubUser['name']; ?></a>
|
||||
</strong>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-8">
|
||||
<?php print $github; ?>
|
||||
</div>
|
||||
<div class="col-lg-8">
|
||||
<?php print $github; ?>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-4">
|
||||
<div class="panel panel-info">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">Where to find these...</h3>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<div class="panel panel-info">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">Where to find these...</h3>
|
||||
</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<p>If you own the application you would like to use, you can find this information within your
|
||||
<a href="https://github.com/settings/applications">applications</a> settings area.</p>
|
||||
<div class="panel-body">
|
||||
<p>If you own the application you would like to use, you can find this information within your
|
||||
<a href="https://github.com/settings/applications">applications</a> settings area.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h3 class="title">Email Settings</h3>
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">Email Settings</h3>
|
||||
</div>
|
||||
|
||||
<?php if (!isset($settings['phpci']['email_settings'])): ?>
|
||||
<p class="alert alert-warning clearfix">
|
||||
Before PHPCI can send build status emails, you need to configure your SMTP settings below.
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
<div class="panel-body">
|
||||
<?php if (!isset($settings['phpci']['email_settings'])): ?>
|
||||
<p class="alert alert-warning clearfix">
|
||||
Before PHPCI can send build status emails, you need to configure your SMTP settings below.
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
<?php print $emailSettings; ?>
|
||||
|
||||
<div class="col-lg-8">
|
||||
<?php print $emailSettings; ?>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-4">
|
||||
<!-- nothing -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue