Browse Source

playlists tags page

sleepytaco 3 years ago
parent
commit
141e1f87e3

+ 28 - 0
apps/main/templates/playlists_home.html

@@ -106,4 +106,32 @@
         </a>
     </div>
 </div>
+<br>
+    <div class="card bg-dark text-white">
+            <div class="card-header">
+                <div class="d-flex justify-content-center">
+                    <h3><span style="border-bottom: 3px #ffffff dashed;">Your Playlist Tags</span></h3>
+                </div>
+            </div>
+            <div class="card-body">
+                <div class="d-flex justify-content-evenly h4">
+                    <div class="w-75">
+                    {% for tag in user.playlist_tags.all %}
+                        <span class="badge rounded-pill bg-warning bg-gradient mb-lg-1 text-black-50">{{ tag.name }}</span>
+                    {% endfor %}
+                    </div>
+                </div>
+
+            </div>
+            <div class="card-footer">
+                <div class="d-flex justify-content-center">
+                    <h3>
+                        <a href="" class="btn btn-success">Filter Playlists by Tags</a>
+                        <a href="" class="btn btn-danger">Edit Tags</a>
+                    </h3>
+                </div>
+            </div>
+
+    </div>
+
 {% endblock %}

+ 1 - 1
apps/main/templates/view_playlist.html

@@ -74,7 +74,7 @@
                 {% endfor %}
                 </span>
             <a data-bs-toggle="collapse" href="#addTagsCollapse" role="button" aria-expanded="false" aria-controls="addTagsCollapse">
-              <span class="badge rounded-pill bg-warning mb-lg-2{% if not playlist_tags %} ms-1{% endif %}"><i class="fas fa-plus"></i>{% if playlist_tags.count == 0 %} add a tag{% endif %}</span>
+              <span class="badge rounded-pill bg-warning mb-lg-2"><i class="fas fa-plus"></i>{% if playlist_tags.count == 0 %} add a tag{% endif %}</span>
             </a>
             </span>
             <div class="collapse" id="addTagsCollapse">

+ 1 - 1
apps/main/views.py

@@ -744,7 +744,7 @@ def get_unused_playlist_tags(request, playlist_id):
 def create_playlist_tag(request, playlist_id):
     tag_name = request.POST["createTagField"]
 
-    if tag_name == 'Pick from existing unused tags':
+    if tag_name.lower() == 'Pick from existing unused tags'.lower():
         return HttpResponse("Can't use that! Try again >_<")
 
     playlist = request.user.profile.playlists.get(playlist_id=playlist_id)