1 |
www |
1 |
<?php
|
|
|
2 |
|
4553 |
stevensc |
3 |
use LeadersLinked\Model\Theme;
|
|
|
4 |
|
|
|
5 |
$currentNetworkHelper = $this->currentNetworkHelper();
|
|
|
6 |
$currentNetwork = $currentNetworkHelper->getNetwork();
|
1 |
www |
7 |
// React components
|
|
|
8 |
// View
|
|
|
9 |
// $this->inlineScript()->appendFile('/react/profile/view/View.js', 'text/jsx');
|
|
|
10 |
|
|
|
11 |
// SHARED
|
|
|
12 |
// People who viewed profile Helper
|
|
|
13 |
// $this->inlineScript()->appendFile('/react/shared/components/helper/people-viewed-profile/PeopleViewedProfile.js', 'text/jsx');
|
|
|
14 |
|
|
|
15 |
// months
|
|
|
16 |
$months = [
|
|
|
17 |
'LABEL_MONTH_JANUARY',
|
|
|
18 |
'LABEL_MONTH_FEBRUARY',
|
|
|
19 |
'LABEL_MONTH_MARCH',
|
|
|
20 |
'LABEL_MONTH_APRIL',
|
|
|
21 |
'LABEL_MONTH_MAY',
|
|
|
22 |
'LABEL_MONTH_JUNE',
|
|
|
23 |
'LABEL_MONTH_JULY',
|
|
|
24 |
'LABEL_MONTH_AUGUST',
|
|
|
25 |
'LABEL_MONTH_SEPTEMBER',
|
|
|
26 |
'LABEL_MONTH_OCTOBER',
|
|
|
27 |
'LABEL_MONTH_NOVEMBER',
|
|
|
28 |
'LABEL_MONTH_DECEMBER',
|
|
|
29 |
];
|
|
|
30 |
|
|
|
31 |
// vars to json
|
|
|
32 |
$userExperiences = json_encode($user_experiences);
|
|
|
33 |
$userEducations = json_encode($user_educations);
|
|
|
34 |
$userLanguages = json_encode($user_languages);
|
|
|
35 |
$userSkills = json_encode($user_skills);
|
3916 |
efrain |
36 |
$userAptitudes = json_encode($user_aptitudes);
|
|
|
37 |
$userHobbiesAndInterests = json_encode($user_hobbies_and_interests);
|
1 |
www |
38 |
|
3916 |
efrain |
39 |
|
1 |
www |
40 |
$monthsJson = json_encode($months);
|
|
|
41 |
|
|
|
42 |
|
|
|
43 |
$js = <<<JS
|
4591 |
stevensc |
44 |
|
|
|
45 |
const userLanguages = Object.entries($userLanguages).map(([key, value]) => ({ value: key, name: value }))
|
|
|
46 |
const userSkills = Object.entries($userSkills).map(([key, value]) => ({ value: key, name: value }))
|
|
|
47 |
const userAptitudes = Object.entries($userAptitudes).map(([key, value]) => ({ value: key, name: value }))
|
|
|
48 |
const userHobbiesAndInterests = Object.entries($userHobbiesAndInterests).map(([key, value]) => ({ value: key, name: value }))
|
|
|
49 |
|
1 |
www |
50 |
const backendVars = {
|
|
|
51 |
months: JSON.parse('$monthsJson'),
|
|
|
52 |
userIdEncrypted: "$user_uuid",
|
|
|
53 |
cover: "$cover",
|
|
|
54 |
image: "$image",
|
|
|
55 |
following: "$following",
|
|
|
56 |
total_connections: "$total_connections",
|
|
|
57 |
facebook: "$facebook",
|
|
|
58 |
twitter: "$twitter",
|
|
|
59 |
instagram: "$instagram",
|
|
|
60 |
overview: `$overview`,
|
4593 |
stevensc |
61 |
userExperiences: $userExperiences,
|
|
|
62 |
userEducations: $userEducations,
|
1 |
www |
63 |
formatted_address: `$formatted_address`,
|
4591 |
stevensc |
64 |
userLanguages: userLanguages,
|
|
|
65 |
userSkills: userSkills,
|
|
|
66 |
userAptitudes: userAptitudes,
|
|
|
67 |
userHobbiesAndInterests: userHobbiesAndInterests,
|
1 |
www |
68 |
showContact: "$show_contact",
|
|
|
69 |
requestConnection: "$request_connection",
|
|
|
70 |
CancelConnectionUrl: "$link_cancel",
|
|
|
71 |
RequestConnectionUrl: "$link_request",
|
|
|
72 |
fullName: `$full_name`,
|
|
|
73 |
profileId: "$user_profile_id",
|
3121 |
efrain |
74 |
linkInmail: "$link_inmail",
|
4856 |
stevensc |
75 |
view_following: $view_following,
|
5066 |
stevensc |
76 |
view_total_connections: $view_total_connections,
|
1 |
www |
77 |
}
|
|
|
78 |
|
5068 |
stevensc |
79 |
const LABELS = {
|
|
|
80 |
FOLLOW: 'LABEL_FOLLOW',
|
|
|
81 |
UNFOLLOW: 'LABEL_UNFOLLOW',
|
|
|
82 |
SKILLS: 'LABEL_SKILLS',
|
|
|
83 |
LANGUAGES:'LABEL_LANGUAGES',
|
|
|
84 |
LOCATION:'LABEL_LOCATION',
|
|
|
85 |
EDUCATION:'LABEL_EDUCATION',
|
|
|
86 |
CURRENT:'LABEL_CURRENT',
|
|
|
87 |
EXPERIENCE:'LABEL_EXPERIENCE',
|
|
|
88 |
OVERVIEW:'LABEL_OVERVIEW',
|
|
|
89 |
CONNECTIONS:'LABEL_CONNECTIONS',
|
|
|
90 |
FOLLOWING:'LABEL_FOLLOWING',
|
5070 |
stevensc |
91 |
FOLLOWERS:'LABEL_FOLLOWERS',
|
|
|
92 |
PROFILE_NOT_VIEWED: 'LABEL_PROFILE_NOT_VIEWED',
|
|
|
93 |
VIEW_MORE: 'LABEL_VIEW_MORE',
|
|
|
94 |
VIEW_LESS: 'LABEL_VIEW_LESS',
|
|
|
95 |
TITLE_CONFIRM_CONECTION: 'LABEL_TITLE_CONFIRM_CONECTION',
|
|
|
96 |
ACCEPT: 'LABEL_ACCEPT',
|
|
|
97 |
CANCEL:'LABEL_CANCEL',
|
|
|
98 |
CONNECT:'LABEL_CONNECT',
|
|
|
99 |
MESSAGE:'LABEL_MESSAGE',
|
|
|
100 |
PERSONAL_INFO:'LABEL_PERSONAL_INFO',
|
5069 |
stevensc |
101 |
APTITUDES:'LABEL_APTITUDES',
|
5068 |
stevensc |
102 |
HOBBIES_AND_INTERESTS:'LABEL_HOBBIES_AND_INTERESTS',
|
|
|
103 |
WHO_HAS_SEEN_THIS_PROFILE:'LABEL_WHO_HAS_SEEN_THIS_PROFILE',
|
|
|
104 |
EMPTY:'LABEL_DATATABLE_EMPTY',
|
5070 |
stevensc |
105 |
ABOUT_GROUP: 'LABEL_ABOUT_GROUP',
|
|
|
106 |
FIRST_NAME: 'LABEL_FIRST_NAME',
|
|
|
107 |
DESCRIPTION: 'LABEL_DESCRIPTION',
|
|
|
108 |
SOCIAL_NETWORKS: 'LABEL_SOCIAL_NETWORKS',
|
5066 |
stevensc |
109 |
}
|
|
|
110 |
|
1 |
www |
111 |
JS;
|
4459 |
stevensc |
112 |
$this->inlineScript()->appendScript($js);
|
4553 |
stevensc |
113 |
|
|
|
114 |
if ($currentNetwork->theme_id == Theme::THEME_LEADERSLINKED_LINKEDIN) {
|
|
|
115 |
$this->headLink()->appendStylesheet('/react-bundles/profile/view/main.css');
|
|
|
116 |
$this->inlineScript()->appendFile('/react-bundles/profile/view/linkedinProfileViewBundle.js');
|
|
|
117 |
} else {
|
|
|
118 |
$this->inlineScript()->appendFile('/react-bundles/profile/view/profileViewBundle.js');
|
|
|
119 |
}
|
|
|
120 |
|
1 |
www |
121 |
?>
|
|
|
122 |
|
|
|
123 |
<div id="react_profile_view">
|
|
|
124 |
<div class="process-comm" id="paginator-process-comm">
|
|
|
125 |
<div class="spinner">
|
|
|
126 |
<div class="bounce1"></div>
|
|
|
127 |
<div class="bounce2"></div>
|
|
|
128 |
<div class="bounce3"></div>
|
|
|
129 |
</div>
|
|
|
130 |
</div>
|
|
|
131 |
</div>
|