From 60267cc31563aae17c3742f59ad7d07ada53127d Mon Sep 17 00:00:00 2001 From: Dmitry Khomutov Date: Thu, 5 Jan 2017 01:24:16 +0700 Subject: [PATCH 01/10] Small updates --- LICENSE.md | 4 ++-- composer.json | 8 ++++---- composer.lock | 17 +++++++++-------- 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/LICENSE.md b/LICENSE.md index 4db5eba9..f1806a62 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,7 +1,7 @@ -PHP Censor Copyright (c) 2016, Corpsee +Copyright (c) 2016, PHP Censor All rights reserved. -PHPCI Copyright (c) 2013, Block 8 Limited +Copyright (c) 2013, PHPCI, Block 8 Limited All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/composer.json b/composer.json index 3cb532e8..54211280 100644 --- a/composer.json +++ b/composer.json @@ -1,14 +1,14 @@ { "name": "corpsee/php-censor", - "description": "Simple continuous integration for PHP projects. PHPCI fork.", + "description": "PHP Censor is a fork of PHPCI and is a open source continuous integration tool specifically designed for PHP", "minimum-stability": "stable", - "type": "library", + "type": "application", "keywords": ["php", "php-censor", "ci", "continuous integration"], "homepage": "https://github.com/corpsee/php-censor", "license": "BSD-2-Clause", "authors": [ { - "name": "Corpsee", + "name": "Dmitry Khomutov", "email": "poisoncorpsee@gmail.com", "homepage": "http://corpsee.com", "role": "PHP Censor developer" @@ -37,7 +37,7 @@ } }, "require": { - "php": ">=5.4.0", + "php": ">=5.6.0", "ext-pdo": "*", "ext-pdo_mysql": "*", diff --git a/composer.lock b/composer.lock index 8fac69f2..1d92b759 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "813fe1e7b00edc029b1137481591822c", + "content-hash": "0a4b95103fb8aa05e609a2a7f5997214", "packages": [ { "name": "bower-asset/admin-lte", @@ -521,23 +521,24 @@ }, { "name": "swiftmailer/swiftmailer", - "version": "v5.4.4", + "version": "v5.4.5", "source": { "type": "git", "url": "https://github.com/swiftmailer/swiftmailer.git", - "reference": "545ce9136690cea74f98f86fbb9c92dd9ab1a756" + "reference": "cd142238a339459b10da3d8234220963f392540c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/545ce9136690cea74f98f86fbb9c92dd9ab1a756", - "reference": "545ce9136690cea74f98f86fbb9c92dd9ab1a756", + "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/cd142238a339459b10da3d8234220963f392540c", + "reference": "cd142238a339459b10da3d8234220963f392540c", "shasum": "" }, "require": { "php": ">=5.3.3" }, "require-dev": { - "mockery/mockery": "~0.9.1" + "mockery/mockery": "~0.9.1", + "symfony/phpunit-bridge": "~3.2" }, "type": "library", "extra": { @@ -570,7 +571,7 @@ "mail", "mailer" ], - "time": "2016-11-24T01:01:23+00:00" + "time": "2016-12-29T10:02:40+00:00" }, { "name": "symfony/config", @@ -2588,7 +2589,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=5.4.0", + "php": ">=5.6.0", "ext-pdo": "*", "ext-pdo_mysql": "*" }, From 6a0a7a0bf20248b5ae28a0ba38a7df432dd008c6 Mon Sep 17 00:00:00 2001 From: Dmitry Khomutov Date: Thu, 5 Jan 2017 01:39:23 +0700 Subject: [PATCH 02/10] Added login by Login or Email --- .../Controller/SessionController.php | 4 +- src/PHPCensor/Store/Base/UserStoreBase.php | 41 +++++++++++++++++-- 2 files changed, 40 insertions(+), 5 deletions(-) diff --git a/src/PHPCensor/Controller/SessionController.php b/src/PHPCensor/Controller/SessionController.php index 51e3afe8..b63d8c84 100644 --- a/src/PHPCensor/Controller/SessionController.php +++ b/src/PHPCensor/Controller/SessionController.php @@ -51,7 +51,7 @@ class SessionController extends Controller } else { unset($_SESSION['login_token']); - $user = $this->userStore->getByEmail($this->getParam('email')); + $user = $this->userStore->getByEmailOrName($this->getParam('email')); if ($user && password_verify($this->getParam('password', ''), $user->getHash())) { session_regenerate_id(true); @@ -69,7 +69,7 @@ class SessionController extends Controller $form->setMethod('POST'); $form->setAction(APP_URL.'session/login'); - $email = new b8\Form\Element\Email('email'); + $email = new b8\Form\Element\Text('email'); $email->setLabel(Lang::get('email_address')); $email->setRequired(true); $email->setContainerClass('form-group'); diff --git a/src/PHPCensor/Store/Base/UserStoreBase.php b/src/PHPCensor/Store/Base/UserStoreBase.php index dd6824e5..fee5fe24 100644 --- a/src/PHPCensor/Store/Base/UserStoreBase.php +++ b/src/PHPCensor/Store/Base/UserStoreBase.php @@ -52,17 +52,23 @@ class UserStoreBase extends Store } /** + * * Get a single User by Email. - * @return null|User + * + * @param string $value + * + * @throws HttpException + * + * @return User */ - public function getByEmail($value, $useConnection = 'read') + public function getByEmail($value) { if (is_null($value)) { throw new HttpException('Value passed to ' . __FUNCTION__ . ' cannot be null.'); } $query = 'SELECT * FROM `user` WHERE `email` = :email LIMIT 1'; - $stmt = Database::getConnection($useConnection)->prepare($query); + $stmt = Database::getConnection()->prepare($query); $stmt->bindValue(':email', $value); if ($stmt->execute()) { @@ -74,6 +80,35 @@ class UserStoreBase extends Store return null; } + /** + * + * Get a single User by Email or Name. + * + * @param string $value + * + * @throws HttpException + * + * @return User + */ + public function getByEmailOrName($value) + { + if (is_null($value)) { + throw new HttpException('Value passed to ' . __FUNCTION__ . ' cannot be null.'); + } + + $query = 'SELECT * FROM `user` WHERE `email` = :value OR `name` = :value LIMIT 1'; + $stmt = Database::getConnection()->prepare($query); + $stmt->bindValue(':value', $value); + + if ($stmt->execute()) { + if ($data = $stmt->fetch(\PDO::FETCH_ASSOC)) { + return new User($data); + } + } + + return null; + } + /** * Get multiple User by Name. * @return array From 1771d6c1f555ac32aa2d5b8291e82d7bf234f690 Mon Sep 17 00:00:00 2001 From: Dmitry Khomutov Date: Thu, 5 Jan 2017 17:36:13 +0700 Subject: [PATCH 03/10] Small fixes --- README.md | 4 ++-- src/PHPCensor/Controller/SessionController.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c08d65a7..840c5ffb 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ More [screenshots](docs/en/screenshots.md). Configuring ----------- -Similar to Travis CI, to support **PHP Censor** in your project, you simply need to add a `.php-censor.yml` +Similar to [TravisCI](https://travis-ci.org), to support PHP Censor in your project, you simply need to add a `.php-censor.yml` (`phpci.yml`/`.phpci.yml` for backward compatibility with PHPCI) file to the root of your repository. The file should look something like this: @@ -124,4 +124,4 @@ Documentation License ------- -*PHP Censor* is open source software licensed under the [BSD-2-Clause license](LICENSE.md). +PHP Censor is open source software licensed under the [BSD-2-Clause license](LICENSE.md). diff --git a/src/PHPCensor/Controller/SessionController.php b/src/PHPCensor/Controller/SessionController.php index b63d8c84..5d9f4661 100644 --- a/src/PHPCensor/Controller/SessionController.php +++ b/src/PHPCensor/Controller/SessionController.php @@ -70,7 +70,7 @@ class SessionController extends Controller $form->setAction(APP_URL.'session/login'); $email = new b8\Form\Element\Text('email'); - $email->setLabel(Lang::get('email_address')); + $email->setLabel(Lang::get('login')); $email->setRequired(true); $email->setContainerClass('form-group'); $email->setClass('form-control'); From b861071402ffc5e72c5493921069b087509e596b Mon Sep 17 00:00:00 2001 From: Stephen Ball Date: Fri, 6 Jan 2017 10:04:39 +0700 Subject: [PATCH 04/10] Update Deployer plugin --- src/PHPCensor/Plugin/Deployer.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/PHPCensor/Plugin/Deployer.php b/src/PHPCensor/Plugin/Deployer.php index 31519936..42b11991 100644 --- a/src/PHPCensor/Plugin/Deployer.php +++ b/src/PHPCensor/Plugin/Deployer.php @@ -62,7 +62,8 @@ class Deployer extends Plugin 'source' => 'PHP Censor', 'url' => $this->builder->interpolate('%BUILD_URI%'), 'branch' => $this->builder->interpolate('%BRANCH%'), - 'update_only' => $this->updateOnly + 'commit' => $this->builder->interpolate('%COMMIT%'), + 'update_only' => $this->updateOnly, ]); return $response['success']; From 5c10fca90583299b84bfc46f240644975a79dc53 Mon Sep 17 00:00:00 2001 From: TobiasKappe Date: Fri, 6 Jan 2017 10:18:14 +0700 Subject: [PATCH 05/10] Read standard output and standard error of child process using stream_select. (#1253) If a process filled up the buffer of the standard error pipe before closing the standard output pipe, it would hang. As a result, the call to stream_get_contents for the standard output pipe would not return, as the standard error pipe needs to be read from in order for the process to continue. This change uses stream_select to read from both pipes whenever data becomes available. --- src/PHPCensor/Helper/BaseCommandExecutor.php | 39 ++++++++++++++++--- .../PHPCensor/Helper/CommandExecutorTest.php | 19 +++++++++ 2 files changed, 53 insertions(+), 5 deletions(-) diff --git a/src/PHPCensor/Helper/BaseCommandExecutor.php b/src/PHPCensor/Helper/BaseCommandExecutor.php index de6b0485..e0b0dabe 100644 --- a/src/PHPCensor/Helper/BaseCommandExecutor.php +++ b/src/PHPCensor/Helper/BaseCommandExecutor.php @@ -94,14 +94,13 @@ abstract class BaseCommandExecutor implements CommandExecutor $pipes = []; $process = proc_open($command, $descriptorSpec, $pipes, $this->buildPath, null); + $this->lastOutput = ''; + $this->lastError = ''; + if (is_resource($process)) { fclose($pipes[0]); - $this->lastOutput = stream_get_contents($pipes[1]); - $this->lastError = stream_get_contents($pipes[2]); - - fclose($pipes[1]); - fclose($pipes[2]); + list($this->lastOutput, $this->lastError) = $this->readAlternating([$pipes[1], $pipes[2]]); $status = proc_close($process); } @@ -127,6 +126,36 @@ abstract class BaseCommandExecutor implements CommandExecutor return $rtn; } + /** + * Reads from array of streams as data becomes available. + * @param array $descriptors + * @return string[] data read from each descriptor + */ + private function readAlternating(array $descriptors) + { + $outputs = []; + foreach ($descriptors as $key => $descriptor) { + stream_set_blocking($descriptor, false); + $outputs[$key] = ''; + } + do { + $read = $descriptors; + $write = null; + $except = null; + stream_select($read, $write, $except, null); + foreach ($read as $descriptor) { + $key = array_search($descriptor, $descriptors); + if (feof($descriptor)) { + fclose($descriptor); + unset($descriptors[$key]); + } else { + $outputs[$key] .= fgets($descriptor); + } + } + } while (count($descriptors) > 0); + return $outputs; + } + /** * Returns the output from the last command run. */ diff --git a/tests/PHPCensor/Helper/CommandExecutorTest.php b/tests/PHPCensor/Helper/CommandExecutorTest.php index 877be38b..efd8d443 100644 --- a/tests/PHPCensor/Helper/CommandExecutorTest.php +++ b/tests/PHPCensor/Helper/CommandExecutorTest.php @@ -62,6 +62,25 @@ class CommandExecutorTest extends \PHPUnit_Framework_TestCase $this->assertFalse($returnValue); } + /** + * Runs a script that generates an output that fills the standard error + * buffer first, followed by the standard output buffer. The function + * should be able to read from both streams, thereby preventing the child + * process from blocking because one of its buffers is full. + */ + public function testExecuteCommand_AlternatesBothBuffers() + { + $length = 80000; + $script = <<&2 echo "\$data"; >&1 echo "\$data"' +EOD; + $data = str_repeat("-", $length); + $returnValue = $this->testedExecutor->executeCommand(array($script)); + $this->assertTrue($returnValue); + $this->assertEquals($data, trim($this->testedExecutor->getLastOutput())); + $this->assertEquals($data, trim($this->testedExecutor->getLastError())); + } + public function testFindBinary_ReturnsPathInSpecifiedRoot() { $thisFileName = "CommandExecutorTest.php"; From 1e17905140e8f38cb14d3ee278fef1a16b11c8da Mon Sep 17 00:00:00 2001 From: Dmitry Khomutov Date: Fri, 6 Jan 2017 11:51:53 +0700 Subject: [PATCH 06/10] Small style fix --- public/assets/css/admin-lte-skins.css | 814 -------------------------- public/assets/css/main.css | 472 ++++++++++++++- src/PHPCensor/View/layout.phtml | 1 - 3 files changed, 461 insertions(+), 826 deletions(-) delete mode 100644 public/assets/css/admin-lte-skins.css diff --git a/public/assets/css/admin-lte-skins.css b/public/assets/css/admin-lte-skins.css deleted file mode 100644 index d09ba551..00000000 --- a/public/assets/css/admin-lte-skins.css +++ /dev/null @@ -1,814 +0,0 @@ -/* - * Skin: Blue - * ---------- - */ -.skin-blue .main-header .navbar { - background-color: #3c8dbc; -} - -.skin-blue .main-header .navbar .nav > li > a { - color: #ffffff; -} - -.skin-blue .main-header .navbar .nav > li > a:hover, -.skin-blue .main-header .navbar .nav > li > a:active, -.skin-blue .main-header .navbar .nav > li > a:focus, -.skin-blue .main-header .navbar .nav .open > a, -.skin-blue .main-header .navbar .nav .open > a:hover, -.skin-blue .main-header .navbar .nav .open > a:focus, -.skin-blue .main-header .navbar .nav > .active > a { - background: rgba(0, 0, 0, 0.1); - color: #f6f6f6; -} - -.skin-blue .main-header .navbar .sidebar-toggle { - color: #ffffff; -} - -.skin-blue .main-header .navbar .sidebar-toggle:hover { - color: #f6f6f6; - background: rgba(0, 0, 0, 0.1); -} - -.skin-blue .main-header .navbar .sidebar-toggle { - color: #fff; -} - -.skin-blue .main-header .navbar .sidebar-toggle:hover { - background-color: #367fa9; -} - -@media (max-width: 767px) { - .skin-blue .main-header .navbar .dropdown-menu li.divider { - background-color: rgba(255, 255, 255, 0.1); - } - - .skin-blue .main-header .navbar .dropdown-menu li a { - color: #fff; - } - - .skin-blue .main-header .navbar .dropdown-menu li a:hover { - background: #367fa9; - } -} - -.skin-blue .main-header .logo { - background-color: #367fa9; - color: #ffffff; - border-bottom: 0 solid transparent; -} - -.skin-blue .main-header .logo:hover { - background-color: #357ca5; -} - -.skin-blue .main-header li.user-header { - background-color: #3c8dbc; -} - -.skin-blue .content-header { - background: transparent; -} - -.skin-blue .wrapper, -.skin-blue .main-sidebar, -.skin-blue .left-side { - background-color: #222d32; -} - -.skin-blue .user-panel > .info, -.skin-blue .user-panel > .info > a { - color: #fff; -} - -.skin-blue .sidebar-menu > li.header { - color: #4b646f; - background: #1a2226; -} - -.skin-blue .sidebar-menu > li > a { - border-left: 3px solid transparent; -} - -.skin-blue .sidebar-menu > li:hover > a, -.skin-blue .sidebar-menu > li.active > a { - color: #ffffff; - background: #1e282c; - border-left-color: #3c8dbc; -} - -.skin-blue .sidebar-menu > li > .treeview-menu { - margin: 0 1px; - background: #2c3b41; -} - -.skin-blue .sidebar a { - color: #b8c7ce; -} - -.skin-blue .sidebar a:hover { - text-decoration: none; -} - -.skin-blue .treeview-menu > li > a { - color: #8aa4af; -} - -.skin-blue .treeview-menu > li.active > a, -.skin-blue .treeview-menu > li > a:hover { - color: #ffffff; -} - -.skin-blue .sidebar-form { - border-radius: 3px; - border: 1px solid #374850; - margin: 10px 10px; -} - -.skin-blue .sidebar-form input[type="text"], -.skin-blue .sidebar-form .btn { - box-shadow: none; - background-color: #374850; - border: 1px solid transparent; - height: 35px; -} - -.skin-blue .sidebar-form input[type="text"] { - color: #666; - border-top-left-radius: 2px; - border-top-right-radius: 0; - border-bottom-right-radius: 0; - border-bottom-left-radius: 2px; -} - -.skin-blue .sidebar-form input[type="text"]:focus, -.skin-blue .sidebar-form input[type="text"]:focus + .input-group-btn .btn { - background-color: #fff; - color: #666; -} - -.skin-blue .sidebar-form input[type="text"]:focus + .input-group-btn .btn { - border-left-color: #fff; -} - -.skin-blue .sidebar-form .btn { - color: #999; - border-top-left-radius: 0; - border-top-right-radius: 2px; - border-bottom-right-radius: 2px; - border-bottom-left-radius: 0; -} - -.skin-blue.layout-top-nav .main-header > .logo { - background-color: #3c8dbc; - color: #ffffff; - border-bottom: 0 solid transparent; -} - -.skin-blue.layout-top-nav .main-header > .logo:hover { - background-color: #3b8ab8; -} - -/* - * Skin: Green - * ----------- - */ -.skin-green .main-header .navbar { - background-color: #00a65a; -} - -.skin-green .main-header .navbar .nav > li > a { - color: #ffffff; -} - -.skin-green .main-header .navbar .nav > li > a:hover, -.skin-green .main-header .navbar .nav > li > a:active, -.skin-green .main-header .navbar .nav > li > a:focus, -.skin-green .main-header .navbar .nav .open > a, -.skin-green .main-header .navbar .nav .open > a:hover, -.skin-green .main-header .navbar .nav .open > a:focus, -.skin-green .main-header .navbar .nav > .active > a { - background: rgba(0, 0, 0, 0.1); - color: #f6f6f6; -} - -.skin-green .main-header .navbar .sidebar-toggle { - color: #ffffff; -} - -.skin-green .main-header .navbar .sidebar-toggle:hover { - color: #f6f6f6; - background: rgba(0, 0, 0, 0.1); -} - -.skin-green .main-header .navbar .sidebar-toggle { - color: #fff; -} - -.skin-green .main-header .navbar .sidebar-toggle:hover { - background-color: #008d4c; -} - -@media (max-width: 767px) { - .skin-green .main-header .navbar .dropdown-menu li.divider { - background-color: rgba(255, 255, 255, 0.1); - } - - .skin-green .main-header .navbar .dropdown-menu li a { - color: #fff; - } - - .skin-green .main-header .navbar .dropdown-menu li a:hover { - background: #008d4c; - } -} - -.skin-green .main-header .logo { - background-color: #008d4c; - color: #ffffff; - border-bottom: 0 solid transparent; -} - -.skin-green .main-header .logo:hover { - background-color: #008749; -} - -.skin-green .main-header li.user-header { - background-color: #00a65a; -} - -.skin-green .content-header { - background: transparent; -} - -.skin-green .wrapper, -.skin-green .main-sidebar, -.skin-green .left-side { - background-color: #222d32; -} - -.skin-green .user-panel > .info, -.skin-green .user-panel > .info > a { - color: #fff; -} - -.skin-green .sidebar-menu > li.header { - color: #4b646f; - background: #1a2226; -} - -.skin-green .sidebar-menu > li > a { - border-left: 3px solid transparent; -} - -.skin-green .sidebar-menu > li:hover > a, -.skin-green .sidebar-menu > li.active > a { - color: #ffffff; - background: #1e282c; - border-left-color: #00a65a; -} - -.skin-green .sidebar-menu > li > .treeview-menu { - margin: 0 1px; - background: #2c3b41; -} - -.skin-green .sidebar a { - color: #b8c7ce; -} - -.skin-green .sidebar a:hover { - text-decoration: none; -} - -.skin-green .treeview-menu > li > a { - color: #8aa4af; -} - -.skin-green .treeview-menu > li.active > a, -.skin-green .treeview-menu > li > a:hover { - color: #ffffff; -} - -.skin-green .sidebar-form { - border-radius: 3px; - border: 1px solid #374850; - margin: 10px 10px; -} - -.skin-green .sidebar-form input[type="text"], -.skin-green .sidebar-form .btn { - box-shadow: none; - background-color: #374850; - border: 1px solid transparent; - height: 35px; -} - -.skin-green .sidebar-form input[type="text"] { - color: #666; - border-top-left-radius: 2px; - border-top-right-radius: 0; - border-bottom-right-radius: 0; - border-bottom-left-radius: 2px; -} - -.skin-green .sidebar-form input[type="text"]:focus, -.skin-green .sidebar-form input[type="text"]:focus + .input-group-btn .btn { - background-color: #fff; - color: #666; -} - -.skin-green .sidebar-form input[type="text"]:focus + .input-group-btn .btn { - border-left-color: #fff; -} - -.skin-green .sidebar-form .btn { - color: #999; - border-top-left-radius: 0; - border-top-right-radius: 2px; - border-bottom-right-radius: 2px; - border-bottom-left-radius: 0; -} - -/* - * Skin: Red - * --------- - */ -.skin-red .main-header .navbar { - background-color: #dd4b39; -} - -.skin-red .main-header .navbar .nav > li > a { - color: #ffffff; -} - -.skin-red .main-header .navbar .nav > li > a:hover, -.skin-red .main-header .navbar .nav > li > a:active, -.skin-red .main-header .navbar .nav > li > a:focus, -.skin-red .main-header .navbar .nav .open > a, -.skin-red .main-header .navbar .nav .open > a:hover, -.skin-red .main-header .navbar .nav .open > a:focus, -.skin-red .main-header .navbar .nav > .active > a { - background: rgba(0, 0, 0, 0.1); - color: #f6f6f6; -} - -.skin-red .main-header .navbar .sidebar-toggle { - color: #ffffff; -} - -.skin-red .main-header .navbar .sidebar-toggle:hover { - color: #f6f6f6; - background: rgba(0, 0, 0, 0.1); -} - -.skin-red .main-header .navbar .sidebar-toggle { - color: #fff; -} - -.skin-red .main-header .navbar .sidebar-toggle:hover { - background-color: #d73925; -} - -@media (max-width: 767px) { - .skin-red .main-header .navbar .dropdown-menu li.divider { - background-color: rgba(255, 255, 255, 0.1); - } - - .skin-red .main-header .navbar .dropdown-menu li a { - color: #fff; - } - - .skin-red .main-header .navbar .dropdown-menu li a:hover { - background: #d73925; - } -} - -.skin-red .main-header .logo { - background-color: #d73925; - color: #ffffff; - border-bottom: 0 solid transparent; -} - -.skin-red .main-header .logo:hover { - background-color: #d33724; -} - -.skin-red .main-header li.user-header { - background-color: #dd4b39; -} - -.skin-red .content-header { - background: transparent; -} - -.skin-red .wrapper, -.skin-red .main-sidebar, -.skin-red .left-side { - background-color: #222d32; -} - -.skin-red .user-panel > .info, -.skin-red .user-panel > .info > a { - color: #fff; -} - -.skin-red .sidebar-menu > li.header { - color: #4b646f; - background: #1a2226; -} - -.skin-red .sidebar-menu > li > a { - border-left: 3px solid transparent; -} - -.skin-red .sidebar-menu > li:hover > a, -.skin-red .sidebar-menu > li.active > a { - color: #ffffff; - background: #1e282c; - border-left-color: #dd4b39; -} - -.skin-red .sidebar-menu > li > .treeview-menu { - margin: 0 1px; - background: #2c3b41; -} - -.skin-red .sidebar a { - color: #b8c7ce; -} - -.skin-red .sidebar a:hover { - text-decoration: none; -} - -.skin-red .treeview-menu > li > a { - color: #8aa4af; -} - -.skin-red .treeview-menu > li.active > a, -.skin-red .treeview-menu > li > a:hover { - color: #ffffff; -} - -.skin-red .sidebar-form { - border-radius: 3px; - border: 1px solid #374850; - margin: 10px 10px; -} - -.skin-red .sidebar-form input[type="text"], -.skin-red .sidebar-form .btn { - box-shadow: none; - background-color: #374850; - border: 1px solid transparent; - height: 35px; -} - -.skin-red .sidebar-form input[type="text"] { - color: #666; - border-top-left-radius: 2px; - border-top-right-radius: 0; - border-bottom-right-radius: 0; - border-bottom-left-radius: 2px; -} - -.skin-red .sidebar-form input[type="text"]:focus, -.skin-red .sidebar-form input[type="text"]:focus + .input-group-btn .btn { - background-color: #fff; - color: #666; -} - -.skin-red .sidebar-form input[type="text"]:focus + .input-group-btn .btn { - border-left-color: #fff; -} - -.skin-red .sidebar-form .btn { - color: #999; - border-top-left-radius: 0; - border-top-right-radius: 2px; - border-bottom-right-radius: 2px; - border-bottom-left-radius: 0; -} - -/* - * Skin: Yellow - * ------------ - */ -.skin-yellow .main-header .navbar { - background-color: #f39c12; -} - -.skin-yellow .main-header .navbar .nav > li > a { - color: #ffffff; -} - -.skin-yellow .main-header .navbar .nav > li > a:hover, -.skin-yellow .main-header .navbar .nav > li > a:active, -.skin-yellow .main-header .navbar .nav > li > a:focus, -.skin-yellow .main-header .navbar .nav .open > a, -.skin-yellow .main-header .navbar .nav .open > a:hover, -.skin-yellow .main-header .navbar .nav .open > a:focus, -.skin-yellow .main-header .navbar .nav > .active > a { - background: rgba(0, 0, 0, 0.1); - color: #f6f6f6; -} - -.skin-yellow .main-header .navbar .sidebar-toggle { - color: #ffffff; -} - -.skin-yellow .main-header .navbar .sidebar-toggle:hover { - color: #f6f6f6; - background: rgba(0, 0, 0, 0.1); -} - -.skin-yellow .main-header .navbar .sidebar-toggle { - color: #fff; -} - -.skin-yellow .main-header .navbar .sidebar-toggle:hover { - background-color: #e08e0b; -} - -@media (max-width: 767px) { - .skin-yellow .main-header .navbar .dropdown-menu li.divider { - background-color: rgba(255, 255, 255, 0.1); - } - - .skin-yellow .main-header .navbar .dropdown-menu li a { - color: #fff; - } - - .skin-yellow .main-header .navbar .dropdown-menu li a:hover { - background: #e08e0b; - } -} - -.skin-yellow .main-header .logo { - background-color: #e08e0b; - color: #ffffff; - border-bottom: 0 solid transparent; -} - -.skin-yellow .main-header .logo:hover { - background-color: #db8b0b; -} - -.skin-yellow .main-header li.user-header { - background-color: #f39c12; -} - -.skin-yellow .content-header { - background: transparent; -} - -.skin-yellow .wrapper, -.skin-yellow .main-sidebar, -.skin-yellow .left-side { - background-color: #222d32; -} - -.skin-yellow .user-panel > .info, -.skin-yellow .user-panel > .info > a { - color: #fff; -} - -.skin-yellow .sidebar-menu > li.header { - color: #4b646f; - background: #1a2226; -} - -.skin-yellow .sidebar-menu > li > a { - border-left: 3px solid transparent; -} - -.skin-yellow .sidebar-menu > li:hover > a, -.skin-yellow .sidebar-menu > li.active > a { - color: #ffffff; - background: #1e282c; - border-left-color: #f39c12; -} - -.skin-yellow .sidebar-menu > li > .treeview-menu { - margin: 0 1px; - background: #2c3b41; -} - -.skin-yellow .sidebar a { - color: #b8c7ce; -} - -.skin-yellow .sidebar a:hover { - text-decoration: none; -} - -.skin-yellow .treeview-menu > li > a { - color: #8aa4af; -} - -.skin-yellow .treeview-menu > li.active > a, -.skin-yellow .treeview-menu > li > a:hover { - color: #ffffff; -} - -.skin-yellow .sidebar-form { - border-radius: 3px; - border: 1px solid #374850; - margin: 10px 10px; -} - -.skin-yellow .sidebar-form input[type="text"], -.skin-yellow .sidebar-form .btn { - box-shadow: none; - background-color: #374850; - border: 1px solid transparent; - height: 35px; -} - -.skin-yellow .sidebar-form input[type="text"] { - color: #666; - border-top-left-radius: 2px; - border-top-right-radius: 0; - border-bottom-right-radius: 0; - border-bottom-left-radius: 2px; -} - -.skin-yellow .sidebar-form input[type="text"]:focus, -.skin-yellow .sidebar-form input[type="text"]:focus + .input-group-btn .btn { - background-color: #fff; - color: #666; -} - -.skin-yellow .sidebar-form input[type="text"]:focus + .input-group-btn .btn { - border-left-color: #fff; -} - -.skin-yellow .sidebar-form .btn { - color: #999; - border-top-left-radius: 0; - border-top-right-radius: 2px; - border-bottom-right-radius: 2px; - border-bottom-left-radius: 0; -} - -/* - * Skin: Purple - * ------------ - */ -.skin-black .main-header .navbar { - background-color: #1e282c; -} - -.skin-black .main-header .navbar .nav > li > a { - color: #ffffff; -} - -.skin-black .main-header .navbar .nav > li > a:hover, -.skin-black .main-header .navbar .nav > li > a:active, -.skin-black .main-header .navbar .nav > li > a:focus, -.skin-black .main-header .navbar .nav .open > a, -.skin-black .main-header .navbar .nav .open > a:hover, -.skin-black .main-header .navbar .nav .open > a:focus, -.skin-black .main-header .navbar .nav > .active > a { - background: rgba(0, 0, 0, 0.1); - color: #f6f6f6; -} - -.skin-black .main-header .navbar .sidebar-toggle { - color: #ffffff; -} - -.skin-black .main-header .navbar .sidebar-toggle:hover { - color: #f6f6f6; - background: rgba(0, 0, 0, 0.1); -} - -.skin-black .main-header .navbar .sidebar-toggle { - color: #fff; -} - -.skin-black .main-header .navbar .sidebar-toggle:hover { - background-color: black; -} - -@media (max-width: 767px) { - .skin-black .main-header .navbar .dropdown-menu li.divider { - background-color: rgba(255, 255, 255, 0.1); - } - - .skin-black .main-header .navbar .dropdown-menu li a { - color: #fff; - } - - .skin-black .main-header .navbar .dropdown-menu li a:hover { - background: black; - } -} - -.skin-black .main-header .logo { - background-color: black; - color: #ffffff; - border-bottom: 0 solid transparent; -} - -.skin-black .main-header .logo:hover { - background-color: black; -} - -.skin-black .main-header li.user-header { - background-color: black; -} - -.skin-black .content-header { - background: transparent; -} - -.skin-black .wrapper, -.skin-black .main-sidebar, -.skin-black .left-side { - background-color: #222d32; -} - -.skin-black .user-panel > .info, -.skin-black .user-panel > .info > a { - color: #fff; -} - -.skin-black .sidebar-menu > li.header { - color: #4b646f; - background: #1a2226; -} - -.skin-black .sidebar-menu > li > a { - border-left: 3px solid transparent; -} - -.skin-black .sidebar-menu > li:hover > a, -.skin-black .sidebar-menu > li.active > a { - color: #ffffff; - background: #1e282c; - border-left-color: #fff; -} - -.skin-black .sidebar-menu > li > .treeview-menu { - margin: 0 1px; - background: #2c3b41; -} - -.skin-black .sidebar a { - color: #b8c7ce; -} - -.skin-black .sidebar a:hover { - text-decoration: none; -} - -.skin-black .treeview-menu > li > a { - color: #8aa4af; -} - -.skin-black .treeview-menu > li.active > a, -.skin-black .treeview-menu > li > a:hover { - color: #ffffff; -} - -.skin-black .sidebar-form { - border-radius: 3px; - border: 1px solid #374850; - margin: 10px 10px; -} - -.skin-black .sidebar-form input[type="text"], -.skin-black .sidebar-form .btn { - box-shadow: none; - background-color: #374850; - border: 1px solid transparent; - height: 35px; -} - -.skin-black .sidebar-form input[type="text"] { - color: #666; - border-top-left-radius: 2px; - border-top-right-radius: 0; - border-bottom-right-radius: 0; - border-bottom-left-radius: 2px; -} - -.skin-black .sidebar-form input[type="text"]:focus, -.skin-black .sidebar-form input[type="text"]:focus + .input-group-btn .btn { - background-color: #fff; - color: #666; -} - -.skin-black .sidebar-form input[type="text"]:focus + .input-group-btn .btn { - border-left-color: #fff; -} - -.skin-black .sidebar-form .btn { - color: #999; - border-top-left-radius: 0; - border-top-right-radius: 2px; - border-bottom-right-radius: 2px; - border-bottom-left-radius: 0; -} diff --git a/public/assets/css/main.css b/public/assets/css/main.css index 3124dbb0..eac36887 100644 --- a/public/assets/css/main.css +++ b/public/assets/css/main.css @@ -1,6 +1,456 @@ +.wrapper, +.main-sidebar, +.left-side { + background-color: #222d32; +} + +.user-panel > .info, +.user-panel > .info > a { + color: #fff; +} + +.sidebar-menu > li.header { + color: #4b646f; + background: #1a2226; +} + +.sidebar-menu > li > a { + border-left: 3px solid transparent; +} + +.sidebar-menu > li:hover > a, +.sidebar-menu > li.active > a { + color: #fff; + background: #1e282c; + border-left-color: #fff; +} + +.sidebar-menu > li > .treeview-menu { + margin: 0 1px; + background: #2c3b41; +} + +.sidebar a { + color: #b8c7ce; +} + +.sidebar a:hover { + text-decoration: none; +} + +.treeview-menu > li > a { + color: #8aa4af; +} + +.treeview-menu > li.active > a, +.treeview-menu > li > a:hover { + color: #ffffff; +} + +.sidebar-form { + border-radius: 3px; + border: 1px solid #374850; + margin: 10px 10px; +} + +.sidebar-form input[type="text"], +.sidebar-form .btn { + box-shadow: none; + background-color: #374850; + border: 1px solid transparent; + height: 35px; +} + +.sidebar-form input[type="text"] { + color: #666; + border-top-left-radius: 2px; + border-top-right-radius: 0; + border-bottom-right-radius: 0; + border-bottom-left-radius: 2px; +} + +.sidebar-form input[type="text"]:focus, +.sidebar-form input[type="text"]:focus + .input-group-btn .btn { + background-color: #fff; + color: #666; +} + +.sidebar-form input[type="text"]:focus + .input-group-btn .btn { + border-left-color: #fff; +} + +.sidebar-form .btn { + color: #999; + border-top-left-radius: 0; + border-top-right-radius: 2px; + border-bottom-right-radius: 2px; + border-bottom-left-radius: 0; +} + +/* + * Skin: Blue + * ---------- + */ +.skin-blue .main-header .navbar { + background-color: #3c8dbc; +} + +.skin-blue .main-header .navbar .nav > li > a { + color: #ffffff; +} + +.skin-blue .main-header .navbar .nav > li > a:hover, +.skin-blue .main-header .navbar .nav > li > a:active, +.skin-blue .main-header .navbar .nav > li > a:focus, +.skin-blue .main-header .navbar .nav .open > a, +.skin-blue .main-header .navbar .nav .open > a:hover, +.skin-blue .main-header .navbar .nav .open > a:focus, +.skin-blue .main-header .navbar .nav > .active > a { + background: rgba(0, 0, 0, 0.1); + color: #f6f6f6; +} + +.skin-blue .main-header .navbar .sidebar-toggle { + color: #ffffff; +} + +.skin-blue .main-header .navbar .sidebar-toggle:hover { + color: #f6f6f6; + background: rgba(0, 0, 0, 0.1); +} + +.skin-blue .main-header .navbar .sidebar-toggle { + color: #fff; +} + +.skin-blue .main-header .navbar .sidebar-toggle:hover { + background-color: #367fa9; +} + +@media (max-width: 767px) { + .skin-blue .main-header .navbar .dropdown-menu li.divider { + background-color: rgba(255, 255, 255, 0.1); + } + + .skin-blue .main-header .navbar .dropdown-menu li a { + color: #fff; + } + + .skin-blue .main-header .navbar .dropdown-menu li a:hover { + background: #367fa9; + } +} + +.skin-blue .main-header .logo { + background-color: #367fa9; + color: #ffffff; + border-bottom: 0 solid transparent; +} + +.skin-blue .main-header .logo:hover { + background-color: #357ca5; +} + +.skin-blue .main-header li.user-header { + background-color: #3c8dbc; +} + +.skin-blue .content-header { + background: transparent; +} + +/* + * Skin: Green + * ----------- + */ +.skin-green .main-header .navbar { + background-color: #00a65a; +} + +.skin-green .main-header .navbar .nav > li > a { + color: #ffffff; +} + +.skin-green .main-header .navbar .nav > li > a:hover, +.skin-green .main-header .navbar .nav > li > a:active, +.skin-green .main-header .navbar .nav > li > a:focus, +.skin-green .main-header .navbar .nav .open > a, +.skin-green .main-header .navbar .nav .open > a:hover, +.skin-green .main-header .navbar .nav .open > a:focus, +.skin-green .main-header .navbar .nav > .active > a { + background: rgba(0, 0, 0, 0.1); + color: #f6f6f6; +} + +.skin-green .main-header .navbar .sidebar-toggle { + color: #ffffff; +} + +.skin-green .main-header .navbar .sidebar-toggle:hover { + color: #f6f6f6; + background: rgba(0, 0, 0, 0.1); +} + +.skin-green .main-header .navbar .sidebar-toggle { + color: #fff; +} + +.skin-green .main-header .navbar .sidebar-toggle:hover { + background-color: #008d4c; +} + +@media (max-width: 767px) { + .skin-green .main-header .navbar .dropdown-menu li.divider { + background-color: rgba(255, 255, 255, 0.1); + } + + .skin-green .main-header .navbar .dropdown-menu li a { + color: #fff; + } + + .skin-green .main-header .navbar .dropdown-menu li a:hover { + background: #008d4c; + } +} + +.skin-green .main-header .logo { + background-color: #008d4c; + color: #ffffff; + border-bottom: 0 solid transparent; +} + +.skin-green .main-header .logo:hover { + background-color: #008749; +} + +.skin-green .main-header li.user-header { + background-color: #00a65a; +} + +.skin-green .content-header { + background: transparent; +} + +/* + * Skin: Red + * --------- + */ +.skin-red .main-header .navbar { + background-color: #dd4b39; +} + +.skin-red .main-header .navbar .nav > li > a { + color: #ffffff; +} + +.skin-red .main-header .navbar .nav > li > a:hover, +.skin-red .main-header .navbar .nav > li > a:active, +.skin-red .main-header .navbar .nav > li > a:focus, +.skin-red .main-header .navbar .nav .open > a, +.skin-red .main-header .navbar .nav .open > a:hover, +.skin-red .main-header .navbar .nav .open > a:focus, +.skin-red .main-header .navbar .nav > .active > a { + background: rgba(0, 0, 0, 0.1); + color: #f6f6f6; +} + +.skin-red .main-header .navbar .sidebar-toggle { + color: #ffffff; +} + +.skin-red .main-header .navbar .sidebar-toggle:hover { + color: #f6f6f6; + background: rgba(0, 0, 0, 0.1); +} + +.skin-red .main-header .navbar .sidebar-toggle { + color: #fff; +} + +.skin-red .main-header .navbar .sidebar-toggle:hover { + background-color: #d73925; +} + +@media (max-width: 767px) { + .skin-red .main-header .navbar .dropdown-menu li.divider { + background-color: rgba(255, 255, 255, 0.1); + } + + .skin-red .main-header .navbar .dropdown-menu li a { + color: #fff; + } + + .skin-red .main-header .navbar .dropdown-menu li a:hover { + background: #d73925; + } +} + +.skin-red .main-header .logo { + background-color: #d73925; + color: #ffffff; + border-bottom: 0 solid transparent; +} + +.skin-red .main-header .logo:hover { + background-color: #d33724; +} + +.skin-red .main-header li.user-header { + background-color: #dd4b39; +} + +.skin-red .content-header { + background: transparent; +} + +/* + * Skin: Yellow + * ------------ + */ +.skin-yellow .main-header .navbar { + background-color: #f39c12; +} + +.skin-yellow .main-header .navbar .nav > li > a { + color: #ffffff; +} + +.skin-yellow .main-header .navbar .nav > li > a:hover, +.skin-yellow .main-header .navbar .nav > li > a:active, +.skin-yellow .main-header .navbar .nav > li > a:focus, +.skin-yellow .main-header .navbar .nav .open > a, +.skin-yellow .main-header .navbar .nav .open > a:hover, +.skin-yellow .main-header .navbar .nav .open > a:focus, +.skin-yellow .main-header .navbar .nav > .active > a { + background: rgba(0, 0, 0, 0.1); + color: #f6f6f6; +} + +.skin-yellow .main-header .navbar .sidebar-toggle { + color: #ffffff; +} + +.skin-yellow .main-header .navbar .sidebar-toggle:hover { + color: #f6f6f6; + background: rgba(0, 0, 0, 0.1); +} + +.skin-yellow .main-header .navbar .sidebar-toggle { + color: #fff; +} + +.skin-yellow .main-header .navbar .sidebar-toggle:hover { + background-color: #e08e0b; +} + +@media (max-width: 767px) { + .skin-yellow .main-header .navbar .dropdown-menu li.divider { + background-color: rgba(255, 255, 255, 0.1); + } + + .skin-yellow .main-header .navbar .dropdown-menu li a { + color: #fff; + } + + .skin-yellow .main-header .navbar .dropdown-menu li a:hover { + background: #e08e0b; + } +} + +.skin-yellow .main-header .logo { + background-color: #e08e0b; + color: #ffffff; + border-bottom: 0 solid transparent; +} + +.skin-yellow .main-header .logo:hover { + background-color: #db8b0b; +} + +.skin-yellow .main-header li.user-header { + background-color: #f39c12; +} + +.skin-yellow .content-header { + background: transparent; +} + +/* + * Skin: Black + * ----------- + */ +.skin-black .main-header .navbar { + background-color: #222d32; +} + +.skin-black .main-header .navbar .nav > li > a { + color: #ffffff; +} + +.skin-black .main-header .navbar .nav > li > a:hover, +.skin-black .main-header .navbar .nav > li > a:active, +.skin-black .main-header .navbar .nav > li > a:focus, +.skin-black .main-header .navbar .nav .open > a, +.skin-black .main-header .navbar .nav .open > a:hover, +.skin-black .main-header .navbar .nav .open > a:focus, +.skin-black .main-header .navbar .nav > .active > a { + background: rgba(0, 0, 0, 0.1); + color: #f6f6f6; +} + +.skin-black .main-header .navbar .sidebar-toggle { + color: #ffffff; +} + +.skin-black .main-header .navbar .sidebar-toggle:hover { + color: #f6f6f6; + background: rgba(0, 0, 0, 0.1); +} + +.skin-black .main-header .navbar .sidebar-toggle { + color: #fff; +} + +.skin-black .main-header .navbar .sidebar-toggle:hover { + background-color: #1e282c; +} + +@media (max-width: 767px) { + .skin-black .main-header .navbar .dropdown-menu li.divider { + background-color: rgba(255, 255, 255, 0.1); + } + + .skin-black .main-header .navbar .dropdown-menu li a { + color: #fff; + } + + .skin-black .main-header .navbar .dropdown-menu li a:hover { + background: #1e282c; + } +} + +.skin-black .main-header .logo { + background-color: black; + color: #ffffff; + border-bottom: 0 solid transparent; +} + +.skin-black .main-header .logo:hover { + background-color: black; +} + +.skin-black .main-header li.user-header { + background-color: #1e282c; +} + +.skin-black .content-header { + background: transparent; +} + + .build-info-panel .box-header h1.box-title { - border: 0; - font-size: 1.5em; + border: 0; + font-size: 1.5em; font-weight: bold; margin-left: 110px; } @@ -10,14 +460,14 @@ } .build-info-panel img { - border: 2px solid #fff; + border: 2px solid #fff; border-radius: 50%; - margin-top: -40px; + margin-top: -40px; } .build-info-panel #build-info { margin-left: 110px; - min-height: 50px; + min-height: 50px; } .build-info-panel .commit-message { @@ -28,10 +478,10 @@ color: #fff; } -.pagination>li>span { +.pagination > li > span { font-weight: bold; background: #337ab7; - color: #fff; + color: #fff; } #plugins table td { @@ -57,11 +507,11 @@ float: left; } .small-box-minimal > .small-box-footer-build { - width: 5%; - border: 1px solid rgba(0, 0, 0, 0.15); + width: 5%; + border: 1px solid rgba(0, 0, 0, 0.15); margin-left: 1px; - margin-top: 19px; - font-size: 11px; + margin-top: 19px; + font-size: 11px; } .navbar-nav > .user-menu > .dropdown-menu { diff --git a/src/PHPCensor/View/layout.phtml b/src/PHPCensor/View/layout.phtml index 40b6cba6..7250e8a4 100644 --- a/src/PHPCensor/View/layout.phtml +++ b/src/PHPCensor/View/layout.phtml @@ -12,7 +12,6 @@ - From 69302adf2b1b128af0c87533c7bc824301362f00 Mon Sep 17 00:00:00 2001 From: Dmitry Khomutov Date: Fri, 6 Jan 2017 18:39:04 +0700 Subject: [PATCH 07/10] UI fixes --- public/assets/css/main.css | 49 ++++++++++-- public/assets/js/build-plugins/phpunit.js | 54 ++++--------- public/assets/js/build-plugins/summary.js | 8 +- public/assets/js/build.js | 2 +- src/PHPCensor/Languages/lang.en.php | 28 +++---- src/PHPCensor/Languages/lang.pt-br.php | 24 +++--- src/PHPCensor/Languages/lang.ru.php | 2 +- src/PHPCensor/Languages/lang.zh.php | 26 +++---- src/PHPCensor/Model/BuildError.php | 1 - src/PHPCensor/View/Build/errors.phtml | 6 +- src/PHPCensor/View/Build/view.phtml | 6 +- src/PHPCensor/View/BuildStatus/view.phtml | 2 +- src/PHPCensor/View/BuildsTable.phtml | 94 +++++++++++------------ src/PHPCensor/View/Group/edit.phtml | 2 +- src/PHPCensor/View/Group/index.phtml | 2 +- src/PHPCensor/View/Home/index.phtml | 4 +- src/PHPCensor/View/Plugin/index.phtml | 4 +- src/PHPCensor/View/Project/view.phtml | 40 +++++----- src/PHPCensor/View/ProjectForm.phtml | 8 +- src/PHPCensor/View/Settings/index.phtml | 12 +-- src/PHPCensor/View/User/index.phtml | 7 +- src/PHPCensor/View/User/profile.phtml | 2 +- src/PHPCensor/View/UserForm.phtml | 6 +- 23 files changed, 202 insertions(+), 187 deletions(-) diff --git a/public/assets/css/main.css b/public/assets/css/main.css index eac36887..889b46e6 100644 --- a/public/assets/css/main.css +++ b/public/assets/css/main.css @@ -11,7 +11,7 @@ .sidebar-menu > li.header { color: #4b646f; - background: #1a2226; + background: black; } .sidebar-menu > li > a { @@ -21,7 +21,7 @@ .sidebar-menu > li:hover > a, .sidebar-menu > li.active > a { color: #fff; - background: #1e282c; + background: #1a2226; border-left-color: #fff; } @@ -412,7 +412,7 @@ } .skin-black .main-header .navbar .sidebar-toggle:hover { - background-color: #1e282c; + background-color: #1a2226; } @media (max-width: 767px) { @@ -425,7 +425,7 @@ } .skin-black .main-header .navbar .dropdown-menu li a:hover { - background: #1e282c; + background: #1a2226; } } @@ -440,7 +440,7 @@ } .skin-black .main-header li.user-header { - background-color: #1e282c; + background-color: #1a2226; } .skin-black .content-header { @@ -518,6 +518,45 @@ width: 290px; } +.nav-tabs-custom > .nav-tabs > li.active { + border-top-color: #8aa4af; +} + +.box { + border-top: 3px solid #8aa4af; +} + +pre { + display: block; + padding: 9.5px; + margin: 0 0 10px; + font-size: 13px; + line-height: 1.42857143; + color: #333; + word-break: break-all; + word-wrap: break-word; + background-color: #fff; + border: none; + border-radius: 0; +} + +body, +h1, +h2, +h3, +h4, +h5, +h6, +.h1, +.h2, +.h3, +.h4, +.h5, +.h6, +.main-header .logo { + font-family: sans-serif; +} + #phpunit-data th div { margin: 0 0.5em; } #phpunit-data .success td { background: none; color: #00a65a; } #phpunit-data .fail td { background: none; color: #f56954; } diff --git a/public/assets/js/build-plugins/phpunit.js b/public/assets/js/build-plugins/phpunit.js index f5080077..3159d00c 100644 --- a/public/assets/js/build-plugins/phpunit.js +++ b/public/assets/js/build-plugins/phpunit.js @@ -1,6 +1,6 @@ var phpunitPlugin = ActiveBuild.UiPlugin.extend({ id: 'build-phpunit-errors', - css: 'col-lg-6 col-md-12 col-sm-12 col-xs-12', + css: 'col-xs-12', title: Lang.get('phpunit'), lastData: null, displayOnUpdate: false, @@ -28,16 +28,6 @@ var phpunitPlugin = ActiveBuild.UiPlugin.extend({ query(); } }); - - $(document).on('click', '#phpunit-data .test-toggle', function(ev) { - var input = $(ev.target); - $('#phpunit-data tbody ' + input.data('target')).toggle(input.prop('checked')); - }); - - $(document).on('click', '#phpunit-data button.trace', function() { - var $btn = $(this); - $($btn).replaceWith(self.buildTrace($btn.data('trace'))); - }); }, render: function() { @@ -45,7 +35,9 @@ var phpunitPlugin = ActiveBuild.UiPlugin.extend({ return $('
' + '' + '' + - ' ' + + '' + + '' + + '' + '' + '
'+Lang.get('test_message')+''+Lang.get('status')+''+Lang.get('test_message')+''+Lang.get('trace')+'
'); }, @@ -62,7 +54,7 @@ var phpunitPlugin = ActiveBuild.UiPlugin.extend({ var tests = this.lastData[0].meta_value; var thead = $('#phpunit-data thead tr'); var tbody = $('#phpunit-data tbody'); - thead.empty().append(''+Lang.get('test_message')+''); + thead.empty().append(''+Lang.get('status')+''+Lang.get('test_message')+''+Lang.get('trace')+''); tbody.empty(); if (tests.length == 0) { @@ -73,9 +65,16 @@ var phpunitPlugin = ActiveBuild.UiPlugin.extend({ var counts = { success: 0, fail: 0, error: 0, skipped: 0, todo: 0 }, total = 0; for (var i in tests) { - var content = $(''), - message = $('
').appendTo(content), - severity = tests[i].severity || (tests[i].pass ? 'success' : 'failed'); + var severity = tests[i].severity || (tests[i].pass ? 'success' : 'fail'), + label = ('success' == severity) ? 'success' : ( + ('error' == severity) ? 'danger' : 'warning' + ); + + var status = $('' + severity + ''), + content = $(''), + trace = $(''), + message = $('
').appendTo(content), + trace_message = $('
').appendTo(trace); if (tests[i].message) { message.text(tests[i].message); @@ -90,34 +89,15 @@ var phpunitPlugin = ActiveBuild.UiPlugin.extend({ } if (tests[i].trace && tests[i].trace.length) { - var $traceBtn = $(''); - $traceBtn.data('trace', tests[i].trace); - content.append('Trace: '); - content.append($traceBtn); + trace_message.append(tests[i].trace); } - $('').append(content).appendTo(tbody); + $('').append(status).append(content).append(trace).appendTo(tbody); counts[severity]++; total++; } - var checkboxes = $(''); - thead.append(checkboxes).append('' + Lang.get('test_total', total) + ''); - - for (var key in counts) { - var count = counts[key]; - if(count > 0) { - checkboxes.append( - '
 ' + - Lang.get('test_'+key, count)+ '
' - ); - } - } - - tbody.find('.success').hide(); - $('#build-phpunit-errors').show(); }, diff --git a/public/assets/js/build-plugins/summary.js b/public/assets/js/build-plugins/summary.js index d14951a0..af2e0186 100644 --- a/public/assets/js/build-plugins/summary.js +++ b/public/assets/js/build-plugins/summary.js @@ -3,9 +3,8 @@ var SummaryPlugin = ActiveBuild.UiPlugin.extend({ css: 'col-xs-12', title: Lang.get('build-summary'), box: true, - statusIcons: [ 'fa-clock-o', 'fa-cogs', 'fa-check', 'fa-remove' ], - statusLabels: [ Lang.get('pending'), Lang.get('running'), Lang.get('successful'), Lang.get('failed') ], - statusClasses: ['text-blue', 'text-yellow', 'text-green', 'text-red'], + statusLabels: [ Lang.get('pending'), Lang.get('running'), Lang.get('success'), Lang.get('failed') ], + statusClasses: ['info', 'warning', 'success', 'danger'], register: function() { var self = this; @@ -50,8 +49,7 @@ var SummaryPlugin = ActiveBuild.UiPlugin.extend({ '' + '' + Lang.get('stage_' + stage) + '' + '' + Lang.get(plugin) + '' + - '' + - ' ' + + '' + this.statusLabels[data.status] + '' + '' + duration + '' + diff --git a/public/assets/js/build.js b/public/assets/js/build.js index d4fd8433..fad4fd4a 100644 --- a/public/assets/js/build.js +++ b/public/assets/js/build.js @@ -166,7 +166,7 @@ var Build = Class.extend({ var container = $('
').addClass('ui-plugin ' + plugin.css).attr('id', plugin.id); var content = $('
').append(output); - content.addClass('box box-default'); + content.addClass('box'); if (plugin.title) { content.prepend('

'+plugin.title+'

'); diff --git a/src/PHPCensor/Languages/lang.en.php b/src/PHPCensor/Languages/lang.en.php index 5b866c68..22ade6c8 100644 --- a/src/PHPCensor/Languages/lang.en.php +++ b/src/PHPCensor/Languages/lang.en.php @@ -181,21 +181,21 @@ PHP Censor', 'build' => 'Build', 'lines' => 'Lines', - 'comment_lines' => 'Comment Lines', - 'noncomment_lines' => 'Non-Comment Lines', + 'comment_lines' => 'Comment lines', + 'noncomment_lines' => 'Non-Comment lines', 'logical_lines' => 'Logical Lines', - 'lines_of_code' => 'Lines of Code', - 'build_log' => 'Build Log', - 'quality_trend' => 'Quality Trend', - 'codeception_errors' => 'Codeception Errors', - 'phpmd_warnings' => 'PHPMD Warnings', - 'phpcs_warnings' => 'PHPCS Warnings', - 'phpcs_errors' => 'PHPCS Errors', - 'phplint_errors' => 'Lint Errors', - 'phpunit_errors' => 'PHPUnit Errors', + 'lines_of_code' => 'Lines of code', + 'build_log' => 'Build log', + 'quality_trend' => 'Quality trend', + 'codeception_errors' => 'Codeception errors', + 'phpmd_warnings' => 'PHPMD warnings', + 'phpcs_warnings' => 'PHPCS warnings', + 'phpcs_errors' => 'PHPCS errors', + 'phplint_errors' => 'Lint errors', + 'phpunit_errors' => 'PHPUnit errors', 'phpunit_fail_init' => 'Neither a configuration file nor a test directory found.', - 'phpcpd_warnings' => 'PHP Copy/Paste Detector Warnings', - 'phpdoccheck_warnings' => 'Missing Docblocks', + 'phpcpd_warnings' => 'PHP Copy/Paste Detector warnings', + 'phpdoccheck_warnings' => 'Missing docblocks', 'issues' => 'Issues', 'phpcpd' => 'PHP Copy/Paste Detector', @@ -462,7 +462,7 @@ PHP Censor', 'php_cpd' => 'PHP Copy/Paste Detector', 'php_docblock_checker' => 'PHP Docblock Checker', 'composer' => 'Composer', - 'php_loc' => 'PHPLOC', + 'php_loc' => 'PHP LOC', 'php_parallel_lint' => 'PHP Parallel Lint', 'email' => 'Email', 'atoum' => 'Atoum', diff --git a/src/PHPCensor/Languages/lang.pt-br.php b/src/PHPCensor/Languages/lang.pt-br.php index a3bb0116..e2f3bde0 100644 --- a/src/PHPCensor/Languages/lang.pt-br.php +++ b/src/PHPCensor/Languages/lang.pt-br.php @@ -166,19 +166,19 @@ PHPCI', 'build' => 'Build', 'lines' => 'Lines', - 'comment_lines' => 'Comment Lines', - 'noncomment_lines' => 'Non-Comment Lines', - 'logical_lines' => 'Logical Lines', - 'lines_of_code' => 'Lines of Code', + 'comment_lines' => 'Comment lines', + 'noncomment_lines' => 'Non-Comment lines', + 'logical_lines' => 'Logical lines', + 'lines_of_code' => 'Lines of code', 'build_log' => 'Log de compilação', - 'quality_trend' => 'Quality Trend', - 'codeception_errors' => 'Codeception Errors', - 'phpmd_warnings' => 'PHPMD Warnings', - 'phpcs_warnings' => 'PHPCS Warnings', - 'phpcs_errors' => 'PHPCS Errors', - 'phplint_errors' => 'Lint Errors', - 'phpunit_errors' => 'PHPUnit Errors', - 'phpdoccheck_warnings' => 'Missing Docblocks', + 'quality_trend' => 'Quality trend', + 'codeception_errors' => 'Codeception errors', + 'phpmd_warnings' => 'PHPMD warnings', + 'phpcs_warnings' => 'PHPCS warnings', + 'phpcs_errors' => 'PHPCS errors', + 'phplint_errors' => 'Lint errors', + 'phpunit_errors' => 'PHPUnit errors', + 'phpdoccheck_warnings' => 'Missing docblocks', 'issues' => 'Issues', 'codeception' => 'Codeception', diff --git a/src/PHPCensor/Languages/lang.ru.php b/src/PHPCensor/Languages/lang.ru.php index a96f87ca..7b64e137 100644 --- a/src/PHPCensor/Languages/lang.ru.php +++ b/src/PHPCensor/Languages/lang.ru.php @@ -446,7 +446,7 @@ PHP Censor', 'php_cpd' => 'PHP Copy/Paste Detector', 'php_docblock_checker' => 'PHP Docblock Checker', 'composer' => 'Composer', - 'php_loc' => 'PHPLOC', + 'php_loc' => 'PHP LOC', 'php_parallel_lint' => 'PHP Parallel Lint', 'email' => 'Email', 'atoum' => 'Atoum', diff --git a/src/PHPCensor/Languages/lang.zh.php b/src/PHPCensor/Languages/lang.zh.php index b179c6b6..daa45859 100644 --- a/src/PHPCensor/Languages/lang.zh.php +++ b/src/PHPCensor/Languages/lang.zh.php @@ -164,19 +164,19 @@ PHPCI', 'build' => 'Build', 'lines' => 'Lines', - 'comment_lines' => 'Comment Lines', - 'noncomment_lines' => 'Non-Comment Lines', - 'logical_lines' => 'Logical Lines', - 'lines_of_code' => 'Lines of Code', - 'build_log' => 'Build Log', - 'quality_trend' => 'Quality Trend', - 'codeception_errors' => 'Codeception Errors', - 'phpmd_warnings' => 'PHPMD Warnings', - 'phpcs_warnings' => 'PHPCS Warnings', - 'phpcs_errors' => 'PHPCS Errors', - 'phplint_errors' => 'Lint Errors', - 'phpunit_errors' => 'PHPUnit Errors', - 'phpdoccheck_warnings' => 'Missing Docblocks', + 'comment_lines' => 'Comment lines', + 'noncomment_lines' => 'Non-Comment lines', + 'logical_lines' => 'Logical lines', + 'lines_of_code' => 'Lines of code', + 'build_log' => 'Build log', + 'quality_trend' => 'Quality trend', + 'codeception_errors' => 'Codeception errors', + 'phpmd_warnings' => 'PHPMD warnings', + 'phpcs_warnings' => 'PHPCS warnings', + 'phpcs_errors' => 'PHPCS errors', + 'phplint_errors' => 'Lint errors', + 'phpunit_errors' => 'PHPUnit errors', + 'phpdoccheck_warnings' => 'Missing docblocks', 'issues' => 'Issues', 'codeception' => 'Codeception', diff --git a/src/PHPCensor/Model/BuildError.php b/src/PHPCensor/Model/BuildError.php index 40492eb0..4819f854 100644 --- a/src/PHPCensor/Model/BuildError.php +++ b/src/PHPCensor/Model/BuildError.php @@ -10,7 +10,6 @@ use PHPCensor\Model\Base\BuildErrorBase; /** * BuildError Model - * @uses PHPCensor\Model\Base\BuildErrorBase */ class BuildError extends BuildErrorBase { diff --git a/src/PHPCensor/View/Build/errors.phtml b/src/PHPCensor/View/Build/errors.phtml index 8a383c92..d6021d21 100644 --- a/src/PHPCensor/View/Build/errors.phtml +++ b/src/PHPCensor/View/Build/errors.phtml @@ -3,7 +3,7 @@ use PHPCensor\Helper\Lang; $linkTemplate = $build->getFileLinkTemplate(); -/** @var \PHPCI\Model\BuildError[] $errors */ +/** @var \PHPCensor\Model\BuildError[] $errors */ foreach ($errors as $error): $link = str_replace('{FILE}', $error->getFile(), $linkTemplate); @@ -11,7 +11,7 @@ foreach ($errors as $error): $link = str_replace('{LINE_END}', $error->getLineEnd(), $link); ?> - + getSeverityString()); ?> @@ -30,7 +30,7 @@ foreach ($errors as $error): ?> - getMessage(); ?> + getMessage()); ?> diff --git a/src/PHPCensor/View/Build/view.phtml b/src/PHPCensor/View/Build/view.phtml index 05fe8ee1..3543afd1 100644 --- a/src/PHPCensor/View/Build/view.phtml +++ b/src/PHPCensor/View/Build/view.phtml @@ -134,11 +134,11 @@
-
+
- +
@@ -149,7 +149,7 @@ - +
diff --git a/src/PHPCensor/View/BuildStatus/view.phtml b/src/PHPCensor/View/BuildStatus/view.phtml index 2aae24e8..381083af 100644 --- a/src/PHPCensor/View/BuildStatus/view.phtml +++ b/src/PHPCensor/View/BuildStatus/view.phtml @@ -96,7 +96,7 @@ -
+

Builds

diff --git a/src/PHPCensor/View/BuildsTable.phtml b/src/PHPCensor/View/BuildsTable.phtml index c5284297..3f094e60 100644 --- a/src/PHPCensor/View/BuildsTable.phtml +++ b/src/PHPCensor/View/BuildsTable.phtml @@ -1,9 +1,9 @@ - - - + + + @@ -11,36 +11,36 @@ getStatus()) { - case 0: - $cls = 'active'; - $subcls = 'info'; - $status = Lang::get('pending'); - - break; - - case 1: - $cls = 'warning'; - $subcls = 'warning'; - $status = Lang::get('running'); - break; - - case 2: - $cls = 'success'; - $subcls = 'success'; - $status = Lang::get('success'); - break; - - case 3: - $cls = 'danger'; - $subcls = 'danger'; - $status = Lang::get('failed'); - break; + case 0: + $cls = 'active'; + $subcls = 'info'; + $status = Lang::get('pending'); + + break; + + case 1: + $cls = 'warning'; + $subcls = 'warning'; + $status = Lang::get('running'); + break; + + case 2: + $cls = 'success'; + $subcls = 'success'; + $status = Lang::get('success'); + break; + + case 3: + $cls = 'danger'; + $subcls = 'danger'; + $status = Lang::get('failed'); + break; } ?> - - + + - - - - + + + diff --git a/src/PHPCensor/View/Group/edit.phtml b/src/PHPCensor/View/Group/edit.phtml index 0aba8f57..809fc59f 100644 --- a/src/PHPCensor/View/Group/edit.phtml +++ b/src/PHPCensor/View/Group/edit.phtml @@ -1,5 +1,5 @@ -
+

diff --git a/src/PHPCensor/View/Group/index.phtml b/src/PHPCensor/View/Group/index.phtml index f1018f3e..9b6c6b16 100644 --- a/src/PHPCensor/View/Group/index.phtml +++ b/src/PHPCensor/View/Group/index.phtml @@ -5,7 +5,7 @@
-
+

diff --git a/src/PHPCensor/View/Home/index.phtml b/src/PHPCensor/View/Home/index.phtml index debbf7ce..28ca5fcf 100644 --- a/src/PHPCensor/View/Home/index.phtml +++ b/src/PHPCensor/View/Home/index.phtml @@ -3,7 +3,7 @@
-
+

@@ -16,7 +16,7 @@
-
+

diff --git a/src/PHPCensor/View/Plugin/index.phtml b/src/PHPCensor/View/Plugin/index.phtml index f6526eba..4f017be3 100644 --- a/src/PHPCensor/View/Plugin/index.phtml +++ b/src/PHPCensor/View/Plugin/index.phtml @@ -8,7 +8,7 @@
-
+

@@ -35,7 +35,7 @@
-
+

diff --git a/src/PHPCensor/View/Project/view.phtml b/src/PHPCensor/View/Project/view.phtml index 3483eb6d..a2149600 100644 --- a/src/PHPCensor/View/Project/view.phtml +++ b/src/PHPCensor/View/Project/view.phtml @@ -42,34 +42,34 @@
-
-
+
+

()

-
#getId(), 6, '0', STR_PAD_LEFT); ?>
#getId(), 6, '0', STR_PAD_LEFT); ?> getCreated()->format('Y-m-d H:i:s'); ?> + getStatus()) ?> getBranch(); ?> - - -
- - User()->getIsAdmin()): ?> - - - -
-
getBranch(); ?> + + +
+ + User()->getIsAdmin()): ?> + + + +
+
- - - +
+ + + - - - - - - - - - - -
+ + + + + + + + + + +
-
+
getType(), ['github', 'gitlab', 'bitbucket'])): ?> -
+

