20 parent::__construct($oConfig,
$oDb);
21 $this->_iPageIndex = 300;
24 function unit ($aData, $sTemplateName, &$oVotingView, $isShort =
false)
26 if (
null == $this->_oMain)
29 if (!$this->_oMain->isAllowedView ($aData)) {
35 if ($aData[
'PrimPhoto']) {
36 $a = array (
'ID' => $aData[
'ResponsibleID'],
'Avatar' => $aData[
'PrimPhoto']);
38 $sImage = $aImage[
'no_image'] ?
'' : $aImage[
'file'];
43 'thumb_url' => $sImage ? $sImage : $this->
getImageUrl(
'no-image-thumb.png'),
44 'event_url' => CH_WSB_URL_ROOT . $this->_oConfig->getBaseUri() .
'view/' . $aData[
'EntryUri'],
45 'event_title' => $aData[
'Title'],
46 'event_start' => $this->_oMain->_formatDateInBrowse($aData),
48 'participants' => $aData[
'FansCount'],
49 'country_city' => $this->_oMain->_formatLocation($aData),
50 'snippet_text' => $this->_oMain->_formatSnippetText($aData),
51 'ch_if:full' => array (
52 'condition' => !$isShort,
54 'author' => $aData[
'ResponsibleID'] ?
getNickName($aData[
'ResponsibleID']) :
_t(
'_ch_events_admin'),
55 'author_url' => $aData[
'ResponsibleID'] ?
getProfileLink($aData[
'ResponsibleID']) :
'javascript:void(0);',
56 'rate' => $oVotingView ? $oVotingView->getJustVotingElement(0, $aData[
'ID'], $aData[
'Rate']) :
' ',
69 if (
null == $this->_oMain)
75 'author_unit' =>
$GLOBALS[
'oFunctions']->getMemberThumbnail($aAuthor[
'ID'],
'none',
true),
79 'tags' => $this->
parseTags($aEvent[
'Tags']),
80 'location' => $this->_oMain->_formatLocation($aEvent,
true,
true),
81 'fields' => $this->blockFields($aEvent),
82 'author_username' => $aAuthor ? $aAuthor[
'NickName'] :
_t(
'_ch_events_admin'),
83 'author_url' => $aAuthor ?
getProfileLink($aAuthor[
'ID']) :
'javascript:void(0)',
91 'description' => $aEvent[
'Description'],
98 $sRet =
'<table class="ch_events_fields">';
101 foreach (
$oForm->aInputs
as $k => $a) {
102 if (!isset($a[
'display']))
continue;
103 $sRet .=
'<tr><td class="ch_events_field_name ch-def-font-grayed ch-def-padding-sec-right" valign="top">' . $a[
'caption'] .
'</td><td class="ch_events_field_value">';
104 if (is_string($a[
'display']) && is_callable(array($this, $a[
'display'])))
105 $sRet .= call_user_func_array(array($this, $a[
'display']), array($aEvent[$k]));
107 $sRet .= $aEvent[$k];
108 $sRet .=
'</td></tr>';