Commit 588026ad authored by Raphael Remorosa's avatar Raphael Remorosa

'add into playlist' in search is only visible to users

parent 787d171a
...@@ -10,10 +10,6 @@ ...@@ -10,10 +10,6 @@
Source: Local</p> Source: Local</p>
{% endblock %} {% endblock %}
<!-- ... -->
<!-- Add if statement to show ONLY IF a user is logged in -->
<!-- ... -->
{% block content %} {% block content %}
{% for i in results %} {% for i in results %}
...@@ -29,18 +25,20 @@ ...@@ -29,18 +25,20 @@
</div> </div>
<!-- ... --> <!-- ... -->
<!-- ... --> {% if request.user.is_authenticated %}
<div class="w3-dropdown-hover"> <!-- ... -->
<button id="search_type" class="w3-button" style="width:200px; text-align: left;"><i class="fa fa-caret-down"></i> </button> <div class="w3-dropdown-hover">
<div class="w3-dropdown-content w3-bar-block w3-card-4"> <button id="search_type" class="w3-button" style="width:200px; text-align: left;"><i class="fa fa-caret-down"></i> </button>
<button class=" w3-bar-item w3-button">Update existing playlist</button> <div class="w3-dropdown-content w3-bar-block w3-card-4">
<button onclick="alert('{{type}} id is {{i.id}}')">Show {{type}}</button> <button class=" w3-bar-item w3-button">Update existing playlist</button>
<button class=" w3-bar-item w3-button">Create new playlist</button> <button onclick="alert('{{type}} id is {{i.id}}')">Show {{type}}</button>
<button class=" w3-bar-item w3-button">Create new playlist</button>
</div>
</div> </div>
</div> <!-- ... -->
<!-- ... --> {% endif %}
<!-- ... --> <!-- ... -->
{% endif %} {% endif %}
...@@ -60,18 +58,20 @@ ...@@ -60,18 +58,20 @@
{% endfor %} {% endfor %}
</div> </div>
<!-- ... --> <!-- ... -->
<!-- ... --> {% if request.user.is_authenticated %}
<div class="w3-dropdown-hover"> <!-- ... -->
<button id="search_type" class="w3-button" style="width:200px; text-align: left;"><i class="fa fa-caret-down"></i> </button> <div class="w3-dropdown-hover">
<div class="w3-dropdown-content w3-bar-block w3-card-4"> <button id="search_type" class="w3-button" style="width:200px; text-align: left;"><i class="fa fa-caret-down"></i> </button>
<button class=" w3-bar-item w3-button">Update existing playlist</button> <div class="w3-dropdown-content w3-bar-block w3-card-4">
<button onclick="alert('{{type}} id is {{i.id}}')">Show {{type}}</button> <button class=" w3-bar-item w3-button">Update existing playlist</button>
<button class=" w3-bar-item w3-button">Create new playlist</button> <button onclick="alert('{{type}} id is {{i.id}}')">Show {{type}}</button>
<button class=" w3-bar-item w3-button">Create new playlist</button>
</div>
</div> </div>
</div> <!-- ... -->
<!-- ... --> {% endif %}
<!-- ... --> <!-- ... -->
{% endif %} {% endif %}
...@@ -88,18 +88,20 @@ ...@@ -88,18 +88,20 @@
Year: {{i.album.year}} </p> Year: {{i.album.year}} </p>
</div> </div>
<!-- ... --> <!-- ... -->
<!-- ... --> {% if request.user.is_authenticated %}
<div class="w3-dropdown-hover"> <!-- ... -->
<button id="search_type" class="w3-button" style="width:200px; text-align: left;"><i class="fa fa-caret-down"></i> </button> <div class="w3-dropdown-hover">
<div class="w3-dropdown-content w3-bar-block w3-card-4"> <button id="search_type" class="w3-button" style="width:200px; text-align: left;"><i class="fa fa-caret-down"></i> </button>
<button class=" w3-bar-item w3-button">Update existing playlist</button> <div class="w3-dropdown-content w3-bar-block w3-card-4">
<button onclick="alert('{{type}} id is {{i.id}}')">Show {{type}}</button> <button class=" w3-bar-item w3-button">Update existing playlist</button>
<button class=" w3-bar-item w3-button">Create new playlist</button> <button onclick="alert('{{type}} id is {{i.id}}')">Show {{type}}</button>
<button class=" w3-bar-item w3-button">Create new playlist</button>
</div>
</div> </div>
</div> <!-- ... -->
<!-- ... --> {% endif %}
<!-- ... --> <!-- ... -->
{% endif %} {% endif %}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment