Personal blog written from scratch using Node.js, Bootstrap, and MySQL. https://jrtechs.net
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

69 lines
2.7 KiB

  1. <div class="row">
  2. <!-- Add Download -->
  3. <div class="col-md-4">
  4. <div class="blogPost">
  5. <h1 class="text-center">Add Download</h1>
  6. <form action="/admin/downloads/" method ="post" class="p-2">
  7. <div class="form-group">
  8. <input class="form-control" type="text" name="add_download_name" required>
  9. <label>Download Name</label>
  10. </div>
  11. <div class="form-group">
  12. <input class="form-control" type="text" name="add_download_file" required>
  13. <label>File name</label>
  14. </div>
  15. <div class="text-center">
  16. <input type="submit" name="add_download" value="Add Download"
  17. class="btn btn-lg btn-secondary"/>
  18. </div>
  19. </form>
  20. </div>
  21. <br>
  22. </div>
  23. <!-- Downloads -->
  24. <div class="col-md-8">
  25. <div class='blogPost'>
  26. <h1 class="text-center">Downloads</h1>
  27. <div class="">
  28. <table class="table table-responsive table-striped">
  29. <thead class="thead-dark">
  30. <tr>
  31. <td>Download Name</td>
  32. <td>File</td>
  33. <td>URL</td>
  34. <td>Download Count</td>
  35. <td>Delete</td>
  36. </tr>
  37. </thead>
  38. <tbody>
  39. {for download in downloads}
  40. <tr>
  41. <td>
  42. {download.name}
  43. </td>
  44. <td class="w-25">
  45. https://jrtechs.net/downloads/{download.name}
  46. </td>
  47. <td>
  48. {download.file}
  49. </td>
  50. <td>
  51. {download.download_count}
  52. </td>
  53. <td>
  54. <form action="/admin/downloads/" method ="post" >
  55. <input type="submit" name="submit" value="Delete" class="btn btn-secondary"/>
  56. <input type='hidden' name='delete_download' value='{download.download_id}' />
  57. </form>
  58. </td>
  59. </tr>
  60. {/for}
  61. </tbody>
  62. </table>
  63. </div>
  64. </div>
  65. </div>
  66. </div>