HTMLify
dashboard.html
Views: 506 | Author: abh
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | <!DOCTYPE html> <html> <head> <title>Dashboard - {{ session["user"]["username"] }}</title> {% include "stylesheet.html" %} <style> </style> </head> <body> <h1>Dashboard</h1> {% include "search-bar.html" %} {% include "nav-bar.html" %} <div class="dashboard-links"> <a href="/edit?filepath={{ dir }}">Make new file</a> <a href="/file-upload?dir={{ dir }}">Upload File</a> <a href="/git?dir={{ dir }}">Git Clone</a> </div> <table class="file-table"> <tr> <th>#</th> <th>File Name</th> <th>Edit</th> <th>View</th> <th>Delete</th> </tr> {% for filepath in filepaths[::-1] %} {% if not "/" in filepath %} <tr> <td>{{ filepaths|length + 1 - loop.index }}</td> <td><b>{{ filepath }}</b></td> <td><a href="edit?filepath={{ dir + filepath }}"><button>Edit</button></a></td> <td><a href="/{{ session["user"]["username"] }}/{{ dir + filepath }}"><button>View</button></a></td> <td> <form action="/delete" method="POST" style="display:inline;"> <input type="hidden" name="path" value="{{ session["user"]["username"] }}/{{ dir + filepath }}"> <input type="submit" value="Delete"> </form> </td> </tr> {% else %} <tr> <td>{{ loop.index }}</td> <td><a href="/dashboard?dir={{ dir + filepath }}">{{ filepath }}</a></td> <td></td> <td></td> <td></td> </tr> {% endif %} {% endfor %} </table> </body> </html> |