Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 7343 | Autoría | Comparar con el anterior | Ultima modificación | Ver Log |

<?php

use LeadersLinked\Library\Functions;
use LeadersLinked\Model\UserType;
use LeadersLinked\Model\Theme;

$notify = '';
$messages = $this->flashMessenger()->getInfoMessages();
foreach ($messages as $message) {
  $notify .= "$.fn.showInfo('$message')";
}

$messages = $this->flashMessenger()->getSuccessMessages();
foreach ($messages as $message) {
  $notify .= "$.fn.showSuccess('$message')";
}

$messages = $this->flashMessenger()->getWarningMessages();
foreach ($messages as $message) {
  $notify .= " $.fn.showWarning('$message')";
}

$messages = $this->flashMessenger()->getErrorMessages();
foreach ($messages as $message) {
  $notify .= " $.fn.showError('$message')";
}

if ($notify) {
  $this->inlineScript()->captureStart();
  echo " jQuery( document ).ready(function( $ ) { $notify }); ";
  $this->inlineScript()->captureEnd();
}

$routeCheckSession = $this->url('check-session');

$currentNetworkHelper = $this->currentNetworkHelper();
$currentNetwork = $currentNetworkHelper->getNetwork();

$currentUser    = $this->currentUserHelper();
// if ($currentUser->hasIdentity()) {
//   $this->inlineScript()->captureStart();
//   echo <<<EOT
//     jQuery( document ).ready(function( $ ) {
//         $.fn.checkSession = function() {
//             $.ajax({
//                 'dataType'  : 'json',
//                 'accept'    : 'application/json',
//                 'method'    : 'get',
//                 'url'       : '$routeCheckSession',
//             }).done(function(response) {
//                 if(response['success']) {
//                     if(parseInt(response['data']['total_messages']) > 0) {
//                         $('#badge-inmail').html(response['data']['total_messages']);
//                         $('#badge-inmail').show();
//                     } else {
//                         $('#badge-inmail').hide();
//                     }

//                     if(parseInt(response['data']['total_messages']) > 0) {
//                         $('#badge-message').html(response['data']['total_messages']);
//                         $('#badge-message').show();
//                     } else {
//                         $('#badge-message').hide();
//                     }

//                     if(parseInt(response['data']['total_notifications']) > 0) {
//                         $('#badge-notification').html(response['data']['total_notifications']);
//                         $('#badge-notification').show();
//                     } else {
//                         $('#badge-notification').hide();
//                     }


//                  } else {
//                     if(response['data']['url']) {
//                         window.location.href = response['data']['url'];
//                     } else {
//                         $.fn.showError(response['data']['message'])
//                     }
//                 }
//             }).fail(function( jqXHR, textStatus, errorThrown) {
//             }).always(function() {

//                 setTimeout(function() {
//                     $.fn.checkSession();
//                 }, 3000);
//             })

//         }

//         setTimeout(function() {
//             $.fn.checkSession();
//         }, 3000);

//     });
// EOT;
//   $this->inlineScript()->captureEnd();
// }
$acl = $this->viewModel()->getRoot()->getVariable('acl');

?>

<!DOCTYPE html>
<html>

