item voting tools

This commit is contained in:
friendica
2015-02-10 19:10:18 -08:00
parent 79da33dafd
commit 79223b6b3d
10 changed files with 63 additions and 3 deletions

View File

@@ -148,11 +148,13 @@ class Item extends BaseObject {
$isevent = true;
$attend = array( t('I will attend'), t('I will not attend'), t('I might attend'));
}
$consensus = (($item['item_flags'] & ITEM_CONSENSUS)? true : false);
if($consensus) {
$response_verbs[] = 'agree';
$response_verbs[] = 'disagree';
$response_verbs[] = 'abstain';
$conlabels = array( t('I agree'), t('I disagree'), t('I abstain'));
}
$responses = get_responses($conv_responses,$response_verbs,$this,$item);
@@ -280,6 +282,8 @@ class Item extends BaseObject {
'id' => $this->get_id(),
'isevent' => $isevent,
'attend' => $attend,
'consensus' => $consensus,
'conlabels' => $conlabels,
'linktitle' => sprintf( t('View %s\'s profile - %s'), $profile_name, $item['author']['xchan_addr']),
'olinktitle' => sprintf( t('View %s\'s profile - %s'), $this->get_owner_name(), $item['owner']['xchan_addr']),
'llink' => $item['llink'],