]> git.parisson.com Git - telemeta.git/commitdiff
100 of last revisions in RSS, fix save buttons for item, remove TELEMETA_OAI_HOST_NAM...
authoryomguy <yomguy@parisson.com>
Fri, 24 Jun 2011 16:43:07 +0000 (18:43 +0200)
committeryomguy <yomguy@parisson.com>
Fri, 24 Jun 2011 16:43:07 +0000 (18:43 +0200)
INSTALL.rst
example/sandbox/settings.py
telemeta/templates/telemeta_default/base.html
telemeta/templates/telemeta_default/collection_add.html
telemeta/templates/telemeta_default/collection_edit.html
telemeta/templates/telemeta_default/mediaitem_add.html
telemeta/templates/telemeta_default/mediaitem_copy.html
telemeta/templates/telemeta_default/mediaitem_edit.html
telemeta/templatetags/telemeta_utils.py
telemeta/web/base.py

index 8e423c6f8d0fe3f42bfeed5415b69c3c6be75f24..c91bf13269c5b28282bf473feff1289d927585b2 100644 (file)
@@ -166,6 +166,7 @@ Add the following variables:
 
     TELEMETA_ORGANIZATION =         name of the organization which hosts this installation
     TELEMETA_SUBJECTS =             tuple of subject keywords (used for Dublin Core), such as "Ethnology", etc...
+    TELEMETA_DESCRIPTION =          the description of the site
     TELEMETA_CACHE_DIR =            absolute path to the cache directory that you just created
     TELEMETA_GMAP_KEY =             your Google Map API key
     TELEMETA_DOWNLOAD_ENABLED =     True to enable raw audio data download
@@ -173,7 +174,6 @@ Add the following variables:
     TELEMETA_PUBLIC_ACCESS_PERIOD = number of years above which item files are automagically published
     EMAIL_HOST =                    your default SMTP server
     DEFAULT_FROM_EMAIL =            the default sending email address 
-    TELEMETA_OAI_REPOSITORY_NAME =  the description of the OAI data provider
     
 Just paste the lines below::
 
