(no commit message)
[eventlist:eventlist.git] / views / editvenue / view.html.php
1 <?php 
2 /**
3  * @version 0.9 $Id$
4  * @package Joomla 
5  * @subpackage EventList
6  * @copyright (C) 2005 - 2007 Christoph Lukes
7  * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
8  */
9
10 // no direct access
11 defined( '_JEXEC' ) or die( 'Restricted access' );
12
13 jimport( 'joomla.application.component.view');
14
15 /**
16  * HTML View class for the Editevents View
17  *
18  * @package Joomla 
19  * @subpackage EventList
20  * @since 0.9
21  */
22 class EventListViewEditvenue extends JView 
23 {
24         /**
25          * Creates the output for venue submissions
26          *
27          * @since 0.5
28          * @param int $tpl
29          */
30         function display( $tpl=null )
31         {
32                 global $Itemid, $mainframe, $option;                    
33
34                 $editor         = & JFactory::getEditor();
35                 $doc            = & JFactory::getDocument();
36                 $elsettings = ELHelper::config();
37
38                 $live_site      = $mainframe->getCfg('live_site');
39                 
40                 // Get requests
41                 $id                             = JRequest::getVar('id', 0, '', 'int');
42                 $returnview             = JRequest::getVar('returnview', '', '', 'string');
43                 
44                 //Get Data from the model
45                 $row            = $this->Get('Venue');
46
47                 // Load tooltips behavior
48                 jimport('joomla.html.tooltips');
49                 
50                 jimport('joomla.filter.output');
51                 JOutputFilter::objectHTMLSafe( $row, ENT_QUOTES, 'locdescription' );
52                 
53                 //add css file
54                 $doc->addStyleSheet('components/com_eventlist/assets/css/eventlist.css');
55                 $doc->addCustomTag('<!--[if IE]><style type="text/css">.floattext{zoom:1;}</style><![endif]-->');
56                 
57                 // Get the menu object of the active menu item
58                 $menu           =& JMenu::getInstance();
59                 $item           = $menu->getActive();
60                 $params         =& $menu->getParams($item->id);
61                 
62                 $id ? $title = JText::_( 'EDIT VENUE' ) : $title = JText::_( 'ADD VENUE' );
63                 
64                 //pathway
65                 $pathway        = & $mainframe->getPathWay();
66                 $pathway->setItemName(1, $item->name);
67                 $pathway->addItem($title, '');
68                 
69                 //Set Title
70                 $doc->setTitle($title);
71                 
72                 //editor user
73                 $editoruser = ELUser::editoruser();
74                                 
75                 //Get image
76                 $limage = ELImage::venueimage($live_site, $row->locimage, $elsettings->imagewidth, $elsettings->imagehight, $elsettings->imageprob, $elsettings->gddisabled);
77                 
78                 //Set the info image
79                 $infoimage = JAdminMenus::ImageCheck( 'icon-16-hint.png', 'components/com_eventlist/assets/images/', NULL, NULL, JText::_( 'NOTES' ), JText::_( 'NOTES' ) );
80                 
81                 $this->assignRef('row' ,                                        $row);
82                 $this->assignRef('editor' ,                             $editor);
83                 $this->assignRef('live_site' ,                          $live_site);
84                 $this->assignRef('editoruser' ,                         $editoruser);
85                 $this->assignRef('limage' ,                             $limage);
86                 $this->assignRef('infoimage' ,                          $infoimage);
87                 $this->assignRef('returnview' ,                         $returnview);
88                 $this->assignRef('elsettings' ,                         $elsettings);
89                 
90                 parent::display($tpl);
91
92         }
93 }
94 ?>