Fixing PHPCI so that it'll work in a subdirectory.
This commit is contained in:
parent
b9415316d4
commit
f256db237b
14 changed files with 66 additions and 53 deletions
|
|
@ -7,13 +7,13 @@
|
|||
<div class="span3">
|
||||
<div class="well" style="padding: 8px 0">
|
||||
<ul class="nav nav-list">
|
||||
<li><a href="/"><i class="icon-home"></i> Dashboard</a></li>
|
||||
<li><a href="/project/view/<?php print $build->getProject()->getId(); ?>"><i class="icon-folder-open"></i> <?php print $build->getProject()->getTitle(); ?></a></li>
|
||||
<li><a href="<?= PHPCI_URL ?>"><i class="icon-home"></i> Dashboard</a></li>
|
||||
<li><a href="<?= PHPCI_URL ?>project/view/<?php print $build->getProject()->getId(); ?>"><i class="icon-folder-open"></i> <?php print $build->getProject()->getTitle(); ?></a></li>
|
||||
<li class="divider"></li>
|
||||
<li class="nav-header">Options</li>
|
||||
<li><a href="/build/rebuild/<?php print $build->getId(); ?>"><i class="icon-cog"></i> Rebuild</a></li>
|
||||
<li><a href="<?= PHPCI_URL ?>build/rebuild/<?php print $build->getId(); ?>"><i class="icon-cog"></i> Rebuild</a></li>
|
||||
<?php if($this->User()->getIsAdmin()): ?>
|
||||
<li><a href="javascript:confirmDelete('/build/delete/<?php print $build->getId(); ?>')"><i class="icon-trash"></i> Delete Build</a></li>
|
||||
<li><a href="javascript:confirmDelete('<?= PHPCI_URL ?>build/delete/<?php print $build->getId(); ?>')"><i class="icon-trash"></i> Delete Build</a></li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
@ -69,7 +69,7 @@
|
|||
<?php if($build->getStatus() == 0 || $build->getStatus() == 1 || true): ?>
|
||||
setInterval(function()
|
||||
{
|
||||
$.getJSON('/build/data/<?php print $build->getId(); ?>', updateBuildView);
|
||||
$.getJSON('<?= PHPCI_URL ?>build/data/<?php print $build->getId(); ?>', updateBuildView);
|
||||
}, 10000);
|
||||
<?php endif; ?>
|
||||
|
||||
|
|
|
|||
|
|
@ -31,20 +31,20 @@ switch($build->getStatus())
|
|||
}
|
||||
?>
|
||||
<tr class="<?php print $cls; ?>">
|
||||
<td><a href="/build/view/<?php print $build->getId(); ?>">#<?php print str_pad($build->getId(), 6, '0', STR_PAD_LEFT); ?></a></td>
|
||||
<td><a href="/project/view/<?php print $build->getProjectId(); ?>"><?php print $build->getProject()->getTitle(); ?></a></td>
|
||||
<td><a href="<?= PHPCI_URL ?>build/view/<?php print $build->getId(); ?>">#<?php print str_pad($build->getId(), 6, '0', STR_PAD_LEFT); ?></a></td>
|
||||
<td><a href="<?= PHPCI_URL ?>project/view/<?php print $build->getProjectId(); ?>"><?php print $build->getProject()->getTitle(); ?></a></td>
|
||||
<td><a href="<?php print $build->getCommitLink(); ?>"><?php print $build->getCommitId(); ?></a></td>
|
||||
<td><a href="<?php print $build->getBranchLink(); ?>"><?php print $build->getBranch(); ?></a></td>
|
||||
<td><?php print $status; ?></td>
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
<a class="btn" href="/build/view/<?php print $build->getId(); ?>">View</a>
|
||||
<a class="btn" href="<?= PHPCI_URL ?>build/view/<?php print $build->getId(); ?>">View</a>
|
||||
<?php if($this->User()->getIsAdmin()): ?>
|
||||
<button class="btn dropdown-toggle" data-toggle="dropdown">
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="javascript:confirmDelete('/build/delete/<?php print $build->getId(); ?>');">Delete Build</a></li>
|
||||
<li><a href="javascript:confirmDelete('<?= PHPCI_URL ?>build/delete/<?php print $build->getId(); ?>');">Delete Build</a></li>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@
|
|||
<div class="span3">
|
||||
<div class="well" style="padding: 8px 0">
|
||||
<ul class="nav nav-list">
|
||||
<li><a href="/"><i class="icon-home"></i> Dashboard</a></li>
|
||||
<li><a href="/user"><i class="icon-user"></i> Users</a></li>
|
||||
<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="divider"></li>
|
||||
<li class="nav-header">Projects</li>
|
||||
|
||||
|
|
@ -34,7 +34,7 @@
|
|||
}
|
||||
}
|
||||
?>
|
||||
<li><a href="/project/view/<?php print $project->getId(); ?>"><i class="<?= $status; ?>"></i> <?php print $project->getTitle(); ?></a></li>
|
||||
<li><a href="<?= PHPCI_URL ?>project/view/<?php print $project->getId(); ?>"><i class="<?= $status; ?>"></i> <?php print $project->getTitle(); ?></a></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
@ -61,6 +61,6 @@
|
|||
<script>
|
||||
setInterval(function()
|
||||
{
|
||||
$('#latest-builds').load('/index/latest');
|
||||
$('#latest-builds').load('<?= PHPCI_URL ?>index/latest');
|
||||
}, 10000);
|
||||
</script>
|
||||
|
|
@ -7,24 +7,24 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link href='http://fonts.googleapis.com/css?family=Roboto:400,100,300,500,700,900,300italic' rel='stylesheet' type='text/css'>
|
||||
<link rel="stylesheet" type="text/css" href="/assets/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" type="text/css" href="/assets/css/phpci.css">
|
||||
<link rel="stylesheet" type="text/css" href="<?= PHPCI_URL ?>assets/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" type="text/css" href="<?= PHPCI_URL ?>assets/css/phpci.css">
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
|
||||
<script src="/assets/js/bootstrap.min.js"></script>
|
||||
<script src="/assets/js/phpci.js"></script>
|
||||
<script src="<?= PHPCI_URL ?>assets/js/bootstrap.min.js"></script>
|
||||
<script src="<?= PHPCI_URL ?>assets/js/phpci.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="navbar navbar-fixed-top">
|
||||
<div class="navbar-inner">
|
||||
<div class="container">
|
||||
<a class="brand" href="/">PHPCI <span class="badge badge-important" style="position: relative; top: -3px; margin-left: 10px">1.0 Alpha</span></a>
|
||||
<a class="brand" href="<?= PHPCI_URL ?>">PHPCI <span class="badge badge-important" style="position: relative; top: -3px; margin-left: 10px">1.0 Alpha</span></a>
|
||||
|
||||
<ul class="nav pull-right">
|
||||
<li><a href="/session/logout">Log out</a></li>
|
||||
<li><a href="<?= PHPCI_URL ?>session/logout">Log out</a></li>
|
||||
</ul>
|
||||
|
||||
<?php if($this->User()->getIsAdmin()): ?>
|
||||
<a class="pull-right btn" href="/project/add">Add Project</a>
|
||||
<a class="pull-right btn" href="<?= PHPCI_URL ?>project/add">Add Project</a>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -5,11 +5,9 @@
|
|||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="/assets/css/bootstrap.min.css">
|
||||
<!-- link rel="stylesheet" type="text/css" href="/assets/css/cms.css" -->
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="<?= PHPCI_URL ?>assets/css/bootstrap.min.css">
|
||||
<script src="http://code.jquery.com/jquery-1.8.1.min.js"></script>
|
||||
<script src="/assets/js/bootstrap.min.js"></script>
|
||||
<script src="<?= PHPCI_URL ?>assets/js/bootstrap.min.js"></script>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
|
|
|
|||
|
|
@ -6,15 +6,15 @@
|
|||
<div class="span3">
|
||||
<div class="well" style="padding: 8px 0">
|
||||
<ul class="nav nav-list">
|
||||
<li><a href="/"><i class="icon-home"></i> Dashboard</a></li>
|
||||
<li><a href="/project/view/<?php print $project->getId(); ?>"><i class="icon-folder-open"></i> <?php print $project->getTitle(); ?></a></li>
|
||||
<li><a href="<?= PHPCI_URL ?>"><i class="icon-home"></i> Dashboard</a></li>
|
||||
<li><a href="<?= PHPCI_URL ?>project/view/<?php print $project->getId(); ?>"><i class="icon-folder-open"></i> <?php print $project->getTitle(); ?></a></li>
|
||||
<li class="divider"></li>
|
||||
<li class="nav-header">Options</li>
|
||||
<li><a href="/project/build/<?php print $project->getId(); ?>"><i class="icon-cog"></i> Build Now</a></li>
|
||||
<li><a href="<?= PHPCI_URL ?>project/build/<?php print $project->getId(); ?>"><i class="icon-cog"></i> Build Now</a></li>
|
||||
|
||||
<?php if($this->User()->getIsAdmin()): ?>
|
||||
<li><a href="/project/edit/<?php print $project->getId(); ?>"><i class="icon-edit"></i> Edit Project</a></li>
|
||||
<li><a href="javascript:confirmDelete('/project/delete/<?php print $project->getId(); ?>')"><i class="icon-trash"></i> Delete Project</a></li>
|
||||
<li><a href="<?= PHPCI_URL ?>project/edit/<?php print $project->getId(); ?>"><i class="icon-edit"></i> Edit Project</a></li>
|
||||
<li><a href="javascript:confirmDelete('<?= PHPCI_URL ?>project/delete/<?php print $project->getId(); ?>')"><i class="icon-trash"></i> Delete Project</a></li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
@ -61,14 +61,14 @@
|
|||
$pages = ceil($total / 10);
|
||||
$pages = $pages == 0 ? 1 : $pages;
|
||||
|
||||
print '<li class="'.($page == 1 ? 'disabled' : '').'"><a href="/project/view/'.$project->getId().'?p='.($page == 1 ? '1' : $page - 1).'">«</a></li>';
|
||||
print '<li class="'.($page == 1 ? 'disabled' : '').'"><a href="<?= PHPCI_URL ?>project/view/'.$project->getId().'?p='.($page == 1 ? '1' : $page - 1).'">«</a></li>';
|
||||
|
||||
for($i = 1; $i <= $pages; $i++)
|
||||
{
|
||||
print '<li><a href="/project/view/' . $project->getId() . '?p=' . $i . '">' . $i . '</a></li>';
|
||||
print '<li><a href="<?= PHPCI_URL ?>project/view/' . $project->getId() . '?p=' . $i . '">' . $i . '</a></li>';
|
||||
}
|
||||
|
||||
print '<li class="'.($page == $pages ? 'disabled' : '').'"><a href="/project/view/'.$project->getId().'?p='.($page == $pages ? $pages : $page + 1).'">»</a></li>';
|
||||
print '<li class="'.($page == $pages ? 'disabled' : '').'"><a href="<?= PHPCI_URL ?>project/view/'.$project->getId().'?p='.($page == $pages ? $pages : $page + 1).'">»</a></li>';
|
||||
|
||||
print '</ul></div>';
|
||||
|
||||
|
|
@ -80,7 +80,7 @@
|
|||
<script>
|
||||
setInterval(function()
|
||||
{
|
||||
$('#latest-builds').load('/project/builds/<?php print $project->getId(); ?>');
|
||||
$('#latest-builds').load('<?= PHPCI_URL ?>project/builds/<?php print $project->getId(); ?>');
|
||||
}, 10000);
|
||||
</script>
|
||||
<?php endif; ?>
|
||||
|
|
@ -6,10 +6,10 @@
|
|||
<div class="span3">
|
||||
<div class="well" style="padding: 8px 0">
|
||||
<ul class="nav nav-list">
|
||||
<li><a href="/"><i class="icon-home"></i> Dashboard</a></li>
|
||||
<li><a href="/user"><i class="icon-user"></i> Users</a></li>
|
||||
<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>
|
||||
<?php if($this->User()->getIsAdmin()): ?>
|
||||
<li><a href="/user/add"><i class="icon-plus-sign"></i> Add User</a></li>
|
||||
<li><a href="<?= PHPCI_URL ?>user/add"><i class="icon-plus-sign"></i> Add User</a></li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
@ -41,18 +41,18 @@
|
|||
}
|
||||
?>
|
||||
<tr class="<?php print $cls; ?>">
|
||||
<td><a href="/user/edit/<?php print $user->getId(); ?>"><?php print $user->getEmail(); ?></a></td>
|
||||
<td><a href="<?= PHPCI_URL ?>user/edit/<?php print $user->getId(); ?>"><?php print $user->getEmail(); ?></a></td>
|
||||
<td><?php print $user->getName(); ?></td>
|
||||
<td><?php print $status; ?></td>
|
||||
<td>
|
||||
<?php if($this->User()->getIsAdmin()): ?>
|
||||
<div class="btn-group">
|
||||
<a class="btn" href="/user/edit/<?php print $user->getId(); ?>">Edit</a>
|
||||
<a class="btn" href="<?= PHPCI_URL ?>user/edit/<?php print $user->getId(); ?>">Edit</a>
|
||||
<button class="btn dropdown-toggle" data-toggle="dropdown">
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="javascript:confirmDelete('/user/delete/<?php print $user->getId(); ?>');">Delete User</a></li>
|
||||
<li><a href="javascript:confirmDelete('<?= PHPCI_URL ?>user/delete/<?php print $user->getId(); ?>');">Delete User</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue