mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Add a list of vote user
This commit is contained in:
parent
2535dcec6b
commit
4c7ce6a380
5 changed files with 93 additions and 2 deletions
|
|
@ -1210,6 +1210,55 @@ class boardView extends board
|
|||
$this->setTemplateFile('update_view');
|
||||
}
|
||||
|
||||
function dispBoardVoteLog()
|
||||
{
|
||||
iF(Context::get('logged_info')->is_admin !== 'Y')
|
||||
{
|
||||
return new Object(-1, 'msg_not_permitted');
|
||||
}
|
||||
|
||||
$document_srl = Context::get('document_srl');
|
||||
$oMemberModel = getModel('member');
|
||||
|
||||
$args = new stdClass();
|
||||
$args->document_srl = $document_srl;
|
||||
|
||||
$output = executeQueryArray('document.getDocumentVotedLog', $args);
|
||||
if(!$output->toBool())
|
||||
{
|
||||
return $output;
|
||||
}
|
||||
|
||||
$vote_member_infos = array();
|
||||
$blame_member_infos = array();
|
||||
if(count($output->data) > 0)
|
||||
{
|
||||
foreach($output->data as $key => $log)
|
||||
{
|
||||
if($log->point > 0)
|
||||
{
|
||||
if($log->member_srl == $vote_member_infos[$log->member_srl]->member_srl)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
$vote_member_infos[$log->member_srl] = $oMemberModel->getMemberInfoByMemberSrl($log->member_srl);
|
||||
}
|
||||
else
|
||||
{
|
||||
if($log->member_srl == $blame_member_infos[$log->member_srl]->member_srl)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
$blame_member_infos[$log->member_srl] = $oMemberModel->getMemberInfoByMemberSrl($log->member_srl);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Context::set('vote_member_info', $vote_member_infos);
|
||||
Context::set('blame_member_infos', $blame_member_infos);
|
||||
$this->setTemplateFile('vote_log');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief the method for displaying the warning messages
|
||||
* display an error message if it has not a special design
|
||||
|
|
|
|||
|
|
@ -72,6 +72,7 @@
|
|||
<action name="dispBoardContentCommentList" type="view" />
|
||||
<action name="dispBoardContentFileList" type="view" />
|
||||
<action name="dispBoardUpdateLog" type="view" />
|
||||
<action name="dispBoardVoteLog" type="view" />
|
||||
|
||||
<action name="dispBoardTagList" type="view" />
|
||||
<action name="dispBoardWrite" type="view" standalone="false" />
|
||||
|
|
|
|||
|
|
@ -1131,4 +1131,25 @@
|
|||
.board .secretForm .btn {border-radius: 0 2px 2px 0; }
|
||||
.board .secretForm p {margin-bottom:5px;}
|
||||
|
||||
.vote-list {
|
||||
display:block;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
margin: 0px !important;
|
||||
padding: 20px;
|
||||
color: rgb(34, 34, 34);
|
||||
font-size: 15px;
|
||||
font-family: "Open Sans","나눔바른고딕",NanumBarunGothic,"맑은 고딕","Malgun Gothic","돋움",Dotum,"애플 SD 산돌고딕 Neo","Apple SD Gothic Neo",AppleGothic,Helvetica,sans-serif;
|
||||
line-height: 1.6;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
background: rgb(255, 255, 255);
|
||||
}
|
||||
|
||||
.votelog {
|
||||
display:inline-block;
|
||||
padding:2px 15px;
|
||||
background:#00b0a2;
|
||||
border-radius: 23px;
|
||||
color:#fff;
|
||||
text-decoration: inherit;
|
||||
}
|
||||
14
modules/board/skins/xedition/vote_log.html
Normal file
14
modules/board/skins/xedition/vote_log.html
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<include target="_header.html" />
|
||||
|
||||
<div class="vote-list">
|
||||
<h2>추천인</h2>
|
||||
<block loop="$vote_member_info => $val">
|
||||
<a href="#popup_menu_area" class="votelog member_{$val->member_srl}" onclick="return false">{$val->nick_name}</a>
|
||||
</block>
|
||||
<h2>비추천인</h2>
|
||||
<block loop="$blame_member_infos => $val">
|
||||
<a href="#popup_menu_area" class="votelog member_{$val->member_srl}" onclick="return false">{$val->nick_name}</a>
|
||||
</block>
|
||||
</div>
|
||||
|
||||
<include target="_footer.html" />
|
||||
|
|
@ -1289,8 +1289,14 @@ class documentController extends document
|
|||
*/
|
||||
function updateVotedCount($document_srl, $point = 1)
|
||||
{
|
||||
if($point > 0) $failed_voted = 'failed_voted';
|
||||
else $failed_voted = 'failed_blamed';
|
||||
if($point > 0)
|
||||
{
|
||||
$failed_voted = 'failed_voted';
|
||||
}
|
||||
else
|
||||
{
|
||||
$failed_voted = 'failed_blamed';
|
||||
}
|
||||
// Return fail if session already has information about votes
|
||||
if($_SESSION['voted_document'][$document_srl])
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue