first commit

This commit is contained in:
2026-02-08 21:16:11 +01:00
commit e17b7026fd
8881 changed files with 1160453 additions and 0 deletions

View File

@@ -0,0 +1,102 @@
<?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;
use \Joomla\CMS\Session\Session;
use Joomla\Utilities\ArrayHelper;
?>
<div class="container">
<div class="row">
<div class="col-8">
<!--<div class="name">
<h1><?php /*echo $this->item->name; */?> </h1>
</div>-->
<div class="desc">
<?php
echo JHtml::_('content.prepare', $this->item->description);
?>
</div>
<div class="publications">
<?php
echo JHtml::_('content.prepare', $this->item->publications);
?>
</div>
</div>
<div class="col-4">
<div class="avatar">
<img src="<?php echo $this->item->avatar ? $this->item->avatar : '/images/O%20instytucie/avatar.png'; ?>" alt="avatar"/>
</div>
<div class="name">
<strong><?php echo $this->item->name; ?></strong>
</div>
<!-- <div class="url">
<?php /*if(!empty($this->item->url)):*/?>
<a href="<?php /*echo $this->item->url */?>">
<?php /*echo $this->item->url */?>
</a>
<?php /*endif;*/?>
</div>-->
<div class="contact_data">
<?php
echo JHtml::_('content.prepare', $this->item->contact_data);
?>
</div>
<div class="achievements">
<strong><?php echo $this->item->achievements_label;?></strong><br/>
<?php
echo JHtml::_('content.prepare', $this->item->achievements);
?>
</div>
<div class="social-media">
<?php if(!empty($this->item->social_linkedin)):?>
<a href="<?php echo $this->item->social_linkedin ?>">
<!-- <i class="fa fa-linkedin"></i>-->
<img src="/media/com_quantummanager/images/icons/action/linkedin-logo.svg"/>
</a>
<?php endif;?>
<?php if(!empty($this->item->social_facebook)):?>
<a href="<?php echo $this->item->social_facebook ?>">
<!-- <i class="fa fa-facebook"></i>-->
<img src="/media/com_quantummanager/images/icons/action/facebook-logo.svg"/>
</a>
<?php endif;?>
<?php if(!empty($this->item->social_instagram)):?>
<a href="<?php echo $this->item->social_instagram ?>">
<!-- <i class="fa fa-facebook"></i>-->
<img src="/media/com_quantummanager/images/icons/action/instagram-logo.svg"/>
</a>
<?php endif;?>
<?php if(!empty($this->item->social_twitter)):?>
<a href="<?php echo $this->item->social_twitter ?>">
<!-- <i class="fa fa-facebook"></i>-->
<img src="/media/com_quantummanager/images/icons/action/twitter-logo-on-black-background.svg"/>
</a>
<?php endif;?>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<metadata>
<layout title="COM_DVTR_EMPLOYEES_TITLE_ITEM_VIEW_EMPLOYEE" option="View">
<message>
<![CDATA[COM_DVTR_EMPLOYEES_TITLE_ITEM_VIEW_EMPLOYEE_DESC]]>
</message>
</layout>
<fields name="request">
<fieldset
name="request"
label="COM_DVTR_EMPLOYEES_FIELDSET_ITEM_ID_SELECT_LABEL">
<field
name="id"
query="SELECT `id`, `name` FROM #__employees_ ORDER BY `id`"
type="sql"
key_field="id"
value_field="name"
label="COM_DVTR_EMPLOYEES_ITEM_ID_SELECT_LABEL"
require="true"
description="JGLOBAL_SHOW_TITLE_DESC">
</field>
</fieldset>
</fields>
</metadata>

View File

@@ -0,0 +1 @@
<html><body></body></html>

View File

