Bladeren bron

Move grid buttons to base list

Colin Powell 2 jaren geleden
bovenliggende
commit
6ffc77a9d5
2 gewijzigde bestanden met toevoegingen van 7 en 12 verwijderingen
  1. 7 1
      vrobbler/templates/base_list.html
  2. 0 11
      vrobbler/templates/scrobbles/long_plays_in_progress.html

+ 7 - 1
vrobbler/templates/base_list.html

@@ -1,4 +1,5 @@
 {% extends "base.html" %}
+{% load urlreplace %}
 
 {% block content %}
 <main class="col-md-9 ms-sm-auto col-lg-10 px-md-4">
@@ -7,6 +8,11 @@
         <h1 class="h2">{% block title %}{% endblock %} </h1>
         <div class="btn-toolbar mb-2 mb-md-0">
             <div class="btn-group me-2">
+                {% if view == 'grid' %}
+                <button type="button" class="btn btn-sm btn-outline-secondary"><a href="?{% urlreplace view='list' %}">List View</a>
+                {% else %}
+                <button type="button" class="btn btn-sm btn-outline-secondary"><a href="?{% urlreplace view='grid' %}">Grid View</a>
+                {% endif %}
                 <button type="button" class="btn btn-sm btn-outline-secondary">Export</button>
             </div>
         </div>
@@ -16,4 +22,4 @@
         {% block lists %}{% endblock %}
     </div>
 </main>
-{% endblock %}
+{% endblock %}

+ 0 - 11
vrobbler/templates/scrobbles/long_plays_in_progress.html

@@ -1,20 +1,9 @@
 {% extends "base_list.html" %}
-{% load urlreplace %}
 
 {% block title %}Long Plays{% endblock %}
 
 {% block lists %}
 <div class="row">
-    <p class="view">
-        <span class="view-links">
-            {% if view == 'grid' %}
-            View as <a href="?{% urlreplace view='list' %}">List</a>
-            {% else %}
-            View as <a href="?{% urlreplace view='grid' %}">Grid</a>
-            {% endif %}
-        </span>
-    </p>
-    <hr />
 
     <h2>In progress</h2>
     {% if view == 'grid' %}