Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 16822 Rev 16842
Línea 4... Línea 4...
4
 
4
 
5
$roleName = $currentUser->getUserTypeId();
5
$roleName = $currentUser->getUserTypeId();
Línea 6... Línea 6...
6
$routeDatatable = $this->url('reports/users-blocked');
6
$routeDatatable = $this->url('reports/users-blocked');
7
 
-
 
8
$allowDownload  = $acl->isAllowed($roleName, 'reports/users-blocked/excel') ? 1 : 0;
-
 
Línea 9... Línea 7...
9
//$allowEdit      = $acl->isAllowed($roleName, 'reports/users-blocked/edit') ? 1 : 0;
7
 
10
//$allowDelete      = $acl->isAllowed($roleName, 'reports/users-blocked/delete') ? 1 : 0;
8
$allowDownload  = $acl->isAllowed($roleName, 'reports/users-blocked/excel') ? 1 : 0;
11
 
9
 
Línea 113... Línea -...
113
 
-
 
114
 
-
 
115
 
-
 
116
 
111
 
117
 
112
 
118
   // var allowEdit   = $allowEdit;
113
 
119
   // var allowDelete = $allowDelete;
114
 
120
    
115
 
Línea 187... Línea 182...
187
                { 'mDataProp': 'first_name' },
182
                { 'mDataProp': 'first_name' },
188
                { 'mDataProp': 'last_name' },
183
                { 'mDataProp': 'last_name' },
189
                { 'mDataProp': 'email' },
184
                { 'mDataProp': 'email' },
190
                { 'mDataProp': 'last_activity_on' },
185
                { 'mDataProp': 'last_activity_on' },
191
                { 'mDataProp': 'actions' },
186
                { 'mDataProp': 'actions' },
-
 
187
 
-
 
188
 
192
    	    ],
189
    	    ],
193
            'columnDefs': [
190
            'columnDefs': [
194
                {
191
                {
195
                    'targets': 0,
192
                    'targets': 0,
196
                    'className' : 'text-vertical-middle',
193
                    'className' : 'text-vertical-middle',
Línea 201... Línea 198...
201
                    'className' : 'text-vertical-middle',
198
                    'className' : 'text-vertical-middle',
Línea 202... Línea 199...
202
 
199
 
Línea 203... Línea 200...
203
                },
200
                },
204
 
-
 
205
                {
-
 
206
                    'targets': -2,
-
 
207
                    'orderable': false,
-
 
208
                    'className' : 'text-center',
-
 
209
                      'render' : function ( data, type, row ) {
-
 
210
                      
-
 
211
                        checked = data == 'a'  ? 'checked' : '';
-
 
212
                        return '<div class="form-check">' +
-
 
213
                            '<input type="checkbox" class="form-check-input" disabled="" checked="' + checked + '">' +
-
 
214
                            '<label class="form-check-label" for="checkCheckedDisabled"></label></div>' ;
-
 
215
                    }
-
 
216
                },
201
 
217
                {
202
                {
218
                    'targets': -1,
203
                    'targets': -1,
219
                    'orderable': false,
204
                    'orderable': false,
220
                    'render' : function ( data, type, row ) {
205
                    'render' : function ( data, type, row ) {
221
                        s = '';
-
 
222
    
-
 
223
/*
-
 
224
                        if(allowEdit) {
-
 
225
                            s = s + '<button class="btn btn-primary btn-edit" data-href="' + data['link_edit']+ '" data-toggle="tooltip" title="LABEL_EDIT"><i class="fa fa-pencil"></i> LABEL_EDIT </button>&nbsp;';
-
 
226
                        }
-
 
227
                        if(allowDelete) {
-
 
228
                            s = s + '<button class="btn btn-danger btn-delete" data-href="' + data['link_delete']+ '" data-toggle="tooltip" title="LABEL_DELETE"><i class="fa fa-trash"></i> LABEL_DELETE </button>&nbsp;';
-
 
229
                        }
206
                        s = '&nbsp;';
230
*/
207
 
231
                        return s;
208
                        return s;
232
                    }
209
                    }
233
                }
210
                }
Línea 240... Línea 217...
240
        $.fn.loadData();
217
        $.fn.loadData();
Línea 241... Línea 218...
241
    
218
    
Línea 242... Línea -...
242
 
-
 
243
    });
-
 
244
 
-
 
245
 $('body').on('click', 'button.btn-delete', function(e) { 
-
 
Línea 246... Línea -...
246
        e.preventDefault();
-
 
247
        var action = $(this).data('href');
-
 
248
 
-
 
249
 
-
 
250
          swal.fire({
-
 
251
            title: 'LABEL_ARE_YOU_SURE',
-
 
252
            icon: 'question',
-
 
253
            cancelButtonText: 'LABEL_NO',
-
 
254
            showCancelButton: true,
-
 
255
            confirmButtonText: 'LABEL_YES'
-
 
256
          }).then((result) => {
-
 
257
            if (result.isConfirmed) {
-
 
258
 
-
 
259
                    NProgress.start();
-
 
260
                    $.ajax({
-
 
261
                        'dataType'  : 'json',
-
 
262
                        'accept'    : 'application/json',
-
 
263
                        'method'    : 'post',
-
 
264
                        'url'       :  action,
-
 
265
                    }).done(function(response) {
-
 
266
                        if(response['success']) {
-
 
267
                            $.fn.showSuccess(response['data']);
-
 
268
                            gridTable.api().ajax.reload(null, false);
-
 
269
                        } else {
-
 
270
                            $.fn.showError(response['data']);
-
 
271
                        }
-
 
272
                    }).fail(function( jqXHR, textStatus, errorThrown) {
-
 
273
                        $.fn.showError(textStatus);
-
 
274
                    }).always(function() {
-
 
275
                        NProgress.done();
-
 
Línea 276... Línea 219...
276
                    });
219
 
277
            }
220
    });
Línea 278... Línea 221...
278
       });
221
 
279
    });
222
 
280
 
223
 
281
 
224
 
Línea 282... Línea -...
282
    $.fn.loadData();
-
 
283
    $('button.btn-download').hide();
-
 
284
        
225
    $.fn.loadData();
285
});
226
    $('button.btn-download').hide();
286
JS;
-
 
287
$this->inlineScript()->captureEnd();
-
 
288
?>
-
 
289
 
-
 
290
<!-- Content Header (Page header) -->
-
 
291
<section class="content-header">
-
 
292
    <div class="container-fluid">
227
        
293
        <div class="row mb-2">
228
});
294
            <div class="col-sm-12">
229
JS;
295
                <h1>LABEL_REPORTS_USERS_BLOCKED</h1>
230
$this->inlineScript()->captureEnd();
296
            </div>
231
?>
297
        </div>
-
 
298
    </div><!-- /.container-fluid -->
-
 
299
</section>
-
 
300
 
-
 
301
<section class="content">
-
 
302
    <div class="container-fluid">
-
 
303
        <div class="row">
-
 
304
            <div class="col-12">
-
 
305
                <div class="card">
-
 
306
                    <div class="card-header">
-
 
307
                        <div class="col-md-12 col-sm-12">
-
 
308
                            <div style="float:right;">
-
 
309
                                <button type="button" class="btn btn-info btn-refresh"><i class="fa fa-refresh"></i> LABEL_REFRESH </button>
-
 
310
                                <?php if ($allowDownload) :  ?>
232
 
311
 
233
<div class="container">
312
                                    <button type="button" class="btn btn-info btn-download"><i class="fa fa-download"></i> LABEL_DOWNLOAD </button>
234
	<div class="card" id="">
313
                                <?php endif; ?>
235
	 	
314
                            </div>
236
	 	<div class="card-body">
315
                        </div>
237
	 		<h6 class="card-title">LABEL_REPORTS_USERS_BLOCKED</h6>
Línea 326... Línea 248...
326
                                </tr>
248
                                </tr>
327
                            </thead>
249
                            </thead>
328
                            <tbody>
250
                            <tbody>
329
                            </tbody>
251
                            </tbody>
330
                        </table>
252
                        </table>
-
 
253
                        
331
                    </div>
254
	 	         </div>
332
                </div>
255
	 	     </div>
-
 
256
	 	</div>
-
 
257
	 	<div class="card-footer text-right">
-
 
258
	 		<button type="button" class="btn btn-info btn-refresh"><i class="fa fa-refresh"></i> LABEL_REFRESH </button>
-
 
259
      		<?php if ($allowDownload) :  ?>
-
 
260
			<button type="button" class="btn btn-info btn-download"><i class="fa fa-download"></i> LABEL_DOWNLOAD </button>
333
            </div>
261
    		<?php endif; ?>
334
        </div>
262
	 	</div>
335
    </div>
263
	</div>
336
</section>
264
</div>
Línea 337... Línea 265...
337
 
265