]> git.parisson.com Git - telemeta.git/commitdiff
fix various buttons
authorGuillaume Pellerin <yomguy@parisson.com>
Thu, 18 Dec 2014 22:44:19 +0000 (23:44 +0100)
committerGuillaume Pellerin <yomguy@parisson.com>
Thu, 18 Dec 2014 22:44:19 +0000 (23:44 +0100)
telemeta/templates/telemeta/resource_detail_dc.html
telemeta/templates/telemeta/search_results.html

index 98e31a59d7fa574452447e96b1245424d833cd0b..dcd94981df0fbd9cb69f7d141f6b45048c3e0ead 100644 (file)
@@ -8,15 +8,26 @@
 {% with resource|to_dublincore as resource %}
 {% include "telemeta/inc/dublincore.html" %}
 {% endwith %}
+
+    {% block dublincore %}
+    <a href="{% url "telemeta-resource-detail" type resource.public_id %}" style="float:left;margin-top:0.5em;margin-bottom:1em">
+      <button type="button" class="btn btn-default">
+         <span class="glyphicon glyphicon-arrow-left"></span> {% trans "Normal View" %}
+      </button>
+    </a>
+    {% endblock dublincore %}
+
 {% endblock %}
 
 {% block delete %}
- <a class="component_icon button icon_previous" style="float:left;margin-top:0.5em;margin-bottom:1em" href="{% url "telemeta-resource-detail" type resource.public_id %}">{% trans "Normal View" %}</a>
 {% if user.is_authenticated and perms.telemeta.delete_mediaresource %}
- <a href="#" onclick="if(confirm(gettrans('delete the resource permanently?'))){window.location.href='{% url "telemeta-resource-delete" type resource.public_id %}';};return false;"
-        class="component_icon button icon_delete" style="float:right;margin-top:0.5em;margin-bottom:1em">{% trans "Delete" %}</a>
+    <a href="#" onclick="if(confirm(gettrans('delete the item permanently?'))){window.location.href='{% url "telemeta-resource-delete" type resource.public_id %}';};return false;" style="float:right;margin-top:0.5em;margin-bottom:1em">
+      <button type="button" class="btn btn-default">
+        <span class="glyphicon glyphicon-trash"></span> {% trans "Delete" %}
+      </button>
+    </a>
 {% endif %}
-{% endblock %}
+{% endblock delete %}
 
 {% else %}
     <p>{% trans "No such resource" %}</p>
index fa0fa270ff132e257d4376d010d071a103ef97db..e5552b8ace85da838c3f7072a3d49608bc014a5e 100644 (file)
 {% endblock %}
 
 {% block title_buttons %}
+  <div class="btn-group">
     {% ifequal type 'items' %}
-     <a href="{% url "telemeta-search-type" "items" %}?{{criteria|with_no_sound|build_query_string}}" class="component_icon button icon_filter">{% trans "All" %}</a>
-     <a href="{% url "telemeta-search-type" "items" %}?{{criteria|with_sound|build_query_string}}" class="component_icon button icon_filter">{% trans "Sounds" %}</a>
+    <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
+      <span class="glyphicon glyphicon-filter"></span> {% trans "Filters" %} <span class="caret"></span>
+    </button>
+    <ul class="dropdown-menu" role="menu">
+      <li><a href="{% url "telemeta-search-type" "items" %}?{{criteria|with_no_sound|build_query_string}}" class="">{% trans "All" %}</a></li>
+      <li><a href="{% url "telemeta-search-type" "items" %}?{{criteria|with_sound|build_query_string}}">{% trans "Sounds" %}</a></li>
+    </ul>
     {% endifequal %}
     {% ifequal type 'collections' %}
-     <a href="{% url "telemeta-search-type" "collections" %}?{{criteria|with_no_sound|build_query_string}}" class="component_icon button icon_filter">{% trans "All" %}</a>
-     <a href="{% url "telemeta-search-type" "collections" %}?{{criteria|with_sound|build_query_string}}" class="component_icon button icon_filter">{% trans "Sounds" %}</a>
+    <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
+      <span class="glyphicon glyphicon-filter"></span> {% trans "Filters" %} <span class="caret"></span>
+    </button>
+    <ul class="dropdown-menu" role="menu">
+      <li><a href="{% url "telemeta-search-type" "collections" %}?{{criteria|with_no_sound|build_query_string}}" class="">{% trans "All" %}</a></li>
+      <li><a href="{% url "telemeta-search-type" "collections" %}?{{criteria|with_sound|build_query_string}}">{% trans "Sounds" %}</a></li>
+    </ul>
     {% endifequal %}
+  </div>
 {% endblock %}
 
 {% block content %}