Ejemplo n.º 1
0
    public static function saisons(&$rows, &$lists, &$pageNav, $option)
    {
        // Nur CLM-Amin darf hier zugreifen
        if (!JFactory::getUser()->authorise('core.manage.clm', 'com_clm')) {
            return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
        }
        $mainframe = JFactory::getApplication();
        //CLM parameter auslesen
        $config = clm_core::$db->config();
        $countryversion = $config->countryversion;
        CLMViewSaisons::setSaisonsToolbar($countryversion);
        $user = JFactory::getUser();
        //Ordering allowed ?
        $ordering = $lists['order'] == 'a.ordering';
        JHtml::_('behavior.tooltip');
        ?>
		<form action="index.php?option=com_clm&section=saisons" method="post" name="adminForm" id="adminForm">

		<table>
		<tr>
			<td align="left" width="100%">
				<?php 
        echo JText::_('Filter');
        ?>
:
		<input type="text" name="search" id="search" value="<?php 
        echo $lists['search'];
        ?>
" class="text_area" onchange="document.adminForm.submit();" />
		<button onclick="this.form.submit();"><?php 
        echo JText::_('GO');
        ?>
</button>
		<button onclick="document.getElementById('search').value='';this.form.getElementById('filter_catid').value='0';this.form.getElementById('filter_state').value='';this.form.submit();"><?php 
        echo JText::_('Reset');
        ?>
</button>
			</td>
			<td nowrap="nowrap">
				<?php 
        // eigenes Dropdown Menue
        echo "&nbsp;&nbsp;&nbsp;" . $lists['state'];
        ?>
			</td>
		</tr>
		</table>

			<table class="adminlist">
			<thead>
				<tr>
					<th width="10">
						#
					</th>
					<th width="10">
						<?php 
        echo $GLOBALS["clm"]["grid.checkall"];
        ?>
					</th>
					<th class="title">
						<?php 
        echo JHtml::_('grid.sort', 'SAISON', 'a.name', @$lists['order_Dir'], @$lists['order']);
        ?>
					</th>
					<th width="10%">
						<?php 
        echo JHtml::_('grid.sort', 'JDATE', 'a.datum', @$lists['order_Dir'], @$lists['order']);
        ?>
					</th>
					<th width="6%">
						<?php 
        echo JHtml::_('grid.sort', 'JPUBLISHED', 'a.published', @$lists['order_Dir'], @$lists['order']);
        ?>
					</th>
					<th width="6%">
						<?php 
        echo JHtml::_('grid.sort', 'SAISON_ARCHIVE', 'a.archiv', @$lists['order_Dir'], @$lists['order']);
        ?>
					</th>
					<th width="8%" nowrap="nowrap">
						<?php 
        echo JHtml::_('grid.sort', 'JGRID_HEADING_ORDERING', 'a.ordering', @$lists['order_Dir'], @$lists['order']);
        ?>
						<?php 
        echo JHtml::_('grid.order', $rows);
        ?>
					</th>
					<th width="1%" nowrap="nowrap">
						<?php 
        echo JHtml::_('grid.sort', 'JGRID_HEADING_ID', 'a.id', @$lists['order_Dir'], @$lists['order']);
        ?>
					</th>
				</tr>
			</thead>
			<tfoot>
				<tr>
					<td colspan="12">
						<?php 
        echo $pageNav->getListFooter();
        ?>
					</td>
				</tr>
			</tfoot>
			<tbody>
			<?php 
        $k = 0;
        $row = JTable::getInstance('saisons', 'TableCLM');
        for ($i = 0, $n = count($rows); $i < $n; $i++) {
            //$row = &$rows[$i];
            // load the row from the db table
            $row->load($rows[$i]->id);
            $link = JRoute::_('index.php?option=com_clm&section=saisons&task=edit&cid[]=' . $row->id);
            $checked = JHtml::_('grid.checkedout', $row, $i);
            $published = JHtml::_('grid.published', $row, $i);
            ?>
				<tr class="<?php 
            echo 'row' . $k;
            ?>
">


					<td align="center">
						<?php 
            echo $pageNav->getRowOffset($i);
            ?>
					</td>

					<td>
						<?php 
            echo $checked;
            ?>
					</td>

					<td>
			 <span title="<?php 
            echo JText::_('SAISON_EDIT');
            ?>
"><a href="<?php 
            echo $link;
            ?>
">
								<?php 
            echo $row->name;
            ?>
</a></span>
					</td>
					
					<td align="center">
						<?php 
            echo $row->datum;
            ?>
					</td>
					
					<td align="center">
						<?php 
            echo $published;
            ?>
					</td>
					<td align="center">
						<?php 
            if ($row->archiv > 0) {
                ?>
<img width="16" height="16" src="components/com_clm/images/apply_f2.png" /> <?php 
            } else {
                ?>
<img width="16" height="16" src="components/com_clm/images/cancel_f2.png" /> <?php 
            }
            ?>
					</td>


	<td class="order">
	<?php 
            $disabled = $ordering ? '' : 'disabled="disabled"';
            ?>
	<input type="text" name="order[]" size="5" value="<?php 
            echo $row->ordering;
            ?>
" <?php 
            echo $disabled;
            ?>
 class="text_area" style="text-align: center" />
					</td>

					<td align="center">
						<?php 
            echo $row->id;
            ?>
					</td>
				</tr>
				<?php 
            $k = 1 - $k;
        }
        ?>
			</tbody>
			</table>


		<input type="hidden" name="option" value="<?php 
        echo $option;
        ?>
" />
		<input type="hidden" name="task" value="" />
		<input type="hidden" name="boxchecked" value="0" />
		<input type="hidden" name="filter_order" value="<?php 
        echo $lists['order'];
        ?>
" />
		<input type="hidden" name="filter_order_Dir" value="<?php 
        echo $lists['order_Dir'];
        ?>
" />
		<?php 
        echo JHtml::_('form.token');
        ?>
		</form>
		<?php 
    }
