Nouvelles url - Modif Fil d'Ariane
This commit is contained in:
parent
4537df1b5f
commit
0222bac963
|
@ -32,10 +32,9 @@ $app = (new \Framework\App( $chemin_new .'/config/config.php'))
|
||||||
->addModule(AuthModule::class)
|
->addModule(AuthModule::class)
|
||||||
->addModule(AccountModule::class);
|
->addModule(AccountModule::class);
|
||||||
|
|
||||||
|
|
||||||
$container = $app->getContainer();
|
$container = $app->getContainer();
|
||||||
|
|
||||||
// Pose problème
|
// Pose un problème
|
||||||
//$container->get(\Framework\Router::class)->get('/', \App\Gmarche\Actions\RegionIndexAction::class, 'home');
|
//$container->get(\Framework\Router::class)->get('/', \App\Gmarche\Actions\RegionIndexAction::class, 'home');
|
||||||
|
|
||||||
$app->pipe(Whoops::class);
|
$app->pipe(Whoops::class);
|
||||||
|
|
|
@ -37,7 +37,6 @@ class AntenneShowAction
|
||||||
AntenneTable $antenneTable,
|
AntenneTable $antenneTable,
|
||||||
ContainerInterface $container
|
ContainerInterface $container
|
||||||
) {
|
) {
|
||||||
|
|
||||||
$this->renderer = $renderer;
|
$this->renderer = $renderer;
|
||||||
$this->regionTable = $regionTable;
|
$this->regionTable = $regionTable;
|
||||||
$this->antenneTable = $antenneTable;
|
$this->antenneTable = $antenneTable;
|
||||||
|
@ -55,7 +54,6 @@ class AntenneShowAction
|
||||||
$antennes = $this->antenneTable->findAllbyRegion($region_id)->paginate(25, $page);
|
$antennes = $this->antenneTable->findAllbyRegion($region_id)->paginate(25, $page);
|
||||||
|
|
||||||
$region=$this->regionTable->findBy('slug', $request->getAttribute('slug'));
|
$region=$this->regionTable->findBy('slug', $request->getAttribute('slug'));
|
||||||
//$antenne = 1;
|
|
||||||
/*if ($region->slug !== $slug) {
|
/*if ($region->slug !== $slug) {
|
||||||
return $this->redirect('gmarche.show', [
|
return $this->redirect('gmarche.show', [
|
||||||
'slug' => $region->slug,
|
'slug' => $region->slug,
|
||||||
|
|
|
@ -20,7 +20,7 @@ class GmarcheModule extends Module
|
||||||
$gmarchePrefix = $container->get('gmarche.prefix');
|
$gmarchePrefix = $container->get('gmarche.prefix');
|
||||||
$container->get(RendererInterface::class)->addPath('gmarche', __DIR__ . '/views');
|
$container->get(RendererInterface::class)->addPath('gmarche', __DIR__ . '/views');
|
||||||
$router = $container->get(Router::class);
|
$router = $container->get(Router::class);
|
||||||
$router->get( '/france', RegionIndexAction::class, 'gmarche.index');
|
$router->get( "$gmarchePrefix", RegionIndexAction::class, 'gmarche.index');
|
||||||
$router->get("/france/{slug:[a-z\-0-9]+}", AntenneShowAction::class, 'gmarche.antenne');
|
$router->get("$gmarchePrefix/{slug:[a-z\-0-9]+}", AntenneShowAction::class, 'gmarche.antenne');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
use App\Gmarche\GmarcheModule;
|
use App\Gmarche\GmarcheModule;
|
||||||
use function \Di\object;
|
use function \Di\object;
|
||||||
use function \Di\get;
|
use function \Di\get;
|
||||||
|
/* Chemin */
|
||||||
return [
|
return [
|
||||||
'gmarche.prefix' => '/france'
|
'gmarche.prefix' => '/france'
|
||||||
];
|
];
|
||||||
|
|
|
@ -26,8 +26,6 @@
|
||||||
grid-area: footer;
|
grid-area: footer;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
||||||
<!-- Fil d'Ariane -->
|
<!-- Fil d'Ariane -->
|
||||||
<div class="breadcrumbs" >
|
<div class="breadcrumbs" >
|
||||||
<nav aria-label="breadcrumb">
|
<nav aria-label="breadcrumb">
|
||||||
|
|
|
@ -55,9 +55,7 @@ class ProductIndexAction
|
||||||
//$routePrefix = 'product.index';
|
//$routePrefix = 'product.index';
|
||||||
$viewPath = '@product/admin/products';
|
$viewPath = '@product/admin/products';
|
||||||
$items = $this->productTable->findByAntenneId('antenne_id', $antenne_id)->paginate(20, $page);
|
$items = $this->productTable->findByAntenneId('antenne_id', $antenne_id)->paginate(20, $page);
|
||||||
//echo "antenne_ici";
|
|
||||||
//var_dump($items);
|
|
||||||
//die();
|
|
||||||
return $this->renderer->render($viewPath.'/index', compact('antenne_slug','gmarchePrefix','region_name','region_slug','antenne_id','antenne_name','viewPath', 'items' ));
|
return $this->renderer->render($viewPath.'/index', compact('antenne_slug','gmarchePrefix','region_name','region_slug','antenne_id','antenne_name','viewPath', 'items' ));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,17 +10,13 @@ use Framework\Module;
|
||||||
use Framework\Renderer\RendererInterface;
|
use Framework\Renderer\RendererInterface;
|
||||||
use Framework\Renderer\TwigRenderer;
|
use Framework\Renderer\TwigRenderer;
|
||||||
use Framework\Router;
|
use Framework\Router;
|
||||||
//use Grpc\Server;
|
|
||||||
use GuzzleHttp\Psr7\ServerRequest;
|
use GuzzleHttp\Psr7\ServerRequest;
|
||||||
use Psr\Container\ContainerInterface;
|
use Psr\Container\ContainerInterface;
|
||||||
|
|
||||||
class ProductModule extends Module
|
class ProductModule extends Module
|
||||||
{
|
{
|
||||||
|
|
||||||
const DEFINITIONS = __DIR__ . '/config.php';
|
const DEFINITIONS = __DIR__ . '/config.php';
|
||||||
|
|
||||||
const MIGRATIONS = __DIR__ . '/db/migrations';
|
const MIGRATIONS = __DIR__ . '/db/migrations';
|
||||||
|
|
||||||
const SEEDS = __DIR__ . '/db/seeds';
|
const SEEDS = __DIR__ . '/db/seeds';
|
||||||
|
|
||||||
public function __construct(ContainerInterface $container)
|
public function __construct(ContainerInterface $container)
|
||||||
|
|
|
@ -131,7 +131,6 @@
|
||||||
$('.fond').css('background-image', "url('/images/toureiffel.jpeg')");
|
$('.fond').css('background-image', "url('/images/toureiffel.jpeg')");
|
||||||
</script>
|
</script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
@ -143,8 +142,7 @@
|
||||||
{{ annonce_ligne2 }}
|
{{ annonce_ligne2 }}
|
||||||
{{ annonce_ligne3 }}
|
{{ annonce_ligne3 }}
|
||||||
<p></p>
|
<p></p>
|
||||||
Consultez, rajoutez, modifiez vos propositions dans la liste du mois.<br /><br />
|
Consultez, rajoutez, modifiez vos propositions dans la liste du mois.
|
||||||
|
|
||||||
Mettez bien le pseudo, la clé publique, le bien ou service, et le prix en june.
|
Mettez bien le pseudo, la clé publique, le bien ou service, et le prix en june.
|
||||||
</div>
|
</div>
|
||||||
<p>
|
<p>
|
||||||
|
|
|
@ -64,8 +64,6 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<!-- <div class="container">-->
|
|
||||||
{% if flash('success') %}
|
{% if flash('success') %}
|
||||||
<div class="alert alert-success">
|
<div class="alert alert-success">
|
||||||
{{ flash('success') }}
|
{{ flash('success') }}
|
||||||
|
@ -74,9 +72,7 @@
|
||||||
|
|
||||||
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
|
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
|
||||||
|
|
||||||
{% block body %}{% endblock %}
|
{% block body %}{% endblock %}
|
||||||
|
|
||||||
<!--</div>-->
|
|
||||||
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js"></script>
|
||||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js"></script>
|
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js"></script>
|
||||||
|
|
Loading…
Reference in New Issue