@import java.util.ArrayList @args (ArrayList files, String path) @css => { <link href="/css/files.css" rel="stylesheet"> } @js => { <script>const path = "@path";</script> <script src="/js/imagePreview.js"></script> <script src="/js/files.js"></script> } @layout.template(files.size() + " Files", css, js) -> { <div class="drop" id="drop"> <h2>/@path</h2> <table id="table"> <thead> <tr> <th>Name</th> <th>Size</th> <th>Last modified</th> </tr> </thead> <tbody> <tr data-href="../"> <td>../</td> <td></td> <td></td> </tr> @for (String[] fileArray : files) { @if (fileArray[3] == "true") { <tr data-href="@fileArray[0]"> <td>@fileArray[0]</td> <td>@fileArray[1]</td> <td>@fileArray[2]</td> </tr> } else { <tr data-path="@fileArray[0]"> <td>@fileArray[0]</td> <td>@fileArray[1]</td> <td>@fileArray[2]</td> </tr> } } </tbody> </table> </div> }