Files
fdn2/public/admin/tablesBackends/rejectedNotizieTableBackend.php
T
Riccardo Di Dato fa648c0850 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
2016-02-29 18:44:22 +01:00

37 lines
971 B
PHP

<?php
/*
Author: Riccardo Di Dato
Creation Date: 29/feb/2016
*/
require_once(dirname(__FILE__)."/../../load.php");
$useModel = "NotiziaModel";
$permissionFlagRequired = AdminModel::ADMIN_TYPE_EDITORE_SUPERVISOR;
$exposedFields = array(
"category"=>function ($data){
if (array_key_exists($data, NotiziaModel::$NOTIZIE_CATEGORY) ){
return NotiziaModel::$NOTIZIE_CATEGORY[$data]["label"];
}
else {
return "Sconosciuta";
}
},
"titolo"=>function($data){
$rval = $data;
if (strlen($rval)>80){
$rval = substr($rval, 0, 80)."...";
}
return $rval;
},
"about"=>array("data"=>null,"author"=>null,"owner"=>function ($id){
$model = GlobalVariables::get("dao")->getFirst("AdminModel",array("id"=>$id));
return $model->nome." ".$model->cognome;
}),
"id"=>null
);
$ret = DatatablesHelper::getResult($useModel, $permissionFlagRequired, $exposedFields,array("status"=>NotiziaModel::STATUS_REJECTED));
echo json_encode($ret);
?>