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.

65 lines
2.5 KiB

  1. <div class="row">
  2. <!-- Add Download -->
  3. <div class="col-md-6">
  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-6">
  25. <div class='blogPost'>
  26. <h1 class="text-center">Downloads</h1>
  27. <div class="">
  28. <table class="table table-striped">
  29. <thead class="thead-dark">
  30. <tr>
  31. <td>Download Name</td>
  32. <td>File</td>
  33. <td>Download Count</td>
  34. <td>Delete</td>
  35. </tr>
  36. </thead>
  37. <tbody>
  38. {for download in downloads}
  39. <tr>
  40. <td>
  41. {download.name}
  42. </td>
  43. <td>
  44. {download.file}
  45. </td>
  46. <td>
  47. {download.download_count}
  48. </td>
  49. <td>
  50. <form action="/admin/downloads/" method ="post" >
  51. <input type="submit" name="submit" value="Delete" class="btn btn-secondary"/>
  52. <input type='hidden' name='delete_download' value='{download.download_id}' />
  53. </form>
  54. </td>
  55. </tr>
  56. {/for}
  57. </tbody>
  58. </table>
  59. </div>
  60. </div>
  61. </div>
  62. </div>