*/
protected function _render()
{
- $ret = $this->_renderInline();
+ $ret = $this->_renderInline(true);
if (!empty($ret)) {
reset($ret);
$ret[key($ret)]['data'] = Horde_Util::bufferOutput('include', $GLOBALS['registry']->get('templates', 'horde') . '/common-header.inc') .
*
* @return array See Horde_Mime_Viewer_Driver::render().
*/
- protected function _renderInline()
+ protected function _renderInline($full = false)
{
global $registry;
// Create the HTML to display the iCal file.
$html = '';
- if ($_SESSION['imp']['view'] == 'imp') {
+ if ($_SESSION['imp']['view'] == 'imp' || $full) {
$html .= '<form method="post" name="iCal" action="' . (IMP::selfUrl()) . '">';
}
foreach ($components as $key => $component) {
switch ($component->getType()) {
case 'vEvent':
- $html .= $this->_vEvent($component, $key, $method, $msgs);
+ $html .= $this->_vEvent($component, $key, $method, $msgs, $full);
break;
case 'vTodo':
- $html .= $this->_vTodo($component, $key, $method, $msgs);
+ $html .= $this->_vTodo($component, $key, $method, $msgs, $full);
break;
case 'vTimeZone':
break;
case 'vFreebusy':
- $html .= $this->_vFreebusy($component, $key, $method, $msgs);
+ $html .= $this->_vFreebusy($component, $key, $method, $msgs, $full);
break;
// @todo: handle stray vcards here as well.
}
// Need to work out if we are inline and actually need this.
- if ($_SESSION['imp']['view'] == 'imp') {
+ if ($_SESSION['imp']['view'] == 'imp' || $full) {
$html .= '</form>';
}
/**
* Return the html for a vFreebusy.
*/
- protected function _vFreebusy($vfb, $id, $method, $msgs)
+ protected function _vFreebusy($vfb, $id, $method, $msgs, $full)
{
global $registry, $prefs;
}
}
- if ($_SESSION['imp']['view'] != 'imp') {
+ if ($_SESSION['imp']['view'] != 'imp' && !$full) {
return $html;
}
/**
* Return the html for a vEvent.
*/
- protected function _vEvent($vevent, $id, $method, $msgs)
+ protected function _vEvent($vevent, $id, $method, $msgs, $full)
{
global $registry, $prefs;
} catch (Horde_Exception $e) {}
}
- if ($_SESSION['imp']['view'] != 'imp') {
+ if ($_SESSION['imp']['view'] != 'imp' && !$full) {
return $html;
}
* @todo IMP 5: move organizerName() from Horde_iCalendar_vevent to
* Horde_iCalendar
*/
- protected function _vTodo($vtodo, $id, $method, $msgs)
+ protected function _vTodo($vtodo, $id, $method, $msgs, $full)
{
global $registry, $prefs;
$html .= '</tbody></table>';
}
- if ($_SESSION['imp']['view'] != 'imp') {
+ if ($_SESSION['imp']['view'] != 'imp' && !$full) {
return $html;
}