@@ -100,7 +100,7 @@ getSshPublicKey()): ?> -
+

getSshPublicKey(); ?>
diff --git a/src/PHPCensor/View/ProjectForm.phtml b/src/PHPCensor/View/ProjectForm.phtml index 9f2e2701..1bdaef49 100644 --- a/src/PHPCensor/View/ProjectForm.phtml +++ b/src/PHPCensor/View/ProjectForm.phtml @@ -1,8 +1,8 @@
-
-
+
+

@@ -11,11 +11,11 @@
-
+
-
+

diff --git a/src/PHPCensor/View/Settings/index.phtml b/src/PHPCensor/View/Settings/index.phtml index e76b77f1..ba9bb404 100644 --- a/src/PHPCensor/View/Settings/index.phtml +++ b/src/PHPCensor/View/Settings/index.phtml @@ -30,20 +30,20 @@

-
+
-
+

-
+

@@ -81,7 +81,7 @@
-
+

@@ -99,7 +99,7 @@
-
+

@@ -116,7 +116,7 @@
-
+

Authentication Settings

diff --git a/src/PHPCensor/View/User/index.phtml b/src/PHPCensor/View/User/index.phtml index 84eac454..c1e2af79 100644 --- a/src/PHPCensor/View/User/index.phtml +++ b/src/PHPCensor/View/User/index.phtml @@ -6,8 +6,8 @@
-
-
+
+
@@ -56,6 +56,5 @@
- -
+
diff --git a/src/PHPCensor/View/User/profile.phtml b/src/PHPCensor/View/User/profile.phtml index 0c29451e..a9f92352 100644 --- a/src/PHPCensor/View/User/profile.phtml +++ b/src/PHPCensor/View/User/profile.phtml @@ -3,7 +3,7 @@

-
+

diff --git a/src/PHPCensor/View/UserForm.phtml b/src/PHPCensor/View/UserForm.phtml index 4a83e7ec..96234e36 100644 --- a/src/PHPCensor/View/UserForm.phtml +++ b/src/PHPCensor/View/UserForm.phtml @@ -1,9 +1,9 @@
-
-
+
+
-
+
From ae90538a380217d09208ff81aa581f276dcd7994 Mon Sep 17 00:00:00 2001 From: Dmitry Khomutov Date: Fri, 6 Jan 2017 22:12:50 +0700 Subject: [PATCH 08/10] Fixed for languages --- docs/en/plugins/codeception.md | 2 +- public/assets/css/main.css | 4 ++ public/assets/js/build-plugins/phpunit.js | 12 +++-- src/PHPCensor/Languages/lang.da.php | 1 - src/PHPCensor/Languages/lang.de.php | 1 - src/PHPCensor/Languages/lang.el.php | 1 - src/PHPCensor/Languages/lang.en.php | 2 +- src/PHPCensor/Languages/lang.es.php | 1 - src/PHPCensor/Languages/lang.fr.php | 1 - src/PHPCensor/Languages/lang.it.php | 1 - src/PHPCensor/Languages/lang.nl.php | 1 - src/PHPCensor/Languages/lang.pl.php | 1 - src/PHPCensor/Languages/lang.pt-br.php | 65 +++++++++++------------ src/PHPCensor/Languages/lang.ru.php | 4 +- src/PHPCensor/Languages/lang.uk.php | 1 - src/PHPCensor/Languages/lang.zh.php | 65 +++++++++++------------ src/PHPCensor/View/Email/layout.phtml | 2 +- src/PHPCensor/View/Home/index.phtml | 2 +- src/PHPCensor/View/layout.phtml | 5 -- tests/PHPCensor/Plugin/EmailTest.php | 2 +- 20 files changed, 83 insertions(+), 91 deletions(-) diff --git a/docs/en/plugins/codeception.md b/docs/en/plugins/codeception.md index 1d493a6e..401950d3 100644 --- a/docs/en/plugins/codeception.md +++ b/docs/en/plugins/codeception.md @@ -10,7 +10,7 @@ Configuration * **config** - Required - Can be either a single string pointing to a Codeception configuration file, or an array of configuration file paths. By default this is called `codeception.yml` and will be in the root of your project. -* **args** - Optional - The string of arguments to be passed to the run command.**Important**, due to the assumption made on line [132](https://github.com/Block8/PHPCI/blob/master/PHPCI/Plugin/Codeception.php#L132) regarding the value of `--xml` being the next argument which will not be correct if the user provides arguments using this config param, you must specify `report.xml` before any user input arguments to satisfy the report processing on line [146](https://github.com/Block8/PHPCI/blob/master/PHPCI/Plugin/Codeception.php#L146) +* **args** - Optional - The string of arguments to be passed to the run command.**Important**, due to the assumption made on line 132 regarding the value of `--xml` being the next argument which will not be correct if the user provides arguments using this config param, you must specify `report.xml` before any user input arguments to satisfy the report processing on line 146. * **path** - Optional - The path from the root of your project to the root of the codeception _output directory diff --git a/public/assets/css/main.css b/public/assets/css/main.css index 889b46e6..f841185f 100644 --- a/public/assets/css/main.css +++ b/public/assets/css/main.css @@ -563,3 +563,7 @@ h6, #phpunit-data .error td { background: none; color: #f56954; } #phpunit-data .skipped td { background: none; color: #e08e0b; } #phpunit-data .todo td { background: none; color: #00c0ef; } + +.visible-line-breaks { + white-space: pre-wrap; +} diff --git a/public/assets/js/build-plugins/phpunit.js b/public/assets/js/build-plugins/phpunit.js index 3159d00c..9f7f61b1 100644 --- a/public/assets/js/build-plugins/phpunit.js +++ b/public/assets/js/build-plugins/phpunit.js @@ -8,7 +8,7 @@ var phpunitPlugin = ActiveBuild.UiPlugin.extend({ rendered: false, statusMap: { success : 'ok', - fail: 'remove', + failed: 'remove', error: 'warning-sign', todo: 'info-sign', skipped: 'exclamation-sign' @@ -62,15 +62,19 @@ var phpunitPlugin = ActiveBuild.UiPlugin.extend({ return; } - var counts = { success: 0, fail: 0, error: 0, skipped: 0, todo: 0 }, total = 0; + var counts = { success: 0, failed: 0, error: 0, skipped: 0, todo: 0 }, total = 0; for (var i in tests) { - var severity = tests[i].severity || (tests[i].pass ? 'success' : 'fail'), + var severity = tests[i].severity || (tests[i].pass ? 'success' : 'failed'), label = ('success' == severity) ? 'success' : ( ('error' == severity) ? 'danger' : 'warning' ); + + if ('fail' === severity) { + severity = 'failed'; + } - var status = $('' + severity + ''), + var status = $(''+Lang.get(severity)+''), content = $(''), trace = $(''), message = $('
').appendTo(content), diff --git a/src/PHPCensor/Languages/lang.da.php b/src/PHPCensor/Languages/lang.da.php index fbe04ab9..9ddead7f 100644 --- a/src/PHPCensor/Languages/lang.da.php +++ b/src/PHPCensor/Languages/lang.da.php @@ -84,7 +84,6 @@ PHP Censor', 'pending' => 'Venter', 'running' => 'Kører', 'success' => 'Succes', - 'successful' => 'Lykkedes', 'failed' => 'Fejlede', 'manual_build' => 'Manuelt Build', diff --git a/src/PHPCensor/Languages/lang.de.php b/src/PHPCensor/Languages/lang.de.php index f08dc06a..a6bb9348 100644 --- a/src/PHPCensor/Languages/lang.de.php +++ b/src/PHPCensor/Languages/lang.de.php @@ -84,7 +84,6 @@ PHP Censor', 'pending' => 'Ausstehend', 'running' => 'Wird ausgeführt', 'success' => 'Erfolg', - 'successful' => 'Erfolgreich', 'failed' => 'Fehlgeschlagen', 'manual_build' => 'Manueller Build', diff --git a/src/PHPCensor/Languages/lang.el.php b/src/PHPCensor/Languages/lang.el.php index d77268a4..c4072695 100644 --- a/src/PHPCensor/Languages/lang.el.php +++ b/src/PHPCensor/Languages/lang.el.php @@ -84,7 +84,6 @@ PHP Censor', 'pending' => 'Σε εκκρεμότητα', 'running' => 'Τρέχοντα', 'success' => 'Επιτυχία', - 'successful' => 'Επιτυχής', 'failed' => 'Αποτυχία', 'manual_build' => 'Χειροκίνητη κατασκευή', diff --git a/src/PHPCensor/Languages/lang.en.php b/src/PHPCensor/Languages/lang.en.php index 22ade6c8..0f4906a6 100644 --- a/src/PHPCensor/Languages/lang.en.php +++ b/src/PHPCensor/Languages/lang.en.php @@ -87,8 +87,8 @@ PHP Censor', 'pending' => 'Pending', 'running' => 'Running', 'success' => 'Success', - 'successful' => 'Successful', 'failed' => 'Failed', + 'error' => 'Error', 'manual_build' => 'Manual Build', // Add/Edit Project: diff --git a/src/PHPCensor/Languages/lang.es.php b/src/PHPCensor/Languages/lang.es.php index b8716f78..4c4c33a6 100644 --- a/src/PHPCensor/Languages/lang.es.php +++ b/src/PHPCensor/Languages/lang.es.php @@ -83,7 +83,6 @@ PHP Censor', 'pending' => 'Pediente', 'running' => 'Ejecutando', 'success' => 'Éxito', - 'successful' => 'Exitoso', 'failed' => 'Falló', 'manual_build' => 'Build Manual', diff --git a/src/PHPCensor/Languages/lang.fr.php b/src/PHPCensor/Languages/lang.fr.php index 3ed42f22..386a2497 100644 --- a/src/PHPCensor/Languages/lang.fr.php +++ b/src/PHPCensor/Languages/lang.fr.php @@ -84,7 +84,6 @@ PHP Censor', 'pending' => 'En attente', 'running' => 'En cours', 'success' => 'Terminé', - 'successful' => 'Réussi', 'failed' => 'Échoué', 'manual_build' => 'Build manuel', diff --git a/src/PHPCensor/Languages/lang.it.php b/src/PHPCensor/Languages/lang.it.php index 675f1e39..419a419c 100644 --- a/src/PHPCensor/Languages/lang.it.php +++ b/src/PHPCensor/Languages/lang.it.php @@ -82,7 +82,6 @@ PHP Censor', 'pending' => 'In attesa', 'running' => 'In corso', 'success' => 'Successo', - 'successful' => 'Con successo', 'failed' => 'Fallita', 'manual_build' => 'Build Manuale', diff --git a/src/PHPCensor/Languages/lang.nl.php b/src/PHPCensor/Languages/lang.nl.php index 56a413e3..e5ecc72e 100644 --- a/src/PHPCensor/Languages/lang.nl.php +++ b/src/PHPCensor/Languages/lang.nl.php @@ -84,7 +84,6 @@ PHP Censor', 'pending' => 'In afwachting', 'running' => 'Lopende', 'success' => 'Succes', - 'successful' => 'Succesvol', 'failed' => 'Gefaald', 'manual_build' => 'Manuele build', diff --git a/src/PHPCensor/Languages/lang.pl.php b/src/PHPCensor/Languages/lang.pl.php index b80025ea..3c41326d 100644 --- a/src/PHPCensor/Languages/lang.pl.php +++ b/src/PHPCensor/Languages/lang.pl.php @@ -84,7 +84,6 @@ PHP Censor', 'pending' => 'Oczekujące', 'running' => 'W toku', 'success' => 'Sukces', - 'successful' => 'Zakończone sukcesem', 'failed' => 'Nieudane', 'manual_build' => 'Budowanie Manualne', diff --git a/src/PHPCensor/Languages/lang.pt-br.php b/src/PHPCensor/Languages/lang.pt-br.php index e2f3bde0..53f47d7f 100644 --- a/src/PHPCensor/Languages/lang.pt-br.php +++ b/src/PHPCensor/Languages/lang.pt-br.php @@ -12,7 +12,7 @@ $strings = array( 'language' => 'Idioma', // Log in: - 'log_in_to_phpci' => 'Acessar o PHPCI', + 'log_in_to_app' => 'Acessar o PHP Censor', 'login_error' => 'Email ou senha incorretos', 'forgotten_password_link' => 'Perdeu sua senha?', 'reset_emailed' => 'We\'ve emailed you a link to reset your password.', @@ -25,7 +25,7 @@ $strings = array( 'reset_no_user_exists' => 'No user exists with that email address, please try again.', 'reset_email_body' => 'Hi %s, -You have received this email because you, or someone else, has requested a password reset for PHPCI. +You have received this email because you, or someone else, has requested a password reset for PHP Censor. If this was you, please click the following link to reset your password: %ssession/reset-password/%d/%s @@ -33,9 +33,9 @@ Otherwise, please ignore this email and no action will be taken. Thank you, -PHPCI', +PHP Censor', - 'reset_email_title' => 'PHPCI Password Reset for %s', + 'reset_email_title' => 'PHP Censor Password Reset for %s', 'reset_invalid' => 'Invalid password reset request.', 'email_address' => 'Endereço de e-mail', 'login' => 'Login / Email Address', @@ -83,7 +83,6 @@ PHPCI', 'pending' => 'Pendente', 'running' => 'Correndo', 'success' => 'Sucesso', - 'successful' => 'Bem sucedido', 'failed' => 'Fracassado', 'manual_build' => 'Compilação manual', @@ -108,8 +107,8 @@ PHPCI', 'project_title' => 'Titulo do projeto', 'project_private_key' => 'Chave privada usada para acessar o repositório (Deixe em branco para controles remotos locais e/ou anônimos)', - 'build_config' => 'PHPCI construir configuração para este projeto - (if you cannot add a phpci.yml file in the project repository)', + 'build_config' => 'PHP Censor construir configuração para este projeto + (if you cannot add a .php-censor.yml (.phpci.yml|phpci.yml) file in the project repository)', 'default_branch' => 'Nome padrão do branch', 'allow_public_status' => 'Habilitar página de status pública e imagem para este projeto?', 'archived' => 'Arquivado', @@ -241,21 +240,21 @@ PHPCI', // Settings: 'settings_saved' => 'Your settings have been saved.', 'settings_check_perms' => 'Your settings could not be saved, check the permissions of your config.yml file.', - 'settings_cannot_write' => 'PHPCI cannot write to your config.yml file, settings may not be saved properly + 'settings_cannot_write' => 'PHP Censor cannot write to your config.yml file, settings may not be saved properly until this is rectified.', 'settings_github_linked' => 'Your GitHub account has been linked.', 'settings_github_not_linked' => 'Your GitHub account could not be linked.', 'build_settings' => 'Build Settings', 'github_application' => 'GitHub Application', 'github_sign_in' => 'Before you can start using GitHub, you need to sign in and grant - PHPCI access to your account.', - 'github_phpci_linked' => 'PHPCI is successfully linked to GitHub account.', + PHP Censor access to your account.', + 'github_linked' => 'PHP Censor is successfully linked to GitHub account.', 'github_where_to_find' => 'Where to find these...', 'github_where_help' => 'If you own the application you would like to use, you can find this information within your applications settings area.', 'email_settings' => 'Email Settings', - 'email_settings_help' => 'Before PHPCI can send build status emails, + 'email_settings_help' => 'Before PHP Censor can send build status emails, you need to configure your SMTP settings below.', 'application_id' => 'Application ID', @@ -280,7 +279,7 @@ PHPCI', '3_hours' => '3 Hours', // Plugins - 'cannot_update_composer' => 'PHPCI cannot update composer.json for you as it is not writable.', + 'cannot_update_composer' => 'PHP Censor cannot update composer.json for you as it is not writable.', 'x_has_been_removed' => '%s has been removed.', 'x_has_been_added' => '%s has been added to composer.json for you and will be installed next time you run composer update.', @@ -310,7 +309,7 @@ PHPCI', 'stage_fixed' => 'Fixed', // Installer - 'installation_url' => 'PHPCI Installation URL', + 'installation_url' => 'PHP Censor Installation URL', 'db_host' => 'Database Host', 'db_name' => 'Database Name', 'db_user' => 'Database Username', @@ -319,37 +318,37 @@ PHPCI', 'admin_pass' => 'Admin Password', 'admin_email' => 'Admin Email Address', 'config_path' => 'Config File Path', - 'install_phpci' => 'Install PHPCI', - 'welcome_to_phpci' => 'Welcome to PHPCI', + 'install_app' => 'Install PHP Censor', + 'welcome_to_app' => 'Welcome to PHP Censor', 'please_answer' => 'Please answer the following questions:', - 'phpci_php_req' => 'PHPCI requires at least PHP 5.3.8 to function.', + 'app_php_req' => 'PHP Censor requires at least PHP 5.3.8 to function.', 'extension_required' => 'Extension required: %s', - 'function_required' => 'PHPCI needs to be able to call the %s() function. Is it disabled in php.ini?', - 'requirements_not_met' => 'PHPCI cannot be installed, as not all requirements are met. + 'function_required' => 'PHP Censor needs to be able to call the %s() function. Is it disabled in php.ini?', + 'requirements_not_met' => 'PHP Censor cannot be installed, as not all requirements are met. Please review the errors above before continuing.', 'must_be_valid_email' => 'Must be a valid email address.', 'must_be_valid_url' => 'Must be a valid URL.', 'enter_name' => 'Admin Name: ', 'enter_email' => 'Admin Email: ', 'enter_password' => 'Admin Password: ', - 'enter_phpci_url' => 'Your PHPCI URL ("http://phpci.local" for example): ', + 'enter_app_url' => 'Your PHP Censor URL ("http://php-censor.local" for example): ', 'enter_db_host' => 'Please enter your MySQL host [localhost]: ', - 'enter_db_name' => 'Please enter your MySQL database name [phpci]: ', - 'enter_db_user' => 'Please enter your MySQL username [phpci]: ', + 'enter_db_name' => 'Please enter your MySQL database name [php-censor-db]: ', + 'enter_db_user' => 'Please enter your MySQL username [php-censor-user]: ', 'enter_db_pass' => 'Please enter your MySQL password: ', - 'could_not_connect' => 'PHPCI could not connect to MySQL with the details provided. Please try again.', + 'could_not_connect' => 'PHP Censor could not connect to MySQL with the details provided. Please try again.', 'setting_up_db' => 'Setting up your database... ', 'user_created' => 'User account created!', - 'failed_to_create' => 'PHPCI failed to create your admin account.', - 'config_exists' => 'The PHPCI config file exists and is not empty.', - 'update_instead' => 'If you were trying to update PHPCI, please use phpci:update instead.', + 'failed_to_create' => 'PHP Censor failed to create your admin account.', + 'config_exists' => 'The PHP Censor config file exists and is not empty.', + 'update_instead' => 'If you were trying to update PHP Censor, please use php-censor:update instead.', // Update - 'update_phpci' => 'Update the database to reflect modified models.', - 'updating_phpci' => 'Updating PHPCI database: ', - 'not_installed' => 'PHPCI does not appear to be installed.', - 'install_instead' => 'Please install PHPCI via phpci:install instead.', + 'update_app' => 'Update the database to reflect modified models.', + 'updating_app' => 'Updating PHP Censor database: ', + 'not_installed' => 'PHP Censor does not appear to be installed.', + 'install_instead' => 'Please install PHP Censor via php-censor:install instead.', // Poll Command 'poll_github' => 'Poll GitHub to check if we need to start a build.', @@ -370,18 +369,18 @@ PHPCI', 'commit_id_option' => 'Commit ID to build', 'branch_name_option' => 'Branch to build', 'add_to_queue_failed' => 'Build created successfully, but failed to add to build queue. This usually happens - when PHPCI is set to use a beanstalkd server that does not exist, + when PHP Censor is set to use a beanstalkd server that does not exist, or your beanstalkd server has stopped.', // Run Command - 'run_all_pending' => 'Run all pending PHPCI builds.', + 'run_all_pending' => 'Run all pending PHP Censor builds.', 'finding_builds' => 'Finding builds to process', 'found_n_builds' => 'Found %d builds', 'skipping_build' => 'Skipping Build %d - Project build already in progress.', 'marked_as_failed' => 'Build %d marked as failed due to timeout.', // Builder - 'missing_phpci_yml' => 'This project does not contain a phpci.yml file, or it is empty.', + 'missing_app_yml' => 'This project does not contain a .php-censor.yml (.phpci.yml|phpci.yml) file, or it is empty.', 'build_success' => 'BUILD SUCCESS', 'build_failed' => 'BUILD FAILED', 'removing_build' => 'Removing Build.', @@ -408,7 +407,7 @@ PHPCI', 'n_emails_sent' => '%d emails sent.', 'n_emails_failed' => '%d emails failed to send.', 'unable_to_set_env' => 'Unable to set environment variable', - 'tag_created' => 'Tag created by PHPCI: %s', + 'tag_created' => 'Tag created by PHP Censor: %s', 'x_built_at_x' => '%PROJECT_TITLE% built at %BUILD_URI%', 'hipchat_settings' => 'Please define room and authToken for hipchat_notify plugin', 'irc_settings' => 'You must configure a server, room and nick.', diff --git a/src/PHPCensor/Languages/lang.ru.php b/src/PHPCensor/Languages/lang.ru.php index 7b64e137..6974e02b 100644 --- a/src/PHPCensor/Languages/lang.ru.php +++ b/src/PHPCensor/Languages/lang.ru.php @@ -84,9 +84,9 @@ PHP Censor', 'latest_builds' => 'Последние сборки', 'pending' => 'Ожидает', 'running' => 'Запущена', - 'success' => 'Успех', - 'successful' => 'Успешно', + 'success' => 'Успешно', 'failed' => 'Провал', + 'error' => 'Ошибка', 'manual_build' => 'Запущена вручную', // Add/Edit Project: diff --git a/src/PHPCensor/Languages/lang.uk.php b/src/PHPCensor/Languages/lang.uk.php index 47b89706..f5aeab25 100644 --- a/src/PHPCensor/Languages/lang.uk.php +++ b/src/PHPCensor/Languages/lang.uk.php @@ -84,7 +84,6 @@ PHP Censor', 'pending' => 'Очікує', 'running' => 'Виконується', 'success' => 'Успіх', - 'successful' => 'Успішно', 'failed' => 'Провалена', 'manual_build' => 'Ручна збірка', diff --git a/src/PHPCensor/Languages/lang.zh.php b/src/PHPCensor/Languages/lang.zh.php index daa45859..830a9beb 100644 --- a/src/PHPCensor/Languages/lang.zh.php +++ b/src/PHPCensor/Languages/lang.zh.php @@ -12,7 +12,7 @@ $strings = array( 'language' => '语言选择', // Log in: - 'log_in_to_phpci' => '登录 PHPCI', + 'log_in_to_app' => '登录 PHP Censor', 'login_error' => '邮箱或密码错误', 'forgotten_password_link' => '忘记密码?', 'reset_emailed' => '已发送重置密码邮件.', @@ -25,7 +25,7 @@ $strings = array( 'reset_no_user_exists' => '不存该该邮箱用户,请检查后重试!', 'reset_email_body' => '您好 %s, -您收到这封邮件,是因为您或者别人发起了来自PHPCI的密码重置请求。 +您收到这封邮件,是因为您或者别人发起了来自PHP Censor的密码重置请求。 如果确实是您发起的,请点击链接去重置您的密码:%ssession/reset-password/%d/%s @@ -33,9 +33,9 @@ $strings = array( 多谢, -PHPCI', +PHP Censor', - 'reset_email_title' => '给 %s 来自 PHPCI 的密码重置邮件', + 'reset_email_title' => '给 %s 来自 PHP Censor 的密码重置邮件', 'reset_invalid' => '密码重置请求失败!', 'email_address' => '邮箱地址', 'password' => '密码', @@ -82,7 +82,6 @@ PHPCI', 'pending' => '等待中', 'running' => '构建中', 'success' => '成功', - 'successful' => '成功', 'failed' => '失败', 'manual_build' => 'Manual Build', @@ -108,8 +107,8 @@ PHPCI', 'project_title' => '项目标题', 'project_private_key' => '访问仓库私有秘钥 (本地或公共仓库可为空)', - 'build_config' => '该项目 PHPCI 构建配置文件 - (如果您无法在该项目仓库创建 phpci.yml 文件)', + 'build_config' => '该项目 PHP Censor 构建配置文件 + (如果您无法在该项目仓库创建 .php-censor.yml (.phpci.yml|phpci.yml) 文件)', 'default_branch' => '默认分支名称', 'allow_public_status' => '启用此项目的公共状态页和图像?', 'archived' => '归档', @@ -239,18 +238,18 @@ PHPCI', // Settings: 'settings_saved' => '您的设置已经保存。', 'settings_check_perms' => '权限不足,您的设置无法保存, 请检查 config.yml 文件.', - 'settings_cannot_write' => 'PHPCI 无法写入 config.yml 文件, 在这个问题解决前设置可能无法正常保存', + 'settings_cannot_write' => 'PHP Censor 无法写入 config.yml 文件, 在这个问题解决前设置可能无法正常保存', 'settings_github_linked' => '您的 GitHub 账户已经连接。', 'settings_github_not_linked' => '您的 GitHub 无法连接。', 'build_settings' => '构建设置', 'github_application' => 'GitHub Application', - 'github_sign_in' => '在使用您的 GitHub 账号之前, 您需要登录 GitHub , 并允许 PHPCI 访问您的账户。', - 'github_phpci_linked' => 'PHPCI 成功连接到您的 GitHub 账户。', + 'github_sign_in' => '在使用您的 GitHub 账号之前, 您需要登录 GitHub , 并允许 PHP Censor 访问您的账户。', + 'github_linked' => 'PHP Censor 成功连接到您的 GitHub 账户。', 'github_where_to_find' => '在哪里可以找到...', 'github_where_help' => '如果您想使用您自己的应用, 您可以在applications 的 setting 中 找到相关信息。', 'email_settings' => '邮箱设置', - 'email_settings_help' => 'PHPCI在发送构建状态的邮件之前,您需要配置您的SMTP设置如下。', + 'email_settings_help' => 'PHP Censor在发送构建状态的邮件之前,您需要配置您的SMTP设置如下。', 'application_id' => 'Application ID', 'application_secret' => 'Application Secret', @@ -274,7 +273,7 @@ PHPCI', '3_hours' => '3 小时', // Plugins - 'cannot_update_composer' => '由于 composer.json 文件不可写 PHPCI 无法为您更新该文件, ', + 'cannot_update_composer' => '由于 composer.json 文件不可写 PHP Censor 无法为您更新该文件, ', 'x_has_been_removed' => '%s 已经移除', 'x_has_been_added' => '%s 已经为您添加至 composer.json , 当您下次执行 composer update 时相关库将会安装', 'enabled_plugins' => '已启用插件', @@ -303,7 +302,7 @@ PHPCI', 'stage_fixed' => 'Fixed', // Installer - 'installation_url' => 'PHPCI Installation URL', + 'installation_url' => 'PHP Censor Installation URL', 'db_host' => 'Database Host', 'db_name' => 'Database Name', 'db_user' => 'Database Username', @@ -312,37 +311,37 @@ PHPCI', 'admin_pass' => 'Admin Password', 'admin_email' => 'Admin Email Address', 'config_path' => 'Config File Path', - 'install_phpci' => 'Install PHPCI', - 'welcome_to_phpci' => 'Welcome to PHPCI', + 'install_app' => 'Install PHP Censor', + 'welcome_to_app' => 'Welcome to PHP Censor', 'please_answer' => 'Please answer the following questions:', - 'phpci_php_req' => 'PHPCI requires at least PHP 5.3.8 to function.', + 'app_php_req' => 'PHP Censor requires at least PHP 5.3.8 to function.', 'extension_required' => 'Extension required: %s', - 'function_required' => 'PHPCI needs to be able to call the %s() function. Is it disabled in php.ini?', - 'requirements_not_met' => 'PHPCI cannot be installed, as not all requirements are met. + 'function_required' => 'PHP Censor needs to be able to call the %s() function. Is it disabled in php.ini?', + 'requirements_not_met' => 'PHP Censor cannot be installed, as not all requirements are met. Please review the errors above before continuing.', 'must_be_valid_email' => 'Must be a valid email address.', 'must_be_valid_url' => 'Must be a valid URL.', 'enter_name' => 'Admin Name: ', 'enter_email' => 'Admin Email: ', 'enter_password' => 'Admin Password: ', - 'enter_phpci_url' => 'Your PHPCI URL ("http://phpci.local" for example): ', + 'enter_app_url' => 'Your PHP Censor URL ("http://php-censor.local" for example): ', 'enter_db_host' => 'Please enter your MySQL host [localhost]: ', - 'enter_db_name' => 'Please enter your MySQL database name [phpci]: ', - 'enter_db_user' => 'Please enter your MySQL username [phpci]: ', + 'enter_db_name' => 'Please enter your MySQL database name [php-censor-db]: ', + 'enter_db_user' => 'Please enter your MySQL username [php-censor-user]: ', 'enter_db_pass' => 'Please enter your MySQL password: ', - 'could_not_connect' => 'PHPCI could not connect to MySQL with the details provided. Please try again.', + 'could_not_connect' => 'PHP Censor could not connect to MySQL with the details provided. Please try again.', 'setting_up_db' => 'Setting up your database... ', 'user_created' => 'User account created!', - 'failed_to_create' => 'PHPCI failed to create your admin account.', - 'config_exists' => 'The PHPCI config file exists and is not empty.', - 'update_instead' => 'If you were trying to update PHPCI, please use phpci:update instead.', + 'failed_to_create' => 'PHP Censor failed to create your admin account.', + 'config_exists' => 'The PHP Censor config file exists and is not empty.', + 'update_instead' => 'If you were trying to update PHP Censor, please use php-censor:update instead.', // Update - 'update_phpci' => 'Update the database to reflect modified models.', - 'updating_phpci' => 'Updating PHPCI database: ', - 'not_installed' => 'PHPCI does not appear to be installed.', - 'install_instead' => 'Please install PHPCI via phpci:install instead.', + 'update_app' => 'Update the database to reflect modified models.', + 'updating_app' => 'Updating PHP Censor database: ', + 'not_installed' => 'PHP Censor does not appear to be installed.', + 'install_instead' => 'Please install PHP Censor via php-censor:install instead.', // Poll Command 'poll_github' => 'Poll GitHub to check if we need to start a build.', @@ -363,18 +362,18 @@ PHPCI', 'commit_id_option' => 'Commit ID to build', 'branch_name_option' => 'Branch to build', 'add_to_queue_failed' => 'Build created successfully, but failed to add to build queue. This usually happens - when PHPCI is set to use a beanstalkd server that does not exist, + when PHP Censor is set to use a beanstalkd server that does not exist, or your beanstalkd server has stopped.', // Run Command - 'run_all_pending' => 'Run all pending PHPCI builds.', + 'run_all_pending' => 'Run all pending PHP Censor builds.', 'finding_builds' => 'Finding builds to process', 'found_n_builds' => 'Found %d builds', 'skipping_build' => 'Skipping Build %d - Project build already in progress.', 'marked_as_failed' => 'Build %d marked as failed due to timeout.', // Builder - 'missing_phpci_yml' => 'This project does not contain a phpci.yml file, or it is empty.', + 'missing_app_yml' => 'This project does not contain a .php-censor.yml (.phpci.yml|phpci.yml) file, or it is empty.', 'build_success' => 'BUILD SUCCESS', 'build_failed' => 'BUILD FAILED', 'removing_build' => 'Removing Build.', @@ -401,7 +400,7 @@ PHPCI', 'n_emails_sent' => '%d emails sent.', 'n_emails_failed' => '%d emails failed to send.', 'unable_to_set_env' => 'Unable to set environment variable', - 'tag_created' => 'Tag created by PHPCI: %s', + 'tag_created' => 'Tag created by PHP Censor: %s', 'x_built_at_x' => '%PROJECT_TITLE% built at %BUILD_URI%', 'hipchat_settings' => 'Please define room and authToken for hipchat_notify plugin', 'irc_settings' => 'You must configure a server, room and nick.', diff --git a/src/PHPCensor/View/Email/layout.phtml b/src/PHPCensor/View/Email/layout.phtml index c845d64c..a97ac991 100644 --- a/src/PHPCensor/View/Email/layout.phtml +++ b/src/PHPCensor/View/Email/layout.phtml @@ -13,7 +13,7 @@

Your commit getCommitId(); ?> generated a - isSuccessful() ? 'successful' : 'failed'; ?> build in project + isSuccessful() ? 'success' : 'failed'; ?> build in project getTitle(); ?>.

diff --git a/src/PHPCensor/View/Home/index.phtml b/src/PHPCensor/View/Home/index.phtml index 28ca5fcf..b504e319 100644 --- a/src/PHPCensor/View/Home/index.phtml +++ b/src/PHPCensor/View/Home/index.phtml @@ -42,7 +42,7 @@ case \PHPCensor\Model\Build::STATUS_SUCCESS: $updated = $build->getFinished(); - $label = Lang::get('successful'); + $label = Lang::get('success'); $color = 'green'; break; diff --git a/src/PHPCensor/View/layout.phtml b/src/PHPCensor/View/layout.phtml index 7250e8a4..254c1975 100644 --- a/src/PHPCensor/View/layout.phtml +++ b/src/PHPCensor/View/layout.phtml @@ -16,11 +16,6 @@ - + + - - - - - - - + + + + - - - -
- -

getTitle(); ?>

- - - getStatus()) { - case 0: - $statusClass = 'info'; - $statusText = 'Pending'; - break; - case 1: - $statusClass = 'warning'; - $statusText = 'Running'; - break; - case 2: - $statusClass = 'success'; - $statusText = 'Success'; - break; - case 3: - $statusClass = 'danger'; - $statusText = 'Failed'; - break; - } - - ?> - - -
- - -
-

- - getProject()->getTitle(); ?> - #getId(); ?> - - -

-
- -
-
- getCommitMessage()): ?> -
- getCommitMessage(); ?> -
- - - Branch: getBranch(); ?>
- Committer: getCommitterEmail(); ?> - - getCommitId() != 'Manual'): ?> -
Commit ID: getCommitId(); ?>
- + +
+
+
- - - - -
-

