Creato sistema accetazione commenti;
Create pagine per notizie in pending e rifiutate; Creati componenti grafici per mostrare Notizia, Commento e lista commenti; Bugfix e limature su amministrazione
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/*
|
||||
Author: Riccardo Di Dato
|
||||
Creation Date: 29/feb/2016
|
||||
*/
|
||||
|
||||
require_once(dirname(__FILE__)."/../../load.php");
|
||||
|
||||
$useModel = "CommentoModel";
|
||||
$permissionFlagRequired = AdminModel::ADMIN_TYPE_COMMENTI_SUPERVISOR;
|
||||
$exposedFields = array(
|
||||
"notizia"=>function($id){
|
||||
$model = GlobalVariables::get("dao")->getFirst("NotiziaModel",array("id"=>$id));
|
||||
return '<a href="javascript:void(0);" onClick="openPagePost(\''.GUIHandler::getBaseUrl().'admin/homeNotizie.php\',[{name:\'id\',value:\''.$id.'\'}],true);">'.$model->titolo.'</a>';
|
||||
// return $model->nome." ".$model->cognome;
|
||||
},
|
||||
"titolo"=>function($data){
|
||||
$rval = $data;
|
||||
if (strlen($rval)>80){
|
||||
$rval = substr($rval, 0, 80)."...";
|
||||
}
|
||||
return $rval;
|
||||
},
|
||||
"user"=>function ($id){
|
||||
$model = GlobalVariables::get("dao")->getFirst("UserModel",array("id"=>$id));
|
||||
return $model->nome." ".$model->cognome;
|
||||
},
|
||||
"date"=>null,
|
||||
"id"=>null
|
||||
);
|
||||
|
||||
$ret = DatatablesHelper::getResult($useModel, $permissionFlagRequired, $exposedFields,array("status"=>NotiziaModel::STATUS_PENDING));
|
||||
echo json_encode($ret);
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user