Ejemplo n.º 2
0
    function saisons(&$rows, &$lists, &$pageNav, $option)
    {
        global $mainframe;
        CLMViewSaisons::setSaisonsToolbar();
        $user =& JFactory::getUser();
        //Ordering allowed ?
        $ordering = $lists['order'] == 'a.ordering';
        JHTML::_('behavior.tooltip');
        ?>
		<form action="index.php?option=com_clm&section=saisons" method="post" name="adminForm">

		<table>
		<tr>
			<td align="left" width="100%">
				<?php 
        echo JText::_('Filter');
        ?>
:
		<input type="text" name="search" id="search" value="<?php 
        echo $lists['search'];
        ?>
" class="text_area" onchange="document.adminForm.submit();" />
		<button onclick="this.form.submit();"><?php 
        echo JText::_('GO');
        ?>
</button>
		<button onclick="document.getElementById('search').value='';this.form.getElementById('filter_catid').value='0';this.form.getElementById('filter_state').value='';this.form.submit();"><?php 
        echo JText::_('Reset');
        ?>
</button>
			</td>
			<td nowrap="nowrap">
				<?php 
        // eigenes Dropdown Menue
        echo "&nbsp;&nbsp;&nbsp;" . $lists['state'];
        ?>
			</td>
		</tr>
		</table>

			<table class="adminlist">
			<thead>
				<tr>
					<th width="10">
						<?php 
        echo JText::_('NUM');
        ?>
					</th>
					<th width="10">
						<input type="checkbox" name="toggle" value="" onclick="checkAll(<?php 
        echo count($rows);
        ?>
);" />
					</th>
					<th class="title">
						<?php 
        echo JHTML::_('grid.sort', 'SAISON', 'a.name', @$lists['order_Dir'], @$lists['order']);
        ?>
					</th>
					<th width="10%">
						<?php 
        echo JHTML::_('grid.sort', 'DATE', 'a.datum', @$lists['order_Dir'], @$lists['order']);
        //klkl
        ?>
					</th>
					<th width="6%">
						<?php 
        echo JHTML::_('grid.sort', 'PUBLISHED', 'a.published', @$lists['order_Dir'], @$lists['order']);
        ?>
					</th>
					<th width="6%">
						<?php 
        echo JHTML::_('grid.sort', 'SAISON_ARCHIVE', 'a.archiv', @$lists['order_Dir'], @$lists['order']);
        ?>
					</th>
					<th width="8%" nowrap="nowrap">
						<?php 
        echo JHTML::_('grid.sort', 'ORDER', 'a.ordering', @$lists['order_Dir'], @$lists['order']);
        ?>
						<?php 
        echo JHTML::_('grid.order', $rows);
        ?>
					</th>
					<th width="1%" nowrap="nowrap">
						<?php 
        echo JHTML::_('grid.sort', 'ID', 'a.id', @$lists['order_Dir'], @$lists['order']);
        ?>
					</th>
				</tr>
			</thead>
			<tfoot>
				<tr>
					<td colspan="12">
						<?php 
        echo $pageNav->getListFooter();
        ?>
					</td>
				</tr>
			</tfoot>
			<tbody>
			<?php 
        $k = 0;
        for ($i = 0, $n = count($rows); $i < $n; $i++) {
            $row =& $rows[$i];
            $link = JRoute::_('index.php?option=com_clm&section=saisons&task=edit&cid[]=' . $row->id);
            $checked = JHTML::_('grid.checkedout', $row, $i);
            $published = JHTML::_('grid.published', $row, $i);
            ?>
				<tr class="<?php 
            echo 'row' . $k;
            ?>
">


					<td align="center">
						<?php 
            echo $pageNav->getRowOffset($i);
            ?>
					</td>


					<td>
						<?php 
            echo $checked;
            ?>
					</td>


					<td>
						<?php 
            if (JTable::isCheckedOut($user->get('id'), $row->editor)) {
                echo $row->name;
            } else {
                ?>
								<span class="editlinktip hasTip" title="<?php 
                echo JText::_('SAISON_EDIT');
                ?>
::<?php 
                echo $row->name . $row->man_nr;
                ?>
">
							<a href="<?php 
                echo $link;
                ?>
">
								<?php 
                echo $row->name;
                ?>
</a></span>
							<?php 
            }
            ?>
					</td>
					
					<td align="center">
						<?php 
            echo $row->datum;
            ?>
					</td>
					
					<td align="center">
						<?php 
            echo $published;
            ?>
					</td>
					<td align="center">
						<?php 
            if ($row->archiv > 0) {
                ?>
<img width="16" height="16" src="images/apply_f2.png" /> <?php 
            } else {
                ?>
<img width="16" height="16" src="images/cancel_f2.png" /> <?php 
            }
            ?>
					</td>


	<td class="order">
	<?php 
            $disabled = $ordering ? '' : 'disabled="disabled"';
            ?>
	<input type="text" name="order[]" size="5" value="<?php 
            echo $row->ordering;
            ?>
" <?php 
            echo $disabled;
            ?>
 class="text_area" style="text-align: center" />
					</td>

					<td align="center">
						<?php 
            echo $row->id;
            ?>
					</td>
				</tr>
				<?php 
            $k = 1 - $k;
        }
        ?>
			</tbody>
			</table>


		<input type="hidden" name="option" value="<?php 
        echo $option;
        ?>
" />
		<input type="hidden" name="task" value="" />
		<input type="hidden" name="boxchecked" value="0" />
		<input type="hidden" name="filter_order" value="<?php 
        echo $lists['order'];
        ?>
" />
		<input type="hidden" name="filter_order_Dir" value="<?php 
        echo $lists['order_Dir'];
        ?>
" />
		<?php 
        echo JHTML::_('form.token');
        ?>
		</form>
		<?php 
    }