File tree Expand file tree Collapse file tree 9 files changed +39
-37
lines changed Expand file tree Collapse file tree 9 files changed +39
-37
lines changed Original file line number Diff line number Diff line change @@ -15,16 +15,20 @@ class Files extends \Tatter\Files\Config\Files
1515 // Whether to continue instead of throwing exceptions
1616 public $ silent = true ;
1717
18- // The session variable to check for a logged-in user ID
18+ // Session variable to check for a logged-in user ID
1919 public $ userSource = 'logged_in ' ;
2020
2121 // Directory to store files (with trailing slash)
2222 public $ storagePath = ROOTPATH . 'writable/files/ ' ;
2323
24+ // Layouts to use for general access and for administration
25+ public $ layouts = [
26+ 'public ' => 'Tatter\Files\Views\layout ' ,
27+ 'manage ' => 'Tatter\Files\Views\layout ' ,
28+ ];
29+
2430 // Views to display for each function
2531 public $ views = [
26- 'header ' => 'Tatter\Files\Views\templates\header ' ,
27- 'footer ' => 'Tatter\Files\Views\templates\footer ' ,
2832 'dropzone ' => 'Tatter\Files\Views\dropzone\config ' ,
2933 ];
3034
Original file line number Diff line number Diff line change @@ -6,20 +6,24 @@ class Files extends BaseConfig
66{
77 // Whether to continue instead of throwing exceptions
88 public $ silent = true ;
9-
9+
1010 // Session variable to check for a logged-in user ID
1111 public $ userSource = 'logged_in ' ;
12-
12+
1313 // Directory to store files (with trailing slash)
1414 public $ storagePath = ROOTPATH . 'writable/files/ ' ;
15-
15+
16+ // Layouts to use for general access and for administration
17+ public $ layouts = [
18+ 'public ' => 'Tatter\Files\Views\layout ' ,
19+ 'manage ' => 'Tatter\Files\Views\layout ' ,
20+ ];
21+
1622 // Views to display for each function
1723 public $ views = [
18- 'header ' => 'Tatter\Files\Views\templates\header ' ,
19- 'footer ' => 'Tatter\Files\Views\templates\footer ' ,
2024 'dropzone ' => 'Tatter\Files\Views\dropzone\config ' ,
2125 ];
22-
26+
2327 // Default display format; built in are 'cards', 'list', 'select'
2428 public $ defaultFormat = 'cards ' ;
2529}
Original file line number Diff line number Diff line change @@ -187,7 +187,7 @@ public function rename($fileId = null)
187187
188188 // Display only the form for AJAX
189189 if ($ this ->request ->isAJAX ())
190- return view ('Tatter\Files\Views\renameForm ' , $ data );
190+ return view ('Tatter\Files\Views\forms\rename ' , $ data );
191191
192192 // Display the form
193193 return view ('Tatter\Files\Views\rename ' , $ data );
Original file line number Diff line number Diff line change 1- <?= view ($ config ->views ['header ' ]) ?>
1+ <?= $ this ->extend ($ config ->layouts ['public ' ]) ?>
2+ <?= $ this ->section ('main ' ) ?>
23
34 <div class="row">
45 <div class="col">
5758
5859 <?= view ($ config ->views ['dropzone ' ]) ?>
5960
60- <?= view ( $ config -> views [ ' footer ' ], [ ' config ' => $ config ] ) ?>
61+ <?= $ this -> endSection ( ) ?>
Original file line number Diff line number Diff line change 1414
1515 <!-- Bootstrap core CSS -->
1616 <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
17-
17+
1818 <!-- FontAwesome Free -->
1919 <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.2/css/all.css" integrity="sha384-oS3vJWv+0UjzBfQzYUhtDYW+Pj2yciDJxpsK1OYPAYjqT085Qq/1cq5FLXAZQ7Ay" crossorigin="anonymous">
20-
20+
2121 <?= service ('alerts ' )->css () ?>
2222</head>
2323<body>
4343 <?= service ('alerts ' )->display () ?>
4444
4545 <main role="main" class="container my-5">
46+
47+ <?= $ this ->renderSection ('main ' ) ?>
48+
49+ </main><!-- /.container -->
50+
51+ <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
52+ <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
53+
54+ </body>
55+ </html>
Original file line number Diff line number Diff line change 1- <?= view ($ config ->views ['header ' ]) ?>
1+ <?= $ this ->extend ($ config ->layouts ['public ' ]) ?>
2+ <?= $ this ->section ('main ' ) ?>
23
34 <h2>Information</h2>
45
3435endif ;
3536?>
3637
37- <?= view ( $ config -> views [ ' footer ' ] ) ?>
38+ <?= $ this -> endSection ( ) ?>
Original file line number Diff line number Diff line change 1- <?= view ($ config ->views ['header ' ]) ?>
1+ <?= $ this ->extend ($ config ->layouts ['public ' ]) ?>
2+ <?= $ this ->section ('main ' ) ?>
23
34 <div class="row">
45 <div class="col">
78 </div>
89 </div>
910
10- <?= view ( $ config -> views [ ' footer ' ], [ ' config ' => $ config ] ) ?>
11+ <?= $ this -> endSection ( ) ?>
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments