$this->item->slug, 'print_link' => $this->print_link);
            echo JemOutput::createButtonBar($this->getName(), $this->permissions, $btn_params);
            ?>
        
         
        params->get('show_page_heading', 1)) : ?>
            
                escape($this->params->get('page_heading')); ?>
             
        
         
        
        
        
            item) .' ';
            if($this->item_root) {
                echo JemOutput::editbutton($this->item_root, $params, $attribs, $this->permissions->canEditEvent, 'editevent') . ' ';
            }
            if(!$this->item_root || ($this->item_root && $this->item->recurrence_first_id)) {
                echo JemOutput::editbutton($this->item, $params, $attribs, $this->permissions->canEditEvent, 'editevent') . ' ';
            }
            echo JemOutput::copybutton($this->item, $params, $attribs, $this->permissions->canAddEvent, 'editevent');
            ?>
         
         
        item, $this->dimage, 'event'); ?>
        
            get('event_show_detailstitle',1)) : ?>
                : 
                escape($this->item->title); ?> 
            
            : 
            
                item->dates, $this->item->times,$this->item->enddates, $this->item->endtimes);
                echo JemOutput::formatSchemaOrgDateTime($this->item->dates, $this->item->times,$this->item->enddates, $this->item->endtimes);
                ?>
             
            item->locid != 0) : ?>
                : 
                get('event_show_detlinkvenue') == 1) && (!empty($this->item->url))) :
                        ?>escape($this->item->venue); ?> get('event_show_detlinkvenue') == 2) && (!empty($this->item->venueslug))) :
                        ?>item->venue; ?> get('event_show_detlinkvenue') == 0)*/ :
                        echo $this->escape($this->item->venue);
                    endif;
                    # will show "venue" or "venue - city" or "venue - city, state" or "venue, state"
                    $city  = $this->escape($this->item->city);
                    $state = $this->escape($this->item->state);
                    if ($city)  { echo ' - ' . $city; }
                    if ($state) { echo ', ' . $state; }
                    ?>
                 
            categories) ? count($this->categories) : 0;
            ?>
            : 
            
                categories as $category) :
                    ?>escape($category->catname); ?> 
             
            item->{'custom'.$cr};
                if (preg_match('%^http(s)?://%', $currentRow)) {
                    $currentRow = ''.$this->escape($currentRow).' ';
                }
                if ($currentRow) {
                    ?>
                    : 
                    : 
                item->hits); ?> 
            
            
            get('event_show_author') && !empty($this->item->author)) : ?>
                : 
                
                    item->created_by_alias ? $this->item->created_by_alias : $this->item->author; ?>
                    item->contactid2) && $params->get('event_link_author') == true) :
                        $needle = 'index.php?option=com_contact&view=contact&id=' . $this->item->contactid2 . '&catid=' . $this->item->concatid;
                        $menu = Factory::getApplication()->getMenu();
                        $item = $menu->getItems('link', $needle, true);
                        $cntlink = !empty($item) ? $needle . '&Itemid=' . $item->id : $needle;
                        echo Text::sprintf('COM_JEM_EVENT_CREATED_BY', HTMLHelper::_('link', Route::_($cntlink), $author));
                    else :
                        echo Text::sprintf('COM_JEM_EVENT_CREATED_BY', $author);
                    endif;
                    ?>
                 
            
            
            showeventstate) && isset($this->item->published)) : ?>
                : 
                
                    item->published) {
                        case  1: echo Text::_('JPUBLISHED');   break;
                        case  0: echo Text::_('JUNPUBLISHED'); break;
                        case  2: echo Text::_('JARCHIVED');    break;
                        case -2: echo Text::_('JTRASHED');     break;
                    } ?>
                 
            
         
        
        get('event_show_description','1') && ($this->item->fulltext != '' && $this->item->fulltext != '
' || $this->item->introtext != '' && $this->item->introtext != '
')) { ?>
            
        
        
        get('event_show_contact') && !empty($this->item->conid )) : ?>
            
            
                : 
                
                    item->conname;
                    if ($params->get('event_link_contact') == true) :
                        $needle = 'index.php?option=com_contact&view=contact&id=' . $this->item->conid . '&catid=' . $this->item->concatid;
                        $menu = Factory::getApplication()->getMenu();
                        $item = $menu->getItems('link', $needle, true);
                        $cntlink2 = !empty($item) ? $needle . '&Itemid=' . $item->id : $needle;
                        echo Text::sprintf('COM_JEM_EVENT_CONTACT', HTMLHelper::_('link', Route::_($cntlink2), $contact));
                    else :
                        echo Text::sprintf('COM_JEM_EVENT_CONTACT', $contact);
                    endif;
                    ?>
                 
                item->contelephone) : ?>
                    : 
                    
                        escape($this->item->contelephone); ?>
                     
                
             
        
        attachments = $this->item->attachments; ?>
        loadTemplate('attachments'); ?>
        
        item->locid != 0) && !empty($this->item->venue) && $params->get('event_show_venue', '1')) : ?>
            
            
                
                item ? $this->item->id : 0 ; ?>
                
                    item ? $this->item->id : 0 ;
                    echo JemOutput::editbutton($this->item, $params, $attribs, $this->permissions->canEditVenue, 'editvenue');
                    echo JemOutput::copybutton($this->item, $params, $attribs, $this->permissions->canAddVenue, 'editvenue');
                    ?>
                 
                item, $this->limage, 'venue'); ?>
                
                    : 
                    
                        item->venueslug)) :
                            echo '' . $this->escape($this->item->venue) . ' ';
                        else :
                            echo $this->escape($this->item->venue);
                        endif;
                        if (!empty($this->item->url)) :
                            echo ' - ' . Text::_('COM_JEM_WEBSITE') . ' ';
                        endif;
                        ?>
                     
                 
                get('event_show_detailsadress', '1')) : ?>
                    
                        item->street) : ?>
                            : 
                            
                                escape($this->item->street); ?>
                             
                        
                        item->postalCode) : ?>
                            : 
                            
                                escape($this->item->postalCode); ?>
                             
                        
                        item->city) : ?>
                            : 
                            
                                escape($this->item->city); ?>
                             
                        
                        item->state) : ?>
                            : 
                            
                                escape($this->item->state); ?>
                             
                        
                        item->country) : ?>
                            : 
                            
                                item->countryimg ? $this->item->countryimg : $this->item->country; ?>
                                 
                        
                        
                        showvenuestate) && isset($this->item->locpublished)) : ?>
                            : 
                            
                                item->locpublished) {
                                    case  1: echo Text::_('JPUBLISHED');   break;
                                    case  0: echo Text::_('JUNPUBLISHED'); break;
                                    case  2: echo Text::_('JARCHIVED');    break;
                                    case -2: echo Text::_('JTRASHED');     break;
                                } ?>
                             
                        
                        item->{'venue'.$cr};
                            if (preg_match('%^http(s)?://%', $currentRow)) {
                                $currentRow = '' . $this->escape($currentRow) . ' ';
                            }
                            if ($currentRow) {
                                ?>
                                : 
                                 
                    get('event_show_mapserv') == 2 || $params->get('event_show_mapserv') == 5) : ?>
                        
                            item, 'event', $params); ?>
                        
                    
                    get('event_show_mapserv') == 3) : ?>
                        
                        item, 'event', $params); ?>
                    
                
                get('event_show_locdescription', '1') && $this->item->locdescription != ''
                    && $this->item->locdescription != '
