Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 7535 | Rev 11224 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 7535 Rev 7536
Línea 2... Línea 2...
2
$currentUser = $this->currentUserHelper();
2
$currentUser = $this->currentUserHelper();
3
$currentUser = $currentUser->getUser();
3
$currentUser = $currentUser->getUser();
Línea 4... Línea 4...
4
 
4
 
Línea 5... Línea -...
5
$routeTimeline = $this->url('feeds/timeline');
-
 
6
 
5
$routeTimeline = $this->url('feeds/timeline');
7
 
-
 
8
$this->headLink()->appendStylesheet($this->basePath('plugins/nprogress/nprogress.css'));
-
 
9
$this->inlineScript()->appendFile($this->basePath('plugins/nprogress/nprogress.js'));
6
 
10
 
-
 
11
$this->inlineScript()->appendFile($this->basePath('plugins/ckeditor/ckeditor.js'));
-
 
12
 
7
$this->headLink()->appendStylesheet('css/line-awesome.css');
13
 
8
$this->headLink()->appendStylesheet('css/line-awesome-font-awesome.min.css');
14
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap-fileinput/css/fileinput.min.css'));
-
 
15
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap-fileinput/themes/explorer-fa/theme.css'));
-
 
16
 
-
 
17
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-fileinput/js/plugins/piexif.js'));
-
 
18
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-fileinput/js/plugins/sortable.js'));
-
 
19
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-fileinput/js/fileinput.js'));
-
 
20
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-fileinput/js/locales/es.js'));
-
 
21
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-fileinput/themes/fa/theme.js'));
-
 
22
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-fileinput/themes/explorer-fa/theme.js'));
-
 
23
 
-
 
24
 
-
 
25
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/jquery.validate.js'));
-
 
26
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/additional-methods.js'));
-
 
27
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/localization/messages_es.js'));
9
$this->headLink()->appendStylesheet('vendors/fontawesome-free/css/all.min.css');
28
 
-
 
29
$this->inlineScript()->appendFile($this->basePath('plugins/jsrender/jsrender.min.js'));
-
 
30
 
10
$this->headLink()->appendStylesheet('vendors/font-awesome/css/font-awesome.min.css');  	
31
 
-
 
32
$this->inlineScript()->appendFile($this->basePath('plugins/bootbox/bootbox.all.min.js'));
-
 
33
 
11
$this->headLink()->appendStylesheet('css/font-awesome.min.css');
34
$this->inlineScript()->captureStart();
12
$this->headLink()->appendStylesheet('vendors/font-awesome/font-awesome.min.css');
35
 
-
 
36
echo <<<JS
-
 
