Update access page design

This commit is contained in:
Xavier Rousset
2018-10-19 19:09:52 +02:00
parent 61782f5596
commit a8ebe5fc43
8 changed files with 239 additions and 211 deletions

View File

@@ -11,7 +11,7 @@
namespace Alchemy\Phrasea\Cache;
use Doctrine\Common\Cache\WincacheCache as DoctrineWinCache;
use Doctrine\Common\Cache\WinCacheCache as DoctrineWinCache;
class WinCacheCache extends DoctrineWinCache implements Cache
{

View File

@@ -201,6 +201,7 @@ class AccountController extends Controller
*/
public function accountAccess()
{
//var_dump($this->getRegistrationManager()->getRegistrationSummary($this->getAuthenticatedUser()));die;
return $this->render('account/access.html.twig', [
'inscriptions' => $this->getRegistrationManager()->getRegistrationSummary($this->getAuthenticatedUser())
]);

View File

@@ -176,7 +176,7 @@ class RegistrationManager
}
if ($isTimeLimited && $isOutDated && $isPending) {
$userRegistration['type'] = 'out-time';
$userRegistration['type'] = 'out-dated';
return $userRegistration;
}

View File

@@ -12,7 +12,7 @@
namespace Alchemy\Phrasea\TaskManager;
use Alchemy\Phrasea\Exception\RuntimeException;
use Alchemy\Phrasea\Model\Entities\Task;
use Alchemy\Phrasea\Model\Entities\Task as liveTask;
class LiveInformation
{
@@ -43,10 +43,11 @@ class LiveInformation
/**
* Returns live informations about the given task.
*
* @param liveTask $task
* @param boolean $throwException
* @return array
*/
public function getTask(Task $task, $throwException = false)
public function getTask(liveTask $task, $throwException = false)
{
$data = $this->query($throwException);
@@ -56,7 +57,7 @@ class LiveInformation
/**
* Returns live informations about some tasks.
*
* @param Task[] $tasks
* @param liveTask[] $tasks
* @param boolean $throwException
*
* @return array
@@ -73,13 +74,13 @@ class LiveInformation
return $ret;
}
private function formatTask(Task $task, $data)
private function formatTask(liveTask $task, $data)
{
$taskData = (isset($data['jobs']) && isset($data['jobs'][$task->getId()])) ? $data['jobs'][$task->getId()] : [];
return [
'configuration' => $task->getStatus(),
'actual' => isset($taskData['status']) ? $taskData['status'] : Task::STATUS_STOPPED,
'actual' => isset($taskData['status']) ? $taskData['status'] : liveTask::STATUS_STOPPED,
'process-id' => isset($taskData['process-id']) ? $taskData['process-id'] : null,
];
}