<div class="btn-group pull-left"> <?php echo JEMOutput::statuslabel($this->venue->published); ?> </div> <div class="btn-group pull-right hidden-phone"> <?php if ($this->print) { echo JemOutput::printbutton($this->print_link, $this->params); } else { ?> <div class="button_flyer icons"> <?php echo JemOutput::printbutton($this->print_link, $this->params); echo JemOutput::mailbutton($this->venue->slug, 'venue', $this->params); echo JemOutput::submitbutton($this->addeventlink, $this->params); echo JemOutput::addvenuebutton($this->addvenuelink, $this->params, $this->jemsettings); echo JemOutput::archivebutton($this->params, $this->task, $this->venue->slug); ?> </div> <?php } ?> </div> </div> <div class="clearfix"></div> <!-- info --> <div class="info_container"> <?php if ($this->params->get('show_page_heading', 1)) {
/** * Creates the button bar shown on frontend view's top right corner. * * @param string $view Name of the view * ('attendees', 'calendar', 'categories', 'category', 'category-cal', 'day', * 'editevent', 'editvenue', 'event', 'eventslist', 'myattendances', 'myevents', 'myvenues', * 'search', 'venue', 'venue-cal', 'venues', 'weekcal') * @param object $permissions Object holding relevant permissions * (canAddEvent, canAddVenue, canPublishEvent, canPublishVenue) * @param object $params Object containing other relevant parameters * (id: for '&id=', for Archive and Export button, * slug: for '&id=', for Mail and iCal button, * task: e.g. 'archive', for Archive button, * print_link: for Print button * show, hide: to override button visibility; array of one or more of * 'addEvent', 'addVenue', * 'archive' 'mail', 'print', 'ical', ('export', 'back',) * 'publish', 'unpublish', 'trash' - note: some buttons may not work or need additional changes) * * @return string Resulting HTML code. */ static function createButtonBar($view, $permissions, $params) { foreach (array('canAddEvent', 'canAddVenue', 'canPublishEvent', 'canPublishVenue') as $key) { ${$key} = isset($permissions->$key) ? $permissions->$key: null; } if (is_object($params)) { foreach (array('id', 'slug', 'task', 'print_link', 'show', 'hide') as $key) { ${$key} = isset($params->$key) ? $params->$key : null; } } elseif (is_array($params)) { foreach (array('id', 'slug', 'task', 'print_link', 'show', 'hide') as $key) { ${$key} = key_exists($key, $params) ? $params[$key] : null; } } else { foreach (array('id', 'slug', 'task', 'print_link') as $key) { ${$key} = null; } } $btns_show = isset($show) ? (array)$show : array(); $btns_hide = isset($hide) ? (array)$hide : array(); $archive = !empty($task) && ($task == 'archive'); $buttons = array(); $idx = 0; # Left block ------------------ if (!$archive) { if (in_array('addEvent', $btns_show) || (!in_array('addEvent', $btns_hide) && in_array($view, array('categories', 'category', 'day', 'event', 'eventslist', 'myevents', 'myvenues', 'venue', 'venues')))) { $buttons[$idx][] = JemOutput::submitbutton(!empty($canAddEvent), null); } if (in_array('addVenue', $btns_show) || (!in_array('addVenue', $btns_hide) && in_array($view, array('categories', 'category', 'day', 'event', 'eventslist', 'myevents', 'myvenues', 'venue', 'venues')))) { $buttons[$idx][] = JemOutput::addvenuebutton(!empty($canAddVenue), null, null); } } ++$idx; # Middle block ---------------- if (in_array('archive', $btns_show) || (!in_array('archive', $btns_hide) && in_array($view, array('categories', 'category', 'eventslist', 'myattendances', 'myevents', 'venue')))) { $buttons[$idx][] = JemOutput::archivebutton(null, $task, $id); // task: archive, id: for '&id=' } if (in_array('mail', $btns_show) || (!in_array('mail', $btns_hide) && in_array($view, array('category', 'event', 'venue')))) { $buttons[$idx][] = JemOutput::mailbutton($slug, $view, null); // slug: for '&id=' } if (in_array('print', $btns_show) || (!in_array('print', $btns_hide) && in_array($view, array('attendees', 'calendar', 'categories', 'category', 'category-cal', 'day', 'event', 'eventslist', 'myattendances', 'myevents', 'myvenues', 'venue', 'venue-cal', 'venues', 'weekcal')))) { $buttons[$idx][] = JemOutput::printbutton($print_link, null); } if (in_array('ical', $btns_show) || (!in_array('ical', $btns_hide) && in_array($view, array('event')))) { $buttons[$idx][] = JemOutput::icalbutton($slug, $view); // slug: for '&id=' } if (in_array('export', $btns_show) || (!in_array('export', $btns_hide) && in_array($view, array('attendees')))) { $buttons[$idx][] = JemOutput::exportbutton($id); // id: for '&id=' } if (in_array('back', $btns_show) || (!in_array('back', $btns_hide) && in_array($view, array('attendees')))) { $buttons[$idx][] = JemOutput::backbutton(null, $view); } ++$idx; # Right block ----------------- if (!empty($canPublishEvent) || !empty($canPublishVenue)) { if (in_array('publish', $btns_show) || (!in_array('publish', $btns_hide) && in_array($view, array('myevents', 'myvenues')))) { $buttons[$idx][] = JemOutput::publishbutton($view); } if (in_array('unpublish', $btns_show) || (!in_array('unpublish', $btns_hide) && in_array($view, array('myevents', 'myvenues')))) { $buttons[$idx][] = JemOutput::unpublishbutton($view); } if (in_array('trash', $btns_show) || (!in_array('trash', $btns_hide) && in_array($view, array('myevents')))) { $buttons[$idx][] = JemOutput::trashbutton($view); } } # ----------------------------- foreach ($buttons as $i => $btns) { $buttons[$i] = implode('', array_filter($btns)); } $result = implode('<span class="gap"> </span>', array_filter($buttons)); return $result; }
* @version 2.0.0 * @package JEM * @copyright (C) 2013-2014 joomlaeventmanager.net * @copyright (C) 2005-2009 Christoph Lukes * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL */ defined('_JEXEC') or die; $document = JFactory::getDocument(); ?> <div id="jem" class="jem_eventslist<?php echo $this->pageclass_sfx; ?> "> <div class="buttons"> <?php echo JemOutput::submitbutton($this->dellink, $this->params); echo JemOutput::archivebutton($this->params, $this->task); echo JemOutput::printbutton($this->print_link, $this->params); ?> </div> <?php if ($this->params->get('show_page_heading', 1)) { ?> <h1> <?php echo $this->escape($this->params->get('page_heading')); ?> </h1> <?php }