Moved everything under annotations.

Some review is still needed.
This commit is contained in:
Polonkai Gergely
2012-07-13 12:07:21 +02:00
parent 60b5eecbc8
commit 00190c3e37
41 changed files with 3264 additions and 2509 deletions

View File

@@ -2,12 +2,23 @@
namespace KekRozsak\AdminBundle\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
/**
* @Route("/admin")
*/
class DefaultController extends Controller
{
public function manageRegsAction($name)
{
return $this->render('KekRozsakAdminBundle:Default:manage_regs.html.twig');
}
/**
* @Route("/jelentkezok", name="KekRozsakAdminBundle_manage_reg")
*/
public function manageRegsAction()
{
$users = $this->getDoctrine()->getEntityManager()->createQuery('SELECT u FROM KekRozsakFrontBundle:User u WHERE u.acceptedBy IS NULL')->getResult();
return $this->render('KekRozsakAdminBundle:Default:manage_regs.html.twig', array (
'users' => $users,
));
}
}

View File

@@ -22,7 +22,7 @@ class KekRozsakAdminExtension extends Extension
$configuration = new Configuration();
$config = $this->processConfiguration($configuration, $configs);
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
$loader->load('services.yml');
$loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
$loader->load('services.xml');
}
}

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" ?>
<container xmlns="http://symfony.com/schema/dic/services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
</container>

View File

@@ -1,7 +0,0 @@
parameters:
# kek_rozsak_admin.example.class: KekRozsak\AdminBundle\Example
services:
# kek_rozsak_admin.example:
# class: %kek_rozsak_admin.example.class%
# arguments: [@service_id, "plain_value", %parameter%]

View File

@@ -1 +1,32 @@
Juj!
{% extends '::main_template.html.twig' %}
{% block title %} - Jelentkezők{% endblock %}
{% block content %}
<h3>Jelentkezők</h3>
{% if users|length > 0 %}
<table>
<thead>
<tr>
<td>Felhasználónév</td>
<td>E-mail cím</td>
<td>Fórum-név</td>
<td>Regisztráció ideje</td>
</tr>
</thead>
<tbody>
{% for user in users %}
<tr>
<td>{{ user.username }}</td>
<td>{{ user.email }}</td>
<td>{{ user.displayName }}</td>
<td>{{ user.registeredAt|date('Y-m-d H:i') }}</td>
<td>
<form method="post" action="">
<button type="submit">Engedélyezem</button>
</form>
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
{%endblock content %}