Merge pull request #842 from corpsee/feature-ui-improvements

UI improvements
This commit is contained in:
Marco Vito Moscaritolo 2015-03-25 12:51:10 +01:00
commit 039324c056
15 changed files with 31 additions and 9 deletions

View file

@ -98,12 +98,22 @@ class HomeController extends \PHPCI\Controller
protected function getSummaryHtml($projects)
{
$summaryBuilds = array();
$successes = array();
$failures = array();
$successes = array();
$failures = array();
$counts = array();
foreach ($projects['items'] as $project) {
$summaryBuilds[$project->getId()] = $this->buildStore->getLatestBuilds($project->getId());
$count = $this->buildStore->getWhere(
array('project_id' => $project->getId()),
1,
0,
array(),
array('id' => 'DESC')
);
$counts[$project->getId()] = $count['count'];
$success = $this->buildStore->getLastBuildByStatus($project->getId(), Build::STATUS_SUCCESS);
$failure = $this->buildStore->getLastBuildByStatus($project->getId(), Build::STATUS_FAILED);
@ -112,10 +122,11 @@ class HomeController extends \PHPCI\Controller
}
$summaryView = new b8\View('SummaryTable');
$summaryView->projects = $projects['items'];
$summaryView->builds = $summaryBuilds;
$summaryView->projects = $projects['items'];
$summaryView->builds = $summaryBuilds;
$summaryView->successful = $successes;
$summaryView->failed = $failures;
$summaryView->failed = $failures;
$summaryView->counts = $counts;
return $summaryView->render();
}

View file

@ -86,7 +86,7 @@ class ProjectController extends PHPCI\Controller
$this->view->builds = $builds[0];
$this->view->total = $builds[1];
$this->view->project = $project;
$this->view->branch = urldecode($branch);
$this->view->branch = urldecode($branch);
$this->view->branches = $this->projectStore->getKnownBranches($projectId);
$this->view->page = $page;
$this->view->pages = $pages;

View file

@ -126,6 +126,7 @@ i din foretrukne hosting-platform.',
'all_branches' => 'Alle branches',
'builds' => 'Builds',
'id' => 'ID',
'date' => 'Date',
'project' => 'Projekt',
'commit' => 'Commit',
'branch' => 'Branch',

View file

@ -127,6 +127,7 @@ generiert. Um es zu verwenden, fügen Sie einfach den folgenden Public Key im Ab
'all_branches' => 'Alle Branches',
'builds' => 'Builds',
'id' => 'ID',
'date' => 'Date',
'project' => 'Projekt',
'commit' => 'Commit',
'branch' => 'Branch',

View file

@ -127,6 +127,7 @@ PHPCI',
'all_branches' => 'Όλες οι διακλαδώσεις',
'builds' => 'Κατασκευές',
'id' => 'Αριθμός αναγνώρισης',
'date' => 'Date',
'project' => 'Έργο',
'commit' => 'Συνεισφορά',
'branch' => 'Διακλάδωση',

View file

@ -128,6 +128,7 @@ PHPCI',
'all_branches' => 'All Branches',
'builds' => 'Builds',
'id' => 'ID',
'date' => 'Date',
'project' => 'Project',
'commit' => 'Commit',
'branch' => 'Branch',

View file

@ -127,6 +127,7 @@ PHPCI',
'all_branches' => 'Toutes les branches',
'builds' => 'Builds',
'id' => 'ID',
'date' => 'Date',
'project' => 'Projet',
'commit' => 'Commit',
'branch' => 'Branche',

View file

@ -127,6 +127,7 @@ PHPCI',
'all_branches' => 'Tutti i Branche',
'builds' => 'Builds',
'id' => 'ID',
'date' => 'Data',
'project' => 'Progetto',
'commit' => 'Commit',
'branch' => 'Branch',

View file

@ -127,6 +127,7 @@ van je gekozen source code hosting platform',
'all_branches' => 'Alle brances',
'builds' => 'Builds',
'id' => 'ID',
'date' => 'Datum',
'project' => 'Project',
'commit' => 'Commit',
'branch' => 'Branch',

View file

@ -128,6 +128,7 @@ od wybranego kodu źródłowego platformy hostingowej.',
'all_branches' => 'Wszystkie Gałęzie',
'builds' => 'Budowania',
'id' => 'ID',
'date' => 'Date',
'project' => 'Projekt',
'commit' => 'Commit',
'branch' => 'Gałąź',

View file

@ -126,6 +126,7 @@ PHPCI',
'all_branches' => 'Все ветки',
'builds' => 'Сборки',
'id' => 'ID',
'date' => 'Дата',
'project' => 'Проект',
'commit' => 'Коммит',
'branch' => 'Ветка',

View file

@ -126,6 +126,7 @@ PHPCI',
'all_branches' => 'Усі гілки',
'builds' => 'Збірки',
'id' => 'ID',
'date' => 'Дата',
'project' => 'Проект',
'commit' => 'Комміт',
'branch' => 'Гілка',

View file

@ -39,6 +39,7 @@ switch($build->getStatus())
?>
<tr class="<?php print $cls; ?>">
<td><a href="<?php echo PHPCI_URL ?>build/view/<?php print $build->getId(); ?>">#<?php print str_pad($build->getId(), 6, '0', STR_PAD_LEFT); ?></a></td>
<td><?php print $build->getCreated()->format('Y-m-d H:i:s'); ?></td>
<td><a href="<?php echo PHPCI_URL ?>project/view/<?php print $build->getProjectId(); ?>">
<?php
if (is_object($build->getProject())) {

View file

@ -36,13 +36,13 @@
<div class="col-lg-9 col-md-8 col-sm-8">
<div class="box box-primary">
<div class="box-header">
<h3 class="box-title"><?php Lang::out('builds'); ?></h3>
<h3 class="box-title"><?php Lang::out('builds'); ?> (<?php print $total; ?>)</h3>
</div>
<table class="table">
<thead>
<tr>
<th><?php Lang::out('id'); ?></th>
<th><?php Lang::out('date'); ?></th>
<th><?php Lang::out('project'); ?></th>
<th class="hidden-md hidden-sm hidden-xs"><?php Lang::out('commit'); ?></th>
<th><?php Lang::out('branch'); ?></th>

View file

@ -123,7 +123,7 @@ foreach($projects as $project):
<i class="fa fa-<?php print $project->getIcon(); ?>"></i>
</div>
<a href="<?php print PHPCI_URL; ?>project/view/<?php print $project->getId(); ?>" class="small-box-footer small-box-footer-project">
<?php Lang::out('view_project'); ?> <i class="fa fa-arrow-circle-right"></i>
<?php Lang::out('view_project'); ?> (<?php print $counts[$project->getId()]; ?>) <i class="fa fa-arrow-circle-right"></i>
</a>
<?php endif; ?>