]> git.parisson.com Git - telemeta.git/commitdiff
Hide button back to search result when no precedent search
authormathieu <mathieu.boye28@gmail.com>
Fri, 13 May 2016 15:14:39 +0000 (17:14 +0200)
committermathieu <mathieu.boye28@gmail.com>
Fri, 13 May 2016 15:14:39 +0000 (17:14 +0200)
telemeta/templates/search/addplaylist.html
telemeta/templates/search/confirmation_add_playslist.html

index 0d184bf0ae355c0af09599f21446d39a5466fc0f..f185a9dbfe4c9becb41afedc446e650c16a111c9 100644 (file)
       {% for item in selected_items_list %}
           <input type="hidden" name="item_id" value="{{item.id}}"/>
       {% endfor %}
+    {% if lastquerypath %}
       <input type="hidden" name="lastquerypath" value="{{lastquerypath}}"/>
-      <div class="row">
+      {% endif %}
+        <div class="row">
+          {% if lastquerypath %}
           <div class="col-md-4"><a style="margin-top:10px;width:100%" href="{{lastquerypath}}" id="btn" class="btn btn-default">return to search results</a></div>
-          <div class="col-md-4 col-md-offset-3"><button style="margin-top:10px;width:100%" type="submit" id="btn" class="btn btn-default">{% trans "Add to Playlist" %}</button></div>
+              <div class="col-md-4 col-md-offset-3"><button style="margin-top:10px;width:100%" type="submit" id="btn" class="btn btn-default">{% trans "Add to Playlist" %}</button></div>
+          {% else %}
+              <div class="col-md-4 col-md-offset-7"><button style="margin-top:10px;width:100%" type="submit" id="btn" class="btn btn-default">{% trans "Add to Playlist" %}</button></div>
+
+          {% endif %}
       </div>
   </form>
 {% endblock %}
index 0804447edd3056e12937ff60a15a9f995fdf8150..ebadf7ec16ac857efd4937e757c702f24f293247 100644 (file)
@@ -31,5 +31,7 @@
         {% endifequal %}
         </tbody>
     </table></br>
+    {% if lastquerypath %}
     <a style="margin-top:10px" href="{{lastquerypath}}" id="btn" class="btn btn-default">return to search results</a>
+    {% endif %}
 {% endblock %}
\ No newline at end of file