improved design structure in the task tool - refs BT#7683

pull/2487/head
Alex Aragon 9 years ago
parent da2b6206b9
commit f0f83d3919
  1. 13
      app/Resources/public/css/base.css
  2. 77
      app/bootstrap.php.cache
  3. 7
      main/inc/ajax/model.ajax.php
  4. 3
      main/inc/lib/display.lib.php
  5. 2
      main/inc/lib/userportal.lib.php
  6. 19
      main/work/work.lib.php
  7. 26
      main/work/work_list_all.php

@ -321,6 +321,12 @@ header{
#results .file_upload_highlight {
background: #F4D364;
}
.work-action, .work-date, .work-title{
text-align: center;
}
.work-name{
padding-left: 10px;
}
.file_upload{
position: relative;
}
@ -333,13 +339,13 @@ header{
background: none;
}
.file_upload_small{
line-height: 15px;
border: 1px solid #AFDDE9;
background: #D4E6F0;
width: 100%;
border-radius: 5px;
padding-bottom: 5px;
}
.work_correction_file_upload {
height: 40px !important;
margin-bottom: 5px;
margin-top: 5px;
}
@ -5051,7 +5057,7 @@ div#chat-remote-video video {
border: none;
}
.ui-jqgrid tr.jqgrow td{
height: 45px;
line-height: 22px;
font-size: 13px;
}
.ui-jqgrid .ui-jqgrid-labels .ui-state-hover{
@ -5113,6 +5119,7 @@ div#chat-remote-video video {
}
.ui-jqgrid .ui-jqgrid-htable th {
height: 35px;
font-weight: bold;
}
.ui-jqgrid .ui-state-highlight, .ui-jqgrid .ui-widget-content .ui-state-highlight,.ui-jqgrid .ui-widget-header .ui-state-highlight{
background: #F7F7F7;

@ -412,6 +412,7 @@ return $headers;
}
namespace Symfony\Component\HttpFoundation
{
use Symfony\Component\HttpFoundation\Exception\ConflictingHeadersException;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
class Request
{
@ -764,30 +765,27 @@ $ip = $this->server->get('REMOTE_ADDR');
if (!$this->isFromTrustedProxy()) {
return array($ip);
}
if (self::$trustedHeaders[self::HEADER_FORWARDED] && $this->headers->has(self::$trustedHeaders[self::HEADER_FORWARDED])) {
$hasTrustedForwardedHeader = self::$trustedHeaders[self::HEADER_FORWARDED] && $this->headers->has(self::$trustedHeaders[self::HEADER_FORWARDED]);
$hasTrustedClientIpHeader = self::$trustedHeaders[self::HEADER_CLIENT_IP] && $this->headers->has(self::$trustedHeaders[self::HEADER_CLIENT_IP]);
if ($hasTrustedForwardedHeader) {
$forwardedHeader = $this->headers->get(self::$trustedHeaders[self::HEADER_FORWARDED]);
preg_match_all('{(for)=("?\[?)([a-z0-9\.:_\-/]*)}', $forwardedHeader, $matches);
$clientIps = $matches[3];
} elseif (self::$trustedHeaders[self::HEADER_CLIENT_IP] && $this->headers->has(self::$trustedHeaders[self::HEADER_CLIENT_IP])) {
$clientIps = array_map('trim', explode(',', $this->headers->get(self::$trustedHeaders[self::HEADER_CLIENT_IP])));
$forwardedClientIps = $matches[3];
$forwardedClientIps = $this->normalizeAndFilterClientIps($forwardedClientIps, $ip);
$clientIps = $forwardedClientIps;
}
$clientIps[] = $ip; $firstTrustedIp = null;
foreach ($clientIps as $key => $clientIp) {
if (preg_match('{((?:\d+\.){3}\d+)\:\d+}', $clientIp, $match)) {
$clientIps[$key] = $clientIp = $match[1];
}
if (!filter_var($clientIp, FILTER_VALIDATE_IP)) {
unset($clientIps[$key]);
continue;
}
if (IpUtils::checkIp($clientIp, self::$trustedProxies)) {
unset($clientIps[$key]);
if (null === $firstTrustedIp) {
$firstTrustedIp = $clientIp;
if ($hasTrustedClientIpHeader) {
$xForwardedForClientIps = array_map('trim', explode(',', $this->headers->get(self::$trustedHeaders[self::HEADER_CLIENT_IP])));
$xForwardedForClientIps = $this->normalizeAndFilterClientIps($xForwardedForClientIps, $ip);
$clientIps = $xForwardedForClientIps;
}
if ($hasTrustedForwardedHeader && $hasTrustedClientIpHeader && $forwardedClientIps !== $xForwardedForClientIps) {
throw new ConflictingHeadersException('The request has both a trusted Forwarded header and a trusted Client IP header, conflicting with each other with regards to the originating IP addresses of the request. This is the result of a misconfiguration. You should either configure your proxy only to send one of these headers, or configure Symfony to distrust one of them.');
}
if (!$hasTrustedForwardedHeader && !$hasTrustedClientIpHeader) {
return $this->normalizeAndFilterClientIps(array(), $ip);
}
return $clientIps ? array_reverse($clientIps) : array($firstTrustedIp);
return $clientIps;
}
public function getClientIp()
{
@ -1317,6 +1315,26 @@ private function isFromTrustedProxy()
{
return self::$trustedProxies && IpUtils::checkIp($this->server->get('REMOTE_ADDR'), self::$trustedProxies);
}
private function normalizeAndFilterClientIps(array $clientIps, $ip)
{
$clientIps[] = $ip; $firstTrustedIp = null;
foreach ($clientIps as $key => $clientIp) {
if (preg_match('{((?:\d+\.){3}\d+)\:\d+}', $clientIp, $match)) {
$clientIps[$key] = $clientIp = $match[1];
}
if (!filter_var($clientIp, FILTER_VALIDATE_IP)) {
unset($clientIps[$key]);
continue;
}
if (IpUtils::checkIp($clientIp, self::$trustedProxies)) {
unset($clientIps[$key]);
if (null === $firstTrustedIp) {
$firstTrustedIp = $clientIp;
}
}
}
return $clientIps ? array_reverse($clientIps) : array($firstTrustedIp);
}
}
}
namespace Symfony\Component\HttpFoundation
@ -1505,11 +1523,6 @@ public function send()
{
$this->sendHeaders();
$this->sendContent();
if (function_exists('fastcgi_finish_request')) {
fastcgi_finish_request();
} elseif ('cli'!== PHP_SAPI) {
static::closeOutputBuffers(0, true);
}
return $this;
}
public function setContent($content)
@ -2432,11 +2445,11 @@ protected $booted = false;
protected $name;
protected $startTime;
protected $loadClassCache;
const VERSION ='2.8.7';
const VERSION_ID = 20807;
const VERSION ='2.8.8';
const VERSION_ID = 20808;
const MAJOR_VERSION = 2;
const MINOR_VERSION = 8;
const RELEASE_VERSION = 7;
const RELEASE_VERSION = 8;
const EXTRA_VERSION ='';
const END_OF_MAINTENANCE ='11/2018';
const END_OF_LIFE ='11/2019';
@ -2490,6 +2503,13 @@ if (false === $this->booted) {
return;
}
if ($this->getHttpKernel() instanceof TerminableInterface) {
if (!$this->debug) {
if (function_exists('fastcgi_finish_request')) {
fastcgi_finish_request();
} elseif ('cli'!== PHP_SAPI) {
Response::closeOutputBuffers(0, true);
}
}
$this->getHttpKernel()->terminate($request, $response);
}
}
@ -3141,6 +3161,7 @@ return parent::isFresh();
namespace Symfony\Component\HttpKernel
{
use Symfony\Component\HttpKernel\Controller\ControllerResolverInterface;
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface;
use Symfony\Component\HttpKernel\Event\FilterControllerEvent;
@ -3150,6 +3171,7 @@ use Symfony\Component\HttpKernel\Event\GetResponseEvent;
use Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent;
use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent;
use Symfony\Component\HttpKernel\Event\PostResponseEvent;
use Symfony\Component\HttpFoundation\Exception\ConflictingHeadersException;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\HttpFoundation\Response;
@ -3171,6 +3193,9 @@ $request->headers->set('X-Php-Ob-Level', ob_get_level());
try {
return $this->handleRaw($request, $type);
} catch (\Exception $e) {
if ($e instanceof ConflictingHeadersException) {
$e = new BadRequestHttpException('The request headers contain conflicting information regarding the origin of this request.', $e);
}
if (false === $catch) {
$this->finishRequest($request, $type);
throw $e;

@ -836,8 +836,7 @@ switch ($action) {
if (isset($_GET['type']) && $_GET['type'] === 'simple') {
$columns = array(
//'type',
'firstname',
'lastname',
'fullname',
'title',
'qualification',
'sent_date',
@ -848,8 +847,7 @@ switch ($action) {
} else {
$columns = array(
//'type',
'firstname',
'lastname',
'fullname',
'title',
'qualification',
'sent_date',
@ -858,6 +856,7 @@ switch ($action) {
);
}
$result = get_work_user_list($start, $limit, $sidx, $sord, $work_id, $whereCondition);
break;
case 'get_work_user_list_others':
if (isset($_GET['type']) && $_GET['type'] === 'simple') {

@ -1496,8 +1496,9 @@ class Display
} else {
$notification['link'] = $notification['link'].'&notification=1';
}
$imagen = substr($notification['image'], 0, -4).'.png';
$return .= Display::url(
Display::return_icon($notification['image'], $label),
Display::return_icon($imagen, $label),
api_get_path(WEB_CODE_PATH).
$notification['link'].'&cidReq='.$course_code.
'&ref='.$notification['ref'].

@ -978,7 +978,7 @@ class IndexManager
$html = self::show_right_block(get_lang('MainNavigation'), $content, 'navigation_link_block');
}
var_dump($this->tpl->menu_navigation);
return $html;
}

@ -1840,8 +1840,7 @@ function get_work_user_list(
qualification,
weight,
allow_text_assignment,
u.firstname,
u.lastname,
CONCAT (u.firstname," ",u.lastname) as fullname,
u.username,
parent_id,
accepted,
@ -1956,16 +1955,18 @@ function get_work_user_list(
($is_allowed_to_edit || api_is_drh())
) {
// Firstname, lastname, username
$work['firstname'] = Display::div($work['firstname'], array('class' => $class));
$work['lastname'] = Display::div($work['lastname'], array('class' => $class));
$work['fullname'] = Display::div($work['fullname'], array('class' => 'work-name'));
//$work['firstname'] = Display::div($work['firstname'], array('class' => $class));
//$work['lastname'] = Display::div($work['lastname'], array('class' => $class));
$work['title_clean'] = $work['title'];
if (strlen($work['title']) > 30) {
$short_title = substr($work['title'], 0, 27).'...';
$work['title'] = Display::span($short_title, array('class' => $class, 'title' => $work['title']));
$work['title'] = Display::span($short_title, array('class' => 'work-title', 'title' => $work['title']));
} else {
$work['title'] = Display::div($work['title'], array('class' => $class));
$work['title'] = Display::div($work['title'], array('class' => 'work-title'));
}
// Type.
@ -2000,7 +2001,7 @@ function get_work_user_list(
$date = date_to_str_ago($work['sent_date']). ' ' . $add_string . ' ' . $work_date;
$work['sent_date_from_db'] = $work['sent_date'];
$work['sent_date'] = '<div class="text-center" title="'.$date.'">' . $work['sent_date'] . '</div>';
$work['sent_date'] = '<div class="work-date" title="'.$date.'">' . $work['sent_date'] . '</div>';
// Actions.
$correction = '';
@ -2126,13 +2127,13 @@ function get_work_user_list(
$qualificator_id = Display::label(get_lang('Revised'), 'success');
}
$work['qualificator_id'] = $qualificator_id;
$work['actions'] = $send_to.$link_to_download.$action;
$work['actions'] = '<div class="work-action">'.$send_to.$link_to_download.$action.'</div>';
$work['correction'] = $correction;
$works[] = $work;
}
}
return $works;
}
}

@ -179,7 +179,7 @@ if (api_is_allowed_to_session_edit(false, true) && !empty($workId) && !$isDrhOfC
$actionsLeft .= $display_output;
$url = api_get_path(WEB_CODE_PATH).'work/upload_corrections.php?'.api_get_cidreq().'&id='.$workId;
$actionsLeft .= '<a class="btn-toolbar" href="'.$url.'">'.
Display::return_icon('upload_package.png', get_lang('UpPackageFixes'), '', ICON_SIZE_MEDIUM) . ' ' . get_lang('UpPackageFixes') . '</a>';
Display::return_icon('upload_package.png', get_lang('UploadCorrectionsPackage'), '', ICON_SIZE_MEDIUM) . ' ' . get_lang('UploadCorrectionsPackage') . '</a>';
}
echo Display::toolbarAction('toolbar-worklist', array($actionsLeft), 1);
@ -289,8 +289,7 @@ if (!empty($work_data['enable_qualification']) &&
$columns = array(
//get_lang('Type'),
get_lang('FirstName'),
get_lang('LastName'),
get_lang('FullUserName'),
get_lang('Title'),
get_lang('Feedback'),
get_lang('Date'),
@ -308,15 +307,8 @@ if (!empty($work_data['enable_qualification']) &&
'sortable' => 'false',
),*/
array(
'name' => 'firstname',
'index' => 'firstname',
'width' => '35',
'align' => 'left',
'search' => 'true',
),
array(
'name' => 'lastname',
'index' => 'lastname',
'name' => 'fullname',
'index' => 'fullname',
'width' => '35',
'align' => 'left',
'search' => 'true',
@ -324,7 +316,7 @@ if (!empty($work_data['enable_qualification']) &&
array(
'name' => 'title',
'index' => 'title',
'width' => '40',
'width' => '30',
'align' => 'left',
'search' => 'false',
'wrap_cell' => "true",
@ -332,7 +324,7 @@ if (!empty($work_data['enable_qualification']) &&
array(
'name' => 'qualification',
'index' => 'qualification',
'width' => '25',
'width' => '30',
'align' => 'left',
'search' => 'true',
),
@ -347,7 +339,7 @@ if (!empty($work_data['enable_qualification']) &&
array(
'name' => 'correction',
'index' => 'correction',
'width' => '30',
'width' => '45',
'align' => 'left',
'search' => 'false',
'sortable' => 'false',
@ -355,7 +347,7 @@ if (!empty($work_data['enable_qualification']) &&
array(
'name' => 'actions',
'index' => 'actions',
'width' => '40',
'width' => '30',
'align' => 'left',
'search' => 'false',
'sortable' => 'false'
@ -367,7 +359,7 @@ if (!empty($work_data['enable_qualification']) &&
$extra_params = array(
'autowidth' => 'true',
'height' => 'auto',
'sortname' => 'firstname',
'sortname' => 'fullname',
'sortable' => 'false'
);

Loading…
Cancel
Save