Builds

- - - - - - - - - - - - - - - - - - - + + +
+
+
+ getStatus()) - { + + $statusClass = null; + $statusText = null; + + switch ($latest->getStatus()) { case 0: - $cls = 'active'; - $subcls = 'info'; - $status = 'Pending'; - + $statusClass = 'blue'; + $statusText = 'Pending'; break; - case 1: - $cls = 'warning'; - $subcls = 'warning'; - $status = 'Running'; + $statusClass = 'yellow'; + $statusText = 'Running'; break; - case 2: - $cls = 'success'; - $subcls = 'success'; - $status = 'Success'; + $statusClass = 'green'; + $statusText = 'Success'; break; - case 3: - $cls = 'danger'; - $subcls = 'danger'; - $status = 'Failed'; + $statusClass = 'red'; + $statusText = 'Failed'; break; } - ?> -
- - +
IDCommitBranchStatus
No builds yet.
#getId(), 6, '0', STR_PAD_LEFT); ?> + ?> + +
+
+

+ getProject()->getTitle(); ?> #getId(); ?> () +

+

+ getCommitMessage()): ?> + getCommitMessage(); ?>

+ + + Branch: getBranch(); ?>
+ Committer: getCommitterEmail(); ?> + + getCommitId() != 'Manual'): ?> +
Commit: getCommitId(); ?>
+ +

+
+
+ +
+
+
+ + +
+

Builds

+ + + + + + + + + + + + + + + + + + + + getCommitId() !== 'Manual') { - print ''; - } - print $build->getCommitId(); - if ($build->getCommitId() !== 'Manual') { - print ''; + switch($build->getStatus()) + { + case 0: + $class = 'info'; + $status = 'Pending'; + + break; + + case 1: + $class = 'warning'; + $status = 'Running'; + break; + + case 2: + $class = 'success'; + $status = 'Success'; + break; + + case 3: + $class = 'danger'; + $status = 'Failed'; + break; } ?> - + + - - - - + + + + + + - -
IDCommitBranchStatus
No builds yet.
#getId(), 6, '0', STR_PAD_LEFT); ?>getBranch(); ?> - -
+ getCommitId() !== 'Manual') { + print ''; + } + print $build->getCommitId(); + if ($build->getCommitId() !== 'Manual') { + print ''; + } + ?> + getBranch(); ?> + +
+
+
+
+ +