mirror of
https://github.com/sigmasternchen/MyTube
synced 2025-03-15 21:08:55 +00:00
begin of link management page
This commit is contained in:
parent
9369ffce85
commit
9a782bf3aa
6 changed files with 39 additions and 5 deletions
4
public/css/links.css
Normal file
4
public/css/links.css
Normal file
|
@ -0,0 +1,4 @@
|
|||
.link {
|
||||
margin-top: 2vw;
|
||||
padding: 1vw;
|
||||
}
|
|
@ -15,7 +15,7 @@ use Symfony\Component\HttpFoundation\Request;
|
|||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
|
||||
class HomeController extends AbstractController
|
||||
class DashboardController extends AbstractController
|
||||
{
|
||||
private $userService;
|
||||
private $videoService;
|
||||
|
@ -31,7 +31,7 @@ class HomeController extends AbstractController
|
|||
/**
|
||||
* @Route("/", name="app_dashboard")
|
||||
*/
|
||||
public function home(): Response
|
||||
public function dashboard(): Response
|
||||
{
|
||||
if (!$this->isGranted("ROLE_USER")) {
|
||||
// not logged in
|
||||
|
@ -45,7 +45,7 @@ class HomeController extends AbstractController
|
|||
$video->setCustomId($this->uuidMapper->toString($video->getId()));
|
||||
}
|
||||
|
||||
return $this->render("home/dashboard.html.twig", [
|
||||
return $this->render("dashboard/dashboard.html.twig", [
|
||||
"videos" => $videos
|
||||
]);
|
||||
}
|
||||
|
@ -70,8 +70,19 @@ class HomeController extends AbstractController
|
|||
}
|
||||
}
|
||||
|
||||
return $this->render("home/upload.html.twig", [
|
||||
return $this->render("dashboard/upload.html.twig", [
|
||||
"form" => $form->createView()
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/links", name="app_links")
|
||||
*/
|
||||
public function links(): Response
|
||||
{
|
||||
|
||||
return $this->render("dashboard/links.html.twig", [
|
||||
"links" => ["1", "2", "3"]
|
||||
]);
|
||||
}
|
||||
}
|
|
@ -40,6 +40,10 @@
|
|||
<a class="nav-link {% if route_name == "app_upload" %} active {% endif %}" aria-current="page"
|
||||
href="{{ path("app_upload") }}">Upload</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link {% if route_name == "app_links" %} active {% endif %}" aria-current="page"
|
||||
href="{{ path("app_links") }}">Links</a>
|
||||
</li>
|
||||
</ul>
|
||||
<form class="d-flex input-group w-auto">
|
||||
<input
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}Home{% endblock %}
|
||||
{% block title %}Dashboard{% endblock %}
|
||||
{% block stylesheets %}
|
||||
<link rel="stylesheet" href="{{ asset("css/dashboard.css") }}">
|
||||
{% endblock %}
|
15
templates/dashboard/links.html.twig
Normal file
15
templates/dashboard/links.html.twig
Normal file
|
@ -0,0 +1,15 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}Links{% endblock %}
|
||||
{% block stylesheets %}
|
||||
<link rel="stylesheet" href="{{ asset("css/links.css") }}">
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
Links
|
||||
{% for link in links %}
|
||||
<div class="link container-fluid bg-light shadow-5">
|
||||
Blabla
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endblock %}
|
Loading…
Reference in a new issue