Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 3121 | Ir a la última revisión | Autoría | Comparar con el anterior | Ultima modificación | Ver Log |

<?php

// React components
// View
// $this->inlineScript()->appendFile('/react/profile/view/View.js', 'text/jsx');

// SHARED
//  People who viewed profile Helper
// $this->inlineScript()->appendFile('/react/shared/components/helper/people-viewed-profile/PeopleViewedProfile.js', 'text/jsx');

// months
$months = [
  'LABEL_MONTH_JANUARY',
  'LABEL_MONTH_FEBRUARY',
  'LABEL_MONTH_MARCH',
  'LABEL_MONTH_APRIL',
  'LABEL_MONTH_MAY',
  'LABEL_MONTH_JUNE',
  'LABEL_MONTH_JULY',
  'LABEL_MONTH_AUGUST',
  'LABEL_MONTH_SEPTEMBER',
  'LABEL_MONTH_OCTOBER',
  'LABEL_MONTH_NOVEMBER',
  'LABEL_MONTH_DECEMBER',
];

// vars to json
$userExperiences = json_encode($user_experiences);
$userEducations = json_encode($user_educations);
$userLanguages = json_encode($user_languages);
$userSkills = json_encode($user_skills);

$monthsJson = json_encode($months);


$js = <<<JS
const backendVars = {
  months: JSON.parse('$monthsJson'), 
  userIdEncrypted: "$user_uuid",
  cover: "$cover",
  image: "$image",
  following: "$following",
  total_connections: "$total_connections",
  facebook: "$facebook",
  twitter: "$twitter",
  instagram: "$instagram",
  overview: `$overview`,
  userExperiences: JSON.parse('$userExperiences'),
  userEducations: JSON.parse('$userEducations'),
  formatted_address: `$formatted_address`,
  userLanguages: JSON.parse('$userLanguages'),
  userSkills: JSON.parse('$userSkills'),
  showContact: "$show_contact",
  requestConnection: "$request_connection",
  CancelConnectionUrl: "$link_cancel",
  RequestConnectionUrl: "$link_request",
  fullName: `$full_name`,
  profileId: "$user_profile_id",
  linkInmail: "$link_inmail"
}

JS;
$this->headLink()->appendStylesheet('/react-bundles/profile/view/main.css');
$this->inlineScript()->appendScript($js);
$this->inlineScript()->appendFile('/react-bundles/profile/view/profileViewBundle.js');
?>

<div id="react_profile_view">
  <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>