123 lines
4.2 KiB
PHTML
123 lines
4.2 KiB
PHTML
<?php if (isset($_GET['saved']) && $_GET['saved'] == 1): ?>
|
|
<p class="alert alert-success" style="margin-bottom: 20px;">
|
|
Your settings have been saved.
|
|
</p>
|
|
<?php endif; ?>
|
|
|
|
<?php if (isset($_GET['saved']) && $_GET['saved'] == 2): ?>
|
|
<p class="alert alert-danger" style="margin-bottom: 20px;">
|
|
Your settings could not be saved, maybe check the permissions of config.yml?
|
|
</p>
|
|
<?php endif; ?>
|
|
|
|
<?php if (!$isWriteable): ?>
|
|
<p class="alert alert-danger" style="margin-bottom: 20px;">
|
|
PHPCI cannot write to your config.yml file, settings may not be saved properly until this is rectified.
|
|
</p>
|
|
<?php endif; ?>
|
|
|
|
<?php if (isset($_GET['linked']) && $_GET['linked'] == 1): ?>
|
|
<p class="alert alert-success" style="margin-bottom: 20px;">
|
|
Your Github account has been linked.
|
|
</p>
|
|
<?php endif; ?>
|
|
|
|
<?php if (isset($_GET['linked']) && $_GET['linked'] == 2): ?>
|
|
<p class="alert alert-danger" style="margin-bottom: 20px;">
|
|
Your Github account could not be linked.
|
|
</p>
|
|
<?php endif; ?>
|
|
|
|
<div class="box box-primary">
|
|
<div class="box-header"><h3 class="box-title">Build Settings</h3></div>
|
|
<div class="box-body clearfix">
|
|
<?php print $buildSettings; ?>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="box box-primary">
|
|
<div class="box-header"><h3 class="box-title">Github Application</h3></div>
|
|
<div class="box-body clearfix">
|
|
|
|
<div class="row">
|
|
<div class="col-lg-12">
|
|
<?php
|
|
$id = null;
|
|
|
|
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; ?>
|
|
|
|
<?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-4">
|
|
<div class="box box-info">
|
|
<div class="box-header">
|
|
<h3 class="box-title">Where to find these...</h3>
|
|
</div>
|
|
|
|
<div class="box-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 box-primary">
|
|
<div class="box-header">
|
|
<h3 class="box-title">Email Settings</h3>
|
|
</div>
|
|
|
|
<div class="box-body clearfix">
|
|
<?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; ?>
|
|
|
|
<?php print $emailSettings; ?>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="box box-primary">
|
|
<div class="box-header">
|
|
<h3 class="box-title">Authentication Settings</h3>
|
|
</div>
|
|
|
|
<div class="box-body clearfix">
|
|
<p class="alert alert-warning clearfix">
|
|
Be careful: This setting disables authentication and uses your current admin account for all actions within phpci with admin rights.
|
|
</p>
|
|
|
|
<?php print $authenticationSettings; ?>
|
|
|
|
</div>
|
|
</div>
|