File tree 9 files changed +39
-37
lines changed 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
15
15
// Whether to continue instead of throwing exceptions
16
16
public $ silent = true ;
17
17
18
- // The session variable to check for a logged-in user ID
18
+ // Session variable to check for a logged-in user ID
19
19
public $ userSource = 'logged_in ' ;
20
20
21
21
// Directory to store files (with trailing slash)
22
22
public $ storagePath = ROOTPATH . 'writable/files/ ' ;
23
23
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
+
24
30
// Views to display for each function
25
31
public $ views = [
26
- 'header ' => 'Tatter\Files\Views\templates\header ' ,
27
- 'footer ' => 'Tatter\Files\Views\templates\footer ' ,
28
32
'dropzone ' => 'Tatter\Files\Views\dropzone\config ' ,
29
33
];
30
34
Original file line number Diff line number Diff line change @@ -6,20 +6,24 @@ class Files extends BaseConfig
6
6
{
7
7
// Whether to continue instead of throwing exceptions
8
8
public $ silent = true ;
9
-
9
+
10
10
// Session variable to check for a logged-in user ID
11
11
public $ userSource = 'logged_in ' ;
12
-
12
+
13
13
// Directory to store files (with trailing slash)
14
14
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
+
16
22
// Views to display for each function
17
23
public $ views = [
18
- 'header ' => 'Tatter\Files\Views\templates\header ' ,
19
- 'footer ' => 'Tatter\Files\Views\templates\footer ' ,
20
24
'dropzone ' => 'Tatter\Files\Views\dropzone\config ' ,
21
25
];
22
-
26
+
23
27
// Default display format; built in are 'cards', 'list', 'select'
24
28
public $ defaultFormat = 'cards ' ;
25
29
}
Original file line number Diff line number Diff line change @@ -187,7 +187,7 @@ public function rename($fileId = null)
187
187
188
188
// Display only the form for AJAX
189
189
if ($ this ->request ->isAJAX ())
190
- return view ('Tatter\Files\Views\renameForm ' , $ data );
190
+ return view ('Tatter\Files\Views\forms\rename ' , $ data );
191
191
192
192
// Display the form
193
193
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 ' ) ?>
2
3
3
4
<div class="row">
4
5
<div class="col">
57
58
58
59
<?= view ($ config ->views ['dropzone ' ]) ?>
59
60
60
- <?= view ( $ config -> views [ ' footer ' ], [ ' config ' => $ config ] ) ?>
61
+ <?= $ this -> endSection ( ) ?>
Original file line number Diff line number Diff line change 14
14
15
15
<!-- Bootstrap core CSS -->
16
16
<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
+
18
18
<!-- FontAwesome Free -->
19
19
<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
+
21
21
<?= service ('alerts ' )->css () ?>
22
22
</head>
23
23
<body>
43
43
<?= service ('alerts ' )->display () ?>
44
44
45
45
<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 ' ) ?>
2
3
3
4
<h2>Information</h2>
4
5
34
35
endif ;
35
36
?>
36
37
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 ' ) ?>
2
3
3
4
<div class="row">
4
5
<div class="col">
7
8
</div>
8
9
</div>
9
10
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