AutorÃa | Ultima modificación | Ver Log |
<?php$currentUser = $this->currentUserHelper();$currentUser = $currentUser->getUser();$routeTimeline = $this->url('feed/timeline', ['id' => $company_uuid, 'type' => 'company']);$routeButtons = $this->url('company/view', ['id' => $company_uuid]);$this->inlineScript()->appendFile($this->basePath('vendors/jsrender/jsrender.min.js'));$this->inlineScript()->appendFile($this->basePath('vendors/bootstrap-confirmation/dist/bootstrap-confirmation.js'));$this->inlineScript()->captureStart();echo <<<JSjQuery( document ).ready(function( $ ) {$.fn.reloadButtons = function() {NProgress.start();$.ajax({'dataType' : 'json','accept' : 'application/json','method' : 'get','url' : '$routeButtons',}).done(function(response) {if(response['success']) {$('#total-followers').html(response['data']['total_followers'])console.log(response['data']);$( '#div-user-buttons' ).html($( '#userButtonsTemplate' ).render( {'link_request' : response['data']['link_request'],'link_accept' : response['data']['link_accept'],'link_cancel' : response['data']['link_cancel'],'link_follow' : response['data']['link_follow'],'link_unfollow' : response['data']['link_unfollow'],'link_leave' : response['data']['link_leave'],'link_reject' : response['data']['link_reject'],'link_contact' : response['data']['link_contact'],} ));} else {$.fn.showError(response['data']);}}).fail(function( jqXHR, textStatus, errorThrown) {$.fn.showError(textStatus);}).always(function() {NProgress.done();});}$('body').on('click', 'a.btn-remove-follower', function(e) {e.preventDefault();var action = $(this).data('link');$(this).confirmation({rootSelector: 'a.btn-remove-follower',title : 'LABEL_ARE_YOU_SURE',singleton : true,btnOkLabel: 'LABEL_YES',btnCancelLabel: 'LABEL_NO',onConfirm: function(value) {NProgress.start();$.ajax({'dataType' : 'json','accept' : 'application/json','method' : 'post','data' : {'flash' : true},'url' : action,}).done(function(response) {if(response['success']) {window.location.reload(true);} else {$.fn.showError(response['data']);}}).fail(function( jqXHR, textStatus, errorThrown) {$.fn.showError(textStatus);}).always(function() {NProgress.done();});return false;},});$(this).confirmation('show');});$('body').on('click', 'a.btn-add-follower', function(e) {e.preventDefault();var action = $(this).data('link');NProgress.start();$.ajax({'dataType' : 'json','accept' : 'application/json','method' : 'post','data' : {'flash' : true},'url' : action,}).done(function(response) {if(response['success']) {window.location.reload(true);} else {$.fn.showError(response['data']);}}).fail(function( jqXHR, textStatus, errorThrown) {$.fn.showError(textStatus);}).always(function() {NProgress.done();});return false;});$('body').on('click', 'a.btn-request', function(e) {e.preventDefault();var action = $(this).data('link');NProgress.start();$.ajax({'dataType' : 'json','accept' : 'application/json','method' : 'post','data' : {'flash' : false},'url' : action,}).done(function(response) {if(response['success']) {$.fn.showSuccess(response['data']);$.fn.reloadButtons();} else {$.fn.showError(response['data']);}}).fail(function( jqXHR, textStatus, errorThrown) {$.fn.showError(textStatus);}).always(function() {NProgress.done();});});$('body').on('click', 'a.btn-accept', function(e) {e.preventDefault();var action = $(this).data('link');NProgress.start();$.ajax({'dataType' : 'json','accept' : 'application/json','method' : 'post','data' : {'flash' : true},'url' : action,}).done(function(response) {if(response['success']) {window.location.reload(true);} else {$.fn.showError(response['data']);}}).fail(function( jqXHR, textStatus, errorThrown) {$.fn.showError(textStatus);}).always(function() {NProgress.done();});});$('body').on('click', 'a.btn-cancel', function(e) {e.preventDefault();var action = $(this).data('link');$(this).confirmation({rootSelector: 'a.btn-company-unfollow',title : 'LABEL_ARE_YOU_SURE',singleton : true,btnOkLabel: 'LABEL_YES',btnCancelLabel: 'LABEL_NO',onConfirm: function(value) {NProgress.start();$.ajax({'dataType' : 'json','accept' : 'application/json','method' : 'post','data' : {'flash' : false},'url' : action,}).done(function(response) {if(response['success']) {$.fn.showSuccess(response['data']);$.fn.reloadButtons();} else {$.fn.showError(response['data']);}}).fail(function( jqXHR, textStatus, errorThrown) {$.fn.showError(textStatus);}).always(function() {NProgress.done();});return false;},});$(this).confirmation('show');});$('body').on('click', 'a.btn-reject', function(e) {e.preventDefault();var action = $(this).data('link');$(this).confirmation({rootSelector: 'a.btn-company-unfollow',title : 'LABEL_ARE_YOU_SURE',singleton : true,btnOkLabel: 'LABEL_YES',btnCancelLabel: 'LABEL_NO',onConfirm: function(value) {NProgress.start();$.ajax({'dataType' : 'json','accept' : 'application/json','method' : 'post','data' : {'flash' : false},'url' : action,}).done(function(response) {if(response['success']) {$.fn.showSuccess(response['data']);$.fn.reloadButtons();} else {$.fn.showError(response['data']);}}).fail(function( jqXHR, textStatus, errorThrown) {$.fn.showError(textStatus);}).always(function() {NProgress.done();});return false;},});$(this).confirmation('show');});$('body').on('click', 'a.btn-leave', function(e) {e.preventDefault();var action = $(this).data('link');$(this).confirmation({rootSelector: 'a.btn-company-unfollow',title : 'LABEL_ARE_YOU_SURE',singleton : true,btnOkLabel: 'LABEL_YES',btnCancelLabel: 'LABEL_NO',onConfirm: function(value) {NProgress.start();$.ajax({'dataType' : 'json','accept' : 'application/json','method' : 'post','data' : {'flash' : true},'url' : action,}).done(function(response) {if(response['success']) {window.location.reload(true);} else {$.fn.showError(response['data']);}}).fail(function( jqXHR, textStatus, errorThrown) {$.fn.showError(textStatus);}).always(function() {NProgress.done();});return false;},});$(this).confirmation('show');});$.fn.reload = function(prepend, page) {NProgress.start();$.ajax({'dataType' : 'json','accept' : 'application/json','method' : 'get','data' : {'page' : page},'url' : '$routeTimeline'}).done(function(response) {if(response['success']) {//$('.posts-section').empty();if(prepend) {$( ".posts-section" ).prepend($( "#feedTemplate" ).render( response['data']['current']['items'] ));} else {$( ".posts-section" ).append($( "#feedTemplate" ).render( response['data']['current']['items'] ));}if(response['data']['current']['page'] < response['data']['total']['pages'] ) {$('#paginator-process-comm').data('next-page', response['data']['current']['page'] + 1);$('#paginator-process-comm').show();} else {$('#paginator-process-comm').hide();}} else {$.fn.showError(response['data']);}}).fail(function( jqXHR, textStatus, errorThrown) {$.fn.showError(textStatus);}).always(function() {NProgress.done();});}$('#paginator-process-comm').click(function(e) {e.preventDefault();var next_page = $(this).data('next-page');$.fn.reload(false, next_page);});$.fn.reload(true, 1);$.fn.reloadButtons();});JS;$this->inlineScript()->captureEnd();?><input type="text" name="test" id="test" style="display: none"><section class="cover-sec"><imgid="user-cover-img"src="<?php echo $this->url('storage', ['type' => 'company-cover', 'code' => $company_uuid, 'filename' => $cover]) ?>"alt=""></section><main><div class="main-section"><div class="container"><div class="main-section-data"><div class="row"><div class="col-lg-3"><div class="main-left-sidebar"><div class="user_profile"><div class="user-pro-img"><img id="company-img"src="<?php echo $this->url('storage', ['type' => 'company', 'code' => $company_uuid, 'filename' => $image]) ?>"alt=""></div><!--user-pro-img end--><div class="user_pro_status"><ul class="flw-status"><li><span>LABEL_FOLLOWERS</span> <b id="total-followers"><?php echo $total_followers ?></b></li></ul></div><!--user_pro_status end--><ul id="social-networks" class="social_links"><?phpif($facebook) :$l = strlen($facebook);if ($l > 32) {$s = substr($facebook, 0, 32) . '...';} else {$s = $facebook;}?><li><a href="<?php echo $facebook ?>" target="_blank" title=""><i class="fa fa-facebook-square"></i> <?php echo $s?></a></li><?php endif; ?><?phpif($twitter) :$l = strlen($twitter);if ($l > 32) {$s = substr($twitter, 0, 32) . '...';} else {$s = $twitter;}?><li><a href="<?php echo $twitter ?>" title="" target="_blank"><i class="fa fa-twitter"></i> <?php echo $s?></a></li><?php endif?><?phpif($instagram) :$l = strlen($instagram);if ($l > 32) {$s = substr($instagram, 0, 32) . '...';} else {$s = $instagram;}?><li><a href="<?php echo $instagram ?>" target="_blank" title=""><i class="fa fa-instagram"></i> <?php echo $s?></a></li><?php endif; ?></ul></div><!--user_profile end--><?php echo $this->companyFollowerHelper($company_id); ?></div><!--main-left-sidebar end--></div><div class="col-lg-6"><div class="main-ws-sec"><div class="user-tab-sec rewivew"><h3><?php echo $company_name ?></h3><div class="tab-feed"><ul><li data-tab="feed-dd" class="active animated fadeIn"><a href="#" title=""><img src="<?php echo $this->basePath('images/ic1.png') ?>" alt=""><span>LABEL_FEEDS</span></a></li><li data-tab="info-dd" class="animated fadeIn"><a href="#" title=""><img src="<?php echo $this->basePath('images/ic2.png') ?>" alt=""><span>LABEL_INFO</span></a></li></ul></div><!-- tab-feed end--></div><div class="product-feed-tab animated current fadeIn" id="feed-dd"><div class="posts-section" ><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><!--posts-section end--></div><!--product-feed-tab end--><div class="product-feed-tab animated" id="info-dd"><div class="main-ws-sec"><!--user-tab-sec end--><?php if($overview) : ?><div class="user-profile-extended-ov"><h3>LABEL_OVERVIEW</a></h3><span><?php echo $overview ?></span></div><?php endif; ?><?php$max = count($locations);if($max) :?><div class="user-profile-extended-ov st2"><h3>LABEL_LOCATIONS</h3><span><?phpfor($i = 0; $i < $max; $i++) :$location = $locations[$i];?><p><?php echo $location['formatted_address'] ?><?php echo $location['is_main'] == 'y' ? ' (LABEL_MAIN_LOCATION) ' : ''?></p><?php if($i < ($max - 1)) : ?><hr/><?php endif; ?><?php endfor; ?></span></div><?php endif; ?><!--user-profile-ov end--><?php if($industry) : ?><div class="user-profile-ov"><h3>LABEL_INDUSTRY</h3><span><?php echo $industry ?></span></div><?php endif; ?><!--user-profile-ov end--><!--user-profile-ov end--><?php if( $company_size) : ?><div class="user-profile-ov"><h3>LABEL_COMPANY_SIZE</h3><span><?php echo $company_size?></span></div><?php endif;?><!--user-profile-ov end--><!--user-profile-ov end--><?php if($foundation_year) : ?><div class="user-profile-ov"><h3>LABEL_FOUNDATION_YEAR</h3><span><?php echo $foundation_year ?></span></div><?php endif; ?><!--user-profile-ov end--><!--user-profile-ov end--><?php if($website ) : ?><div class="user-profile-ov"><h3>LABEL_WEBSITE</h3><span><?php echo $website ?></span></div><?php endif;?><!--user-profile-ov end--></div><!--main-ws-sec end--></div></div></div><div class="col-lg-3"><div class="right-sidebar"><div class="message-btn" id="div-user-buttons"></div><?php echo $this->companySuggestionHelper($company_id)?></div></div><!--right-sidebar end--></div></div></div><!-- main-section-data end--></div></div></main><script id="commentTemplate" type="text/x-jsrender"><li><div class="comment-list"><div class="comment comment-{{:unique}}" ><a href="{{>user_url}}"><h3>{{>user_name}}</h3><span><img src="<?php echo $this->basePath('images/clock.png') ?>" alt="">{{>time_elapsed}}{{if link_delete}}<a href="#" class="btn-comment-trash" data-link="{{:link_delete}}" data-comment-unique="{{>unique}}"><i class="fa fa-trash"></i></a>{{/if}}</span><p>{{>comment}}</p></div></div></li></script><script id="feedTemplate" type="text/x-jsrender"><div class="post-bar post-bar-{{>feed_unique}}"><div class="post_topbar"><div class="usy-dt"><a href="{{>owner_url}}"><img src="{{>owner_image}}" alt="" style="width:50px; height: auto"></a><div class="usy-name"><a href="{{>owner_url}}"><h3>{{>owner_name}}</h3></a><span><img src="<?php echo $this->basePath('images/clock.png') ?>" alt="">{{>owner_time_elapse}}{{if link_delete}}<a href="#" class="btn-feed-trash" data-link="{{:link_delete}}" data-feed-unique="{{>feed_unique}}"><i class="fa fa-trash"></i></a>{{/if}}</span></div></div></div><div class="job_descp"><p><div class="show-read-more">{{:owner_description}}</div></p>{{if owner_file_image}}<img src="{{>owner_file_image}}" class="Entradas">{{/if}}{{if owner_file_video}}<video src="{{>owner_file_video}}" controls poster="{{>owner_file_image_preview}}">{{/if}}{{if owner_file_document}}<a href="{{>owner_file_document}}" target="_blank">Descargar</a>{{/if}}{{if shared_name}}<div class="post-bar"><div class="post_topbar"><div class="usy-dt"><img src="{{>shared_image}}" alt="" style="width:50px; height: auto"><div class="usy-name"><h3>{{>shared_name}}</h3><span><img style="width: 12px; height: auto" src="<?php echo $this->basePath('images/clock.png') ?>" alt="">{{>shared_time_elapse}}</span></div></div></div><div class="job_descp"><p><div class="show-read-more">{{:shared_description}}</div></p>{{if shared_file_image}}<img src="{{>shared_file_image}}" class="Entradas">{{/if}}{{if shared_file_video}}<video src="{{>shared_file_video}}" controls poster="{{>shared_file_image_preview}}">{{/if}}{{if shared_file_document}}<a href="{{>shared_file_document}}" target="_blank">Descargar</a>{{/if}}</div></div>{{/if}}</div><div class="job-status-bar"><ul class="like-com"><li>{{if feed_is_liked}}<a href="{{>feed_like_url}}" id="btn-like-{{>feed_unique}}" data-feed-unique="{{>feed_unique}}" class="btn-like" style="display: none"><i class="far fa-heart"></i> Me gusta</a><a href="{{>feed_unlike_url}}" id="btn-unlike-{{>feed_unique}}" data-feed-unique="{{>feed_unique}}" class="btn-unlike" style="display: block"><i class="fas fa-heart"></i> Ya no me gusta</a>{{else}}<a href="{{>feed_like_url}}" id="btn-like-{{>feed_unique}}" data-feed-unique="{{>feed_unique}}" class="btn-like" style="display: block"><i class="far fa-heart"></i> Me gusta</a><a href="{{>feed_unlike_url}}" id="btn-unlike-{{>feed_unique}}" data-feed-unique="{{>feed_unique}}" class="btn-unlike" style="display: none"><i class="fas fa-heart"></i> Ya no me gusta</a>{{/if}}</li><li><a href="#" id="btn-comments-{{>feed_unique}}" class="btn-indicator"><i class="fas fa-comments"></i> {{>owner_comments}}</a></li><li><a href="#" id="btn-share-{{>feed_unique}}" class="btn-indicator"><i class="fas fa-share"></i> {{>owner_shared}}</a></li></ul><a href="{{>feed_share_url}}" data-feed-unique="{{>feed_unique}}" class="btn-feed-share"><i class="fas fa-share"></i>Compartir</a></div><div class="comment-section"><div class="comment-sec comment-sec-{{>feed_unique}}"><ul>{{for comments}}<li><div class="comment-list"><div class="comment comment-{{:unique}}" ><a href="{{>user_url}}"><h3>{{>user_name}}</h3><span><img src="<?php echo $this->basePath('images/clock.png') ?>" alt="">{{>time_elapsed}}{{if link_delete}}<a href="#" class="btn-comment-trash" data-link="{{:link_delete}}" data-comment-unique="{{>unique}}"><i class="fa fa-trash"></i></a>{{/if}}</span><p>{{>comment}}</p></div></div></li>{{/for}}</ul></div></div><div class="comment_box"><form class="form-comment-feed" data-feed-unique="{{>feed_unique}}" action="{{>comment_add_url}}"><input type="text" name="comment" id="comment-{{>feed_unique}}" maxlength="256" placeholder="LABEL_WRITE_A_COMMENT"><button type="submit">LABEL_SEND</button></form></div></div></script><script id="userButtonsTemplate" type="text/x-jsrender">{{if link_unfollow}}<a href="#" data-link="{{>link_unfollow}}" class="btn-remove-follower"><i class="fa fa-user-times"></i> LABEL_UNFOLLOW </a>{{/if}}{{if link_follow}}<a href="#" data-link="{{>link_follow}}" class="btn-add-follower"><i class="fa fa-plus"></i> LABEL_FOLLOW </a>{{/if}}{{if link_request}}<a href="#" data-link="{{>link_request}}" class="btn-request"><i class="fa fa-user-plus"></i> LABEL_COMPANY_REQUEST </a>{{/if}}{{if link_accept}}<a href="#" data-link="{{>link_accept}}" class="btn-accept"><i class="fa fa-check"></i> LABEL_ACCEPT </a>{{/if}}{{if link_cancel}}<a href="#" data-link="{{>link_cancel}}" title="" class="btn-cancel"><i class="fa fa-user-times " ></i> LABEL_CANCEL </a>{{/if}}{{if link_reject}}<a href="#" data-link="{{>link_reject}}" title="" class="btn-reject"><i class="fa fa-user-times " ></i> LABEL_REJECT </a>{{/if}}{{if link_leave}}<a href="#" data-link="{{>link_leave}}" title="" class="btn-leave"><i class="fa fa-user-times " ></i> LABEL_COMPANY_LEAVE </a>{{/if}}{{if link_contact}}<a href="#" data-link="{{>link_contact}}" title="" class="btn-send-message"><i class="fa fa-envelope " ></i> Mensaje </a>{{/if}}</script>