first commit
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
* @version CVS: 1.0.0
|
||||
* @package Com_Anand
|
||||
* @author Super User <dev@component-creator.com>
|
||||
* @copyright 2023 Super User
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
// No direct access
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use \Joomla\CMS\HTML\HTMLHelper;
|
||||
use \Joomla\CMS\Factory;
|
||||
use \Joomla\CMS\Uri\Uri;
|
||||
use \Joomla\CMS\Router\Route;
|
||||
use \Joomla\CMS\Language\Text;
|
||||
use \Joomla\CMS\Session\Session;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<div class="item_fields">
|
||||
|
||||
<table class="table">
|
||||
|
||||
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
/**
|
||||
* @version CVS: 1.0.0
|
||||
* @package Com_Dvtr_employees
|
||||
* @author Pawel Potoniec <pawel@devatri.pl>
|
||||
* @copyright 2025 Pawel Potoniec
|
||||
|
||||
*/
|
||||
|
||||
// No direct access
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use \Joomla\CMS\HTML\HTMLHelper;
|
||||
use \Joomla\CMS\Factory;
|
||||
use \Joomla\CMS\Uri\Uri;
|
||||
use \Joomla\CMS\Router\Route;
|
||||
use \Joomla\CMS\Language\Text;
|
||||
|
||||
$wa = $this->document->getWebAssetManager();
|
||||
$wa->useScript('keepalive')
|
||||
->useScript('form.validate');
|
||||
HTMLHelper::_('bootstrap.tooltip');
|
||||
?>
|
||||
|
||||
<form
|
||||
action="<?php echo Route::_('index.php?option=com_dvtr_employees&layout=edit&id=' . (int) $this->item->id); ?>"
|
||||
method="post" enctype="multipart/form-data" name="adminForm" id="employee-form" class="form-validate form-horizontal">
|
||||
|
||||
|
||||
<?php echo HTMLHelper::_('uitab.startTabSet', 'myTab', array('active' => 'employee')); ?>
|
||||
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'employee', Text::_('COM_DVTR_EMPLOYEES_TAB_EMPLOYEE', true)); ?>
|
||||
<div class="row-fluid">
|
||||
<div class="col-md-12 form-horizontal">
|
||||
<fieldset class="adminform">
|
||||
<legend><?php echo Text::_('COM_DVTR_EMPLOYEES_FIELDSET_EMPLOYEE'); ?></legend>
|
||||
<?php echo $this->form->renderField('name'); ?>
|
||||
<?php echo $this->form->renderField('contact_data'); ?>
|
||||
<?php echo $this->form->renderField('position'); ?>
|
||||
<?php echo $this->form->renderField('description'); ?>
|
||||
<?php echo $this->form->renderField('avatar'); ?>
|
||||
<?php echo $this->form->renderField('achievements'); ?>
|
||||
<?php echo $this->form->renderField('achievements_label'); ?>
|
||||
<?php echo $this->form->renderField('publications'); ?>
|
||||
<?php echo $this->form->renderField('social_linkedin'); ?>
|
||||
<?php echo $this->form->renderField('social_facebook'); ?>
|
||||
<?php echo $this->form->renderField('social_instagram'); ?>
|
||||
<?php echo $this->form->renderField('social_twitter'); ?>
|
||||
<?php echo $this->form->renderField('alias'); ?>
|
||||
<?php echo $this->form->renderField('language'); ?>
|
||||
<?php echo $this->form->renderField('url'); ?>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo HTMLHelper::_('uitab.endTab'); ?>
|
||||
<input type="hidden" name="jform[id]" value="<?php echo isset($this->item->id) ? $this->item->id : ''; ?>" />
|
||||
|
||||
<?php echo $this->form->renderField('created_by'); ?>
|
||||
<?php echo $this->form->renderField('modified_by'); ?>
|
||||
|
||||
|
||||
<?php echo HTMLHelper::_('uitab.endTabSet'); ?>
|
||||
|
||||
<input type="hidden" name="task" value=""/>
|
||||
<?php echo HTMLHelper::_('form.token'); ?>
|
||||
|
||||
</form>
|
||||
@@ -0,0 +1,138 @@
|
||||
<?php
|
||||
/**
|
||||
* @version CVS: 1.0.0
|
||||
* @package Com_Dvtr_employees
|
||||
* @author Pawel Potoniec <pawel@devatri.pl>
|
||||
* @copyright 2025 Pawel Potoniec
|
||||
|
||||
*/
|
||||
|
||||
// No direct access
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
|
||||
use \Joomla\CMS\HTML\HTMLHelper;
|
||||
use \Joomla\CMS\Factory;
|
||||
use \Joomla\CMS\Uri\Uri;
|
||||
use \Joomla\CMS\Router\Route;
|
||||
use \Joomla\CMS\Layout\LayoutHelper;
|
||||
use \Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Session\Session;
|
||||
|
||||
HTMLHelper::_('bootstrap.tooltip');
|
||||
HTMLHelper::_('behavior.multiselect');
|
||||
|
||||
// Import CSS
|
||||
$wa = $this->document->getWebAssetManager();
|
||||
$wa->useStyle('com_dvtr_employees.admin')
|
||||
->useScript('com_dvtr_employees.admin');
|
||||
|
||||
$user = Factory::getApplication()->getIdentity();
|
||||
$userId = $user->get('id');
|
||||
$listOrder = $this->state->get('list.ordering');
|
||||
$listDirn = $this->state->get('list.direction');
|
||||
$canOrder = $user->authorise('core.edit.state', 'com_dvtr_employees');
|
||||
|
||||
|
||||
|
||||
if (!empty($saveOrder))
|
||||
{
|
||||
$saveOrderingUrl = 'index.php?option=com_dvtr_employees&task=employees.saveOrderAjax&tmpl=component&' . Session::getFormToken() . '=1';
|
||||
HTMLHelper::_('draggablelist.draggable');
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<form action="<?php echo Route::_('index.php?option=com_dvtr_employees&view=employees'); ?>" method="post"
|
||||
name="adminForm" id="adminForm">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div id="j-main-container" class="j-main-container">
|
||||
<?php echo LayoutHelper::render('joomla.searchtools.default', array('view' => $this)); ?>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
<table class="table table-striped" id="employeeList">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="w-1 text-center">
|
||||
<input type="checkbox" autocomplete="off" class="form-check-input" name="checkall-toggle" value=""
|
||||
title="<?php echo Text::_('JGLOBAL_CHECK_ALL'); ?>" onclick="Joomla.checkAll(this)"/>
|
||||
</th>
|
||||
|
||||
|
||||
|
||||
<th class='left'>
|
||||
<?php echo HTMLHelper::_('searchtools.sort', 'COM_DVTR_EMPLOYEES_EMPLOYEES_NAME', 'a.name', $listDirn, $listOrder); ?>
|
||||
</th>
|
||||
<th class='left'>
|
||||
<?php echo HTMLHelper::_('searchtools.sort', 'COM_DVTR_EMPLOYEES_EMPLOYEES_POSITION', 'a.position', $listDirn, $listOrder); ?>
|
||||
</th>
|
||||
<th class='left'>
|
||||
<?php echo HTMLHelper::_('searchtools.sort', 'COM_DVTR_EMPLOYEES_EMPLOYEES_LANGUAGE', 'a.language', $listDirn, $listOrder); ?>
|
||||
</th>
|
||||
|
||||
<th scope="col" class="w-3 d-none d-lg-table-cell" >
|
||||
|
||||
<?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="<?php echo isset($this->items[0]) ? count(get_object_vars($this->items[0])) : 10; ?>">
|
||||
<?php echo $this->pagination->getListFooter(); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody <?php if (!empty($saveOrder)) :?> class="js-draggable" data-url="<?php echo $saveOrderingUrl; ?>" data-direction="<?php echo strtolower($listDirn); ?>" <?php endif; ?>>
|
||||
<?php foreach ($this->items as $i => $item) :
|
||||
$ordering = ($listOrder == 'a.ordering');
|
||||
$canCreate = $user->authorise('core.create', 'com_dvtr_employees');
|
||||
$canEdit = $user->authorise('core.edit', 'com_dvtr_employees');
|
||||
$canCheckin = $user->authorise('core.manage', 'com_dvtr_employees');
|
||||
$canChange = $user->authorise('core.edit.state', 'com_dvtr_employees');
|
||||
?>
|
||||
<tr class="row<?php echo $i % 2; ?>" data-draggable-group='1' data-transition>
|
||||
<td class="text-center">
|
||||
<?php echo HTMLHelper::_('grid.id', $i, $item->id); ?>
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
<td>
|
||||
<?php if (isset($item->checked_out) && $item->checked_out && ($canEdit || $canChange)) : ?>
|
||||
<?php echo HTMLHelper::_('jgrid.checkedout', $i, $item->uEditor, $item->checked_out_time, 'employees.', $canCheckin); ?>
|
||||
<?php endif; ?>
|
||||
<?php if ($canEdit) : ?>
|
||||
<a href="<?php echo Route::_('index.php?option=com_dvtr_employees&task=employee.edit&id='.(int) $item->id); ?>">
|
||||
<?php echo $this->escape($item->name); ?>
|
||||
</a>
|
||||
<?php else : ?>
|
||||
<?php echo $this->escape($item->name); ?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo $item->position; ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo $item->language; ?>
|
||||
</td>
|
||||
|
||||
<td class="d-none d-lg-table-cell">
|
||||
<?php echo $item->id; ?>
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<input type="hidden" name="task" value=""/>
|
||||
<input type="hidden" name="boxchecked" value="0"/>
|
||||
<input type="hidden" name="list[fullorder]" value="<?php echo $listOrder; ?> <?php echo $listDirn; ?>"/>
|
||||
<?php echo HTMLHelper::_('form.token'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@@ -0,0 +1 @@
|
||||
<html><body></body></html>
|
||||
Reference in New Issue
Block a user