') : ?>
                    
                        item->locdescription; ?>
                    
                
                attachments = $this->item->vattachments; ?>
                loadTemplate('attachments'); ?>
            
 
        
        
        showAttendees && $params->get('event_show_registration', '1')) : ?>
            
            e_reg) {
                case 0:
                    //Event without registration (NO)
                    echo Text::_('COM_JEM_VENUE_DESCRIPTION');
                    break;
                case 1:
                    //Event with registration (YES with or witout UNTIL)
                    echo $this->loadTemplate('attendees');
                    if($this->dateUnregistationUntil) {
                        echo ($this->allowAnnulation? Text::_('COM_JEM_EVENT_ANNULATION_NOTWILLBE_FROM') : Text::_('COM_JEM_EVENT_ANNULATION_ISNOT_FROM')) . ' ' . HTMLHelper::_('date', $this->dateUnregistationUntil, Text::_('DATE_FORMAT_LC2'));
                    }
                    break;
                case 2:
                    //Event with date starting registration (FROM with or witout UNTIL)
                    if($this->dateRegistationFrom > $timeNow) {
                        echo Text::_('COM_JEM_EVENT_REGISTRATION_WILLBE_FROM') . ' ' . HTMLHelper::_('date', $this->dateRegistationFrom, Text::_('DATE_FORMAT_LC2'));
                    }else if ($this->allowRegistration) {
                        echo Text::_('COM_JEM_EVENT_REGISTRATION_IS_FROM') . ' ' . HTMLHelper::_('date', $this->dateRegistationFrom, Text::_('DATE_FORMAT_LC2'));
                        if($this->dateRegistationUntil){
                            echo " " . mb_strtolower(Text::_('COM_JEM_UNTIL')) . ' ' . HTMLHelper::_('date', $this->dateRegistationUntil, Text::_('DATE_FORMAT_LC2'));
                        }
                        echo $this->loadTemplate('attendees');
                        //Event with date starting annulation
                        if($this->dateUnregistationUntil) {
                            echo "
" . ($this->allowAnnulation? Text::_('COM_JEM_EVENT_ANNULATION_NOTWILLBE_FROM') : Text::_('COM_JEM_EVENT_ANNULATION_ISNOT_FROM')) . ' ' . HTMLHelper::_('date', $this->dateUnregistationUntil, Text::_('DATE_FORMAT_LC2'));
                        }
                    }else if($this->dateRegistationUntil !== false && $this->dateRegistationUntil < $timeNow) {
                        echo Text::_('COM_JEM_EVENT_REGISTRATION_WAS_UNTIL') . ' ' . HTMLHelper::_('date', $this->dateRegistationUntil, Text::_('DATE_FORMAT_LC2'));
                        echo $this->loadTemplate('attendees');
                        //Event with date starting annulation
                        if($this->dateUnregistationUntil) {
                            echo ($this->allowAnnulation? Text::_('COM_JEM_EVENT_ANNULATION_NOTWILLBE_FROM') : Text::_('COM_JEM_EVENT_ANNULATION_ISNOT_FROM')) . ' ' . HTMLHelper::_('date', $this->dateUnregistationUntil, Text::_('DATE_FORMAT_LC2'));
                        }
                    } else {
                        // open registration to the end of event
                        if($this->item->enddates){
                            $endDateEvent = strtotime($this->item->enddates . ' ' . ($this->item->endtimes ? $this->item->endtimes : '23:59:59'));
                            if($timeNow <= $endDateEvent){
                                echo Text::_('COM_JEM_EVENT_REGISTRATION_IS_UNTIL');
                            } else {
                                echo Text::_('COM_JEM_EVENT_REGISTRATION_WAS_UNTIL');
                            }
                            echo ' ' . HTMLHelper::_('date', $endDateEvent, Text::_('DATE_FORMAT_LC2'));
                            echo $this->loadTemplate('attendees');
                        }else{
                            if(!empty($this->item->dates)) {
                                $endDateEvent = strtotime($this->item->dates . ' ' . ($this->item->times ? $this->item->times : '23:59:59'));
                                if($timeNow <= $endDateEvent){
                                    echo Text::_('COM_JEM_EVENT_REGISTRATION_IS_UNTIL');
                                } else {
                                    echo Text::_('COM_JEM_EVENT_REGISTRATION_WAS_UNTIL');
                                }
                                echo ' ' . HTMLHelper::_('date', $endDateEvent, Text::_('DATE_FORMAT_LC2'));
                                echo $this->loadTemplate('attendees');
                            }
                        }
                    }
                    break;
            }?>
        
        item->pluginevent->onEventEnd)) : ?>
            
            item->pluginevent->onEventEnd; ?>