<head>
  <?php
  echo $this->headTitle();
  ?>
  <link rel="icon" href="<?php echo $this->networkFavicoHelper(); ?>">
  <?php
  echo $this->headMeta()->appendHttpEquiv('X-UA-Compatible', 'IE=edge')
    ->appendHttpEquiv('expires', '0')
    ->appendHttpEquiv('expires', 'Tue, 01 Jan 1980 1:00:00 GMT')
    ->appendHttpEquiv('pragma', 'no-cache')
    ->appendHttpEquiv('Cache-Control', 'no-store')
    ->appendHttpEquiv('Cache-Control', 'max-age=0')
    ->appendHttpEquiv('Cache-Control', 'no-cache')
    ->appendHttpEquiv('charset', 'UTF-8')
    ->appendName('viewport', 'width=device-width, initial-scale=1.0');
  //->appendName('description', '')
  //->appendName('author', '{AUTHOR}')
  //->appendName('keywords', '{KEYWORDS}')
  //->appendName('copyright', '{COPYRIGHT}')
  //->appendName('google-signin-client_id', '{GOOGLE_CLIENT_ID');
  ?>
  <meta id="share">
  <link rel="stylesheet" type="text/css" href="<?php echo $this->basePath('css/bootstrap.min.css') ?>">
  <link rel="stylesheet" type="text/css" href="<?php echo $this->basePath('css/line-awesome.css') ?>">
  <link rel="stylesheet" type="text/css" href="<?php echo $this->basePath('css/line-awesome-font-awesome.min.css') ?>">

  <link rel="stylesheet" type="text/css" href="<?php echo $this->basePath('vendors/fontawesome-free/css/all.min.css') ?>">
  <link rel="stylesheet" type="text/css" href="<?php echo $this->basePath('vendors/font-awesome/css/font-awesome.min.css') ?>">
  <!-- 
        
        <link rel="stylesheet" type="text/css" href="<?php echo $this->basePath('css/font-awesome.min.css') ?>">
        <link rel="stylesheet" type="text/css" href="<?php echo $this->basePath('vendors/font-awesome/font-awesome.min.css') ?>">
        -->

  <link rel="stylesheet" type="text/css" href="<?php echo $this->basePath('css/jquery.mCustomScrollbar.min.css') ?>" />

  <link rel="stylesheet" type="text/css" href="<?php echo $this->basePath('vendors/nprogress/nprogress.css') ?>">



    <link rel="stylesheet" type="text/css" href="<?php echo $this->basePath('css/icons.css') ?>" />
    <link rel="stylesheet" type="text/css" href="<?php echo $this->basePath('vendors/smiley/assets/sprites/emojione.sprites.css') ?>" />
    <link rel="stylesheet" type="text/css" href="<?php echo $this->basePath('lib/slick/slick.css') ?>">
    <link rel="stylesheet" type="text/css" href="<?php echo $this->basePath('lib/slick/slick-theme.css') ?>">
    <link rel="stylesheet" type="text/css" href="<?php echo $this->basePath('look-and-field/chat.css') ?>" />
    <link rel="stylesheet" type="text/css" href="<?php echo $this->basePath('look-and-field/style-cesa.css') ?>" />
    <link rel="stylesheet" type="text/css" href="<?php echo $this->basePath('look-and-field/main.css') ?>" />
    <link rel="stylesheet" type="text/css" href="<?php echo $this->basePath('look-and-field/navbar.css') ?>" />
    <link rel="stylesheet" type="text/css" href="<?php echo $this->basePath('react-bundles/chat/main.css') ?>" />
    <link rel="stylesheet" type="text/css" href="<?php echo $this->basePath('look-and-field/dashboard.css') ?>" />

    <link rel="stylesheet" type="text/css" href="<?php echo $this->basePath('react-bundles/app/main.css') ?>" />


  <?php
  echo $this->headStyle();
  echo $this->networkStylesAndColorsHelper();
  echo $this->headLink();
  echo $this->headScript();
  ?>

</head>

<body>

  <?php echo $this->menuHelper($currentUser->getUserId()) ?>

  <div id="app">
     <div id="root">
    <div class="process-comm" id="paginator-process-comm">
      <div class="spinner">
        <div class="bounce1"></div>
        <div class="bounce2"></div>
        <div class="bounce3"></div>
      </div>
    </div>
        </div>
  </div>

  <?php if ($currentUser->hasIdentity() && !$currentUser->hasImpersonate()) {
    $user = $currentUser->getUser();
    echo $this->chatHelper($user->id);
  }
  ?>

  <footer>
    <div class="footy-sec mn container">

      <img class="fl-rgt" src="<?php echo $this->basePath('/images/LL-08.png') ?>" alt="">

      <?php echo $this->footerHelper() ?>

      <div class="d-flex align-items-center">
        <img src="<?php echo $this->basePath('images/copy-icon2.png') ?>" alt="">
        <p>CESA MS Copyright <?php echo date('Y') ?></p>
      </div>

    </div>
  </footer>


    <script type="text/javascript" src="<?php echo $this->basePath('vendors/smiley/smiley.js') ?>"></script>
    <script type="text/javascript" src="<?php echo $this->basePath('vendors/smiley/js/emojione.min.js') ?>"></script>
    

  <script type="text/javascript" src="<?php echo $this->basePath('vendors/jquery/jquery.min.js') ?>"></script>
  <!-- Bootstrap 4 -->
  <script type="text/javascript" src="<?php echo $this->basePath('vendors/bootstrap/js/bootstrap.bundle.min.js') ?>"></script>
  <!--  Aplicacion -->
  <script type="text/javascript" src="<?php echo $this->basePath('vendors/bootstrap-notify/bootstrap-notify.min.js') ?>"></script>

  <script type="text/javascript" src="<?php echo $this->basePath('js/app.js') ?>"></script>


  <script type="text/javascript" src="<?php echo $this->basePath('react-bundles/app/applicationBundle.js') ?>"></script>

  <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=$google_map_key&libraries=places"></script>
  <script  async="async" defer="defer" src="https://www.google.com/recaptcha/api.js?render=explicit"></script>

  <?php
  echo $this->inlineScript();
  ?>
</body>

</html>