Commit 08e9cd94 authored by Ludwig Ruderstaller's avatar Ludwig Ruderstaller

Current version

parent 6ea87ae2
Pipeline #12316 failed with stage
in 143 minutes and 27 seconds
......@@ -18,4 +18,4 @@
!var/sessions/.gitkeep
!var/SymfonyRequirements.php
/vendor/
/web/bundles/
/public/bundles/
This diff is collapsed.
......@@ -18,6 +18,6 @@ return [
'WhiteOctober\PagerfantaBundle\WhiteOctoberPagerfantaBundle' => ['all' => true],
'Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle' => ['all' => true],
'Cwd\CommonBundle\CwdCommonBundle' => ['all' => true],
'Cwd\BootgridBundle\CwdBootgridBundle' => ['all' => true],
'Cwd\FancyGridBundle\CwdFancyGridBundle' => ['all' => true],
'Cwd\GeneratorBundle\CwdGeneratorBundle' => ['dev' => true],
];
\ No newline at end of file
cwd_fancy_grid:
#license: '1234'
js_options:
pageSizeData: [5, 10, 20, 50]
theme: 'bootstrap'
height: 'fit'
trackOver: true
i18n: '%locale%'
menu: true
selModel: 'row'
striped: true
columnLines: false
searching: true
textSelection: true
refreshButton: true
defaults:
resizable: true
draggable: true
sortable: true
menu: true
controllers: ['cwdcontrol']
......@@ -4,15 +4,14 @@ doctrine:
orm:
auto_generate_proxy_classes: '%kernel.debug%'
#naming_strategy: doctrine.orm.naming_strategy.underscore
auto_mapping: true
auto_mapping: false
mappings:
FOSUserBundle: ~
App:
is_bundle: false
type: annotation
dir: '%kernel.project_dir%/src/Domain/Model'
prefix: 'App\Domain\Model\'
alias: Model
type: xml
dir: '%kernel.root_dir%/../config/schema/'
prefix: 'App\Domain'
#Doctrine Extensions Mappings
#gedmo_translatable:
# type: annotation
......
fos_user:
db_driver: orm
firewall_name: admin
user_class: App\Domain\Model\User
user_class: App\Domain\User\User
group:
group_class: App\Domain\Model\Group
from_email:
......
security:
encoders:
App\Domain\Model\User:
algorithm: bcrypt
cost: 15
App\Domain\User\User:
# php7.2
algorithm: 'argon2i'
# php7.0|7.1
#algorithm: bcrypt
#cost: 15
role_hierarchy:
ROLE_SUPER_ADMIN: [ROLE_ADMIN]
......
......@@ -16,3 +16,20 @@ controllers:
resource: ../src/Infrastructure/Web/Controller/
type: annotation
prefix: /
avanzu_admin_profile:
path: /profile/{userid}/
avanzu_admin_logout:
path: /logout
avanzu_admin_all_tasks:
path: /tasks/
avanzu_admin_show_task:
path: /tasks/{taskid}/
avanzu_admin_all_notifications:
path: /notifications/
avanzu_admin_show_notification:
path: /notifications/{notifyid}/
avanzu_admin_all_messages:
path: /messages/
avanzu_admin_show_message:
path: /messages/{messageid}/
\ No newline at end of file
<?xml version="1.0"?>
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" xmlns:gedmo="http://gediminasm.org/schemas/orm/doctrine-extensions-mapping" xsi="http://www.w3.org/2001/XMLSchema-instance" schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
<entity name="App\Domain\User\User" repository-class="App\Domain\User\UserRepository">
<id name="id" type="guid">
<generator strategy="UUID"/>
</id>
<field name="firstname" type="string" length="150" nullable="true"/>
<field name="lastname" type="string" length="150" nullable="true"/>
<field name="state" type="string" length="50" nullable="true"/>
<field name="updatedAt" type="datetime" nullable="true">
<gedmo:timestampable on="update"/>
</field>
<field name="createdAt" type="datetime" nullable="true">
<gedmo:timestampable on="create"/>
</field>
</entity>
</doctrine-mapping>
......@@ -18,7 +18,7 @@ services:
MYSQL_DATABASE: project
MYSQL_ALLOW_EMPTY_PASSWORD: 1
php:
image: dockerhub.cwd.at/docker/php/fpm-xdebug:7.1
image: dockerhub.cwd.at/docker/php/fpm-xdebug:7.2
working_dir: /var/www/app
user: "$USERID"
volumes_from:
......
../../vendor/avanzu/admin-theme-bundle/Resources/public/
\ No newline at end of file
../../vendor/cwd/bootgrid-bundle/Resources/public/
\ No newline at end of file
../../vendor/white-october/pagerfanta-bundle/Resources/public/
\ No newline at end of file
......@@ -13,12 +13,12 @@ declare(strict_types=1);
namespace App\Domain;
use Cwd\CommonBundle\Service\AbstractBaseService as CwdAbstractBaseManager;
use Cwd\CommonBundle\Manager\AbstractManager as cwdAbstractManager;
/**
* Base Service class to ease creation of model-specific service classes.
* If this code proves useful, we should consider moving it into the Generic service.
*/
abstract class AbstractManager extends CwdAbstractBaseManager
abstract class AbstractManager extends cwdAbstractManager
{
}
<?php
/*
* This file is part of Application.
* This file is part of Exceet Carrier Text Verwaltung
*
* (c) 2017 cwd.at GmbH <office@cwd.at>
*
......
<?php
/*
* This file is part of Application.
* This file is part of Exceet Carrier Text Verwaltung
*
* (c) 2017 cwd.at GmbH <office@cwd.at>
*
......@@ -11,50 +11,35 @@
declare(strict_types=1);
namespace App\Domain\Model;
namespace App\Domain\User;
use App\Domain\User\UserInterface;
use Cwd\CommonBundle\Doctrine\Traits\Timestampable;
use Doctrine\ORM\Mapping as ORM;
use FOS\UserBundle\Model\User as FOSUser;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity(repositoryClass="App\Domain\User\UserRepository")
*
* @UniqueEntity(fields={"email"}, groups={"create"})
* Class User.
*/
class User extends FOSUser implements UserInterface
{
use Timestampable;
/**
* @ORM\Id
* @ORM\Column(type="guid")
* @ORM\GeneratedValue(strategy="UUID")
*/
protected $id;
/**
* @Assert\NotBlank
* @ORM\Column(type="string", length=150, nullable=true)
*/
private $firstname;
/**
* @Assert\NotBlank
* @ORM\Column(type="string", length=150, nullable=true)
*/
private $lastname;
/**
* @ORM\Column(type="string", length=50, nullable=true)
*/
private $state;
/**
* @Assert\NotBlank
* @Assert\NotBlank(groups={"Create"})
*/
protected $plainPassword;
......@@ -119,6 +104,11 @@ class User extends FOSUser implements UserInterface
return parent::setEmail($email);
}
public function getFullname(): string
{
return sprintf('%s %s', $this->getFirstname(), $this->getLastname());
}
/**
* Set state.
*
......
<?php
/*
* This file is part of Application.
* This file is part of Exceet Carrier Text Verwaltung
*
* (c) 2017 cwd.at GmbH <office@cwd.at>
*
......
<?php
/*
* This file is part of Application.
* This file is part of Exceet Carrier Text Verwaltung
*
* (c) 2017 cwd.at GmbH <office@cwd.at>
*
......@@ -48,7 +48,7 @@ class UserManager extends AbstractManager
protected function setServiceOptions()
{
return [
'modelName' => 'Model:User',
'modelName' => User::class,
'notFoundExceptionClass' => 'App\Domain\User\Exception\UserNotFoundException',
];
}
......
<?php
/*
* This file is part of Application.
* This file is part of Exceet Carrier Text Verwaltung
*
* (c) 2017 cwd.at GmbH <office@cwd.at>
*
......
......@@ -57,7 +57,7 @@ abstract class AbstractCrudController extends CwdAbstractCrudController
]);
$resolver->setRequired([
'entityService',
'entityManager',
'entityFormType',
'gridService',
'icon',
......
<?php
/*
* This file is part of Application.
* This file is part of Exceet Carrier Text Verwaltung
*
* (c) 2017 cwd.at GmbH <office@cwd.at>
*
......@@ -13,7 +13,7 @@ declare(strict_types=1);
namespace App\Infrastructure\Web\Controller;
use App\Domain\Model\User;
use App\Domain\User\User;
use App\Domain\User\UserManager;
use App\Infrastructure\Web\Form\UserType;
use App\Infrastructure\Web\Grid\UserGrid;
......@@ -44,7 +44,7 @@ class UserController extends AbstractCrudController
protected function setOptions()
{
$options = [
'entityService' => UserManager::class,
'entityManager' => UserManager::class,
'entityFormType' => UserType::class,
'gridService' => UserGrid::class,
'createRoute' => 'app_infrastructure_web_user_create',
......@@ -62,24 +62,21 @@ class UserController extends AbstractCrudController
* @param Request $request
*
* @Route("/list/data")
* @Method({"GET", "POST"})
* @Method({"GET"})
* @Security("has_role('ROLE_ADMIN')")
*
* @return JsonResponse
*/
public function ajaxDataAction(Request $request)
{
$grid = $this->getGrid($request->request->all());
$data = $grid->getData();
return new JsonResponse($data);
return parent::ajaxDataAction($request);
}
/**
* @Route("/list")
* @Route("/")
* @Method({"GET"})
* @Template("Grid/list.html.twig")
* @Template("@CwdFancyGrid/list.html.twig")
* @Security("has_role('ROLE_ADMIN')")
*
* @return array
......@@ -93,7 +90,7 @@ class UserController extends AbstractCrudController
* @Route("/detail/{id}")
* @Method({"GET"})
* @Template()
* @ParamConverter("crudObject", class="Model:User")
* @ParamConverter("crudObject", class="App\Domain\User\User")
*
* @param User $crudObject
* @Security("has_role('ROLE_ADMIN')")
......@@ -124,7 +121,7 @@ class UserController extends AbstractCrudController
/**
* Edit action.
*
* @ParamConverter("crudObject", class="Model:User")
* @ParamConverter("crudObject", class="App\Domain\User\User")
* @Route("/edit/{id}")
* @Method({"GET", "POST", "PUT"})
*
......@@ -142,7 +139,7 @@ class UserController extends AbstractCrudController
/**
* @Route("/delete/{id}")
* @ParamConverter("crudObject", class="Model:User")
* @ParamConverter("crudObject", class="App\Domain\User\User")
* @Method({"GET", "DELETE"})
*
* @param User $crudObject
......
......@@ -61,7 +61,7 @@ class UserType extends AbstractType
{
$resolver->setDefaults(
[
'data_class' => 'App\Domain\Model\User',
'data_class' => 'App\Domain\User\User',
]
);
}
......
<?php
/*
* This file is part of Application.
* This file is part of Exceet Carrier Text Verwaltung
*
* (c) 2017 cwd.at GmbH <office@cwd.at>
*
......@@ -13,12 +13,13 @@ declare(strict_types=1);
namespace App\Infrastructure\Web\Grid;
use Cwd\BootgridBundle\Column\ActionType;
use Cwd\BootgridBundle\Column\DateType;
use Cwd\BootgridBundle\Column\NumberType;
use Cwd\BootgridBundle\Column\TextType;
use Cwd\BootgridBundle\Grid\AbstractGrid;
use Cwd\BootgridBundle\Grid\GridBuilderInterface;
use App\Domain\User\User;
use Cwd\FancyGridBundle\Column\ActionType;
use Cwd\FancyGridBundle\Column\DateType;
use Cwd\FancyGridBundle\Column\NumberType;
use Cwd\FancyGridBundle\Column\TextType;
use Cwd\FancyGridBundle\Grid\AbstractGrid;
use Cwd\FancyGridBundle\Grid\GridBuilderInterface;
use Doctrine\Common\Persistence\ObjectManager;
use Doctrine\ORM\QueryBuilder;
use Symfony\Component\OptionsResolver\OptionsResolver;
......@@ -34,17 +35,16 @@ class UserGrid extends AbstractGrid
*/
public function buildGrid(GridBuilderInterface $builder, array $options)
{
$builder->add(new NumberType('id', 'u.id', ['label' => 'generic.id', 'identifier' => true, 'visible' => false]))
->add(new TextType('username', 'u.username', ['label' => 'user.username']))
->add(new TextType('firstname', 'u.firstname', ['label' => 'user.firstname']))
->add(new TextType('lastname', 'u.lastname', ['label' => 'user.lastname']))
->add(new TextType('email', 'u.email', ['label' => 'user.email']))
$builder->add(new NumberType('id', 'u.id', ['label' => 'generic.id', 'identifier' => true, 'flex' => 1]))
->add(new TextType('username', 'u.username', ['label' => 'user.username', 'flex' => 4]))
->add(new TextType('firstname', 'u.firstname', ['label' => 'user.firstname', 'flex' => 2]))
->add(new TextType('lastname', 'u.lastname', ['label' => 'user.lastname', 'flex' => 3]))
->add(new TextType('email', 'u.email', ['label' => 'user.email', 'flex' => 2]))
->add(new DateType(
'createdAt',
'u.createdAt',
[
'label' => 'generic.created',
'format' => 'd.m.Y H:i:s',
]
))
->add(new DateType(
......@@ -52,8 +52,6 @@ class UserGrid extends AbstractGrid
'u.updatedAt',
[
'label' => 'generic.updated',
'visible' => false,
'format' => 'd.m.Y H:i:s',
]
))
->add(new ActionType(
......@@ -61,6 +59,7 @@ class UserGrid extends AbstractGrid
'u.id',
[
'label' => '',
'minWidth' => 100,
'actions' => [
[
'route' => 'app_infrastructure_web_user_edit',
......@@ -102,7 +101,7 @@ class UserGrid extends AbstractGrid
{
/** @var QueryBuilder $queryBuilder */
$queryBuilder = $objectManager
->getRepository('Model:User')
->getRepository(User::class)
->createQueryBuilder('u')
->addOrderBy('u.lastname', 'ASC');
......
{% extends "Layout/login.html.twig" %}
{% trans_default_domain 'FOSUserBundle' %}
{% block page_content %}
{% block fos_user_content %}
<div class="login-box">
<div class="login-logo">
<img src="{{ asset(theme.logo) }}" class="img-responsive" />
</div>
<div class="login-box-body">
<p>
{{ 'resetting.check_email'|trans({'%tokenLifetime%': tokenLifetime})|nl2br }}
</p>
</div>
</div>
{% endblock %}
{% endblock %}
{% extends "Layout/login.html.twig" %}
{% block page_content %}
{% block fos_user_content %}
{% include "@FOSUser/Resetting/request_content.html.twig" %}
{% endblock fos_user_content %}
{% endblock %}
\ No newline at end of file
<div class="login-box">
<div class="login-logo">
<img src="{{ asset(theme.logo) }}" class="img-responsive" />
</div>
<div class="login-box-body">
<p class="login-box-msg">{{ "password-reset.title"|trans({}, 'cwdlogin') }}</p>
<form action="{{ path('fos_user_resetting_send_email') }}" method="post">
<input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}">
<div class="form-group has-feedback">
<input type="text" class="form-control" name="username" placeholder="{{ "login.email"|trans({}, 'cwdlogin') }}"/>
<span class="glyphicon glyphicon-envelope form-control-feedback"></span>
</div>
<div class="row">
<div class="col-xs-4">
</div><!-- /.col -->
<div class="col-xs-8">
<button type="submit" class="btn btn-success btn-block btn-flat {{ theme.primaryColor }}">{{ "password-reset.reset"|trans({}, 'cwdlogin') }}</button>
</div><!-- /.col -->
</div>
</form>
</div><!-- /.login-box-body -->
</div>
{% extends "Layout/login.html.twig" %}
{% block page_content %}
{% block fos_user_content %}
{% include "@FOSUser/Resetting/reset_content.html.twig" %}
{% endblock fos_user_content %}
{% endblock %}
\ No newline at end of file
{% trans_default_domain 'cwdlogin' %}
<div class="login-box">
<div class="login-logo">
<img src="{{ asset(theme.logo) }}" class="img-responsive" />
</div>
<div class="login-box-body">
<p class="login-box-msg">{{ "password-reset.title"|trans({}, 'cwdlogin') }}</p>
{{ form_start(form, { 'action': path('fos_user_resetting_reset', {'token': token}), 'attr': { 'class': 'fos_user_resetting_reset' } }) }}
{{ form_widget(form) }}
<div class="row">
<div class="col-xs-4">
</div><!-- /.col -->
<div class="col-xs-8">
<button type="submit" class="btn btn-success btn-block btn-flat {{ theme.primaryColor }}">{{ 'resetting.reset.submit'|trans }}</button>
</div><!-- /.col -->
</div>
{{ form_end(form) }}
</div><!-- /.login-box-body -->
</div>
......@@ -32,7 +32,7 @@
</form>
<div class="row">
<div class="col-xs-6"><a href="#">{{ "login.lostpassword"|trans({}, 'cwdlogin') }}</a><br></div>
<div class="col-xs-6"><a href="{{ path('fos_user_resetting_request') }}">{{ "login.lostpassword"|trans({}, 'cwdlogin') }}</a><br></div>
<div class="col-xs-6 text-right text-sm">Version: {{ version }}</div>
</div>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment