2024.12.10 09:45:44

This commit is contained in:
Christian Moser 2024-12-10 09:45:44 +01:00
parent 0e20ab95a7
commit 40741e4477
37 changed files with 659 additions and 373 deletions

39
assets/icons/back.svg Normal file
View File

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
height="16px"
viewBox="0 0 16 16"
width="16px"
version="1.1"
id="svg1"
sodipodi:docname="back.svg"
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs1" />
<sodipodi:namedview
id="namedview1"
pagecolor="#505050"
bordercolor="#ffffff"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#505050"
inkscape:zoom="73.3125"
inkscape:cx="7.9931799"
inkscape:cy="8"
inkscape:window-width="3440"
inkscape:window-height="1369"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="svg1" />
<path
d="m 1 11 c 0 -0.265625 0.105469 -0.519531 0.292969 -0.707031 l 6 -6 c 0.390625 -0.390625 1.023437 -0.390625 1.414062 0 l 6 6 c 0.1875 0.1875 0.292969 0.441406 0.292969 0.707031 s -0.105469 0.519531 -0.292969 0.707031 c -0.390625 0.390625 -1.023437 0.390625 -1.414062 0 l -5.292969 -5.292969 l -5.292969 5.292969 c -0.390625 0.390625 -1.023437 0.390625 -1.414062 0 c -0.1875 -0.1875 -0.292969 -0.441406 -0.292969 -0.707031 z m 0 0"
fill="#2e3436"
id="path1"
style="fill:#e0d4a4;fill-opacity:1" />
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

4
assets/icons/delete.svg Normal file
View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
<path d="m 8 0 c -4.410156 0 -8 3.589844 -8 8 s 3.589844 8 8 8 s 8 -3.589844 8 -8 s -3.589844 -8 -8 -8 z m 0 2 c 3.332031 0 6 2.667969 6 6 s -2.667969 6 -6 6 s -6 -2.667969 -6 -6 s 2.667969 -6 6 -6 z m -2.03125 2.96875 c -0.265625 0 -0.519531 0.105469 -0.707031 0.292969 c -0.390625 0.390625 -0.390625 1.023437 0 1.414062 l 1.292969 1.292969 l -1.292969 1.292969 c -0.390625 0.390625 -0.390625 1.023437 0 1.414062 s 1.023437 0.390625 1.414062 0 l 1.292969 -1.292969 l 1.292969 1.292969 c 0.390625 0.390625 1.023437 0.390625 1.414062 0 s 0.390625 -1.023437 0 -1.414062 l -1.292969 -1.292969 l 1.292969 -1.292969 c 0.390625 -0.390625 0.390625 -1.023437 0 -1.414062 c -0.1875 -0.1875 -0.441406 -0.292969 -0.707031 -0.292969 s -0.519531 0.105469 -0.707031 0.292969 l -1.292969 1.292969 l -1.292969 -1.292969 c -0.1875 -0.1875 -0.441406 -0.292969 -0.707031 -0.292969 z m 0 0" fill="#2e3436"/>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -0,0 +1,60 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
height="16px"
viewBox="0 0 16 16"
width="16px"
version="1.1"
id="svg2"
sodipodi:docname="folder.svg"
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs2" />
<sodipodi:namedview
id="namedview2"
pagecolor="#505050"
bordercolor="#ffffff"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#505050"
inkscape:zoom="73.3125"
inkscape:cx="7.9931799"
inkscape:cy="8"
inkscape:window-width="3440"
inkscape:window-height="1369"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="svg2" />
<g
fill="#2e3436"
id="g2"
style="fill:#e0d4a4;fill-opacity:1">
<path
d="m 1 4 v 1 h 8 v -1 z m 0 0"
id="path1"
style="fill:#e0d4a4;fill-opacity:1" />
<path
d="m 3 1 c -1.644531 0 -3 1.355469 -3 3 v 8 c 0 1.644531 1.355469 3 3 3 h 10 c 1.644531 0 3 -1.355469 3 -3 v -6 c 0 -1.644531 -1.355469 -3 -3 -3 h -3.585938 l -1.707031 -1.707031 c -0.1875 -0.1875 -0.441406 -0.292969 -0.707031 -0.292969 z m 0 2 h 3.585938 l 1.707031 1.707031 c 0.1875 0.1875 0.441406 0.292969 0.707031 0.292969 h 4 c 0.5625 0 1 0.4375 1 1 v 6 c 0 0.566406 -0.4375 1 -1 1 h -10 c -0.5625 0 -1 -0.433594 -1 -1 v -8 c 0 -0.5625 0.4375 -1 1 -1 z m 0 0"
id="path2"
style="fill:#e0d4a4;fill-opacity:1" />
</g>
<g
fill="#2e3436"
id="g4"
style="fill:#e0d4a4;fill-opacity:1">
<path
d="m 1 4 v 1 h 8 v -1 z m 0 0"
id="path3"
style="fill:#e0d4a4;fill-opacity:1" />
<path
d="m 3 1 c -1.644531 0 -3 1.355469 -3 3 v 8 c 0 1.644531 1.355469 3 3 3 h 10 c 1.644531 0 3 -1.355469 3 -3 v -6 c 0 -1.644531 -1.355469 -3 -3 -3 h -3.585938 l -1.707031 -1.707031 c -0.1875 -0.1875 -0.441406 -0.292969 -0.707031 -0.292969 z m 0 2 h 3.585938 l 1.707031 1.707031 c 0.1875 0.1875 0.441406 0.292969 0.707031 0.292969 h 4 c 0.5625 0 1 0.4375 1 1 v 6 c 0 0.566406 -0.4375 1 -1 1 h -10 c -0.5625 0 -1 -0.433594 -1 -1 v -8 c 0 -0.5625 0.4375 -1 1 -1 z m 0 0"
id="path4"
style="fill:#e0d4a4;fill-opacity:1" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

41
assets/icons/empty.svg Normal file
View File

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="32"
height="32"
viewBox="0 0 32 32"
version="1.1"
id="svg1"
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
sodipodi:docname="emptysvg.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview1"
pagecolor="#505050"
bordercolor="#ffffff"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#505050"
inkscape:document-units="px"
inkscape:zoom="36.65625"
inkscape:cx="15.98636"
inkscape:cy="16"
inkscape:window-width="3440"
inkscape:window-height="1369"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="layer1" />
<defs
id="defs1" />
<g
inkscape:label="Ebene 1"
inkscape:groupmode="layer"
id="layer1" />
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

39
assets/icons/file.svg Normal file
View File

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
height="16px"
viewBox="0 0 16 16"
width="16px"
version="1.1"
id="svg1"
sodipodi:docname="file.svg"
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs1" />
<sodipodi:namedview
id="namedview1"
pagecolor="#505050"
bordercolor="#ffffff"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#505050"
inkscape:zoom="73.3125"
inkscape:cx="7.9931799"
inkscape:cy="8"
inkscape:window-width="3440"
inkscape:window-height="1369"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="svg1" />
<path
d="m 5 1 c -1.644531 0 -3 1.355469 -3 3 v 9 c 0 1.644531 1.355469 3 3 3 h 6 c 1.644531 0 3 -1.355469 3 -3 v -7.5 c 0 -0.265625 -0.105469 -0.519531 -0.292969 -0.707031 l -3.5 -3.5 c -0.1875 -0.1875 -0.441406 -0.292969 -0.707031 -0.292969 z m 0 2 h 4 v 1.5 c 0 1 0.5 1.5 1.5 1.5 h 1.5 v 7 c 0 0.570312 -0.429688 1 -1 1 h -6 c -0.570312 0 -1 -0.429688 -1 -1 v -9 c 0 -0.570312 0.429688 -1 1 -1 z m 0 0"
fill="#2e3436"
id="path1"
style="fill:#e0d4a4;fill-opacity:1" />
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -2,8 +2,8 @@
font-family: "JetBrains"; font-family: "JetBrains";
src: src:
local("JetBrainsMono-Medium.ttf"), local("JetBrainsMono-Medium.ttf"),
url("./fonts/JetBrainsMono/JetBrainsMono-Regular.woff2") format("woff2"), url("../fonts/JetBrainsMono/JetBrainsMono-Regular.woff2") format("woff2"),
url("./fonts/JetBrainsMono/JetBrainsMono-Medium.woff2") format("woff2"); url("../fonts/JetBrainsMono/JetBrainsMono-Medium.woff2") format("woff2");
font-style: normal; font-style: normal;
font-weight: normal; font-weight: normal;
} }
@ -12,7 +12,7 @@
font-family: "JetBrains"; font-family: "JetBrains";
src: src:
local("JetBrainsMono-MediumItalic.ttf"), local("JetBrainsMono-MediumItalic.ttf"),
url("./fonts/JetBrainsMono/JetBrainsMono-Italic.woff2") format("woff2"); url("../fonts/JetBrainsMono/JetBrainsMono-Italic.woff2") format("woff2");
font-style: italic; font-style: italic;
font-weight: normal; font-weight: normal;
} }
@ -21,7 +21,7 @@
font-family: "JetBrains"; font-family: "JetBrains";
src: src:
local("JetBrainsMono-Bold.ttf"), local("JetBrainsMono-Bold.ttf"),
url("./fonts/JetBrainsMono/JetBrainsMono-Bold.woff2") format("woff2"); url("../fonts/JetBrainsMono/JetBrainsMono-Bold.woff2") format("woff2");
font-style: normal; font-style: normal;
font-weight: bold; font-weight: bold;
} }
@ -30,7 +30,7 @@
font-family: "JetBrains"; font-family: "JetBrains";
src: src:
local("JetBrainsMono-BoldItalic.ttf"), local("JetBrainsMono-BoldItalic.ttf"),
url("./fonts/JetBrainsMono/JetBrainsMono-BoldItalic.woff2") format("woff2"); url("../fonts/JetBrainsMono/JetBrainsMono-BoldItalic.woff2") format("woff2");
font-style: italic; font-style: italic;
font-weight: bold; font-weight: bold;
} }
@ -39,7 +39,7 @@
font-family: "JetBrains"; font-family: "JetBrains";
src: src:
local("JetBrainsMono-ExtraBold.ttf"), local("JetBrainsMono-ExtraBold.ttf"),
url("./fonts/JetBrainsMono/JetBrainsMono-ExtraBold.woff2") format("woff2"); url("../fonts/JetBrainsMono/JetBrainsMono-ExtraBold.woff2") format("woff2");
font-style: normal; font-style: normal;
font-weight: bolder; font-weight: bolder;
} }
@ -48,7 +48,7 @@
font-family: "JetBrains"; font-family: "JetBrains";
src: src:
local("JetBrainsMono-ExtraBoldItalic.ttf"), local("JetBrainsMono-ExtraBoldItalic.ttf"),
url("./fonts/JetBrainsMono/JetBrainsMono-ExtraBoldItalic.woff2") format("woff2"); url("../fonts/JetBrainsMono/JetBrainsMono-ExtraBoldItalic.woff2") format("woff2");
font-style: italic; font-style: italic;
font-weight: bolder; font-weight: bolder;
} }
@ -57,7 +57,7 @@
font-family: "JetBrains"; font-family: "JetBrains";
src: src:
local("JetBrainsMono-Light.ttf"), local("JetBrainsMono-Light.ttf"),
url("./fonts/JetBrainsMono/JetBrainsMono-Light.woff2") format("woff2"); url("../fonts/JetBrainsMono/JetBrainsMono-Light.woff2") format("woff2");
font-style: normal; font-style: normal;
font-weight: lighter; font-weight: lighter;
} }
@ -66,7 +66,7 @@
font-family: "JetBrains"; font-family: "JetBrains";
src: src:
local("JetBrainsMono-LightItalic.ttf"), local("JetBrainsMono-LightItalic.ttf"),
url("./fonts/JetBrainsMono/JetBrainsMono-LightItalic.woff2") format("woff2"); url("../fonts/JetBrainsMono/JetBrainsMono-LightItalic.woff2") format("woff2");
font-style: italic; font-style: italic;
font-weight: lighter; font-weight: lighter;
} }
@ -366,3 +366,29 @@ fieldset {
background-color:var(--color-code-background); background-color:var(--color-code-background);
color:white; color:white;
} }
.icon-back {
content:url('../icons/back.svg');
}
.icon-delete {
content:url('../icons/delete.svg');
}
.icon-directory {
content:url('../icons/directory.svg');
}
.icon-empty {
content: url('../icons/empty.svg');
}
.icon-file {
content: url('../icons/file.svg');
}
.list-icon {
width: 24;
height: 24;
}

View File

@ -19,6 +19,8 @@ security:
form_login: form_login:
login_path: app_login login_path: app_login
check_path: app_login check_path: app_login
default_target_path: app_index
always_use_default_target_path: false
enable_csrf: true enable_csrf: true
logout: logout:
path: app_logout path: app_logout

View File

@ -1,7 +1,8 @@
framework: framework:
default_locale: de default_locale: en
translator: translator:
default_path: '%kernel.project_dir%/translations' default_path: '%kernel.project_dir%/translations'
fallbacks: fallbacks:
- en - en
- de

View File

@ -0,0 +1,41 @@
<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20241209075313 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE TEMPORARY TABLE __temp__mydevel_webroot_file AS SELECT id, owner_id, url_path, abspath, description FROM mydevel_webroot_file');
$this->addSql('DROP TABLE mydevel_webroot_file');
$this->addSql('CREATE TABLE mydevel_webroot_file (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, owner_id INTEGER NOT NULL, url CLOB NOT NULL, abspath CLOB NOT NULL, description CLOB DEFAULT NULL, CONSTRAINT FK_A7B135127E3C61F9 FOREIGN KEY (owner_id) REFERENCES mydevel_webroot_user (id) ON UPDATE NO ACTION ON DELETE NO ACTION NOT DEFERRABLE INITIALLY IMMEDIATE)');
$this->addSql('INSERT INTO mydevel_webroot_file (id, owner_id, url, abspath, description) SELECT id, owner_id, url_path, abspath, description FROM __temp__mydevel_webroot_file');
$this->addSql('DROP TABLE __temp__mydevel_webroot_file');
$this->addSql('CREATE UNIQUE INDEX UNIQ_A7B135127E3C61F9 ON mydevel_webroot_file (owner_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE TEMPORARY TABLE __temp__mydevel_webroot_file AS SELECT id, owner_id, url, abspath, description FROM mydevel_webroot_file');
$this->addSql('DROP TABLE mydevel_webroot_file');
$this->addSql('CREATE TABLE mydevel_webroot_file (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, owner_id INTEGER NOT NULL, url_path CLOB NOT NULL, abspath CLOB NOT NULL, description CLOB DEFAULT NULL, section VARCHAR(1024) DEFAULT \'webroot\' NOT NULL, CONSTRAINT FK_A7B135127E3C61F9 FOREIGN KEY (owner_id) REFERENCES mydevel_webroot_user (id) NOT DEFERRABLE INITIALLY IMMEDIATE)');
$this->addSql('INSERT INTO mydevel_webroot_file (id, owner_id, url_path, abspath, description) SELECT id, owner_id, url, abspath, description FROM __temp__mydevel_webroot_file');
$this->addSql('DROP TABLE __temp__mydevel_webroot_file');
$this->addSql('CREATE UNIQUE INDEX UNIQ_A7B135127E3C61F9 ON mydevel_webroot_file (owner_id)');
}
}

View File

@ -0,0 +1,25 @@
<?php
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Scripting/PHPClass.php to edit this template
*/
namespace App\Component\Sorter;
enum FileSortType {
case TYPE_ASC;
case TYPE_DESC;
case NAME_ASC;
case NAME_DESC;
case SIZE_ASC;
case SIZE_DESC;
case DATE_ASC;
case DATE_DESC;
}
/**
* Description of FileSortType
*
* @author c9mos
*/

View File

@ -0,0 +1,62 @@
<?php
namespace App\Component\Sorter;
use App\Component\Sorter\FileSortType;
/**
* Description of FileSorter
*
* @author c9mos
*/
class FileSorter {
static public function sortTypeAsc(array $element1,array $element2): int
{
if ($element1['dir'] === $element2['dir']) {
return strcmp($element1['name'], $element2['name']);
} elseif ($element1['dir']) {
return -1;
}
return 1;
}
static public function sortTypeDesc(array $element1,array $element2): int
{
if ($element1['dir'] === $element2['dir']) {
return (strcmp($element2,$element1));
} elseif ($element1[dir]) {
return 1;
}
return -1;
}
static public function sortNameAsc($element1,$element2): int
{
return strcmp($element1['name'],$element2['name']);
}
static public function sortNameDesc($element1,$element2): int
{
return strcmp($element2['name'],$element1['name']);
}
static public function sortSizeAsc($element1,$element2): int
{
return ($element1['size'] - $element2['size']);
}
static public function sortSizeDesc($element1,$element2): int
{
return ($element2['size'] - $element1['size']);
}
static public function sortDateAsc($element1,$element2): int
{
return ($element1['mtime'] - $element2['mtime']);
}
static public function sortDateDesc($element1,$element2): int
{
return ($element2['mtime'] - $element1['mtime']);
}
}

View File

