| 1 |
www |
1 |
<?php
|
|
|
2 |
$this->inlineScript()->appendFile($this->basePath('vendors/bootbox/bootbox.min.js'));
|
|
|
3 |
|
|
|
4 |
|
|
|
5 |
$months = [
|
|
|
6 |
'LABEL_MONTH_JANUARY',
|
|
|
7 |
'LABEL_MONTH_FEBRUARY',
|
|
|
8 |
'LABEL_MONTH_MARCH',
|
|
|
9 |
'LABEL_MONTH_APRIL',
|
|
|
10 |
'LABEL_MONTH_MAY',
|
|
|
11 |
'LABEL_MONTH_JUNE',
|
|
|
12 |
'LABEL_MONTH_JULY',
|
|
|
13 |
'LABEL_MONTH_AUGUST',
|
|
|
14 |
'LABEL_MONTH_SEPTEMBER',
|
|
|
15 |
'LABEL_MONTH_OCTOBER',
|
|
|
16 |
'LABEL_MONTH_NOVEMBER',
|
|
|
17 |
'LABEL_MONTH_DECEMBER',
|
|
|
18 |
];
|
|
|
19 |
|
|
|
20 |
|
|
|
21 |
|
|
|
22 |
$this->inlineScript()->captureStart();
|
|
|
23 |
echo <<<JS
|
|
|
24 |
jQuery( document ).ready(function( $ ) {
|
|
|
25 |
|
|
|
26 |
var months = [
|
|
|
27 |
'LABEL_MONTH_JANUARY',
|
|
|
28 |
'LABEL_MONTH_FEBRUARY',
|
|
|
29 |
'LABEL_MONTH_MARCH',
|
|
|
30 |
'LABEL_MONTH_APRIL',
|
|
|
31 |
'LABEL_MONTH_MAY',
|
|
|
32 |
'LABEL_MONTH_JUNE',
|
|
|
33 |
'LABEL_MONTH_JULY',
|
|
|
34 |
'LABEL_MONTH_AUGUST',
|
|
|
35 |
'LABEL_MONTH_SEPTEMBER',
|
|
|
36 |
'LABEL_MONTH_OCTOBER',
|
|
|
37 |
'LABEL_MONTH_NOVEMBER',
|
|
|
38 |
'LABEL_MONTH_DECEMBER',
|
|
|
39 |
];
|
|
|
40 |
|
|
|
41 |
|
|
|
42 |
|
|
|
43 |
$('.btn-send-message').click(function(e) {
|
|
|
44 |
e.preventDefault();
|
|
|
45 |
|
|
|
46 |
window.location.href = $(this).data('link');
|
|
|
47 |
})
|
|
|
48 |
|
|
|
49 |
$.fn.actionConnection = function() {
|
|
|
50 |
|
|
|
51 |
var action = $('.btn-action-connection').data('action');
|
|
|
52 |
|
|
|
53 |
if(action == 'request') {
|
|
|
54 |
url = $('.btn-action-connection').data('link-request');
|
|
|
55 |
} else {
|
|
|
56 |
url = $('.btn-action-connection').data('link-cancel');
|
|
|
57 |
}
|
|
|
58 |
|
|
|
59 |
NProgress.start();
|
|
|
60 |
$.ajax({
|
|
|
61 |
'dataType' : 'json',
|
|
|
62 |
'accept' : 'application/json',
|
|
|
63 |
'method' : 'post',
|
|
|
64 |
'url' : url,
|
|
|
65 |
}).done(function(response) {
|
|
|
66 |
if(response['success']) {
|
|
|
67 |
if(action == 'request') {
|
|
|
68 |
$('.btn-action-connection').removeClass('btn-request-connection');
|
|
|
69 |
$('.btn-action-connection').addClass('btn-cancel-connection');
|
|
|
70 |
$('.btn-action-connection').html('<i class="fa fa-user-times"></i> Cancelar ');
|
|
|
71 |
$('.btn-action-connection').data('action','cancel');
|
|
|
72 |
} else {
|
|
|
73 |
$('.btn-action-connection').removeClass('btn-cancel-connection');
|
|
|
74 |
$('.btn-action-connection').addClass('btn-request-connection');
|
|
|
75 |
$('.btn-action-connection').html('<i class="fa fa-user-plus"></i> Agregar ');
|
|
|
76 |
$('.btn-action-connection').data('action','request');
|
|
|
77 |
}
|
|
|
78 |
|
|
|
79 |
$.fn.showSuccess(response['data']);
|
|
|
80 |
} else {
|
|
|
81 |
$.fn.showError(response['data']);
|
|
|
82 |
}
|
|
|
83 |
}).fail(function( jqXHR, textStatus, errorThrown) {
|
|
|
84 |
$.fn.showError(textStatus);
|
|
|
85 |
}).always(function() {
|
|
|
86 |
NProgress.done();
|
|
|
87 |
});
|
|
|
88 |
|
|
|
89 |
}
|
|
|
90 |
|
|
|
91 |
$('body').on('click', 'a.btn-request-connection', function(e) {
|
|
|
92 |
e.preventDefault();
|
|
|
93 |
$.fn.actionConnection();
|
|
|
94 |
});
|
|
|
95 |
|
|
|
96 |
$('body').on('click', 'a.btn-cancel-connection', function(e) {
|
|
|
97 |
e.preventDefault();
|
|
|
98 |
|
|
|
99 |
bootbox.confirm({
|
|
|
100 |
message: 'Esta seguro de cancelar esta conexión',
|
|
|
101 |
buttons: {
|
|
|
102 |
confirm: {
|
|
|
103 |
label: 'Si',
|
|
|
104 |
className: 'btn-danger'
|
|
|
105 |
},
|
|
|
106 |
cancel: {
|
|
|
107 |
label: 'No',
|
|
|
108 |
className: 'btn-default'
|
|
|
109 |
}
|
|
|
110 |
},
|
|
|
111 |
callback: function (result) {
|
|
|
112 |
if(result) {
|
|
|
113 |
$.fn.actionConnection();
|
|
|
114 |
}
|
|
|
115 |
}
|
|
|
116 |
});
|
|
|
117 |
});
|
|
|
118 |
|
|
|
119 |
});
|
|
|
120 |
|
|
|
121 |
|
|
|
122 |
JS;
|
|
|
123 |
$this->inlineScript()->captureEnd();
|
|
|
124 |
|
|
|
125 |
?>
|
|
|
126 |
<input type="text" name="test" id="test" style="display: none">
|
|
|
127 |
|
|
|
128 |
<section class="cover-sec">
|
|
|
129 |
<img
|
|
|
130 |
id="user-cover-img"
|
|
|
131 |
src="<?php echo $this->url('storage', ['type' => 'user-cover', 'code' => $user_uuid, 'filename' => $cover]) ?>"
|
|
|
132 |
alt="">
|
|
|
133 |
</section>
|
|
|
134 |
<main>
|
|
|
135 |
<div class="main-section">
|
|
|
136 |
<div class="container">
|
|
|
137 |
|
|
|
138 |
<div class="main-section-data">
|
|
|
139 |
<div class="row">
|
|
|
140 |
<div class="col-lg-3">
|
|
|
141 |
<div class="main-left-sidebar">
|
|
|
142 |
<div class="user_profile">
|
|
|
143 |
<div class="user-pro-img">
|
|
|
144 |
<img id="user-profile-img"
|
|
|
145 |
src="<?php echo $this->url('storage', ['type' => 'user-profile', 'code' => $user_uuid, 'filename' => $image]) ?>"
|
|
|
146 |
alt="">
|
|
|
147 |
</div>
|
|
|
148 |
<!--user-pro-img end-->
|
|
|
149 |
<div class="user_pro_status">
|
|
|
150 |
<ul class="flw-status">
|
|
|
151 |
<li><span>LABEL_FOLLOWING</span> <b><?php echo $following ?></b>
|
|
|
152 |
</li>
|
|
|
153 |
<li><span>LABEL_CONNECTIONS</span> <b><?php echo $total_connections?></b>
|
|
|
154 |
</li>
|
|
|
155 |
</ul>
|
|
|
156 |
</div>
|
|
|
157 |
<!--user_pro_status end-->
|
|
|
158 |
<ul id="social-networks" class="social_links">
|
|
|
159 |
<?php
|
|
|
160 |
if($facebook) :
|
|
|
161 |
$l = strlen($facebook);
|
|
|
162 |
if ($l > 32) {
|
|
|
163 |
$s = substr($facebook, 0, 32) . '...';
|
|
|
164 |
} else {
|
|
|
165 |
$s = $facebook;
|
|
|
166 |
}
|
|
|
167 |
?>
|
|
|
168 |
<li>
|
|
|
169 |
<a href="<?php echo $facebook ?>" target="_blank" title="">
|
|
|
170 |
<i class="fa fa-facebook-square"></i>
|
|
|
171 |
<?php echo $s?>
|
|
|
172 |
</a>
|
|
|
173 |
</li>
|
|
|
174 |
<?php endif; ?>
|
|
|
175 |
<?php
|
|
|
176 |
if($twitter) :
|
|
|
177 |
$l = strlen($twitter);
|
|
|
178 |
if ($l > 32) {
|
|
|
179 |
$s = substr($twitter, 0, 32) . '...';
|
|
|
180 |
} else {
|
|
|
181 |
$s = $twitter;
|
|
|
182 |
}
|
|
|
183 |
?>
|
|
|
184 |
<li>
|
|
|
185 |
<a href="<?php echo $twitter ?>" title="" target="_blank">
|
|
|
186 |
<i class="fa fa-twitter"></i>
|
|
|
187 |
<?php echo $s?>
|
|
|
188 |
</a>
|
|
|
189 |
</li>
|
|
|
190 |
<?php endif;?>
|
|
|
191 |
<?php if($instagram) : ?>
|
|
|
192 |
<?php
|
|
|
193 |
|
|
|
194 |
$l = strlen($instagram);
|
|
|
195 |
if ($l > 32) {
|
|
|
196 |
$s = substr($instagram, 0, 32) . '...';
|
|
|
197 |
} else {
|
|
|
198 |
$s = $instagram;
|
|
|
199 |
}
|
|
|
200 |
?>
|
|
|
201 |
<li>
|
|
|
202 |
<a href="<?php echo $instagram ?>" target="_blank" title="">
|
|
|
203 |
<i class="fa fa-instagram"></i> <?php echo $s?>
|
|
|
204 |
</a>
|
|
|
205 |
</li>
|
|
|
206 |
<?php endif;?>
|
|
|
207 |
|
|
|
208 |
</ul>
|
|
|
209 |
</div>
|
|
|
210 |
<!--user_profile end-->
|
|
|
211 |
</div>
|
|
|
212 |
<!--main-left-sidebar end-->
|
|
|
213 |
</div>
|
|
|
214 |
<div class="col-lg-6">
|
|
|
215 |
<div class="main-ws-sec">
|
|
|
216 |
<div class="user-tab-sec rewivew">
|
|
|
217 |
<h3><?php echo $full_name ?></h3>
|
|
|
218 |
</div>
|
|
|
219 |
<!--user-tab-sec end-->
|
|
|
220 |
<div class="user-profile-extended-ov">
|
|
|
221 |
<h3>
|
|
|
222 |
LABEL_OVERVIEW
|
|
|
223 |
</h3>
|
|
|
224 |
<span id="overview-description"><?php echo $overview ?></span>
|
|
|
225 |
|
|
|
226 |
</div>
|
|
|
227 |
<?php $max = count($user_experiences);
|
|
|
228 |
if($max) :
|
|
|
229 |
?>
|
|
|
230 |
<div class="user-profile-extended-ov st2">
|
|
|
231 |
<h3>
|
|
|
232 |
LABEL_EXPERIENCE
|
|
|
233 |
</h3>
|
|
|
234 |
<span id="experience-records">
|
|
|
235 |
<?php
|
|
|
236 |
|
|
|
237 |
for($i = 0; $i < $max; $i++) :
|
|
|
238 |
$user_experience = $user_experiences[$i];
|
|
|
239 |
|
|
|
240 |
?>
|
|
|
241 |
<p>
|
|
|
242 |
<?php echo $user_experience['company'] ?>
|
|
|
243 |
</p>
|
|
|
244 |
<p>
|
|
|
245 |
<?php echo $user_experience['title'] ?>
|
|
|
246 |
</p>
|
|
|
247 |
<?php if($user_experience['to_year']) : ?>
|
|
|
248 |
<p><?php echo $months[$user_experience['from_month']] . ' ' .$user_experience['from_year'] ?> - <?php echo $months[$user_experience['to_month']] . ' ' . $user_experience['to_year'] ?></p>
|
|
|
249 |
<?php else : ?>
|
|
|
250 |
<p> <?php echo $months[$user_experience['from_month']] . ' ' . $user_experience['from_year'] ?> - LABEL_CURRENT</p>
|
|
|
251 |
<?php endif; ?>
|
|
|
252 |
<p><?php echo $user_experience['industry'] ?> / <?php echo $user_experience['size'] ?></p>
|
|
|
253 |
<p><?php echo $user_experience['formatted_address'] ?></p>
|
|
|
254 |
<?php if($user_experience['description']) : ?>
|
|
|
255 |
<p><?php echo $user_experience['description'] ?></p>
|
|
|
256 |
<?php endif; ?>
|
|
|
257 |
<?php if($i < ($max - 1)) : ?>
|
|
|
258 |
<hr/>
|
|
|
259 |
<?php endif; ?>
|
|
|
260 |
<?php endfor; ?>
|
|
|
261 |
</span>
|
|
|
262 |
</div>
|
|
|
263 |
<?php endif; ?>
|
|
|
264 |
<?php
|
|
|
265 |
$max = count($user_educations);
|
|
|
266 |
if($max) :
|
|
|
267 |
?>
|
|
|
268 |
<!--user-profile-ov end-->
|
|
|
269 |
<div class="user-profile-extended-ov">
|
|
|
270 |
<h3>
|
|
|
271 |
LABEL_EDUCATION
|
|
|
272 |
</h3>
|
|
|
273 |
<span id="education-records">
|
|
|
274 |
<?php
|
|
|
275 |
|
|
|
276 |
for($i = 0; $i < $max; $i++) :
|
|
|
277 |
$user_education = $user_educations[$i];
|
|
|
278 |
|
|
|
279 |
?>
|
|
|
280 |
<p>
|
|
|
281 |
<?php echo $user_education['degree'] ?>
|
|
|
282 |
</p>
|
|
|
283 |
<p>
|
|
|
284 |
<?php echo $user_education['university'] ?>
|
|
|
285 |
</p>
|
|
|
286 |
<?php if($user_education['to_year']) : ?>
|
|
|
287 |
<p><?php echo $user_education['from_year'] ?> - <?php echo $user_education['to_year'] ?></p>
|
|
|
288 |
<?php else : ?>
|
|
|
289 |
<p><?php echo $user_education['from_year'] ?> - LABEL_CURRENT</p>
|
|
|
290 |
<?php endif; ?>
|
|
|
291 |
<?php if($user_education['field_of_study']) : ?>
|
|
|
292 |
<p><?php echo $user_education['field_of_study'] ?></p>
|
|
|
293 |
<?php endif;?>
|
|
|
294 |
<p><?php echo $user_education['formatted_address'] ?></p>
|
|
|
295 |
|
|
|
296 |
<?php if($user_education['description']) : ?>
|
|
|
297 |
<p><?php echo $user_education['description'] ?></p>
|
|
|
298 |
<?php endif; ?>
|
|
|
299 |
<?php if($i < ($max - 1)) : ?>
|
|
|
300 |
<hr/>
|
|
|
301 |
<?php endif; ?>
|
|
|
302 |
<?php endfor; ?>
|
|
|
303 |
</span>
|
|
|
304 |
</div>
|
|
|
305 |
<?php endif; ?>
|
|
|
306 |
<?php if($formatted_address ) : ?>
|
|
|
307 |
<!--user-profile-ov end-->
|
|
|
308 |
<div class="user-profile-ov">
|
|
|
309 |
<h3>
|
|
|
310 |
LABEL_LOCATION
|
|
|
311 |
</h3>
|
|
|
312 |
<p id="location-formatted_address"><?php echo $formatted_address ?> </p>
|
|
|
313 |
</div>
|
|
|
314 |
<?php endif;?>
|
|
|
315 |
<!--user-profile-ov end-->
|
|
|
316 |
<?php if($user_languages) : ?>
|
|
|
317 |
<div class="user-profile-ov">
|
|
|
318 |
<h3>
|
|
|
319 |
LABEL_LANGUAGES
|
|
|
320 |
</h3>
|
|
|
321 |
<ul id="list-languages">
|
|
|
322 |
<?php foreach($user_languages as $key => $value) : ?>
|
|
|
323 |
<li><a href="#" title=""><?php echo $value ?></a></li>
|
|
|
324 |
<?php endforeach;?>
|
|
|
325 |
</ul>
|
|
|
326 |
</div>
|
|
|
327 |
<?php endif; ?>
|
|
|
328 |
|
|
|
329 |
<!--user-profile-ov end-->
|
|
|
330 |
<?php if($user_skills) : ?>
|
|
|
331 |
<div class="user-profile-ov">
|
|
|
332 |
<h3>
|
|
|
333 |
LABEL_SKILLS
|
|
|
334 |
</h3>
|
|
|
335 |
<ul id="list-skills">
|
|
|
336 |
<?php foreach($user_skills as $key => $value) : ?>
|
|
|
337 |
<li><a href="#" title=""><?php echo $value ?></a></li>
|
|
|
338 |
<?php endforeach;?>
|
|
|
339 |
|
|
|
340 |
</ul>
|
|
|
341 |
</div>
|
|
|
342 |
<?php endif; ?>
|
|
|
343 |
<!--user-profile-ov end-->
|
|
|
344 |
</div>
|
|
|
345 |
<!--main-ws-sec end-->
|
|
|
346 |
</div>
|
|
|
347 |
<div class="col-lg-3">
|
|
|
348 |
<div class="right-sidebar">
|
|
|
349 |
<?php if($show_contact) : ?>
|
|
|
350 |
|
|
|
351 |
<div class="message-btn" id="div-user-buttons">
|
|
|
352 |
<?php if(!$request_connection) :?>
|
|
|
353 |
<a href="#" data-action="cancel" data-link-request="<?php echo $link_request ?>" data-link-cancel="<?php echo $link_cancel ?>" class="btn-action-connection btn-cancel-connection"><i class="fa fa-user-times"></i> Cancelar </a>
|
|
|
354 |
<?php else : ?>
|
|
|
355 |
<a href="#" data-action="request" data-link-request="<?php echo $link_request ?>" data-link-cancel="<?php echo $link_cancel ?>" class="btn-action-connection btn-request-connection"><i class="fa fa-user-plus"></i> Agregar </a>
|
|
|
356 |
<?php endif;?>
|
|
|
357 |
<a href="#" data-link="<?php echo $link_inmail ?>" title="" class="btn-send-message"><i class="fa fa-envelope "></i> Mensaje </a>
|
|
|
358 |
</div>
|
|
|
359 |
<?php endif; ?>
|
|
|
360 |
|
|
|
361 |
<div class="right-sidebar">
|
|
|
362 |
<?php echo $this->peopleViewedProfileHelper($user_profile_id) ?>
|
|
|
363 |
</div>
|
|
|
364 |
<!--right-sidebar end-->
|
|
|
365 |
</div>
|
|
|
366 |
</div>
|
|
|
367 |
</div>
|
|
|
368 |
</div>
|
|
|
369 |
<!-- main-section-data end-->
|
|
|
370 |
</div>
|
|
|
371 |
</div>
|
|
|
372 |
</main>
|
|
|
373 |
|
|
|
374 |
<script id="userButtonsTemplate" type="text/x-jsrender">
|
|
|
375 |
{{if is_follower}}
|
|
|
376 |
<a href="#" class="btn-action-connection btn-remove-follower"><i class="fa fa-user-times"></i> LABEL_UNFOLLOW </a>
|
|
|
377 |
{{else}}
|
|
|
378 |
<a href="#" class="btn-action-connection btn-add-follower"><i class="fa fa-user-plus"></i> LABEL_FOLLOW </a>
|
|
|
379 |
{{/if}}
|
|
|
380 |
{{if show_contact}}
|
|
|
381 |
<a href="#" data-link="<?php echo $link_inmail ?>" title="" class="btn-send-message"><i class="fa fa-envelope " ></i> Mensaje </a>
|
|
|
382 |
{{/if}}
|
|
|
383 |
</script>
|