-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Gerardo J. Montivero <[email protected]>
- Loading branch information
Showing
208 changed files
with
838 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
<?php | ||
/** | ||
* Created by PhpStorm. | ||
* User: Gerardo J. Montivero @ Iglesia Alameda | ||
* Date: 15/05/2020 | ||
* Time: 06:34 | ||
*/ | ||
$lema = 'Contacto Iglesia Alameda'; | ||
$lemaSinEspacios = 'Contacto-Iglesia-Alameda'; | ||
$ahora = date('Y-m-d H:i'); | ||
$version = date('YmdHi'); | ||
$domingo = strtotime('today'); | ||
$title = 'Contacto'; | ||
/** | ||
* @example pregunta si la cuarentena terminó | ||
*/ | ||
$finQ = false; | ||
include_once ('gerVendor/gerFunctions.php') | ||
?> | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<?php | ||
include ('meta-base.php'); | ||
include ('style-base.php') | ||
?> | ||
|
||
<link href="css/styles.css?v=<?php echo $version ?>" rel="stylesheet"> | ||
<script src = "js/alameda.js"> </script> | ||
|
||
|
||
|
||
<style> | ||
strong{font-weight: 400 !important} | ||
.card-text{font-size: 1.1em !important; | ||
font-weight: 600 !important;} | ||
.header { | ||
background-image: url('images/series/cabecera_index.jpg'); | ||
background-size: cover; | ||
background-position: center; | ||
position: relative; | ||
|
||
} | ||
.overlay { | ||
position: absolute; | ||
min-height: 100%; | ||
min-width: 100%; | ||
left: 0; | ||
top: 0; | ||
background: rgba(255, 255, 255, 0.6); | ||
|
||
} | ||
img.resize { | ||
width:10%; /* you can use % */ | ||
height: auto; | ||
} | ||
.btn-xl{ | ||
padding: 1.25rem 1.25rem; | ||
font-size: 0.85rem; | ||
font-weight: 700; | ||
text-transform: uppercase; | ||
border: none currentcolor; | ||
border-radius: 10rem; | ||
} | ||
|
||
|
||
|
||
</style> | ||
|
||
<link href="css/styles.css?v=<?php echo $version ?>" rel="stylesheet"> | ||
<link href="https://cdnjs.cloudflare.com/ajax/libs/magnific-popup.js/1.1.0/magnific-popup.min.css" rel="stylesheet" /> | ||
|
||
|
||
<link href="css/landings/heroic-features.css" rel="stylesheet"> | ||
|
||
</head> | ||
|
||
<body> | ||
|
||
|
||
<div class="container "> | ||
<?php include 'nav.php'; ?> | ||
|
||
|
||
|
||
|
||
|
||
|
||
<?php | ||
include "footer.php"; | ||
?> | ||
|
||
<!-- Bootstrap core JavaScript --> | ||
<?php | ||
include ('js-base.php'); | ||
?> | ||
|
||
</body> | ||
|
||
</html> |
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
<?php | ||
|
||
namespace App\Controller; | ||
|
||
use App\Entity\Article; | ||
use App\Form\ArticleFormType; | ||
use App\Repository\ArticleRepository; | ||
use Doctrine\ORM\EntityManagerInterface; | ||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted; | ||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; | ||
use Symfony\Component\HttpFoundation\Request; | ||
use Symfony\Component\HttpFoundation\Response; | ||
use Symfony\Component\Routing\Annotation\Route; | ||
|
||
class ArticleAdminController extends BaseController | ||
{ | ||
/** | ||
* @Route("/admin/article/new", name="admin_article_new") | ||
* @IsGranted("ROLE_ADMIN_ARTICLE") | ||
*/ | ||
public function new(EntityManagerInterface $em, Request $request) | ||
{ | ||
$form = $this->createForm(ArticleFormType::class); | ||
|
||
$form->handleRequest($request); | ||
if ($form->isSubmitted() && $form->isValid()) { | ||
/** @var Article $article */ | ||
$article = $form->getData(); | ||
|
||
$em->persist($article); | ||
$em->flush(); | ||
|
||
$this->addFlash('success', 'Article Created! Knowledge is power!'); | ||
|
||
return $this->redirectToRoute('admin_article_list'); | ||
} | ||
|
||
return $this->render('article_admin/new.html.twig', [ | ||
'articleForm' => $form->createView() | ||
]); | ||
} | ||
|
||
/** | ||
* @Route("/admin/article/{id}/edit", name="admin_article_edit") | ||
* @IsGranted("MANAGE", subject="article") | ||
*/ | ||
public function edit(Article $article, Request $request, EntityManagerInterface $em) | ||
{ | ||
$form = $this->createForm(ArticleFormType::class, $article, [ | ||
'include_published_at' => true | ||
]); | ||
|
||
$form->handleRequest($request); | ||
if ($form->isSubmitted() && $form->isValid()) { | ||
$em->persist($article); | ||
$em->flush(); | ||
|
||
$this->addFlash('success', 'Article Updated! Inaccuracies squashed!'); | ||
|
||
return $this->redirectToRoute('admin_article_edit', [ | ||
'id' => $article->getId(), | ||
]); | ||
} | ||
|
||
return $this->render('article_admin/edit.html.twig', [ | ||
'articleForm' => $form->createView() | ||
]); | ||
} | ||
|
||
/** | ||
* @Route("/admin/article/location-select", name="admin_article_location_select") | ||
* @IsGranted("ROLE_USER") | ||
*/ | ||
public function getSpecificLocationSelect(Request $request) | ||
{ | ||
// a custom security check | ||
if (!$this->isGranted('ROLE_ADMIN_ARTICLE') && $this->getUser()->getArticles()->isEmpty()) { | ||
throw $this->createAccessDeniedException(); | ||
} | ||
|
||
$article = new Article(); | ||
$article->setLocation($request->query->get('location')); | ||
$form = $this->createForm(ArticleFormType::class, $article); | ||
|
||
// no field? Return an empty response | ||
if (!$form->has('specificLocationName')) { | ||
return new Response(null, 204); | ||
} | ||
|
||
return $this->render('article_admin/_specific_location_name.html.twig', [ | ||
'articleForm' => $form->createView(), | ||
]); | ||
} | ||
|
||
/** | ||
* @Route("/admin/article", name="admin_article_list") | ||
* @IsGranted("ROLE_ADMIN_ARTICLE") | ||
*/ | ||
public function list(ArticleRepository $articleRepo) | ||
{ | ||
$articles = $articleRepo->findAll(); | ||
|
||
return $this->render('article_admin/list.html.twig', [ | ||
'articles' => $articles, | ||
]); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
namespace App\Controller; | ||
|
||
use App\Entity\User; | ||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; | ||
|
||
/** | ||
* @method User getUser() | ||
*/ | ||
abstract class BaseController extends AbstractController | ||
{ | ||
} |
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Oops, something went wrong.