issue 70 poll module's admin UI/UX modified.

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@8721 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ovclas 2011-08-04 05:34:03 +00:00
parent f7c964226a
commit 3e70a2c10c
30 changed files with 335 additions and 92 deletions

View file

@ -191,6 +191,46 @@
$this->add('tpl',$tpl);
}
/**
* @brief poll list
**/
function procPollGetList()
{
if(!Context::get('is_logged')) return new Object(-1,'msg_not_permitted');
// Taken from a list of selected sessions
$flagList = $_SESSION['poll_management'];
if(count($flagList)) {
foreach($flagList as $key => $val) {
if(!is_bool($val)) continue;
$pollSrlList[] = $key;
}
}
global $lang;
if(count($pollSrlList) > 0) {
$oPollAdminModel = &getAdminModel('poll');
$args->pollIndexSrlList = $pollSrlList;
$output = $oPollAdminModel->getPollListWithMember($args);
$pollList = $output->data;
if(is_array($pollList))
{
foreach($pollList AS $key=>$value)
{
if($value->checkcount == 1) $value->checkName = $lang->single_check;
else $value->checkName = $lang->multi_check;
}
}
}
else
{
$pollList = array();
$this->setMessage($lang->no_documents);
}
$this->add('poll_list', $pollList);
}
/**
* @brief A poll synchronization trigger when a new post is registered
**/