Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 4856 | Rev 5067 | Ir a la última revisión | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
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
 
5066 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,
91
}
92
 
1 www 93
JS;
4459 stevensc 94
$this->inlineScript()->appendScript($js);
4553 stevensc 95
 
96
if ($currentNetwork->theme_id == Theme::THEME_LEADERSLINKED_LINKEDIN) {
97
  $this->headLink()->appendStylesheet('/react-bundles/profile/view/main.css');
98
  $this->inlineScript()->appendFile('/react-bundles/profile/view/linkedinProfileViewBundle.js');
99
} else {
100
  $this->inlineScript()->appendFile('/react-bundles/profile/view/profileViewBundle.js');
101
}
102
 
1 www 103
?>
104
 
105
<div id="react_profile_view">
106
  <div class="process-comm" id="paginator-process-comm">
107
    <div class="spinner">
108
      <div class="bounce1"></div>
109
      <div class="bounce2"></div>
110
      <div class="bounce3"></div>
111
    </div>
112
  </div>
113
</div>