@ -4,10 +4,11 @@ namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Attribute\Route; use Symfony\Component\Routing\Attribute\Route;
use Symfony\Component\HttpKernel\KernelInterface; use Symfony\Component\HttpKernel\KernelInterface;
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException; use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
use App\Component\Sorter\FileSortType;
use App\Controller\WebrootController; use App\Controller\WebrootController;
class MainController extends WebrootController class MainController extends WebrootController
@ -32,42 +33,102 @@ class MainController extends WebrootController
])); ]));
} }
/*
#[Route('/webroot',name:"app_webroot")] #[Route('/webroot',name:"app_webroot")]
public function webroot(): Response public function webroot(): Response
{ {
$is_allowed = false;
$user = $this->getUser(); $user = $this->getUser();
$url = $this->generateUrl("app_webroot");
$permissions = $this->getFilePermissions($url);
if (!$permissions['read']) {
if (!$is_allowed) { throw new AccessDeniedHttpException("You are not allowd to visit \"$url\"!");
throw new AccessDeniedHttpException();
} }
$routeconfig = [ return $this->getDirectoryResponse($url);
"parent"=>null,
"url"=> $this->generateUrl("app_webroot"),
"child"=>"app_webroot_target",
];
return new Response("<html><body><h1>it works</h1></body></html>");
} }
*/
#[Route('/webroot/{target}',name:"app_webroot_target")]
public function webrootTarget(?string $target): Response #[Route('/webroot/share',name:"app_webroot")]
#[Route('/webroot/share/{path}',name:"app_webroot_path", requirements:["path"=>".+"])]
public function webroot(Request $request,?string $path=null): Response
{ {
$is_allowed = false; $is_allowed = false;
$user = $this->getUser(); $user = $this->getUser();
if ($user) {
if (in_array("ROLE_SUPERADMIN",$user->getRoles()) || in_array("ROLE_ADMIN",$user->getRoles())) {
$is_allowed = true;
}
}
if (!$is_allowed) {
throw new AccessDeniedHttpException();
}
$url = ($path ?
$this->generateUrl("app_webroot_path",['path'=>$path])
: $this->generateUrl("app_webroot"));
return new Response("<html><body><h1>it works</h1></body></html>"); $routeconf = [
'path' => $path,
'parent_url' => ($path ? join('/',array_slice(explode('/',$url),0 ,-1)) : null),
'delete_route' => 'app_webroot_delete',
'mkdir_route' => 'app_webroot_mkdir',
'upload_route' => 'app_webroot_upload',
];
return $this->getUrlResponse($url, $routeconf, $this->parseSort($request->get('S')));
}
#[Route('/webroot')]
public function webrootRedirect(): Response
{
return $this->redirectToRoute("app_webroot");
}
#[Route('/webroot/upload',name: 'app_webroot_upload')]
#[Route('/webroot/upload/{path}',name: 'app_webroot_upload_path',requirements:["path"=>".+"])]
public function webrootUpload(?string $path=null): Response
{
//TODO
return render('main/controller.html.twig',array_merge(
$this->getControllerVariables(),
[
"controller_name"=>"MainController",
"controller_class"=> __CLASS__,
"controller_function"=> __FUNCTION__
]));
}
#[Route('/webroot/upload_archive',name:'upload_archive')]
#[Route('/webroot/upload_archive/{path}',name:'upload_archive_path',requirements:["path"=>".+"])]
public function uploadArchive(?string $path=null): Response
{
//TODO
return render('main/controller.html.twig',array_merge(
$this->getControllerVariables(),
[
"controller_name"=>"MainController",
"controller_class"=> __CLASS__,
"controller_function"=> __FUNCTION__
]));
}
#[Route('/webroot/delete/{path}',name: 'app_webroot_delete',requirements:["path"=>".+"])]
public function webrootDelete(string $path): Response
{
//TODO
return render('main/controller.html.twig',array_merge(
$this->getControllerVariables(),
[
"controller_name"=>"MainController",
"controller_class"=> __CLASS__,
"controller_function"=> __FUNCTION__
]));
}
#[Route('/webroot/mkdir/{path}',name: 'app_webroot_mkdir',requirements:["path"=>".+"])]
public function webrootMkdir(string $path): Response
{
//TODO
return render('main/controller.html.twig',array_merge(
$this->getControllerVariables(),
[
"controller_name"=>"MainController",
"controller_class"=> __CLASS__,
"controller_function"=> __FUNCTION__
]));
} }
} }

View File

