preparations for sef
[eventlist:eventlist.git] / views / categoriesdetailed / tmpl / default_table.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
11 <table width="<?php echo $this->elsettings->tablewidth; ?>" border="0" cellspacing="0" cellpadding="0" summary="eventlist">
12                         <tr>
13                                 <td width="<?php echo $this->elsettings->datewidth; ?>" class="sectiontableheader" align="left"><?php echo $this->elsettings->datename; ?></td>
14                                 <?php
15                                 if ($this->elsettings->showtitle == 1) :
16                                 ?>
17                                 <td width="<?php echo $this->elsettings->titlewidth; ?>" class="sectiontableheader" align="left"><?php echo $this->elsettings->titlename; ?></td>
18                                 <?php
19                                 endif;
20                                 if ($this->elsettings->infobuttonwidth != '') :
21                                 ?>
22                                 <td width="<?php echo $this->elsettings->infobuttonwidth; ?>" class="sectiontableheader" align="left"><?php echo $this->elsettings->infobuttonname; ?></td>
23                                 <?php
24                                 endif;
25                                 if ($this->elsettings->showlocate == 1) :
26                                 ?>
27                                 <td width="<?php echo $this->elsettings->locationwidth; ?>" class="sectiontableheader" align="left"><?php echo $this->elsettings->locationname; ?></td>
28                                 <?php
29                                 endif;
30                                 if ($this->elsettings->showcity == 1) :
31                                 ?>
32                                 <td width="<?php echo $this->elsettings->citywidth; ?>" class="sectiontableheader" align="left"><?php echo $this->elsettings->cityname; ?></td>
33                                 <?php
34                                 endif;
35                                 if ($this->elsettings->showstate == 1) :
36                                 ?>
37                                 <td width="<?php echo $this->elsettings->statewidth; ?>" class="sectiontableheader" align="left"><?php echo $this->elsettings->statename; ?></td>
38                                 <?php
39                                 endif;
40                                 if ($this->elsettings->showcat == 1) :
41                                 ?>
42                                 <td width="<?php echo $this->elsettings->catfrowidth; ?>" class="sectiontableheader" align="left"><?php echo $this->elsettings->catfroname; ?></td>
43                                 <?php
44                                 endif;
45                                 ?>
46                         </tr>
47         </table>
48
49         <table width="<?php echo $this->elsettings->tablewidth; ?>"  border="0" cellspacing="0" cellpadding="0" summary="eventlist">
50                 <?php
51         //      $k = 0;
52         //      for ($i=0, $n=count($this->rows); $i < $n; $i++) {
53         //      $row = $this->rows[$i];
54         $this->rows =& $this->getRows();
55         if (!$this->rows) :
56                 ?>
57                 <tr align="center"><td><?php echo JText::_( 'NO EVENTS' ); ?></td></tr>
58                 <?php
59         else :
60
61         foreach ($this->rows as $row) :
62                 //alternating colors
63                 //$tabclass = array( 'sectiontableentry1', 'sectiontableentry2' );
64
65                 ?>
66                         <!--<tr class="<?php // echo $tabclass[$k]; ?>">-->
67                         <tr class="sectiontableentry<?php echo ($row->odd +1 ) . $this->params->get( 'pageclass_sfx' ); ?>" >
68                         <td width="<?php echo $this->elsettings->datewidth; ?>" align="left">
69                         <b><?php echo $row->displaydate; ?></b>
70                                 <?php
71                                 if ($this->elsettings->showtime == 1) :
72                                         echo $row->displaytime;
73                                 endif;
74                                 ?>
75                                 </td>
76                                 <?php
77                                 //Link to details
78                                 $detaillink = JRoute::_( 'index.php?option=com_eventlist&view=details&did='. $row->id );
79                                 //title
80                                 if (($this->elsettings->showtitle == 1 ) && (($this->elsettings->showdetails == 1) || ($this->elsettings->showdetails == 3)) ) :
81                                 ?>
82                                 <td width="<?php echo $this->elsettings->titlewidth; ?>" align="left" valign="top"><a href="<?php echo $detaillink ; ?>"> <?php echo $row->title ? $row->title : '-'; ?></a></td>
83                                 <?php
84                                 endif;
85                                 if (( $this->elsettings->showtitle == 1 ) && (($this->elsettings->showdetails == 2) || ($this->elsettings->showdetails == 0)) ) :
86                                 ?>
87                                 <td width="<?php echo $this->elsettings->titlewidth; ?>" align="left" valign="top"><?php echo $row->title ? $row->title : '-'; ?></td>
88                                 <?php
89                                 endif;
90
91                                 //Infomation icon
92                                 if ($this->elsettings->infobuttonwidth != '') :
93                                         if (($this->elsettings->showdetails == 2) || ($this->elsettings->showdetails == 3)) :
94                                                 if (empty ($row->datdescription) && empty($row->locdescription)) :
95                                 ?>
96                                                         <td width="<?php echo $this->elsettings->infobuttonwidth; ?>" align="center" valign="top">
97                                                         <img src="<?php echo $live_site."/components/com_eventlist/assets/images/images/information_no.png"; ?>" width="16" height="16"  name="image" alt="<?php JText::_( 'SHOW DETAILS' ); ?>" />
98                                                         </td>
99                                 <?php
100                                                 else :
101                                 ?>
102                                                         <td width="<?php echo $this->elsettings->infobuttonwidth; ?>" align="center" valign="top">
103                                                         <a href="<?php echo $detaillink ; ?>"><img src="<?php echo $live_site."/components/com_eventlist/assets/images/information.png"; ?>" width="16" height="16"  name="image" alt="<?php JText::_( 'SHOW DETAILS' ); ?>" /></a>
104                                                         </td>
105                                 <?php
106                                                 endif;
107                                         endif;
108                                 endif;
109                                 if ($this->elsettings->showlocate == 1) :
110                                 ?>
111                                         <td width="<?php echo $this->elsettings->locationwidth; ?>" align="left" valign="top">
112                                 <?php
113                                         if ($this->elsettings->showlinkclub == 1 ) :
114                                                         echo $row->locid != 0 ? "<a href='".JRoute::_("index.php?option=com_eventlist&view=venueevents&locatid=$row->locid")."'>".$row->club."</a>" : '-';
115                                                 else :
116                                                         echo $row->locid ? $row->club : '-';
117                                                 endif;
118                                 ?>
119                                         </td>
120                                 <?php
121                                 endif;
122                                 if ($this->elsettings->showcity == 1) :
123                                 ?>
124                                         <td width="<?php echo $this->elsettings->citywidth; ?>" align="left" valign="top"><?php echo $row->city ? $row->city : '-'; ?></td>
125                                 <?php
126                                 endif;
127
128                                 if ($this->elsettings->showstate == 1) :
129                                 ?>
130                                         <td width="<?php echo $this->elsettings->statewidth; ?>" align="left" valign="top"><?php echo $row->state ? $row->state : '-'; ?></td>
131                                 <?php
132                                 endif;
133
134                                 if ($this->elsettings->showcat == 1) :
135                                         if ($this->elsettings->catlinklist == 1) :
136                                         ?>
137                                                 <td width="<?php echo $this->elsettings->catfrowidth; ?>" align="left" valign="top">
138                                                         <a href="<?php echo JRoute::_('index.php?option=com_eventlist&view=categoryevents&categid='.$row->catid) ; ?>">
139                                                                 <?php echo $row->catname ? $row->catname : '-' ; ?>
140                                                         </a>
141                                                 </td>
142                                         <?php else : ?>
143                                                 <td width="<?php echo $this->elsettings->catfrowidth; ?>" align="left" valign="top">
144                                                         <?php echo $row->catname ? $row->catname : '-'; ?>
145                                                 </td>
146                                 <?php
147                                         endif;
148                                 endif;
149                                 ?>
150                         </tr>
151                 <?php // $k = 1 - $k; }
152                 endforeach;
153                 endif;
154                 ?>
155 </table>
156 <br />