Rev 5438 | Autoría | Comparar con el anterior | Ultima modificación | Ver Log |
<?php
use LeadersLinked\Model\Theme;
$currentNetworkHelper = $this->currentNetworkHelper();
$currentNetwork = $currentNetworkHelper->getNetwork();
// 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);
$userAptitudes = json_encode($user_aptitudes);
$userHobbiesAndInterests = json_encode($user_hobbies_and_interests);
$monthsJson = json_encode($months);
$js = <<<JS
const userLanguages = Object.entries($userLanguages).map(([key, value]) => ({ value: key, name: value }))
const userSkills = Object.entries($userSkills).map(([key, value]) => ({ value: key, name: value }))
const userAptitudes = Object.entries($userAptitudes).map(([key, value]) => ({ value: key, name: value }))
const userHobbiesAndInterests = Object.entries($userHobbiesAndInterests).map(([key, value]) => ({ value: key, name: value }))
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: $userExperiences,
userEducations: $userEducations,
formatted_address: `$formatted_address`,
userLanguages: userLanguages,
userSkills: userSkills,
userAptitudes: userAptitudes,
userHobbiesAndInterests: userHobbiesAndInterests,
showContact: "$show_contact",
requestConnection: "$request_connection",
CancelConnectionUrl: "$link_cancel",
RequestConnectionUrl: "$link_request",
fullName: `$full_name`,
profileId: "$user_profile_id",
linkInmail: "$link_inmail",
view_following: $view_following,
view_total_connections: $view_total_connections,
}
const LABELS = {
FOLLOW: 'LABEL_FOLLOW',
UNFOLLOW: 'LABEL_UNFOLLOW',
SKILLS: 'LABEL_SKILLS',
LANGUAGES:'LABEL_LANGUAGES',
LOCATION:'LABEL_LOCATION',
EDUCATION:'LABEL_EDUCATION',
CURRENT:'LABEL_CURRENT',
EXPERIENCE:'LABEL_EXPERIENCE',
OVERVIEW:'LABEL_OVERVIEW',
CONNECTIONS:'LABEL_CONNECTIONS',
FOLLOWING:'LABEL_FOLLOWING',
FOLLOWERS:'LABEL_FOLLOWERS',
PROFILE_NOT_VIEWED: 'LABEL_PROFILE_NOT_VIEWED',
VIEW_MORE: 'LABEL_VIEW_MORE',
VIEW_LESS: 'LABEL_VIEW_LESS',
TITLE_CONFIRM_CONECTION: 'LABEL_TITLE_CONFIRM_CONECTION',
ACCEPT: 'LABEL_ACCEPT',
CANCEL:'LABEL_CANCEL',
CONNECT:'LABEL_CONNECT',
MESSAGE:'LABEL_MESSAGE',
PERSONAL_INFO:'LABEL_PERSONAL_INFO',
APTITUDES:'LABEL_APTITUDES',
HOBBIES_AND_INTERESTS:'LABEL_HOBBIES_AND_INTERESTS',
WHO_HAS_SEEN_THIS_PROFILE:'LABEL_WHO_HAS_SEEN_THIS_PROFILE',
EMPTY:'LABEL_DATATABLE_EMPTY',
ABOUT_GROUP: 'LABEL_ABOUT_GROUP',
FIRST_NAME: 'LABEL_FIRST_NAME',
DESCRIPTION: 'LABEL_DESCRIPTION',
SOCIAL_NETWORKS: 'LABEL_SOCIAL_NETWORKS',
}
JS;
$this->inlineScript()->appendScript($js);
if ($currentNetwork->theme_id == Theme::THEME_LEADERSLINKED_LINKEDIN) {
$this->headLink()->appendStylesheet('/react-bundles/profile/view/main.css');
$this->inlineScript()->appendFile('/react-bundles/profile/view/linkedinProfileViewBundle.js');
} else {
$this->headLink()->appendStylesheet('/look-and-field/profile.css');
$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>