]> git.parisson.com Git - telemeta.git/commitdiff
cleanup home, get current playlist for resource adding
authoryomguy <yomguy@parisson.com>
Tue, 15 Mar 2011 17:21:46 +0000 (18:21 +0100)
committeryomguy <yomguy@parisson.com>
Tue, 15 Mar 2011 17:21:46 +0000 (18:21 +0100)
telemeta/htdocs/css/telemeta.css
telemeta/templates/telemeta_default/home.html
telemeta/web/base.py

index 150725477ee58683fc50f14de5c09b473a9cda12..49dbcd211eda49d8a2ad2c662f9903e0fa396277 100644 (file)
@@ -75,8 +75,8 @@ a img { border: none; }
 }
 
 #content h2 {
-    background-color: #6a0307;
-    color: #FFF;
+    color: #6a0307;
+    border-bottom: 1px solid #6a0307;
     width: 75%;
     padding: 0.3em 0.3em 0.3em 0.5em;
 }
index 474929ad84fc1daa4b8157458c3b672a3b6a3d6c..07cb55ba705cab70ce3b52ca3ee51f9b5469cb41 100644 (file)
@@ -9,7 +9,7 @@
 <h3>Playlists</h3>
  <form method="POST" action="">{% csrf_token %}
   {% for playlist in playlists %}
-  <h2>{{ playlist.name }}</h2>
+  <h2>{{ playlist.name }} {% if playlist.is_current %}(current){% endif %}</h2>
     <table class="listing" width="75%">
         <tr>
             <th class="highlight">{% trans "Title" %}</th>
@@ -22,7 +22,7 @@
         </tr>
         
         {% for resource in playlist.resources %}
-        <tr>
+        <tr {% if not forloop.counter0|divisibleby:"2" %}class="odd"{% endif %}>
             <td>
             {% if resource.type == "item" %}
             <a href="{% url telemeta-item-detail resource.element.public_id %}">{{ resource.element }}</a>
@@ -75,7 +75,7 @@
         <th>User</th>
       </tr>
     {% for r in revisions %}
-     <tr>
+     <tr {% if not forloop.counter0|divisibleby:"2" %}class="odd"{% endif %}>
         <td>{{ r.revision.time }}</td>
         <td>{{ r.revision.element_type }}</td>
         <td>
index d151e82e95c293cfcef0a34f796b2ec71e22fb28..f555048f9c46f75385f01b1626dccabb99737816 100644 (file)
@@ -832,7 +832,7 @@ class WebView(object):
         if isinstance(playlist_resource, dict):
             m = PlaylistResource()
             m.public_id = playlist_resource['public_id']
-            m.playlist = Playlist.objects.get(public_id=playlist_resource['playlist_id'])
+            m.playlist = Playlist.objects.get(is_current=True, author=request.user)
             m.resource_type = playlist_resource['resource_type']
             m.resource_id = playlist_resource['resource_id']
             m.save()