index f85fe5eb9bc32df297a9b6105179d4e455f40b24..8ff9c2ccebae26dd3a8c09b1be8dd3909e25e38b 100644 (file)
@@ -110,14 +110,13 @@ TEMPLATE_CONTEXT_PROCESSORS = (
 
 TELEMETA_ORGANIZATION = 'Parisson'
 TELEMETA_SUBJECTS = ('test', 'telemeta', 'sandbox')
+TELEMETA_DESCRIPTION = "Telemeta TEST sandbox"
 TELEMETA_GMAP_KEY = '***************************************************************************'
 TELEMETA_DOWNLOAD_ENABLED = True
 TELEMETA_STREAMING_FORMATS = ('mp3', 'ogg')
 TELEMETA_PUBLIC_ACCESS_PERIOD = 51
 AUTH_PROFILE_MODULE = 'telemeta.userprofile'
 
-TELEMETA_OAI_REPOSITORY_NAME = "Telemeta TEST sandbox"
-
 LOGIN_URL = '/login'
 LOGIN_REDIRECT_URL = '/'
 EMAIL_HOST = 'smtp.free.fr'
index c6e544c0b00c624c372296eef745d2f4a8869281..fb423e7ae3a4c8ae729a2df1a02213daf92e3f1d 100644 (file)
@@ -7,7 +7,7 @@
 
 <head>
 <meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
-<title>{%block head_title %}{% organization %} - Telemeta{% endblock %}</title>
+<title>{%block head_title %}{% organization %} - Telemeta - {% description %}{% endblock %}</title>
 
 {% block stylesheets %}
 <link rel="stylesheet" type="text/css" href="{% url telemeta-css "telemeta.css" %}" />
index 49cf82a37b43eda5618d8ddee22303e676705f75..e1f3bed612fb1838b610fb0b9868c09ae591fc11 100644 (file)
@@ -24,7 +24,7 @@
             {% endif %}
         {% endfor %}
         </table>
-        <div align="center">
+        <div align="center" style="margin-top:3ex;">
             <a href="{% url telemeta-collections %}" class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
             <a href="#" class="component_icon button icon_save"
                 onclick="document.getElementById('_addCollectionForm').submit(); return false;">{% trans "Save" %}</a>
index 62331a7d4078ae67185f13fa4e89a005bdbff34e..d4bcb7a61a95cba2df0b06add81e0f6744da5765 100644 (file)
@@ -23,7 +23,7 @@
         {% endif %}
        {% endfor %}
        </table>
-        <div align="center">
+        <div align="center" style="margin-top:3ex;">
          <a href="{% url telemeta-collection-detail collection.public_id %}" class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
          <a href="#" class="component_icon button icon_save"
    onclick="document.getElementById('_editCollectionForm').submit(); return false;">{% trans "Save" %}</a>
index 03615c75a3186cb932f0a1e4a27fe29f5a35b1f0..31aefe87382e5ffe9d3a6ea14eb34593e8e1677c 100644 (file)
@@ -31,7 +31,7 @@
         {% endif %}
        {% endfor %}
        </table>
-       <div align="center">
+       <div align="center" style="margin-top:3ex;">
         <a href="{% url telemeta-items %}"
            class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
         <a href="#" class="component_icon button icon_save"
index 6fb91f95e44999a086fb7897aba02fc4bc907bd3..3a0c060b19ab5a35b124608fb8319961494bf822 100644 (file)
@@ -39,7 +39,7 @@
         {% endif %}
        {% endfor %}
        </table>
-       <div align="center">
+       <div align="center" style="margin-top:3ex;">
            <a href="{% url telemeta-item-detail item.public_id %}" class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
          <a href="#" class="component_icon button icon_save"
             onclick="document.getElementById('_mediaItemCopyForm').submit(); return false;">{% trans "Save" %}</a>
index c916ea7eddbb226afcacbd2013e54dd498692120..eb130a57513464c669a8a0400b0e57ed9d502553 100644 (file)
@@ -37,7 +37,7 @@
     {% endif %}
     {% endfor %}
     </table>
-    <div align="center">
+    <div align="center" style="margin-top:3ex;">
     <a href="{% url telemeta-item-detail item.public_id %}"
         class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
     <a href="#" class="component_icon button icon_save" 
index 048467c60861cf48331adc442bdcd6b30d4a145b..b1fbf716a579d0a4d502e04931f8d5a7c244b4f8 100644 (file)
@@ -268,6 +268,15 @@ render_flatpage.is_safe = True
 def organization():
     return settings.TELEMETA_ORGANIZATION
 
+@register.simple_tag
+def description():
+    try:
+        description = settings.TELEMETA_OAI_REPOSITORY_NAME
+    except:
+        description = settings.TELEMETA_DESCRIPTION
+        pass
+    return description
+
 class SetVarNode(template.Node):
  
     def __init__(self, var_name, var_value):
index c4a4d7cd93cdee1dff7a842fa3dd4282dea1d4b8..10d2f17a7850160501afa222fe9b3d2e7c2fe44d 100644 (file)
@@ -1196,7 +1196,6 @@ class ProfileView(object):
         return render(request, template, {'forms': forms, 'usr': user, 'user_hidden_fields': user_hidden_fields})
 
 
-
 class LastestRevisionsFeed(Feed):
     "the RSS feed of the lastest revisions"
         
@@ -1206,9 +1205,10 @@ class LastestRevisionsFeed(Feed):
     title = organization + ' - Telemeta - ' + ugettext('Last changes')
     link = ""
     description = ' '.join([subject.decode('utf-8') for subject in subjects])
+    n_items = 100
 
     def items(self):
-        return get_revisions(25)
+        return get_revisions(self.n_items)
 
     def item_title(self, r):
         element = r['element']