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\HttpFoundation\Response;
|
||||||
use Symfony\Component\Routing\Annotation\Route;
|
use Symfony\Component\Routing\Annotation\Route;
|
||||||
|
|
||||||
class HomeController extends AbstractController
|
class DashboardController extends AbstractController
|
||||||
{
|
{
|
||||||
private $userService;
|
private $userService;
|
||||||
private $videoService;
|
private $videoService;
|
||||||
|
@ -31,7 +31,7 @@ class HomeController extends AbstractController
|
||||||
/**
|
/**
|
||||||
* @Route("/", name="app_dashboard")
|
* @Route("/", name="app_dashboard")
|
||||||
*/
|
*/
|
||||||
public function home(): Response
|
public function dashboard(): Response
|
||||||
{
|
{
|
||||||
if (!$this->isGranted("ROLE_USER")) {
|
if (!$this->isGranted("ROLE_USER")) {
|
||||||
// not logged in
|
// not logged in
|
||||||
|
@ -45,7 +45,7 @@ class HomeController extends AbstractController
|
||||||
$video->setCustomId($this->uuidMapper->toString($video->getId()));
|
$video->setCustomId($this->uuidMapper->toString($video->getId()));
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->render("home/dashboard.html.twig", [
|
return $this->render("dashboard/dashboard.html.twig", [
|
||||||
"videos" => $videos
|
"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()
|
"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"
|
<a class="nav-link {% if route_name == "app_upload" %} active {% endif %}" aria-current="page"
|
||||||
href="{{ path("app_upload") }}">Upload</a>
|
href="{{ path("app_upload") }}">Upload</a>
|
||||||
</li>
|
</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>
|
</ul>
|
||||||
<form class="d-flex input-group w-auto">
|
<form class="d-flex input-group w-auto">
|
||||||
<input
|
<input
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{% extends 'base.html.twig' %}
|
{% extends 'base.html.twig' %}
|
||||||
|
|
||||||
{% block title %}Home{% endblock %}
|
{% block title %}Dashboard{% endblock %}
|
||||||
{% block stylesheets %}
|
{% block stylesheets %}
|
||||||
<link rel="stylesheet" href="{{ asset("css/dashboard.css") }}">
|
<link rel="stylesheet" href="{{ asset("css/dashboard.css") }}">
|
||||||
{% endblock %}
|
{% 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