]> git.parisson.com Git - telemeta.git/commitdiff
fix autocode, fix more buttons 1.5.0rc4
authorGuillaume Pellerin <yomguy@parisson.com>
Thu, 18 Dec 2014 23:22:00 +0000 (00:22 +0100)
committerGuillaume Pellerin <yomguy@parisson.com>
Thu, 18 Dec 2014 23:22:00 +0000 (00:22 +0100)
telemeta/templates/telemeta/collection_detail_dc.html
telemeta/templates/telemeta/instrument_edit_value.html
telemeta/templates/telemeta/login.html
telemeta/templates/telemeta/mediaitem_detail.html
telemeta/templates/telemeta/mediaitem_detail_dc.html
telemeta/templates/telemeta/resource_detail.html
telemeta/templates/telemeta/resource_detail_dc.html
telemeta/views/core.py

index f8a2ff1f51023f84b4dff153d35e76540199218f..cda7b9c88372e6e3b5c8115b8a8fbc993c823a45 100644 (file)
@@ -1,32 +1,31 @@
-{% extends "telemeta/base.html" %}
+{% extends "telemeta/collection_detail.html" %}
 {% load telemeta_utils %}
 {% load i18n %}
 
-{% block head_title %}{% trans "Collection" %}{{collection|prepend:': '}} - {{ block.super }}{% endblock %}
-
-{% if collection %}
-{% block title %}
-<h1>Collection: {{ collection }}</h1>
-{% endblock %}
-{% block title_buttons %}
-<a class="component_icon button icon_previous" href="{% url "telemeta-collection-detail" collection.public_id %}">{% trans "Normal View" %}</a>
-{% endblock %}
-
 {% block content %}
+
 {% with collection|to_dublincore as resource %}
 {% include "telemeta/inc/dublincore.html" %}
 {% endwith %}
+
+    {% block dublincore %}
+    <a href="{% url "telemeta-collection-detail" collection.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" href="{% url "telemeta-collection-detail" collection.public_id %}">{% trans "Normal View" %}</a>
 {% if user.is_authenticated and perms.telemeta.delete_mediacollection %}
- <a href="#" onclick="if(confirm(gettrans('delete the collection permanently?'))){window.location.href='{% url "telemeta-collection-delete" collection.public_id %}';};return false;"
-        class="component_icon button icon_delete" style="float:right;margin-top:0.5em;margin-bottom:1em">{% trans "Delete" %}</a>
-{% endif %}
-{% endblock %}
 
-{% else %}
-    <p>{% trans "No such collection" %}</p>
+    <a href="#" onclick="if(confirm(gettrans('delete the collection permanently?'))){window.location.href='{% url "telemeta-collection-delete" collection.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 %}
 
index d85d023899c948c3f910243c8f2a3424d968b26a..d51f76786fbc8b71a6e5dd26e93e92496315b3d1 100644 (file)
@@ -61,7 +61,7 @@ $(document).ready(function(){
    </div>
   </fieldset>
  </form>
+
 
 
   <br style="clear: right"/>
index 8b44621357a8e13d246e83f26cb0e06b5e983e6c..5fecb1335cffe2dbf0a88130dc375f872cbb0eea 100644 (file)
@@ -31,7 +31,7 @@ $(document).ready(function() {
 
 <table>
 <tr>
-       <td><label>{{ form.username.label_tag }}</label></td>
+    <td><label>{{ form.username.label_tag }}</label></td>
        <td>{{ form.username }}</td>
 </tr>
 <tr>
index fe47e4901ae41d95763f0f7e152fedde4b7dccdf..91033ad9b923aa4f1e364d5150400df50b02e467 100644 (file)
@@ -35,7 +35,7 @@
         soundManager.debugMode = false;
         soundManager.allowPolling = true;
         soundManager.useHTML5Audio = true;
-        soundManager.preferFlash = true;
+        soundManager.preferFlash = false;
 
         //initializing the visualizers to be passed to the player
         {% block graphers %}
index 896dd6db8c9d8a263925ad35e1ec991ff2c471f5..75d6b78d1d3e2c24cd450d2420130b1b275a0a56 100644 (file)
@@ -9,15 +9,28 @@
 {% include "telemeta/inc/dublincore.html" %}
 {% endwith %}
 {% endblock %}
+
+    {% block dublincore %}
+    <a href="{% url "telemeta-item-detail" item.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 %}
+
 {% else %}
     <p>{% trans "No such item" %}</p>
 {% endif %}
 
 {% block delete %}
-<a class="component_icon button icon_previous" style="float:left;margin-top:0.5em;margin-bottom:1em" href="{% url "telemeta-item-detail" item.public_id %}">{% trans "Normal View" %}</a>
+
 {% if user.is_authenticated and perms.telemeta.delete_mediaitem %}
- <a href="#" onclick="if(confirm(gettrans('delete the item permanently?'))){window.location.href='{% url "telemeta-item-delete" item.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-item-delete" item.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 %}
 
index 6ff1d2e562f46d447a9d3c2d0426c8b634779f6a..69568be060c9468d884929798858b573220cd991 100644 (file)
@@ -122,13 +122,11 @@ jQuery(document).ready(function(){
 
 {% block delete %}
 {% if user.is_authenticated and perms.telemeta.delete_mediaresource %}
-
     <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 delete %}
 
index dcd94981df0fbd9cb69f7d141f6b45048c3e0ead..a31231bf4762dba7faa865f62296a5fa1eddb0a4 100644 (file)
@@ -21,7 +21,7 @@
 
 {% block delete %}
 {% if user.is_authenticated and perms.telemeta.delete_mediaresource %}
-    <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">
+    <a href="#" onclick="if(confirm(gettrans('delete the resource 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>
index 58911bc70aab277eacc24aa4d58e98dc49ce324f..e69e609755279057f10c00f8341cdc9831e235f5 100644 (file)
@@ -275,7 +275,7 @@ def auto_code(collection):
     if suffixes:
         return collection.code + '_' + str(max(suffixes)+1)
     else:
-        return collection.code + '_'
+        return collection.code + '_001'
 
 
 def get_room(content_type=None, id=None, name=None):