view_playlist_settings.html 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. {% extends 'base.html' %}
  2. {% load humanize %}
  3. {% load static %}
  4. {% block content %}
  5. <div id="view_playlist">
  6. <br>
  7. {% if playlist.is_user_owned %}
  8. <div class="table-responsive" id="videos-div">
  9. <div id="settings-status-div" class="text-dark">
  10. </div>
  11. <div class="card bg-dark text-white mb-3">
  12. <div class="card-body">
  13. <div id="settings-form">
  14. <div class="row">
  15. <div class="col-sm-3">
  16. <h6 class="mb-0">Playlist Name</h6>
  17. </div>
  18. <div class="col-sm-9 text-white-50">
  19. <input type="text" class="form-control" name="playlistTitle" value="{{ playlist.name }}">
  20. </div>
  21. </div>
  22. <hr>
  23. <div class="row">
  24. <div class="col-sm-3">
  25. <h6 class="mb-0">Created By</h6>
  26. </div>
  27. <div class="col-sm-9 text-white-50">
  28. <input type="text" class="form-control" id="fullname" value="{{ playlist.channel_name }}" disabled>
  29. </div>
  30. </div>
  31. <hr>
  32. <div class="row">
  33. <div class="col-sm-3">
  34. <h6 class="mb-0">Playlist Description</h6>
  35. </div>
  36. <div class="col-sm-9 text-white-50">
  37. <textarea class="form-control form-text" name="playlistDesc" rows="6" placeholder="Enter a playlist description here!">{{ playlist.description }}</textarea>
  38. </div>
  39. </div>
  40. <hr>
  41. <div class="row">
  42. <div class="col-sm-3">
  43. <h6 class="mb-0">Playlist Privacy</h6>
  44. </div>
  45. <div class="col-sm-9 text-white-50">
  46. <select class="form-select w-25" name="playlistPrivacy">
  47. <option value="Public" {% if not playlist.is_private_on_yt %}selected{% endif %}>Public</option>
  48. <option value="Private" {% if playlist.is_private_on_yt %}selected{% endif %}>Private</option>
  49. </select>
  50. </div>
  51. </div>
  52. <hr>
  53. <div class="row">
  54. <div class="col-sm-3">
  55. <h6 class="mb-0">Preferences</h6>
  56. </div>
  57. <div class="col-sm-9 text-white">
  58. <div class="mb-3 form-check form-switch">
  59. <input class="form-check-input" name="hide videos" type="checkbox" id="flexSwitchCheckChecked" checked>
  60. <label class="form-check-label" for="flexSwitchCheckChecked">Hide deleted/private videos</label>
  61. </div>
  62. <div class="mb-3 form-check form-switch">
  63. <input class="form-check-input" name="confirm before deleting" type="checkbox" id="flexSwitchCheckChecked" checked>
  64. <label class="form-check-label" for="flexSwitchCheckChecked">Confirm before deleting</label>
  65. </div>
  66. </div>
  67. </div>
  68. <hr>
  69. <div class="row">
  70. <div class="col-sm-3">
  71. <h6 class="mb-0">Danger Zone</h6>
  72. </div>
  73. <div class="col-sm-9 text-white-50">
  74. <button type="button" class="btn btn-outline-danger">Delete Playlist From YouTube</button>
  75. </div>
  76. </div>
  77. </div>
  78. </div>
  79. </div>
  80. <div class="d-flex justify-content-center">
  81. <div class="btn-group">
  82. <a href="{% url 'playlist' playlist.playlist_id %}" class="btn btn-secondary me-2">Back</a>
  83. <button href="#navbar" hx-post="{% url 'update_playlist_settings' playlist.playlist_id %}" hx-include="[id='settings-form']" hx-target="#settings-status-div"
  84. type="button" class="btn btn-success me-2">Save</button>
  85. </div>
  86. </div>
  87. </div>
  88. {% else %}
  89. <div class="table-responsive" id="videos-div">
  90. <div id="settings-status-div" class="text-dark">
  91. </div>
  92. <div class="card bg-dark text-white mb-3">
  93. <div class="card-body">
  94. <div id="settings-form">
  95. <div class="row">
  96. <div class="col-sm-3">
  97. <h6 class="mb-0">Playlist Name on YouTube</h6>
  98. </div>
  99. <div class="col-sm-9 text-white-50">
  100. <input type="text" class="form-control" name="username" id="username" value="{{ playlist.name }}" disabled>
  101. </div>
  102. </div>
  103. <hr>
  104. <div class="row">
  105. <div class="col-sm-3">
  106. <h6 class="mb-0">Playlist User Label</h6>
  107. </div>
  108. <div class="col-sm-9 text-white-50">
  109. <input type="text" class="form-control" name="user_label" id="user_label" placeholder="Enter a personal label you want to identify this playlist with" value="{{ playlist.user_label }}">
  110. </div>
  111. </div>
  112. <hr>
  113. <div class="row">
  114. <div class="col-sm-3">
  115. <h6 class="mb-0">Created By</h6>
  116. </div>
  117. <div class="col-sm-9 text-white-50">
  118. <input type="text" class="form-control" id="fullname" value="{{ playlist.channel_name }}" disabled>
  119. </div>
  120. </div>
  121. <hr>
  122. <div class="row">
  123. <div class="col-sm-3">
  124. <h6 class="mb-0">Preferences</h6>
  125. </div>
  126. <div class="col-sm-9 text-white">
  127. <div class="mb-3 form-check form-switch">
  128. <input class="form-check-input" name="hide videos" type="checkbox" id="flexSwitchCheckChecked" checked>
  129. <label class="form-check-label" for="flexSwitchCheckChecked">Hide deleted/private videos</label>
  130. </div>
  131. <div class="mb-3 form-check form-switch">
  132. <input class="form-check-input" name="confirm before deleting" type="checkbox" id="flexSwitchCheckChecked" checked>
  133. <label class="form-check-label" for="flexSwitchCheckChecked">Confirm before deleting</label>
  134. </div>
  135. </div>
  136. </div>
  137. <hr>
  138. <div class="row">
  139. <div class="col-sm-3">
  140. <h6 class="mb-0">Danger Zone</h6>
  141. </div>
  142. <div class="col-sm-9 text-white-50">
  143. <button type="button" class="btn btn-outline-danger">Remove Playlist From UnTube</button>
  144. </div>
  145. </div>
  146. </div>
  147. </div>
  148. </div>
  149. <div class="d-flex justify-content-center">
  150. <div class="btn-group">
  151. <a href="{% url 'playlist' playlist.playlist_id %}" class="btn btn-secondary me-2">Back</a>
  152. <button href="#navbar" hx-post="{% url 'update_playlist_settings' playlist.playlist_id %}" hx-include="[id='settings-form']" hx-target="#settings-status-div"
  153. type="button" class="btn btn-success me-2">Save</button>
  154. </div>
  155. </div>
  156. </div>
  157. {% endif %}
  158. </div>
  159. {% endblock %}