-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding different views to the backend
- Loading branch information
Showing
9 changed files
with
237 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
/** | ||
* @package Joomla.Administrator | ||
* @subpackage com_tvo | ||
* | ||
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. | ||
* @license GNU General Public License version 2 or later; see LICENSE.txt | ||
*/ | ||
|
||
// No direct access to this file | ||
defined('_JEXEC') or die('Restricted access'); | ||
|
||
/** | ||
* General Controller of HelloWorld component | ||
* | ||
* @package Joomla.Administrator | ||
* @subpackage com_tvo | ||
* @since 0.0.10 | ||
*/ | ||
class TvoController extends JControllerLegacy | ||
{ | ||
/** | ||
* The default view for the display method. | ||
* | ||
* @var string | ||
* @since 12.2 | ||
*/ | ||
//protected $default_view = 'tvo'; | ||
protected $default_view = 'tvoteamslist'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,20 @@ | ||
Hello World administration | ||
<?php | ||
/** | ||
* @package Joomla.Administrator | ||
* @subpackage com_tvo | ||
* | ||
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. | ||
* @license GNU General Public License version 2 or later; see LICENSE.txt | ||
*/ | ||
|
||
// No direct access to this file | ||
defined('_JEXEC') or die('Restricted access'); | ||
|
||
// Get an instance of the controller prefixed by HelloWorld | ||
$controller = JControllerLegacy::getInstance('tvo'); | ||
|
||
// Perform the Request task | ||
$controller->execute(JFactory::getApplication()->input->get('task')); | ||
|
||
// Redirect if set by the controller | ||
$controller->redirect(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<extension type="component" version="3.0" method="upgrade"> | ||
|
||
<name>TVO</name> | ||
<!-- The following elements are optional and free of formatting constraints --> | ||
<creationDate>September 2021</creationDate> | ||
<author>Stefan Herzog</author> | ||
<authorEmail>[email protected]</authorEmail> | ||
<authorUrl>https://github.com/alve89</authorUrl> | ||
<copyright>Copyright Info</copyright> | ||
<license>License Info</license> | ||
<!-- The version string is recorded in the components table --> | ||
<version>0.0.12</version> | ||
<!-- The description is optional and defaults to the name --> | ||
<description>BESCHREIBUNG DER KOMPONENTE FOLGT</description> | ||
|
||
<install> <!-- Runs on install --> | ||
<sql> | ||
<file driver="mysql" charset="utf8">sql/install.mysql.utf8mb4.sql</file> | ||
</sql> | ||
</install> | ||
<uninstall> <!-- Runs on uninstall --> | ||
<sql> | ||
<file driver="mysql" charset="utf8">sql/uninstall.mysql.utf8mb4.sql</file> | ||
</sql> | ||
</uninstall> | ||
|
||
<update> <!-- Runs on update; New since J2.5 --> | ||
<schemas> | ||
<schemapath type="mysql">sql/updates/mysql</schemapath> | ||
</schemas> | ||
</update> | ||
|
||
<!-- Site Main File Copy Section --> | ||
<!-- Note the folder attribute: This attribute describes the folder | ||
to copy FROM in the package to install therefore files copied | ||
in this section are copied from /site/ in the package --> | ||
<files folder="site"> | ||
<filename>index.html</filename> | ||
<filename>tvo.php</filename> | ||
<filename>controller.php</filename> | ||
<folder>views</folder> | ||
<folder>models</folder> | ||
</files> | ||
|
||
<administration> | ||
<!-- Administration Menu Section --> | ||
<menu link='index.php?option=com_tvo'>TV Oberflockenbach</menu> | ||
<!-- Administration Main File Copy Section --> | ||
<!-- Note the folder attribute: This attribute describes the folder | ||
to copy FROM in the package to install therefore files copied | ||
in this section are copied from /admin/ in the package --> | ||
<files folder="admin"> | ||
<!-- Admin Main File Copy Section --> | ||
<filename>index.html</filename> | ||
<filename>tvo.php</filename> | ||
<filename>controller.php</filename> | ||
<!-- SQL files section --> | ||
<folder>sql</folder> | ||
<!-- tables files section --> | ||
<folder>tables</folder> | ||
<!-- models files section --> | ||
<folder>models</folder> | ||
<!-- views files section --> | ||
<folder>views</folder> | ||
</files> | ||
</administration> | ||
<updateservers> | ||
<server type="extension" priority="2" name="com_tvo_updateserver">https://raw.githubusercontent.com/alve89/j_com_tvo/master/updates.xml</server> | ||
</updateservers> | ||
</extension> |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
<?php | ||
/** | ||
* @package Joomla.Administrator | ||
* @subpackage com_tvo | ||
* | ||
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. | ||
* @license GNU General Public License version 2 or later; see LICENSE.txt | ||
*/ | ||
|
||
// No direct access to this file | ||
defined('_JEXEC') or die('Restricted Access'); | ||
?> | ||
<form action="index.php?option=com_tvo&view=tvoteamslist" method="post" id="adminForm" name="adminForm"> | ||
<table class="table table-striped table-hover"> | ||
<thead> | ||
<tr> | ||
<th width="1%"><?php echo JText::_('COM_TVO_NUM'); ?></th> | ||
<th width="2%"> | ||
<?php echo JHtml::_('grid.checkall'); ?> | ||
</th> | ||
<th width="45%"> | ||
<?php echo JText::_('COM_TVO_HELLOWORLDS_NAME') ;?> | ||
</th> | ||
<th width="45%"> | ||
<?php echo JText::_('COM_TVO_HELLOWORLDS_TITLE') ;?> | ||
</th> | ||
<th width="5%"> | ||
<?php echo JText::_('COM_TVO_PUBLISHED'); ?> | ||
</th> | ||
<th width="2%"> | ||
<?php echo JText::_('COM_TVO_ID'); ?> | ||
</th> | ||
</tr> | ||
</thead> | ||
<tfoot> | ||
<tr> | ||
<td colspan="5"> | ||
<?php echo $this->pagination->getListFooter(); ?> | ||
</td> | ||
</tr> | ||
</tfoot> | ||
<tbody> | ||
<?php if (!empty($this->items)) : ?> | ||
<?php foreach ($this->items as $i => $row) : ?> | ||
|
||
<tr> | ||
<td> | ||
<?php echo $this->pagination->getRowOffset($i); ?> | ||
</td> | ||
<td> | ||
<?php echo JHtml::_('grid.id', $i, $row->id); ?> | ||
</td> | ||
<td> | ||
<?php echo $row->teamName; ?> | ||
</td> | ||
<td> | ||
<?=$row->title;?> | ||
<td align="center"> | ||
<?php echo JHtml::_('jgrid.published', $row->published, $i, 'tvoteamslist.', true, 'cb'); ?> | ||
</td> | ||
<td align="center"> | ||
<?php echo $row->id; ?> | ||
</td> | ||
</tr> | ||
<?php endforeach; ?> | ||
<?php endif; ?> | ||
</tbody> | ||
</table> | ||
</form> |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<?php | ||
/** | ||
* @package Joomla.Administrator | ||
* @subpackage com_tvo | ||
* | ||
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. | ||
* @license GNU General Public License version 2 or later; see LICENSE.txt | ||
*/ | ||
|
||
// No direct access to this file | ||
defined('_JEXEC') or die('Restricted access'); | ||
|
||
/** | ||
* HelloWorlds View | ||
* | ||
* @since 0.0.1 | ||
*/ | ||
class TvoViewTvoTeamsList extends JViewLegacy | ||
{ | ||
/** | ||
* Display the Hello World view | ||
* | ||
* @param string $tpl The name of the template file to parse; automatically searches through the template paths. | ||
* | ||
* @return void | ||
*/ | ||
function display($tpl = null) | ||
{ | ||
// Get data from the model | ||
$this->items = $this->get('Items'); | ||
$this->pagination = $this->get('Pagination'); | ||
|
||
// Check for errors. | ||
if (count($errors = $this->get('Errors'))) | ||
{ | ||
JError::raiseError(500, implode('<br />', $errors)); | ||
|
||
return false; | ||
} | ||
|
||
// Display the template | ||
parent::display($tpl); | ||
} | ||
} |