@ -15,12 +15,14 @@ use Symfony\Contracts\Translation\TranslatorInterface;
use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityManagerInterface;
use App\Entity\WebrootFile; use App\Entity\WebrootFile;
use App\Utility\NullTranslator; use App\Utility\NullTranslator;
use App\Component\Sorter\FileSortType;
use App\Component\Sorter\FileSorter;
abstract class WebrootController extends AbstractController abstract class WebrootController extends AbstractController
{ {
private ?string $project_dir = null; private ?string $project_dir = null;
private ?TranslatorInterface $tranlsator = null; private ?TranslatorInterface $tranlsator = null;
private ?EntityManager $entitymanager = null; private ?EntityManagerInterface $entitymanager = null;
protected ?NullTranslator $nulltranslator = null; protected ?NullTranslator $nulltranslator = null;
@ -61,10 +63,10 @@ abstract class WebrootController extends AbstractController
return $this->translator->trans($message,$args,domain:$domain,locale:$locale); return $this->translator->trans($message,$args,domain:$domain,locale:$locale);
} }
protected function getFilePermissions($section,string $url_path): array protected function getFilePermissions(string $url): array
{ {
return $this->entitymanager->getRepositiory(WebrootFile::class) return $this->entitymanager->getRepository(WebrootFile::class)
->findFilePermissionsBySectionPath($this->getUser(),$section,$url_path); ->findFilePermissionsByUrl($this->getUser(),$url);
} }
protected function getFileResponse($abspath): Response protected function getFileResponse($abspath): Response
@ -72,15 +74,24 @@ abstract class WebrootController extends AbstractController
if (!is_file($abspath)) { if (!is_file($abspath)) {
throw new FileException(); throw new FileException();
} }
$response = new BinaryFileResponse();
$response->setFile($abspath); $response = new BinaryFileResponse($abspath);
$response->setContentDisposition(ResponseHeaderBag::DISPOSITION_INLINE); $response->setContentDisposition(ResponseHeaderBag::DISPOSITION_INLINE);
return response; return $response;
} }
protected function getDirectoryList(string $abspath,string $section,string $url_path,array $routeconfig): array protected function getAbspathByUrl(string $url): ?string
{ {
if (!is_directory("abspath")) { return $this->entitymanager
->getRepository(WebrootFile::class)
->findAbspathByUrl($url);
}
protected function getDirectoryList(string $url): array
{
$abspath = $this->getAbspathByUrl($url);
if (!$abspath || !is_dir($abspath)) {
throw new FileException(); throw new FileException();
} }
$file_repos = $this->entitymanager->getRepository(WebrootFile::class); $file_repos = $this->entitymanager->getRepository(WebrootFile::class);
@ -94,18 +105,6 @@ abstract class WebrootController extends AbstractController
$dirlist = []; $dirlist = [];
if (key_exists("child",$routeconfig)) {
$child_route=$routeconfig["child"];
} else {
$child_route=$routeconfig["route"];
}
if (key_exists("parent_href",$routeconfig)) {
$parent_href=$routeconfig["parent"];
} else {
$parent_href=null;
}
foreach (scandir($abspath) as $dirent) { foreach (scandir($abspath) as $dirent) {
if ($dirent === '.' || $dirent === '..') { if ($dirent === '.' || $dirent === '..') {
continue; continue;
@ -114,9 +113,9 @@ abstract class WebrootController extends AbstractController
continue; continue;
} }
$file_urlpath = $url_path . '/' . $dirent; $fileurl = $url . '/' . urlencode($dirent);
$file_abspath = $abspath . DIRECTORY_SEPARATOR . $dirent; $file_abspath = $abspath . DIRECTORY_SEPARATOR . $dirent;
$fileperm = $file_repos->findFilePermissionsBySectionPath($user,$section,$file_urlpath); $fileperm = $file_repos->findFilePermissionsByUrl($user,$fileurl);
if (!$fileperm['read']) { if (!$fileperm['read']) {
continue; continue;
@ -125,8 +124,8 @@ abstract class WebrootController extends AbstractController
if (is_file($file_abspath)) { if (is_file($file_abspath)) {
$dirlist[] = [ $dirlist[] = [
"name" => $dirent, "name" => $dirent,
"icon" => "icons/file.svg", "icon" => "icon-file",
"href" => $this->generateUrl($child_route, ["path"=>"file_urlpath"]), "href" => $fileurl,
"size" => filesize($file_abspath), "size" => filesize($file_abspath),
"delete" => $fileperm['delete'], "delete" => $fileperm['delete'],
"write" => $fileperm['write'], "write" => $fileperm['write'],
@ -137,8 +136,8 @@ abstract class WebrootController extends AbstractController
} elseif (is_dir($file_abspath)) { } elseif (is_dir($file_abspath)) {
$dirlist[] = [ $dirlist[] = [
"name" => $dirent, "name" => $dirent,
"icon"=>"icons/dir.svg", "icon"=>"icon-directory",
"href" => $this->generateUrl($child_route, ["path"=>"file_urlpath"]), "href" => $fileurl,
"size" => "-", "size" => "-",
"delete" => $fileperm['delete'], "delete" => $fileperm['delete'],
"write" => $fileperm['write'], "write" => $fileperm['write'],
@ -151,40 +150,145 @@ abstract class WebrootController extends AbstractController
return $dirlist; return $dirlist;
} }
protected function getDirectoryResponse($abspath,$fileperm,$section,$url_path) : Response protected function getDirectoryResponse(string $url,array $routeconf, FileSortType $sort=FileSortType::TYPE_ASC) : Response
{ {
$dirlist = $this->getDirectoryList($abspath, $fileperm, $section, $url_path); $dirlist = $this->getDirectoryList($url);
$dirperm = $this->getFilePermissions($url);
if (!$dirperm['read']) {
throw AccessDeniedHttpException("You are not allowed to accesss this resource!");
}
return new Response(); $sorter = FileSorter::class;
switch ($sort) {
case FileSortType::TYPE_ASC:
uasort($dirlist,[$sorter,'sortTypeAsc']);
breaK;
case FileSortType::TYPE_DESC:
uasort($dirlist,[$sorter,'sortTypeDesc']);
break;
case FileSortType::NAME_ASC:
uasort($dirlist,[$sorter,'sortNameAsc']);
break;
case FileSortType::NAME_DESC:
uasort($dirlist,[$sorter,'sortNameDesc']);
break;
case FileSortType::SIZE_ASC:
uasort($dirlist,[$sorter,'sortSizeAsc']);
break;
case FileSortType::SIZE_DESC:
uasort($dirlist,[$sorter,'sortSizeDesc']);
break;
case FileSortType::DATE_ASC:
uasort($dirlist,[$sorter,'sortDateAsc']);
break;
case FileSortType::DATE_DESC:
uasort($dirlist,[$sorter,'sortDateDesc']);
break;
default:
break;
}
return $this->render('webroot/directory.html.twig', array_merge(
$this->getControllerVariables(), [
"parent_url"=>$routeconf['parent_url'],
"url"=>$url,
"read"=>$dirperm['read'],
"write"=>$dirperm['write'],
"delete"=>$dirperm['delete'],
"upload_url"=>($routeconf['path']
? $this->generateUrl($routeconf['upload_route'],["path"=>$routeconf['path']]) . "/"
: substr($this->generateUrl($routeconf['upload_route'],['path'=>"."]),0,-1)),
"mkdir_url"=>($routeconf['path']
? $this->generateUrl($routeconf['mkdir_route'],["path"=>$routeconf['path']]) . "/"
: substr($this->generateUrl($routeconf['mkdir_route'],['path'=>"."]),0,-1)),
"dir_entries"=>$dirlist,
]
));
} }
protected function getSectionPathResponse(string $section,string $url_path,array $routeconfig): Response public function parseSort(?string $sort): FileSortType
{ {
if (!getFilePermissions($section,$urlPath)) { if (!$sort) {
throw AccessDeniedHttpException(); return FileSortType::TYPE_ASC;
}
$sa = explode(";",$sort);
if (sizeof($sa) > 1) {
$s1 = explode("=",$sa[1]);
if (sizeof($s1) !== 2) {
$s1 = ['O','A'];
}
} else {
$s1 = ['O','A'];
} }
$path = $this->buildPath($section,$url_path); $ret = FileSortType::TYPE_ASC;
if (!$path || !file_exists($path)) { switch ($s0) {
throw NotFoundHttpException(); case 'T':
switch ($s1[1]) {
case 'D':
$ret = FileSortType::TYPE_DESC;
break;
case 'A':
default:
$ret = FileSortType::TYPE_ASC;
break;
}
break;
case 'N':
switch ($s1[1]) {
case 'D':
$ret = FileSortType::NAME_DESC;
break;
case 'A':
default:
$ret = FileSortType::NAME_ASC;
break;
}
break;
case 'S':
switch ($s1[1]) {
case 'D':
$ret = FileSortType::SIZE_DESC;
break;
case 'A':
default:
$ret = FileSortType::SIZE_ASC;
break;
}
break;
case 'D':
switch ($s1[1]) {
case 'D':
$ret = FileSortType::DATE_DESC;
break;
case 'A':
default:
$ret = FileSortType::DATE_ASC;
break;
}
break;
}
return $ret;
}
protected function getUrlResponse(string $url,array $routeconf,FileSortType $sort= FileSortType::TYPE_ASC): Response
{
if (!$this->getFilePermissions($url)['read']) {
return $this->redirectToRoute("app_login",['_target_path'=> $url]);
} }
$file_repos = $this->entitymanager->getRepository(WebrootFile::class); $abspath = $this->getAbspathByUrl($url);
$abspath = $file_repos->findAbspathBySectionPath($section,$path);
if (!file_exists($abspath)) { if (!file_exists($abspath)) {
throw new NotFoundHttpException(); throw new NotFoundHttpException();
} }
$fileperm = $file_repos->findFilePermissionsBySectionPath($this->getUser(),$section,$path);
if (!$fileperm['read']) {
throw AccessDeniedHttpException();
}
if (is_file($abspath)) { if (is_file($abspath)) {
return $this->getFileResponse($abspath); return $this->getFileResponse($abspath);
} }
if (is_dir($abspath)) { if (is_dir($abspath)) {
return $this->getDirectoryListResponse($abspath,$section,$url_path,$routeconfig); return $this->getDirectoryResponse($url,$routeconf,$sort);
} }
throw FileException(); throw FileException();

View File

@ -894,7 +894,7 @@ abstract class WebrootSetupController extends AbstractController
->getRepository(WebrootUser::class) ->getRepository(WebrootUser::class)
->findByUsername($setup_data['user']['username']); ->findByUsername($setup_data['user']['username']);
$wrf = new WebrootFile(); $wrf = new WebrootFile();
$wrf->setUrl('/webroot'); $wrf->setUrl($this->generateUrl("app_webroot"));
$wrf->setAbspath($setup_data["site"]["rootdir"]); $wrf->setAbspath($setup_data["site"]["rootdir"]);
$wrf->setOwner($admin); $wrf->setOwner($admin);
$this->entitymanager->persist($wrf); $this->entitymanager->persist($wrf);

View File

@ -16,12 +16,8 @@ class WebrootFile
#[ORM\Column] #[ORM\Column]
private ?int $id = null; private ?int $id = null;
#[ORM\Column(length:1024,nullable:false,options:["default"=>"webroot"])]
private ?string $section = null;
#[ORM\Column(length: 65535,nullable:false)] #[ORM\Column(length: 65535,nullable:false)]
private ?string $url_path = null; private ?string $url = null;
#[ORM\Column(length: 65535,nullable:false)] #[ORM\Column(length: 65535,nullable:false)]

View File

@ -18,22 +18,11 @@ class WebrootFileRepository extends ServiceEntityRepository
parent::__construct($registry, WebrootFile::class); parent::__construct($registry, WebrootFile::class);
} }
public function findFilePermissionsBySectionPath(?WebrootUser $user,string $section,string $url_path): array public function findFilePermissionsByUrl(?WebrootUser $user,string $url): array
{ {
$paths_array= explode('/', $url_path); $paths_array= explode('/', $url);
$query_builder = $this->createQueryBuilder('f') $query_builder = $this->createQueryBuilder('f')
->andWhere('f.section := sect') ->andWhere('f.url = :url');
->andWhere('f.url_path := path')
->setParameter('sect', $section);
if ($user) {
$roles = $user->getRoles();
if (in_array('ROLE_SUPERADMIN',$roles)) {
return ['read'=>true,'write'=>true,'delete'=>true];
}
} else {
$roles = ["ROLE_PUBLIC"];
}
$ret = [ $ret = [
'read'=>false, 'read'=>false,
@ -41,17 +30,27 @@ class WebrootFileRepository extends ServiceEntityRepository
'delete'=>false, 'delete'=>false,
]; ];
while (sizeof($paths_array) > 0) { if ($user) {
$result = $query_builder->setParameter('sect',$section) $roles = $user->getRoles();
->setParameter('path',join(DIRECTORY_SEPARATOR,$paths_array)) if (in_array('ROLE_SUPERADMIN',$roles)) {
return ['read'=>true,'write'=>true,'delete'=>true];
}
if (in_array('ROLE_ADMIN',$roles)) {
$ret['read'] = true;
}
} else {
$roles = ["ROLE_PUBLIC"];
}
while (sizeof($paths_array) > 1) {
$result = $query_builder->setParameter('url',join(DIRECTORY_SEPARATOR,$paths_array))
->getQuery() ->getQuery()
->getOneOrNullResult(); ->getOneOrNullResult();
if ($result) { if ($result) {
foreach($result->getPermissions() as $perm) { if ($user && $result->getOwner()->getId() === $user->getId()) {
if ($user && $result->getOwner()->getId() === $user->getId()) {
return [['read'=>true,'write'=>true,'delete'=>true]]; return [['read'=>true,'write'=>true,'delete'=>true]];
} }
foreach($result->getPermissions() as $perm) {
if (in_array($perm->getRole()->getRole(),$roles)) { if (in_array($perm->getRole()->getRole(),$roles)) {
if ($perm->isReadable()) { if ($perm->isReadable()) {
$ret['read'] = true; $ret['read'] = true;
@ -66,47 +65,45 @@ class WebrootFileRepository extends ServiceEntityRepository
} }
break; break;
} }
$paths_array = array_slice($paths_array,0,-1);
} }
return $ret; return $ret;
} }
public function findBySectionPath(string $section,string $url_path): ?WebrootFile public function findByUrl(string $url): ?WebrootFile
{ {
return $this->createQueryBuilder('f') return $this->createQueryBuilder('f')
->andWhere('f.section := sect') ->andWhere('f.section = :sect')
->andWhere('f.url_path := path') ->andWhere('f.url := url')
->setParameter('sect', $section) ->setParameter('url', $url)
->setParameter('path', $url_path)
->getQuery() ->getQuery()
->getOneOrNullResult(); ->getOneOrNullResult();
} }
public function findAbspathBySectionPath(string $section, string $url_path): ?string public function findAbspathByUrl(string $url): ?string
{ {
$query_builder = $this->createQueryBuilder('f') $query_builder = $this->createQueryBuilder('f')
->andWhere('f.section := sect') ->andWhere('f.url = :url');
->andWhere('f.path : path')
->setParameter('sect', $section);
$path_array = explode('/',$url_path);
$url_array = explode('/',$url);
$path_extend=[]; $path_extend=[];
while (sizeof($path_array) > 0) { while (sizeof($url_array) > 1) {
$result = query_builder->setParameter('path',join('/',path_array)) $result = $query_builder->setParameter('url',join('/',$url_array))
->qetQuery() ->getQuery()
->getOneOrNullResult(); ->getOneOrNullResult();
if ($result) { if ($result) {
if (!sizeof($path_extend)) { if (!sizeof($path_extend)) {
return $result->getAbspath(); return $result->getAbspath();
} else { } else {
$join_path = [$result->getAbaspath()]; $join_path = [$result->getAbspath()];
foreach (array_reverse($path_extend) as $xpath) { foreach (array_reverse($path_extend) as $xpath) {
$join_path[] = $xpath; $join_path[] = $xpath;
} }
return join(DIRECTORY_SEPARATOR,$join_path); return join(DIRECTORY_SEPARATOR,$join_path);
} }
} }
$path_extend[] = array_pop($path_array); $path_extend[] = array_pop($url_array);
} }
return null; return null;
} }
@ -114,34 +111,9 @@ class WebrootFileRepository extends ServiceEntityRepository
public function findByAbspath(string $abspath): array public function findByAbspath(string $abspath): array
{ {
return $this->createQueryBuilder('f') return $this->createQueryBuilder('f')
->andWhere('f.absath := val') ->andWhere('f.abspath = :val')
->setParameter('val', $abspath) ->setParameter('val', $abspath)
->getQuery() ->getQuery()
->getResult(); ->getResult();
} }
// /**
// * @return WebrootFile[] Returns an array of WebrootFile objects
// */
// public function findByExampleField($value): array
// {
// return $this->createQueryBuilder('w')
// ->andWhere('w.exampleField = :val')
// ->setParameter('val', $value)
// ->orderBy('w.id', 'ASC')
// ->setMaxResults(10)
// ->getQuery()
// ->getResult()
// ;
// }
// public function findOneBySomeField($value): ?WebrootFile
// {
// return $this->createQueryBuilder('w')
// ->andWhere('w.exampleField = :val')
// ->setParameter('val', $value)
// ->getQuery()
// ->getOneOrNullResult()
// ;
// }
} }

View File

@ -0,0 +1,20 @@
{% extends 'base.html.twig' %}
{% block title %}Hello MainController!{% endblock %}
{% block body %}
<style>
.example-wrapper { margin: 1em auto; max-width: 800px; width: 95%; font: 18px/1.5 sans-serif; }
.example-wrapper code {var(--color-code-background); padding: 2px 6px; }
</style>
<div class="example-wrapper">
<h1>Hello {{ controller_name }}! ✅</h1>
This friendly message is coming from:
<ul>
<li>Your controller at <code>C:/msys64/home/c9mos/www/webroot/src/Controller/MainController.php</code></li>
<li>Your template at <code>C:/msys64/home/c9mos/www/webroot/templates/main/index.html.twig</code></li>
</ul>
</div>
{% endblock %}

View File

@ -5,12 +5,12 @@
<div class="toolbar"> <div class="toolbar">
{% if write %} {% if write %}
<span class="toolbar-item"> <span class="toolbar-item">
<a class="coolbar-button" href="{{ create_dir }}"> <a class="coolbar-button" href="{#{ create_dir }#}">
<img /> <img src="{{ asset('icon/create') }}"/>
</a> </a>
</span> </span>
<span class="toolbar-item"> <span class="toolbar-item">
<a class="toolbar-button" href="{{ upload_file }}"> <a class="toolbar-button" href="{#{ upload_file }#}">
<img /> <img />
</a> </a>
</span> </span>
@ -28,7 +28,7 @@
<tr><td colspan="6"><strong><hr></strong></td></tr> <tr><td colspan="6"><strong><hr></strong></td></tr>
{% if parent_url %} {% if parent_url %}
<tr> <tr>
<td><img class="list-icom" width="24" height="24" alt="[icon]" src="/static/icons/back.svg" /></td> <td><img class="list-icom" width="24" height="24" alt="[icon]" src="{{ '' }}/static/icons/back.svg" /></td>
<td><a href="{{ parent_url }}">Zurück</a></td> <td><a href="{{ parent_url }}">Zurück</a></td>
<td>-</td> <td>-</td>
<td>-</td> <td>-</td>

View File

@ -1,50 +1,51 @@
{% extends 'base.html.twig' %} {% extends 'base.html.twig' %}
{% block body %} {% block body %}
<h3>Index for <em>{{ url_path }}</em></h3> <h3>Index for <em>{{ url }}</em></h3>
<div class="toolbar"> <div class="toolbar">
{% if write %} {% if write %}
<span class="toolbar-item"> <span class="toolbar-item">
<a class="toolbar-button" href="{#{ 'create_dir' }#}"> <a class="toolbar-button" href="{#{ 'create_dir' }#}">
<img src="{{ asset('icons/upload.svg') }}" alt="create-icon"/> <img src="{{ asset('icons/mkdir.svg') }}" alt="create-icon"/>
</a> </a>
</span> </span>
<span class="toolbar-item"> <span class="toolbar-item">
<a class="toolbar-button" href="{#{ 'upload_file' }#}"> <a class="toolbar-button" href="{#{ 'upload_file' }#}">
<img alt="upload-icon"/> <img alt="upload-icon" src="{{ asset('icons/upload.svg') }}"/>
</a> </a>
</span> </span>
{% endif %} {% endif %}
</div> </div>
<table><!-- Directory Index --> <table class="full-width"><!-- Directory Index -->
<tr> <tr>
<th class="td-color"><a href="{#{ 'sort_standard_href' }#}"><img class="list-icon" alt="[icon]" width="32" height="32" src="/static/icons/empty.svg" /></a></th> <th class="td-color shrink-to-fit"><a href="{#{ 'sort_standard_href' }#}"><img class="list-icon icon-empty" alt="[icon]" /></a></th>
<th class="td-color"><a href="{#{ 'sort_name_href' }#}">Size</a></th> <th class="td-color fullwidth left"><a href="{#{ 'sort_name_href' }#}">Name</a></th>
<th class="td-color"><a href="{#{ 'sort_time_href' }#}">Last changed</a></th> <th class="td-color shrink-to-fit left"><a href="{#{ 'sort_name_href' }#}">Size</a></th>
<th class="td-color"></th> <th class="td-color shrink-to-fit left"><a href="{#{ 'sort_time_href' }#}">Last changed</a></th>
<th class="td-color shrink-to-fit left"></th>
</tr> </tr>
<tr><td colspan="5"><strong><hr></strong></td></tr> <tr><td colspan="5"><strong><hr></strong></td></tr>
{% if parent_url %} {% if parent_url %}
<tr> <tr>
<td><img class="list-icom" width="24" height="24" alt="[icon]" src="{{ asset('icons/back.svg') }}" /></td> <td><img class="list-icon icon-back" alt="[icon]"/></td>
<td><a href="{{ parent_url }}">Zurück</a></td> <td><a href="{{ parent_url }}">Zurück</a></td>
<td>-</td> <td>-</td>
<td>-</td> <td>-</td>
<td>-</td> <td>-</td>
<td><img class="list-icon" alt="icon" width="24" height="24" src="/static/icons/empty.svg" /></td> <td><img class="list-icon icon-empty" alt="[icon]"/></td>
</tr> </tr>
{% endif %} {% endif %}
{% for entry in dir_entries %} {% for entry in dir_entries %}
<tr> <tr>
<td>{% if entry.icon %}<img class="list-icon" alt="icon" src="{{ entry.icon }}" width="24" height="24" />{% endif %}</td> <td><img class="list-icon {{ entry.icon }}" alt="[icon]"/></td>
<td><a href="{{ entry.href }}">{{ entry.name }}</a></td> <td><a href="{{ entry.href }}">{{ entry.name }}</a></td>
<td>{{ entry.size }}</td> <td>{{ entry.size }}</td>
<td>{{ entry.mtime }}</td> <td>{{ entry.mtime }}</td>
<td> <td>
{% if entry.delete %} {% if entry.delete %}
<a href="{{ entry.delete }}"<img class="list-icon" alt="[delete]" width="24" height="24" src="/static/icons/delete.svg" /></a> <a href="{{ entry.delete }}"<img class="list-icon icon-delete" alt="[icon]" /></a>
{% else %} {% else %}
<img class="list-icon" alt="" width="24" height="24" src="/static/icons/empty.svg"> <img class="list-icon icon-empty" alt="[icon]" />
{% endif %} {% endif %}
</td> </td>
</tr> </tr>

View File

@ -1,35 +0,0 @@
msgid ""
msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: en de\n"
msgid "webroot-user.name"
msgstr "__webroot-user.name"
msgid "webroot-user.decr"
msgstr "__webroot-user.decr"
msgid "superadmin.name"
msgstr "__superadmin.name"
msgid "superadmin.descr"
msgstr "__superadmin.descr"
msgid "admin.name"
msgstr "__admin.name"
msgid "admin.descr"
msgstr "__admin.descr"
msgid "user.name"
msgstr "__user.name"
msgid "user.descr"
msgstr "__user.descr"
msgid "public.name"
msgstr "__public.name"
msgid "public.descr"
msgstr "__public.descr"

View File

@ -1,173 +0,0 @@
msgid ""
msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: en de\n"
msgid "setupform.section.email"
msgstr "__setupform.section.email"
msgid "setupform.section.site"
msgstr "__setupform.section.site"
msgid "setupform.section.database"
msgstr "__setupform.section.database"
msgid "setupform.section.user"
msgstr "__setupform.section.user"
msgid "setupform.title"
msgstr "__setupform.title"
msgid "command.success"
msgstr "__command.success"
msgid "command.createdb"
msgstr "__command.createdb"
msgid "command.failed"
msgstr "__command.failed"
msgid "command.makemigrations"
msgstr "__command.makemigrations"
msgid "command.migrate"
msgstr "__command.migrate"
msgid "command.populatedb"
msgstr "__command.populatedb"
msgid "button.return-setup"
msgstr "__button.return-setup"
msgid "setupform.env.label"
msgstr "__setupform.env.label"
msgid "setupform.env.help"
msgstr "__setupform.env.help"
msgid "setupform.env.choices.prod"
msgstr "__setupform.env.choices.prod"
msgid "setupform.env.choices.dev"
msgstr "__setupform.env.choices.dev"
msgid "setupform.locale.label"
msgstr "__setupform.locale.label"
msgid "setupform.locale.help"
msgstr "__setupform.locale.help"
msgid "setupform.tempdir.label"
msgstr "__setupform.tempdir.label"
msgid "setupform.site.name.help"
msgstr "__setupform.site.name.help"
msgid "setupform.site.name.label"
msgstr "__setupform.site.name.label"
msgid "setupform.site.root.help"
msgstr "__setupform.site.root.help"
msgid "setupform.site.root.label"
msgstr "__setupform.site.root.label"
msgid "setupform.site.email.label"
msgstr "__setupform.site.email.label"
msgid "setupform.user.username.label"
msgstr "__setupform.user.username.label"
msgid "setupform.user.email.label"
msgstr "__setupform.user.email.label"
msgid "setupform.user.password.label"
msgstr "__setupform.user.password.label"
msgid "setupform.user.confpasswd.label"
msgstr "__setupform.user.confpasswd.label"
msgid "setupform.db.migrate.label"
msgstr "__setupform.db.migrate.label"
msgid "setupform.db.create.label"
msgstr "__setupform.db.create.label"
msgid "setupform.db.mkmigrations.label"
msgstr "__setupform.db.mkmigrations.label"
msgid "setupform.db.backend.label"
msgstr "__setupform.db.backend.label"
msgid "setupform.db.backend.choices.sqlite"
msgstr "__setupform.db.backend.choices.sqlite"
msgid "setupform.db.backend.choices.mysql"
msgstr "__setupform.db.backend.choices.mysql"
msgid "setupform.db.backend.choices.portgesql"
msgstr "__setupform.db.backend.choices.portgesql"
msgid "setupform.db.backend.choices.url"
msgstr "__setupform.db.backend.choices.url"
msgid "setupform.db.database.label"
msgstr "__setupform.db.database.label"
msgid "setupform.db.host.label"
msgstr "__setupform.db.host.label"
msgid "setupform.db.port.label"
msgstr "__setupform.db.port.label"
msgid "setupform.db.user.label"
msgstr "__setupform.db.user.label"
msgid "setupform.db.password.label"
msgstr "__setupform.db.password.label"
msgid "setupform.db.url.label"
msgstr "__setupform.db.url.label"
msgid "setupform.email.backend.label"
msgstr "__setupform.email.backend.label"
msgid "setupform.email.backend.choices.none"
msgstr "__setupform.email.backend.choices.none"
msgid "setupform.email.backend.choices.smtp"
msgstr "__setupform.email.backend.choices.smtp"
msgid "setupform.email.backend.choices.sendmail"
msgstr "__setupform.email.backend.choices.sendmail"
msgid "setupform.email.backend.choices.native"
msgstr "__setupform.email.backend.choices.native"
msgid "setupform.email.backend.choices.dsn"
msgstr "__setupform.email.backend.choices.dsn"
msgid "setupform.email.path.label"
msgstr "__setupform.email.path.label"
msgid "setupform.email.user.label"
msgstr "__setupform.email.user.label"
msgid "setupform.email.password.label"
msgstr "__setupform.email.password.label"
msgid "setupform.email.host.label"
msgstr "__setupform.email.host.label"
msgid "setupform.email.smtp-port.label"
msgstr "__setupform.email.smtp-port.label"
msgid "setupform.email.dsn.label"
msgstr "__setupform.email.dsn.label"
msgid "setupform.email.sender.label"
msgstr "__setupform.email.sender.label"
msgid "setupform.submit"
msgstr "__setupform.submit"