@@ -0,0 +1,144 @@
<?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;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Session\Session;
use Joomla\CMS\User\UserFactoryInterface;
HTMLHelper::_( 'bootstrap.tooltip' );
HTMLHelper::_( 'behavior.multiselect' );
HTMLHelper::_( 'formbehavior.chosen', 'select' );
$user = Factory::getApplication()->getIdentity();
$userId = $user->get( 'id' );
$listOrder = $this->state->get( 'list.ordering' );
$listDirn = $this->state->get( 'list.direction' );
$canCreate = $user->authorise( 'core.create', 'com_dvtr_employees' ) && file_exists( JPATH_COMPONENT . DIRECTORY_SEPARATOR . 'forms' . DIRECTORY_SEPARATOR . 'employeeform.xml' );
$canEdit = $user->authorise( 'core.edit', 'com_dvtr_employees' ) && file_exists( JPATH_COMPONENT . DIRECTORY_SEPARATOR . 'forms' . DIRECTORY_SEPARATOR . 'employeeform.xml' );
$canCheckin = $user->authorise( 'core.manage', 'com_dvtr_employees' );
$canChange = $user->authorise( 'core.edit.state', 'com_dvtr_employees' );
$canDelete = $user->authorise( 'core.delete', 'com_dvtr_employees' );
$wa = $this->document->getWebAssetManager();
$wa->useStyle( 'com_dvtr_employees.list' );
foreach ( $this->items as $item ) :
$item->introtext = $item->description ?? '';
$item->title = $item->name ?? 'Pracownik';
$item->created = $item->created ?? date( 'Y-m-d H:i:s' );
echo LayoutHelper::render( 'joomla.content.article', [
'item' => $item,
'params' => $this->params,
] );
endforeach;
?>
<?php if ( $this->params->get( 'show_page_heading' ) ) : ?>
<div class="page-header">
<h1> <?php echo $this->escape( $this->params->get( 'page_heading' ) ); ?> </h1>
</div>
<?php endif; ?>
<form action="<?php echo htmlspecialchars( Uri::getInstance()->toString() ); ?>" method="post"
name="adminForm" id="adminForm">
<div class="row">
<h1><?php echo Text::_('COM_DVTR_EMPLOYEES_TITLE_EMPLOYEES');?></h1>
<?php foreach ( $this->items as $i => $item ) : ?>
<?php $canEdit = $user->authorise( 'core.edit', 'com_dvtr_employees' ); ?>
<div class="col-3 index-<?php echo $i % 3; ?>">
<!-- <td>-->
<!-- --><?php //echo $item->id; ?>
<!-- </td>-->
<div class="employee-avatar">
<a href="<?php echo Route::_( 'index.php?option=com_dvtr_employees&view=employee&id=' . (int) $item->id ); ?>">
<img src="<?php echo $item->avatar ? $item->avatar : '/images/O%20instytucie/avatar.png'; ?>" alt="avatar"/>
</a>
</div>
<div class="employee-name">
<?php echo $item->name; ?>
</div>
<div class="social-media">
<?php if(!empty($item->social_linkedin)):?>
<a href="<?php echo $item->social_linkedin ?>">
<!-- <i class="fa fa-linkedin"></i>-->
<img src="/media/com_quantummanager/images/icons/action/linkedin-logo.svg"/>
</a>
<?php endif;?>
<?php if(!empty($item->social_facebook)):?>
<a href="<?php echo $item->social_facebook ?>">
<!-- <i class="fa fa-facebook"></i>-->
<img src="/media/com_quantummanager/images/icons/action/facebook-logo.svg"/>
</a>
<?php endif;?>
<?php if(!empty($item->social_instagram)):?>
<a href="<?php echo $item->social_instagram ?>">
<!-- <i class="fa fa-facebook"></i>-->
<img src="/media/com_quantummanager/images/icons/action/instagram-logo.svg"/>
</a>
<?php endif;?>
<?php if(!empty($item->social_twitter)):?>
<a href="<?php echo $item->social_twitter ?>">
<!-- <i class="fa fa-facebook"></i>-->
<img src="/media/com_quantummanager/images/icons/action/twitter-logo-on-black-background.svg"/>
</a>
<?php endif;?>
</div>
</div>
<?php endforeach; ?>
</div>
<?php if ( $canCreate ) : ?>
<a href="<?php echo Route::_( 'index.php?option=com_dvtr_employees&task=employeeform.edit&id=0', FALSE, 0 ); ?>"
class="btn btn-success btn-small"><i
class="icon-plus"></i>
<?php echo Text::_( 'COM_DVTR_EMPLOYEES_ADD_ITEM' ); ?></a>
<?php endif; ?>
<input type="hidden" name="task" value=""/>
<input type="hidden" name="boxchecked" value="0"/>
<input type="hidden" name="filter_order" value=""/>
<input type="hidden" name="filter_order_Dir" value=""/>
<?php echo HTMLHelper::_( 'form.token' ); ?>
</form>
<?php
if ( $canDelete ) {
$wa->addInlineScript( "
jQuery(document).ready(function () {
jQuery('.delete-button').click(deleteItem);
});
function deleteItem() {
if (!confirm(\"" . Text::_( 'COM_DVTR_EMPLOYEES_DELETE_MESSAGE' ) . "\")) {
return false;
}
}
", [], [], [ "jquery" ] );
}
?>

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<metadata>
<layout title="COM_DVTR_EMPLOYEES_TITLE_LIST_VIEW_EMPLOYEES" option="View">
<message>
<![CDATA[COM_DVTR_EMPLOYEES_TITLE_LIST_VIEW_EMPLOYEES_DESC]]>
</message>
</layout>
</metadata>

View File

@@ -0,0 +1 @@
<html><body></body></html>