Skip to content

Commit

Permalink
New/list/view classement
Browse files Browse the repository at this point in the history
  • Loading branch information
GCalmels committed Dec 5, 2014
1 parent 5df86fa commit 4284ac6
Show file tree
Hide file tree
Showing 22 changed files with 101 additions and 890 deletions.
18 changes: 10 additions & 8 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 10 additions & 1 deletion src/CG/PlatformBundle/Controller/PlatformController.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use CG\PlatformBundle\Form\EventType;
use CG\PlatformBundle\Entity\Event;

Expand All @@ -12,7 +13,7 @@ class PlatformController extends Controller
public function homeAction()
{
$repository = $this->getDoctrine()->getRepository('CGPlatformBundle:Event');
$events = $repository->findByEnabled(true);
$events = $repository->findByEnabledWithOrder(true);
return $this->render('CGPlatformBundle:Platform:home.html.twig', array('events', $events));
}

Expand Down Expand Up @@ -60,4 +61,12 @@ public function showEventAction($id)
return $this->render('CGPlatformBundle:Event:view.html.twig', array('event' => $event));
}

public function listEventsAction()
{
$repository = $this->getDoctrine()->getRepository('CGPlatformBundle:Event');
$events = $repository->findByEnabledWithOrder(true);

return $this->render('CGPlatformBundle:Event:list.html.twig', array('events' => $events));
}

}
2 changes: 1 addition & 1 deletion src/CG/PlatformBundle/Entity/Donation.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
/**
* Donation
*
* @ORM\Table()
* @ORM\Table(name="donations")
* @ORM\Entity(repositoryClass="CG\PlatformBundle\Entity\DonationRepository")
*/
class Donation
Expand Down
158 changes: 0 additions & 158 deletions src/CG/PlatformBundle/Entity/Donation.php~

This file was deleted.

2 changes: 1 addition & 1 deletion src/CG/PlatformBundle/Entity/DonationKind.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
/**
* DonationKind
*
* @ORM\Table()
* @ORM\Table(name="donation_kinds")
* @ORM\Entity(repositoryClass="CG\PlatformBundle\Entity\DonationKindRepository")
*/
class DonationKind
Expand Down
105 changes: 0 additions & 105 deletions src/CG/PlatformBundle/Entity/DonationKind.php~

This file was deleted.

2 changes: 1 addition & 1 deletion src/CG/PlatformBundle/Entity/Email.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
/**
* Email
*
* @ORM\Table()
* @ORM\Table(name="emails")
* @ORM\Entity(repositoryClass="CG\PlatformBundle\Entity\EmailRepository")
*/
class Email
Expand Down
Loading

0 comments on commit 4284ac6

Please sign in to comment.