37
jQuery( document ).ready(function( $ ) {
-
 
38
    var feed_unique_shared = '';
-
 
39
 
-
 
40
    $.validator.addMethod('requiredContent', function (value, element, param) {
-
 
41
        value = $.trim($.fn.stripHtml(value));
-
 
42
        return value.length > 0;
-
 
43
    }, 'ERROR_REQUIRED');
-
 
44
 
-
 
45
    $.fn.reload = function(page) {
13
 
46
        NProgress.start();
-
 
47
        $.ajax({
-
 
48
            'dataType'  : 'json',
-
 
49
            'accept'    : 'application/json',
-
 
50
            'method'    : 'get',
-
 
51
            'data'      : {
-
 
52
                'page' : page
14
$js = <<<JS
53
            },
-
 
54
            'url'       :  '$routeTimeline'
-
 
55
        }).done(function(response) {
-
 
56
            if(response['success']) {
-
 
57
                $('.posts-section').empty();
-
 
58
 
-
 
59
                $( ".posts-section" ).append(
-
 
60
                    $( "#feedTemplate" ).render( response['data']['current']['items'] )
-
 
61
                );
-
 
62
            
-
 
63
 
-
 
64
                if(response['data']['total']['pages'] > 1 ) {
-
 
65
             
-
 
66
                    $('#paginator-process-comm').show();
-
 
67
                    if(response['data']['current']['page']  > 1) {
-
 
68
                        $('#btn-page-previous').data('page', response['data']['current']['page'] - 1);
-
 
69
                        $('#btn-page-previous').show();
-
 
70
                    } else {
-
 
71
                         $('#btn-page-previous').hide();
-
 
72
                    } 
-
 
73
                    if(response['data']['current']['page'] <  response['data']['total']['pages']) {
-
 
74
                        $('#btn-page-next').data('page', response['data']['current']['page'] + 1);
-
 
75
                        $('#btn-page-next').show();
-
 
76
                    } else {
-
 
77
                         $('#btn-page-next').hide();
-
 
78
                    } 
-
 
79
 
-
 
80
                    $('#paginator-process-comm').show();
-
 
81
      
-
 
82
                } else {
-
 
83
                    $('#paginator-process-comm').hide();
-
 
84
                }
-
 
85
                            
-
 
86
    
-
 
87
            } else {
-
 
88
                $.fn.showError(response['data']);
-
 
89
            } 
-
 
90
        }).fail(function( jqXHR, textStatus, errorThrown) {
-
 
91
            $.fn.showError(textStatus);
-
 
92
        }).always(function() {
-
 
93
            NProgress.done();
-
 
94
        });
-
 
95
 
-
 
96
    }
-
 
97
 
-
 
98
    $('#btn-page-previous').click(function(e) {
-
 
99
        e.preventDefault();
-
 
100
 
-
 
101
        var page = $(this).data('page');
-
 
102
        $.fn.reload(page);
-
 
103
        
-
 
104
    });
-
 
105
 
-
 
106
    $('#btn-page-next').click(function(e) {
-
 
107
        e.preventDefault();
-
 
108
 
-
 
109
        var page = $(this).data('page');
-
 
110
        $.fn.reload(page);
-
 
111
        
-
 
112
    });
-
 
113
 
-
 
114
    $.validator.setDefaults({
-
 
115
        debug: true,
-
 
116
        highlight: function(element) {
-
 
117
            $(element).addClass('form-group-has-error');
-
 
118
        },
-
 
119
        unhighlight: function(element) {
-
 
120
            $(element).removeClass('form-group-has-error');
-
 
121
        },
-
 
122
        errorElement: 'div',
-
 
123
        errorClass: 'form-group-invalid-feedback',
-
 
124
        errorPlacement: function(error, element) {
-
 
125
            if(element.context.id == 'file') {
-
 
126
                error.insertAfter(element.parent().parent().parent());
-
 
127
            } else { 
-
 
128
               if(element.parent('.form-group').length) {
-
 
129
                    error.insertAfter(element.parent());
-
 
130
                } else {
-
 
131
                    error.insertAfter(element);
-
 
132
                }
-
 
133
            }
-
 
134
 
-
 
135
 
-
 
136
        }
-
 
137
    });
-
 
138
    
-
 
139
    $.fn.showFormErrorValidator = function(fieldname, errors) {
-
 
140
        var field = $(fieldname);
-
 
141
        if(field) {
-
 
142
            $(field).addClass('form-group-has-error');
-
 
143
            
-
 
144
            var error = $('<div id="' + fieldname +'-error" class="form-group-invalid-feedback">' + errors + '</div>');
-
 
145
 
-
 
146
            var element = $(fieldname)
-
 
147
            if(element.parent('.form-group').length) {
-
 
148
                error.insertAfter(element.parent());
-
 
149
            } else if(element.parent('.file-loading').length) {
-
 
150
                error.insertAfter(element.parent().parent());
-
 
151
            } else {
-
 
152
                error.insertAfter(element);
-
 
153
            }
-
 
154
        }
-
 
155
    };
-
 
156
 
-
 
157
    var validatorFeed = $('#form-feed').validate({
-
 
158
        debug: true,
-
 
159
        onclick: false,
-
 
160
        onkeyup: false,
-
 
161
        onfocusout: false,
-
 
162
        ignore: [],
-
 
163
        rules: {
-
 
164
            'shared_with' : {
-
 
165
                required: true,
-
 
166
            },
-
 
167
           'description': {
-
 
168
                updateCkeditor:function() {
-
 
169
                        CKEDITOR.instances.description_feed.updateElement();
-
 
170
                },
-
 
171
                required: true
-
 
172
            },
-
 
173
        },
-
 
174
 
-
 
175
        submitHandler: function(form)
-
 
176
        {
-
 
177
            $('input[type="submit"]').prop('disabled', true);
-
 
178
            NProgress.start();
-
 
179
            $.ajax({
-
 
180
                'dataType'  : 'json',
-
 
181
                'accept'    : 'application/json',
-
 
182
                'method'    : 'post',
-
 
183
                'url'       : $('#form-feed').attr('action'),
-
 
184
                'data'      : $('#form-feed').serialize(),
-
 
185
            }).done(function(response) {
-
 
186
                if(response['success']) {
-
 
187
                    var s = $( "#feedTemplate" ).render( response['data'] );
-
 
188
                    $(s).prependTo(".posts-section");                    
-
 
189
 
-
 
190
                   $('#form-feed')[0].reset()
-
 
191
                    $("#modal-feed-box").modal('hide'); 
-
 
192
                } else {
-
 
193
                    validatorFeed.resetForm();
-
 
194
                    if(jQuery.type(response['data']) == 'string') {
-
 
195
                        $.fn.showError(response['data']);
-
 
196
                    } else  {
-
 
197
                        $.each(response['data'], function( fieldname, errors ) {
-
 
198
                            $.fn.showFormErrorValidator('#form-feed #' + fieldname, errors);
-
 
199
                        });
-
 
200
                    }
-
 
201
                }
-
 
202
            }).fail(function( jqXHR, textStatus, errorThrown) {
-
 
203
                $.fn.showError(textStatus);
-
 
204
            }).always(function() {
-
 
205
                $('input[type="submit"]').prop('disabled', false);
-
 
206
                NProgress.done();
-
 
207
            });
-
 
208
            return false;
-
 
209
        },
-
 
210
        invalidHandler: function(form, validator) {
-
 
211
        
-
 
212
        }
-
 
213
    });
-
 
214
 
-
 
215
    $('.btn-modal-feed-close').click(function(e) {
-
 
216
        e.preventDefault();
-
 
217
        $('#form-feed')[0].reset()
-
 
218
        $('#modal-feed-box').modal('hide');
-
 
219
        return false;
-
 
220
    });
-
 
221
 
-
 
222
    $('#description-main, #btn-description-main').click(function(e) {
-
 
223
        e.preventDefault();
-
 
224
 
-
 
225
        $('#form-feed')[0].reset()
-
 
226
        validatorFeed.resetForm();
-
 
227
        $("#modal-feed-box").modal('show'); 
-
 
228
    })
-
 
229
 
-
 
230
    var validatorFeedImage = $('#form-feed-image').validate({
-
 
231
        debug: true,
-
 
232
        onclick: false,
-
 
233
        onkeyup: false,
-
 
234
        onfocusout: false,
-
 
235
        ignore: [],
-
 
236
        rules: {
-
 
237
            'shared_with' : {
-
 
238
                required: true,
-
 
239
            },
-
 
240
           'description': {
-
 
241
                updateCkeditor:function() {
-
 
242
                        CKEDITOR.instances.description_image.updateElement();
-
 
243
                },
-
 
244
                required: true
-
 
245
            },
-
 
246
           'file': {
-
 
247
                required: true,
-
 
248
                extension: 'jpg|jpeg|png',
-
 
249
                accept: 'image/jpg,image/jpeg,image/png'
-
 
250
            },
-
 
251
        },
-
 
252
 
-
 
253
        submitHandler: function(form)
-
 
254
        {
-
 
255
            var formdata = false;
-
 
256
            if (window.FormData){
-
 
257
                formdata = new FormData(form); //form[0]);
-
 
258
            }
-
 
259
 
-
 
260
            $('input[type="submit"]').prop('disabled', true);
-
 
261
            NProgress.start();
-
 
262
            $.ajax({
-
 
263
                'dataType'  : 'json',
-
 
264
                'accept'    : 'application/json',
-
 
265
                'method'    : 'post',
-
 
266
                'url'       :  $('#form-feed-image').attr('action'),
-
 
267
                'data'      : formdata ? formdata : $('#form-feed-image').serialize(),
-
 
268
                'processData': false,
-
 
269
                'contentType': false,
-
 
270
            }).done(function(response) {
-
 
271
                if(response['success']) {
-
 
272
                    
-
 
273
 
-
 
274
                    var s = $( "#feedTemplate" ).render( response['data'] );
-
 
275
                    $(s).prependTo(".posts-section");  
-
 
276
 
-
 
277
                    $("#modal-feed-image-box").modal('hide');
-
 
278
                } else {
-
 
279
                    validatorFeedImage.resetForm();
-
 
280
                    if(jQuery.type(response['data']) == 'string') {
-
 
281
                        $.fn.showError(response['data']);
-
 
282
                    } else  {
-
 
283
                        $.each(response['data'], function( fieldname, errors ) {
-
 
284
                            $.fn.showFormErrorValidator('#form-feed-image #' + fieldname, errors);
-
 
285
                        });
-
 
286
                    }
-
 
287
                }
-
 
288
            }).fail(function( jqXHR, textStatus, errorThrown) {
-
 
289
                $.fn.showError(textStatus);
-
 
290
            }).always(function() {
-
 
291
                $('input[type="submit"]').prop('disabled', false);
-
 
292
                NProgress.done();
-
 
293
            });
-
 
294
            return false;
-
 
295
        },
-
 
296
        invalidHandler: function(form, validator) {
-
 
297
        
-
 
298
        }
-
 
299
    });
-
 
300
 
-
 
301
    var validatorFeedVideo = $('#form-feed-video').validate({
-
 
302
        debug: true,
-
 
303
        onclick: false,
-
 
304
        onkeyup: false,
-
 
305
        onfocusout: false,
-
 
306
        ignore: [],
-
 
307
        rules: {
-
 
308
            'shared_with' : {
-
 
309
                required: true,
-
 
310
            },
-
 
311
           'description': {
-
 
312
                updateCkeditor:function() {
-
 
313
                        CKEDITOR.instances.description_video.updateElement();
-
 
314
                },
-
 
315
                required: true
-
 
316
            },
-
 
317
           'file': {
-
 
318
                required: true,
-
 
319
                extension: 'webm,mp4,webm',
-
 
320
                accept: 'video/webm,video/mpeg,video/mp4'
-
 
321
            },
-
 
322
        },
-
 
323
 
-
 
324
        submitHandler: function(form)
-
 
325
        {
-
 
326
            var formdata = false;
-
 
327
            if (window.FormData){
-
 
328
                formdata = new FormData(form); //form[0]);
-
 
329
            }
-
 
330
 
-
 
331
            $('input[type="submit"]').prop('disabled', true);
-
 
332
            NProgress.start();
-
 
333
            $.ajax({
-
 
334
                'dataType'  : 'json',
-
 
335
                'accept'    : 'application/json',
-
 
336
                'method'    : 'post',
-
 
337
                'url'       :  $('#form-feed-video').attr('action'),
-
 
338
                'data'      : formdata ? formdata : $('#form-feed-video').serialize(),
-
 
339
                'processData': false,
-
 
340
                'contentType': false,
-
 
341
            }).done(function(response) {
-
 
342
                if(response['success']) {
-
 
343
                    var s = $( "#feedTemplate" ).render( response['data'] );
-
 
344
                    $(s).prependTo(".posts-section");  
-
 
345
 
-
 
346
                    $("#modal-feed-video-box").modal('hide');
-
 
347
                } else {
-
 
348
                    validatorFeedVideo.resetForm();
-
 
349
                    if(jQuery.type(response['data']) == 'string') {
-
 
350
                        $.fn.showError(response['data']);
-
 
351
                    } else  {
-
 
352
                        $.each(response['data'], function( fieldname, errors ) {
-
 
353
                            $.fn.showFormErrorValidator('#form-feed-video #' + fieldname, errors);
-
 
354
                        });
-
 
355
                    }
-
 
356
                }
-
 
357
            }).fail(function( jqXHR, textStatus, errorThrown) {
-
 
358
                $.fn.showError(textStatus);
-
 
359
            }).always(function() {
-
 
360
                $('input[type="submit"]').prop('disabled', false);
-
 
361
                NProgress.done();
-
 
362
            });
-
 
363
            return false;
-
 
364
        },
-
 
365
        invalidHandler: function(form, validator) {
-
 
366
        
-
 
367
        }
-
 
368
    });
-
 
369
 
-
 
370
    var validatorFeedDocument = $('#form-feed-document').validate({
-
 
371
        debug: true,
-
 
372
        onclick: false,
-
 
373
        onkeyup: false,
-
 
374
        onfocusout: false,
-
 
375
        ignore: [],
-
 
376
        rules: {
-
 
377
            'shared_with' : {
-
 
378
                required: true,
-
 
379
            },
-
 
380
           'description': {
-
 
381
                updateCkeditor:function() {
-
 
382
                        CKEDITOR.instances.description_document.updateElement();
-
 
383
                },
-
 
384
                required: true
-
 
385
            },
-
 
386
           'file': {
-
 
387
                required: true,
-
 
388
                extension: 'pdf',
-
 
389
                accept: 'application/pdf'
-
 
390
            },
-
 
391
        },
-
 
392
 
-
 
393
        submitHandler: function(form)
-
 
394
        {
-
 
395
            var formdata = false;
-
 
396
            if (window.FormData){
-
 
397
                formdata = new FormData(form); //form[0]);
-
 
398
            }
-
 
399
 
-
 
400
            $('input[type="submit"]').prop('disabled', true);
-
 
401
            NProgress.start();
-
 
402
            $.ajax({
-
 
403
                'dataType'  : 'json',
-
 
404
                'accept'    : 'application/json',
-
 
405
                'method'    : 'post',
-
 
406
                'url'       :  $('#form-feed-document').attr('action'),
-
 
407
                'data'      : formdata ? formdata : $('#form-feed-document').serialize(),
-
 
408
                'processData': false,
-
 
409
                'contentType': false,
-
 
410
            }).done(function(response) {
-
 
411
                if(response['success']) {
-
 
412
                    var s = $( "#feedTemplate" ).render( response['data'] );
-
 
413
                    $(s).prependTo(".posts-section");  
-
 
414
 
-
 
415
                    $("#modal-feed-document-box").modal('hide');
-
 
416
                } else {
-
 
417
                    validatorFeedDocument.resetForm();
-
 
418
                    if(jQuery.type(response['data']) == 'string') {
-
 
419
                        $.fn.showError(response['data']);
-
 
420
                    } else  {
-
 
421
                        $.each(response['data'], function( fieldname, errors ) {
-
 
422
                            $.fn.showFormErrorValidator('#form-feed-document #' + fieldname, errors);
-
 
423
                        });
-
 
424
                    }
-
 
425
                }
-
 
426
            }).fail(function( jqXHR, textStatus, errorThrown) {
-
 
427
                $.fn.showError(textStatus);
-
 
428
            }).always(function() {
-
 
429
                $('input[type="submit"]').prop('disabled', false);
-
 
430
                NProgress.done();
-
 
431
            });
-
 
432
            return false;
-
 
433
        },
-
 
434
        invalidHandler: function(form, validator) {
-
 
435
        
-
 
436
        }
-
 
437
    });
-
 
438
 
-
 
439
    
-
 
440
 
-
 
441
 
-
 
442
 
-
 
443
    $('a.fa-file').on('click', function(e){
-
 
444
        e.preventDefault();
-
 
445
 
-
 
446
        $('#form-feed-document #shared_with').val('');
-
 
447
        $('#form-feed-document #file').val('');
-
 
448
        CKEDITOR.instances.description_document.setData('');
-
 
449
 
-
 
450
        $('#form-feed-document')[0].reset()
-
 
451
        validatorFeedDocument.resetForm();
-
 
452
        $('#modal-feed-document-box').modal('show');
-
 
453
    });
-
 
454
 
-
 
455
    $('#form-feed-document #file').fileinput({
-
 
456
        theme: 'fa',
-
 
457
        language: 'es',
-
 
458
        showUpload: false,
-
 
459
        dropZoneEnabled: false,
-
 
460
        maxFileCount: 1,
-
 
461
        allowedFileExtensions: ['pdf'],
-
 
462
    });
-
 
463
 
-
 
464
    
-
 
465
    $('.btn-modal-feed-document-close').on('click', function(e){
-
 
466
        e.preventDefault();
-
 
467
            
-
 
468
        $('#modal-feed-document-box').modal('hide');
-
 
469
        return false;
-
 
470
    });
-
 
471
 
-
 
472
 
-
 
473
    $('a.fa-camera').on('click', function(e){
-
 
474
        e.preventDefault();
-
 
475
 
-
 
476
        $('#form-feed-image #shared_with').val('');
-
 
477
        $('#form-feed-image #file').val('');
-
 
478
        CKEDITOR.instances.description_image.setData('');
-
 
479
 
-
 
480
        $('#form-feed-image')[0].reset()
-
 
481
        validatorFeedImage.resetForm();
-
 
482
        $('#modal-feed-image-box').modal('show');
-
 
483
    });
-
 
484
 
-
 
485
    $('#form-feed-image #file').fileinput({
-
 
486
        theme: 'fa',
-
 
487
        language: 'es',
-
 
488
        showUpload: false,
-
 
489
        dropZoneEnabled: false,
-
 
490
        maxFileCount: 1,
-
 
491
        allowedFileExtensions: ['jpg', 'jpeg', 'png', 'gif'],
-
 
492
    });
-
 
493
 
-
 
494
    
-
 
495
    $('.btn-modal-feed-image-close').on('click', function(e){
-
 
496
        e.preventDefault();
-
 
497
            
-
 
498
        $('#modal-feed-image-box').modal('hide');
-
 
499
        return false;
-
 
500
    });
-
 
501
 
-
 
502
 
-
 
503
    $('a.fa-video-camera').on('click', function(e){
-
 
504
        e.preventDefault();
-
 
505
 
-
 
506
        $('#form-feed-video #shared_with').val('');
-
 
507
        $('#form-feed-video #file').val('');
-
 
508
        CKEDITOR.instances.description_video.setData('');
-
 
509
 
-
 
510
 
-
 
511
        $('#form-feed-video')[0].reset()
-
 
512
        validatorFeedVideo.resetForm();
-
 
513
        $('#modal-feed-video-box').modal('show');
-
 
514
    });
-
 
515
 
-
 
516
    $('#form-feed-video #file').fileinput({
-
 
517
        theme: 'fa',
-
 
518
        language: 'es',
-
 
519
        showUpload: false,
-
 
520
        dropZoneEnabled: false,
-
 
521
        maxFileCount: 1,
-
 
522
        allowedFileExtensions: ['mp4', 'mpeg','webm'],
-
 
523
    });
-
 
524
 
-
 
525
    
-
 
526
    $('.btn-modal-feed-video-close').on('click', function(e){
-
 
527
        e.preventDefault();
-
 
528
            
-
 
529
        $('#modal-feed-video-box').modal('hide');
-
 
530
        return false;
-
 
531
    });
-
 
532
 
-
 
533
    $('body').on('click', 'a.btn-indicator', function(e) {
-
 
534
    
-
 
535
        e.preventDefault();
-
 
536
    });
-
 
537
 
-
 
538
 
-
 
539
 
-
 
540
   
-
 
541
 
-
 
542
 
-
 
543
    $('body').on('submit', 'form.form-comment-feed', function(e) {
-
 
544
        e.preventDefault();
-
 
545
 
-
 
546
        var form = $(this);
-
 
547
        var url = form.attr('action');
-
 
548
        var unique  = $(this).data('feed-unique');
-
 
549
 
-
 
550
        NProgress.start();
-
 
551
        $.ajax({
-
 
552
            'dataType'  : 'json',
-
 
553
            'accept'    : 'application/json',
-
 
554
            'method'    : 'post',
-
 
555
            'url'       :  url,
-
 
556
            'data'      : form.serialize(),
-
 
557
        }).done(function(response) {
-
 
558
            if(response['success']) {
-
 
559
                $('#comment-' + unique).val('');
-
 
560
 
-
 
561
                var s = $( "#commentTemplate" ).render( response['data'] );
-
 
562
                $(s).appendTo('.comment-sec-' + unique + ' ul');  
-
 
563
 
-
 
564
                $('#btn-comments-' + unique).html('<i class="fa fa-comments"></i> ' + response['total_comments']);
-
 
565
 
-
 
566
                $('form.form-comment-feed > input[name="comment"]').val('');
-
 
567
                
-
 
568
            } else {
-
 
569
               $.fn.showError(response['data']);
-
 
570
            }
-
 
571
        }).fail(function( jqXHR, textStatus, errorThrown) {
-
 
572
            $.fn.showError(textStatus);
-
 
573
        }).always(function() {
-
 
574
            NProgress.done();
-
 
575
        });
-
 
576
        return false;
-
 
577
 
-
 
578
    });
-
 
579
 
-
 
580
 
-
 
581
    $.fn.deleteFeed = function(url, feed_unique) {
-
 
582
 
-
 
583
 
-
 
584
        NProgress.start();
-
 
585
        $.ajax({
-
 
586
            'dataType'  : 'json',
-
 
587
            'accept'    : 'application/json',
-
 
588
            'method'    : 'post',
-
 
589
            'url'       :  url,
-
 
590
        }).done(function(response) {
-
 
591
            if(response['success']) {
-
 
592
              $('.post-bar-' +  feed_unique).remove();
-
 
593
 
-
 
594
                $.fn.showSuccess(response['data']);
-
 
595
            } else {
-
 
596
                $.fn.showError(response['data']);
-
 
597
            } 
-
 
598
        }).fail(function( jqXHR, textStatus, errorThrown) {
-
 
599
            $.fn.showError(textStatus);
-
 
600
        }).always(function() {
-
 
601
            NProgress.done();
-
 
602
        });
-
 
603
 
-
 
604
    }
-
 
605
 
-
 
606
    $('body').on('click', 'a.btn-feed-trash', function(e) {
-
 
607
        e.preventDefault();
-
 
608
        var url = $(this).data('link');
-
 
609
        var feed_unique = $(this).data('feed-unique');
-
 
610
 
-
 
611
        
-
 
612
 
-
 
613
 
-
 
614
        bootbox.confirm({
-
 
615
            message: 'Esta seguro de borrar esta publicación',
-
 
616
            buttons: {
-
 
617
                confirm: {
-
 
618
                    label: 'Si',
-
 
619
                    className: 'btn-danger'
-
 
620
                },
-
 
621
                cancel: {
-
 
622
                    label:  'No',
-
 
623
                    className: 'btn-default'
-
 
624
                }
-
 
625
            },
-
 
626
            callback: function (result) {
-
 
627
               if(result) {
-
 
628
                    $.fn.deleteFeed(url, feed_unique);
-
 
629
                }
-
 
630
            }
-
 
631
        });
-
 
632
    });
-
 
633
 
-
 
634
 
-
 
635
    $.fn.deleteComment = function(url, unique) {
-
 
636
 
-
 
637
         var feed_unique = $('.comment-' + unique).closest('div.comment-sec').data('feed-unique');
-
 
638
 
-
 
639
        NProgress.start();
-
 
640
        $.ajax({
-
 
641
            'dataType'  : 'json',
-
 
642
            'accept'    : 'application/json',
-
 
643
            'method'    : 'post',
-
 
644
            'url'       :  url,
-
 
645
        }).done(function(response) {
-
 
646
            if(response['success']) {
-
 
647
 
-
 
648
                $('.comment-' + unique).closest('li').remove();
-
 
649
                $('#btn-comments-' + feed_unique).html('<i class="fa fa-comments"></i> ' + response['data']['total_comments']);
-
 
650
            
-
 
651
                $.fn.showSuccess(response['data']['message']);
-
 
652
            } else {
-
 
653
                $.fn.showError(response['data']);
-
 
654
            } 
-
 
655
        }).fail(function( jqXHR, textStatus, errorThrown) {
-
 
656
            $.fn.showError(textStatus);
-
 
657
        }).always(function() {
-
 
658
            NProgress.done();
-
 
659
        });
-
 
660
 
-
 
661
 
-
 
662
    }
-
 
663
 
-
 
664
 
-
 
665
    $('body').on('click', 'a.btn-comment-trash', function(e) {
-
 
666
        e.preventDefault();
-
 
667
        var url = $(this).data('link');
-
 
668
        var unique = $(this).data('comment-unique');
-
 
669
        
-
 
670
 
-
 
671
        bootbox.confirm({
-
 
672
            message: 'Esta seguro de borrar este comentario',
-
 
673
            buttons: {
-
 
674
                confirm: {
-
 
675
                    label: 'Si',
-
 
676
                    className: 'btn-danger'
-
 
677
                },
-
 
678
                cancel: {
-
 
679
                    label:  'No',
-
 
680
                    className: 'btn-default'
-
 
681
                }
-
 
682
            },
-
 
683
            callback: function (result) {
-
 
684
               if(result) {
-
 
685
                   $.fn.deleteComment(url, unique);
-
 
686
                }
-
 
687
            }
-
 
688
        });
-
 
689
    });
-
 
690
 
-
 
691
 
-
 
692
    $('div.modal').on("hide.bs.modal", function() {
-
 
693
    	$(".wrapper").removeClass("overlay");
-
 
694
    })
-
 
695
 
-
 
696
 
-
 
697
    $.fn.reload(1);
-
 
698
 
-
 
699
    CKEDITOR.replace('description_feed', {
-
 
700
				toolbar: [
-
 
701
                    { name: 'editing', items: [ 'Scayt' ] },
-
 
702
                    { name: 'links', items: [ 'Link', 'Unlink'] },
-
 
703
                    { name: 'paragraph', items: [ 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', 'Blockquote' ] },
-
 
704
                    { name: 'basicstyles', items: [ 'Bold', 'Italic', 'Strike', 'RemoveFormat' ] },
-
 
705
                    '/',
-
 
706
                    { name: 'insert', items: [ 'Image', 'Table', 'HorizontalRule', 'SpecialChar' ] },
-
 
707
                    { name: 'styles', items: [ 'Styles', 'Format' ] },
-
 
708
                    { name: 'tools', items: [ 'Maximize' ] }
-
 
709
                ],
-
 
710
                removePlugins: 'elementspath,Anchor',
-
 
711
				height: 100
-
 
712
			});
-
 
713
    CKEDITOR.replace('description_video');
-
 
714
    CKEDITOR.replace('description_image');
-
 
715
    CKEDITOR.replace('description_document');
-
 
716
 
-
 
717
 
-
 
718
});
-
 
719
 
15
const backendVar={}
720
 
-
 
Línea -... Línea 16...
-
 
16
const routeTimeline= "$routeTimeline"
-
 
17
JS;
-
 
18
 
721
JS;
19
$this->inlineScript()->appendScript($js);
Línea 722... Línea -...
722
$this->inlineScript()->captureEnd();
-
 
723
 
-
 
724
?>
-
 
725
 
-
 
726
<section class="content-header">
-
 
727
    <div class="container-fluid">
-
 
728
        <div class="row mb-2">
-
 
729
            <div class="col-sm-12">
-
 
730
                <h1>LABEL_FEEDS</h1>
-
 
731
            </div>
-
 
732
        </div>
-
 
733
    </div><!-- /.container-fluid -->
-
 
734
</section>
-
 
735
 
-
 
736
 
-
 
737
<section class="content">
-
 
738
    <div class="container-fluid">
-
 
739
        <div class="feed-container">
-
 
740
            <div class="">
-
 
741
                <div class="main-ws-sec">
-
 
742
                    <div class="">
-
 
743
                        <div class="">
-
 
744
                            <div class="post-bar">
-
 
745
                                <form id="form-main" name="form-main">
-
 
746
                                    <div class="post_topbar">
-
 
747
 
-
 
748
                                        <div class="mar-top clearfix">
-
 
749
                                            <div class="form-group">
-
 
750
                                            </div>
-
 
751
                                            <div class="form-group">
-
 
752
                                                <textarea id="description-main" name="description-main" placeholder="¿Qué tienes en mente?" class="form-control" readonly="readonly" rows="2"></textarea>
-
 
753
                                            </div>
-
 
754
                                        </div>
-
 
755
                                        <div class="mar-top clearfix">
-
 
756
                                            <button class="btn btn-sm btn-primary pull-right" type="button" id="btn-description-main"><i class="fa fa-pencil fa-fw"></i> LABEL_SHARE </button>
-
 
757
                                            <a class="btn btn-trans btn-icon fa fa-video-camera add-tooltip" href="#"></a>
-
 
758
                                            <a class="btn btn-trans btn-icon fa fa-camera add-tooltip" href="#"></a>
-
 
759
                                            <a class="btn btn-trans btn-icon fa fa-file add-tooltip" href="#"></a>
-
 
760
                                        </div>
-
 
761
                                    </div>
-
 
762
                                </form>
-
 
763
                            </div>
-
 
764
                        </div>
-
 
765
                    </div>
-
 
766
                    <!--posts-section star-->
-
 
767
                    <div class="posts-section">
-
 
768
 
-
 
769
                    </div>
-
 
770
 
-
 
771
                    <div class="process-comm" id="paginator-process-comm" style="display: none">
-
 
772
                        <button class="btn btn-sm btn-primary" data-page="0" id="btn-page-previous"> <i class="fa fa-chevron-left" aria-hidden="true"></i> LABEL_PREVIOUS </button>
-
 
773
                        <button class="btn btn-sm btn-primary" data-page="0" id="btn-page-next"> LABEL_NEXT <i class="fa fa-chevron-right" aria-hidden="true"></i> </button>
-
 
774
                    </div>
-
 
775
                    <!--posts-section end-->
-
 
776
                </div>
-
 
777
            </div>
-
 
778
            <!--main-ws-sec end-->
-
 
779
        </div>
-
 
780
    </div>
-
 
781
</section>
-
 
782
 
-
 
783
 
-
 
784
<div class="modal" tabindex="-1" role="dialog" id="modal-feed-image-box">
-
 
785
    <div class="modal-dialog" role="document">
-
 
786
        <?php
-
 
787
        $form = $this->formFeed;
-
 
788
        $form->setAttributes([
-
 
789
            'method' => 'post',
-
 
790
            'action' => $this->url('feeds/add'),
-
 
791
            'name' => 'form-feed-image',
-
 
792
            'id' => 'form-feed-image',
-
 
793
            'enctype' => 'multipart/form-data'
-
 
794
        ]);
-
 
795
        $form->prepare();
-
 
796
        echo $this->form()->openTag($form);
-
 
797
 
-
 
798
 
-
 
799
        ?>
-
 
800
        <div class="modal-content">
-
 
801
            <div class="modal-header">
-
 
802
                <h3 class="modal-title">LABEL_SHARE_IMAGE</h3>
-
 
803
            </div>
-
 
804
            <div class="modal-body">
-
 
805
                <div class="form-group">
-
 
806
                    <?php
-
 
807
                    $element = $form->get('description');
-
 
808
                    $element->setAttributes(['id' => 'description_image', 'rows' => '2', 'placeholder' => '¿Qué tienes en mente?', 'class' => 'form-control']);
-
 
809
                    echo $this->formTextArea($element);
-
 
810
                    ?>
-
 
811
                </div>
-
 
812
                <div class="form-group">
-
 
813
                    <div class="file-loading">
-
 
814
                        <?php
-
 
815
                        $element = $form->get('file');
-
 
816
                        $element->setAttributes(['accept' => 'image/jpg,image/jpeg,image/png']);
-
 
817
                        echo $this->formFile($element);
-
 
818
                        ?>
-
 
819
                    </div>
-
 
820
                </div>
-
 
821
            </div>
-
 
822
            <div class="modal-footer">
-
 
823
                <button type="submit" class="btn btn-sm btn-primary save">LABEL_UPLOAD</button>
-
 
824
                <button type="button" class="btn btn-sm btn-default cancel btn-modal-feed-image-close">LABEL_CANCEL</button>
-
 
825
            </div>
-
 
826
 
-
 
827
        </div>
-
 
828
        <a href="#" title="" class="close-box btn-feed-image-close"><i class="la la-close"></i></a>
-
 
829
        <?php echo $this->form()->closeTag($form); ?>
-
 
830
    </div>
-
 
831
</div>
-
 
832
 
-
 
833
 
-
 
834
<div class="modal" tabindex="-1" role="dialog" id="modal-feed-video-box">
-
 
835
    <div class="modal-dialog" role="document">
-
 
836
        <?php
-
 
837
        $form = $this->formFeed;
-
 
838
        $form->setAttributes([
-
 
839
            'method' => 'post',
-
 
840
            'action' => $this->url('feeds/add'),
-
 
841
            'name' => 'form-feed-video',
-
 
842
            'id' => 'form-feed-video',
-
 
843
            'enctype' => 'multipart/form-data'
-
 
844
        ]);
-
 
845
        $form->prepare();
-
 
846
        echo $this->form()->openTag($form);
-
 
847
 
-
 
848
 
-
 
849
        ?>
-
 
850
        <div class="modal-content">
-
 
851
            <div class="modal-header">
-
 
852
                <h3 class="modal-title">LABEL_SHARE_VIDEO</h3>
-
 
853
            </div>
-
 
854
            <div class="modal-body">
-
 
855
                <div class="form-group">
-
 
856
                    <?php
-
 
857
                    $element = $form->get('description');
-
 
858
                    $element->setAttributes(['id' => 'description_video', 'rows' => '2', 'placeholder' => '¿Qué tienes en mente?', 'class' => 'form-control']);
-
 
859
                    echo $this->formTextArea($element);
-
 
860
                    ?>
-
 
861
                </div>
-
 
862
                <div class="form-group">
-
 
863
                    <div class="file-loading">
-
 
864
                        <?php
-
 
865
                        $element = $form->get('file');
-
 
866
                        $element->setAttributes(['accept' => 'video/webm,video/mpeg,video/mp4']);
-
 
867
                        echo $this->formFile($element);
-
 
868
                        ?>
-
 
869
                    </div>
-
 
870
                </div>
-
 
871
            </div>
-
 
872
            <div class="modal-footer">
-
 
873
                <button type="submit" class="btn btn-sm btn-primary save">LABEL_UPLOAD</button>
-
 
874
                <button type="button" class="btn btn-sm btn-default cancel btn-modal-feed-video-close">LABEL_CANCEL</button>
-
 
875
            </div>
-
 
876
 
-
 
877
        </div>
-
 
878
        <a href="#" title="" class="close-box btn-feed-video-close"><i class="la la-close"></i></a>
-
 
879
        <?php echo $this->form()->closeTag($form); ?>
-
 
880
    </div>
-
 
881
</div>
-
 
882
 
-
 
883
<div class="modal" tabindex="-1" role="dialog" id="modal-feed-document-box">
-
 
884
    <div class="modal-dialog" role="document">
-
 
885
        <?php
-
 
886
        $form = $this->formFeed;
-
 
887
        $form->setAttributes([
-
 
888
            'method' => 'post',
-
 
889
            'action' => $this->url('feeds/add'),
-
 
890
            'name' => 'form-feed-document',
-
 
891
            'id' => 'form-feed-document',
-
 
892
            'enctype' => 'multipart/form-data'
-
 
893
        ]);
-
 
894
        $form->prepare();
-
 
895
        echo $this->form()->openTag($form);
-
 
896
 
-
 
897
 
-
 
898
 
-
 
899
        ?>
-
 
900
        <div class="modal-content">
-
 
901
            <div class="modal-header">
-
 
902
                <h3 class="modal-title">LABEL_SHARE_DOCUMENT</h3>
-
 
903
            </div>
-
 
904
            <div class="modal-body">
-
 
905
                <div class="form-group">
-
 
906
                    <?php
-
 
907
                    $element = $form->get('description');
-
 
908
                    $element->setAttributes(['id' => 'description_document', 'rows' => '2', 'placeholder' => '¿Qué tienes en mente?', 'class' => 'form-control']);
-
 
909
                    echo $this->formTextArea($element);
-
 
910
                    ?>
-
 
911
                </div>
-
 
912
                <div class="form-group">
-
 
913
                    <div class="file-loading">
-
 
914
                        <?php
-
 
915
                        $element = $form->get('file');
-
 
916
                        $element->setAttributes(['accept' => 'application/pdf']);
-
 
917
                        echo $this->formFile($element);
-
 
918
                        ?>
-
 
919
                    </div>
-
 
920
                </div>
-
 
921
            </div>
-
 
922
            <div class="modal-footer">
-
 
923
                <button type="submit" class="btn btn-sm btn-primary save">LABEL_UPLOAD</button>
-
 
924
                <button type="button" class="btn btn-sm btn-default cancel btn-modal-feed-document-close">LABEL_CANCEL</button>
-
 
925
            </div>
-
 
926
        </div>
-
 
927
        <a href="#" title="" class="close-box btn-feed-document-close"><i class="la la-close"></i></a>
-
 
928
        <?php echo $this->form()->closeTag($form); ?>
-
 
929
    </div>
-
 
930
</div>
-
 
931
 
-
 
932
<div class="modal" tabindex="-1" role="dialog" id="modal-feed-box">
-
 
933
    <div class="modal-dialog" role="document">
-
 
934
        <?php
-
 
935
        $form = $this->formFeed;
-
 
936
        $form->setAttributes([
-
 
937
            'method' => 'post',
-
 
938
            'action' => $this->url('feeds/add'),
-
 
939
            'name' => 'form-feed',
-
 
940
            'id' => 'form-feed',
-
 
941
        ]);
-
 
942
        $form->prepare();
-
 
943
        echo $this->form()->openTag($form);
-
 
944
 
-
 
945
 
-
 
946
 
-
 
947
        ?>
-
 
948
        <div class="modal-content">
-
 
949
            <div class="modal-header">
-
 
950
                <h3 class="modal-title">LABEL_SHARE</h3>
-
 
951
            </div>
-
 
952
            <div class="modal-body">
-
 
953
                <div class="form-group">
-
 
954
                    <?php
-
 
955
                    $element = $form->get('description');
-
 
956
                    $element->setAttributes(['id' => 'description_feed', 'rows' => '2', 'placeholder' => '¿Qué tienes en mente?', 'class' => 'form-control']);
-
 
957
                    echo $this->formTextArea($element);
-
 
958
                    ?>
-
 
959
                </div>
-
 
960
            </div>
-
 
961
            <div class="modal-footer">
-
 
962
                <button type="submit" class="btn btn-sm btn-primary save">LABEL_SAVE</button>
-
 
963
                <button type="button" class="btn btn-sm btn-default cancel btn-modal-feed-close">LABEL_CANCEL</button>
-
 
964
            </div>
-
 
965
        </div>
-
 
966
        <a href="#" title="" class="close-box btn-modal-feed-close"><i class="la la-close"></i></a>
-
 
967
        <?php echo $this->form()->closeTag($form); ?>
-
 
968
    </div>
-
 
969
</div>
-
 
970
 
-
 
971
 
-
 
972
 
-
 
973
 
-
 
974
<script id="commentTemplate" type="text/x-jsrender">
-
 
975
    <li>
-
 
976
				        <div class="comment-list">
-
 
977
							 <div class="comment comment-{{:unique}}" >
-
 
978
    					         <a href="{{>user_url}}"><h3>{{>user_name}}</h3>
-
 
979
    						     <span><img src="<?php echo $this->basePath('images/clock.png') ?>" alt="">{{>time_elapsed}} 
-
 
980
                                {{if link_delete}}
-
 
981
                                    <a href="#" class="btn-comment-trash" data-link="{{:link_delete}}" data-comment-unique="{{>unique}}"><i class="fa fa-trash"></i></a> 
-
 
982
                                {{/if}}
-
 
983
                                 </span>
-
 
984
                                
-
 
985
								 <p>{{>comment}}</p>
-
 
986
						     </div>
-
 
987
	                   </div>
-
 
988
	               </li>
-
 
989
</script>
-
 
990
 
-
 
991
<script id="feedTemplate" type="text/x-jsrender">
-
 
992
    <div class="post-bar post-bar-{{>feed_unique}}">
-
 
993
        <div class="post_topbar">
-
 
994
            <div class="usy-dt">
-
 
995
                <a href="{{>owner_url}}">
-
 
996
                    <img src="{{>owner_image}}" alt="" style="width:50px; height: auto">
-
 
997
                    <div class="usy-name">
-
 
998
                        <h3>{{>owner_name}}</h3>
-
 
999
                        <span>
-
 
1000
                            <img src="<?php echo $this->basePath('images/clock.png') ?>" alt="">
-
 
1001
                            {{>owner_time_elapse}} 
-
 
1002
                            {{if feed_delete_url}}  
-
 
1003
                                <a href="#" class="btn-feed-trash" data-link="{{:feed_delete_url}}" data-feed-unique="{{>feed_unique}}"><i class="fa fa-trash"></i></a>
-
 
1004
                            {{/if}}
-
 
1005
                        </span>  
-
 
1006
                    </div>
-
 
1007
                </a>
-
 
1008
            </div>
-
 
1009
        </div>
-
 
1010
        <div class="job_descp">
-
 
1011
            <p>
-
 
1012
            <div  class="show-read-more">{{:owner_description}}</div>
-
 
1013
            </p>
-
 
1014
            {{if owner_file_image}}
-
 
1015
             <img src="{{>owner_file_image}}" class="Entradas">
-
 
1016
            {{/if}}
-
 
1017
            {{if owner_file_video}}
-
 
1018
             <video src="{{>owner_file_video}}" controls  poster="{{>owner_file_image_preview}}">
-
 
1019
            {{/if}}
-
 
1020
            {{if owner_file_document}}
-
 
1021
                <a href="{{>owner_file_document}}" target="_blank">Descargar</a>
-
 
1022
            {{/if}}
-
 
1023
 
-
 
1024
    {{if shared_name}}
-
 
1025
    <div class="post-bar">
-
 
1026
        <div class="post_topbar">
-
 
1027
            <div class="usy-dt">
-
 
1028
                <img src="{{>shared_image}}" alt="" style="width:50px; height: auto">
-
 
1029
                <div class="usy-name">
-
 
1030
                    <h3>{{>shared_name}}</h3>
-
 
1031
                    <span><img style="width: 12px; height: auto" src="<?php echo $this->basePath('images/clock.png') ?>" alt="">{{>shared_time_elapse}}</span>       
-
 
1032
                </div>
-
 
1033
            </div>
-
 
1034
        </div>
-
 
1035
        <div class="job_descp">
-
 
1036
            <p>
-
 
1037
            <div  class="show-read-more">{{:shared_description}}</div>
-
 
1038
            </p>
-
 
1039
            {{if shared_file_image}}
-
 
1040
             <img src="{{>shared_file_image}}" class="Entradas">
-
 
1041
            {{/if}}
-
 
1042
            {{if shared_file_video}}
-
 
1043
             <video src="{{>shared_file_video}}" controls  poster="{{>shared_file_image_preview}}">
-
 
1044
            {{/if}}
-
 
1045
            {{if shared_file_document}}
-
 
1046
                <a href="{{>shared_file_document}}" target="_blank">Descargar</a>
-
 
1047
            {{/if}}
-
 
1048
        </div>
-
 
1049
    </div>
-
 
1050
    {{/if}}
-
 
1051
 
-
 
1052
 
-
 
1053
        </div>
-
 
1054
        <div class="job-status-bar">
-
 
1055
            <ul class="like-com">
-
 
1056
                <!-- <li>
-
 
1057
                    <a href="#" id="btn-comments-{{>feed_unique}}" class="btn-indicator"><i class="fa fa-heart"></i> {{>feed_likes}}</a>
-
 
1058
                </li> -->
-
 
1059
                <li>
-
 
1060
                    <a href="#" id="btn-comments-{{>feed_unique}}" class="btn-indicator"><i class="fa fa-comments"></i> {{>comments.length}}</a>
-
 
1061
                </li>
-
 
1062
                <li>
-
 
1063
                    <a href="#" id="btn-share-{{>feed_unique}}" class="btn-indicator"><i class="fa fa-share"></i> {{>owner_shared}}</a>
-
 
1064
                </li>
-
 
1065
            </ul>
-
 
1066
         
-
 
1067
        </div>
-
 
1068
        {{if comments}}
-
 
1069
            <div class="comment-section">
-
 
1070
                <div class="comment-sec comment-sec-{{>feed_unique}}" data-feed-unique="{{>feed_unique}}">
-
 
1071
                    <ul>
-
 
1072
                        {{for comments}}
-
 
1073
                            <li>
-
 
1074
                                <div class="comment-list">
-
 
1075
                                    <div class="comment comment-{{:unique}}" >
-
 
1076
                                        <span><img src="<?php echo $this->basePath('images/clock.png') ?>" alt="">{{>time_elapsed}} 
-
 
1077
                                        <a href="{{>user_url}}"><h3>{{>user_name}}</h3>
-
 
1078
                                        {{if link_delete}}
-
 
1079
                                            <a href="#" class="btn-comment-trash" data-link="{{:link_delete}}" 
-
 
1080
                                                data-comment-unique="{{>unique}}"><i class="fa fa-trash"></i></a> 
-
 
1081
                                        {{/if}}
-
 
1082
                                        </span>
-
 
1083
                                        
-
 
1084
                                        <p>{{>comment}}</p>
-
 
1085
                                    </div>
-
 
1086
                                </div>
-
 
1087
                            </li>
-
 
1088
                        {{/for}}
-
 
1089
                    </ul>
-
 
1090
                </div>
-
 
1091
            </div>
-
 
1092
        {{/if}}
-
 
1093
        <div class="comment_box">
-
 
1094
            <form  class="form-comment-feed" data-feed-unique="{{>feed_unique}}"  action="{{>comment_add_url}}">
-
 
1095
                <input type="text" name="comment" id="comment-{{>feed_unique}}" maxlength="256"  placeholder="LABEL_WRITE_A_COMMENT">
-
 
1096
                <button type="submit">LABEL_SEND</button>
-
 
1097
            </form>
20
$this->headLink()->appendStylesheet('/react-bundles/feeds/main.css');
-
 
21
$this->inlineScript()->appendFile('/react-bundles/feeds/feedsBundle.js');
-
 
22
?>
1098
        </div>
23