]> git.parisson.com Git - teleforma.git/commitdiff
add course templates and styles
authoryomguy <yomguy@parisson.com>
Wed, 28 Mar 2012 11:10:01 +0000 (13:10 +0200)
committeryomguy <yomguy@parisson.com>
Wed, 28 Mar 2012 11:10:01 +0000 (13:10 +0200)
teleforma/htdocs/css/teleforma_black.css
teleforma/templates/teleforma/course_detail.html
teleforma/templates/teleforma/courses.html
teleforma/templates/teleforma/inc/conference_list.html [new file with mode: 0644]
teleforma/templates/teleforma/inc/document_list.html [new file with mode: 0644]
teleforma/templates/teleforma/inc/media_list.html [new file with mode: 0644]
teleforma/templates/telemeta/base.html

index 827c9e697be38e14e084adcd3a02d62ecd9ad8c2..3e1c3848a5f5c287d28fcc209db312f81b90b551 100644 (file)
@@ -168,7 +168,7 @@ a img { border: none; }
 
 #collection_player {
     background: transparent; 
-    /*     background-image: url(../images/grid_bg.png); */
+    /*     background-image: url(../images/grid_bg_2.png); */
 }
 
 #collection_player .title {
@@ -436,7 +436,7 @@ form.login .submit {
     background-color: #000000 ;
     font: normal verdana,'Bitstream Vera Sans',helvetica,arial,sans-serif;
     border-top: .25em solid #000000;
-    padding-left:26px;
+    padding-left:200px;
 }
 
 #menu a, #menu a:visited{
@@ -908,7 +908,7 @@ img.align-left {
 
 #module-set .module {
     border: 1px solid #000;
-    background-image: url(../images/grid_bg.png);
+    background-image: url(../images/grid_bg_2.png);
     padding: 0.3em 0.8em 0.8em 0.8em;
     margin: 3.5em 0em 1.5em 1.5em;
     -moz-border-radius: 8px 8px 8px 8px;
@@ -1269,7 +1269,10 @@ input,textarea{
 .course_title {
     border-bottom:1px solid #6A0307;
     color:#FFFFFF;
-    background-image: url(../images/grid_bg.png);
+    background-image: url(../images/grid_bg_2.png);
+    -moz-border-radius: 8px 8px 8px 8px;
+    -webkit-border-radius: 8px 8px 8px 8px;
+    border-radius: 8px 8px 8px 8px;
     }
 
 #module-set-left {
@@ -1280,7 +1283,7 @@ input,textarea{
     
 #module-set-left .module {
         border: 1px solid #000;
-        background-image: url(../images/grid_bg.png);
+        background-image: url(../images/grid_bg_2.png);
         padding: 0em 0.8em 0em 0.8em;
         margin: 0em 0em 1.5em 0em;
         -moz-border-radius: 8px 8px 8px 8px;
index f70797f924c42537615ec2c0076e9269270ccdf2..0113db0c49c5b39683232208a588afdb16fc539d 100644 (file)
@@ -9,62 +9,30 @@
 
 {% block course %}
 
-
-        <table class="listing" style="width:100%;margin-top: 1em">
-            <tr>
-            <td class="course_title" style="font-size: 120%;">{{ course.title }}{% if course.description %} - {{ course.description }}{% endif %}</td>
-            </tr>
-        </table>
-
-        <h2><img src="{% url telemeta-images "item_title.png" %}" style="vertical-align:middle" /> {% trans "Documents"%}</h2>
-        <table class="listing" width="100%">
-            <tr>
-            <th class="highlight">{% trans "Title" %}</th>
-            <th>{% trans "Description" %}</th>
-            <th>{% trans "Date added" %}</th>
-            </tr>
-        {% for document in course.document.all %}
-            <tr {% if not forloop.counter0|divisibleby:"2" %}class="odd"{% endif %}>
-            <td>{{ document.title }}</td>
-            <td>{{ document.description }}</td>
-            <td>{{ document.date_added }}</td>
-            </tr>
-        {% endfor %}
-        </table>
-
-    <h2><img src="{% url telemeta-images "item_title.png" %}" style="vertical-align:middle" /> {% trans "Medias"%}</h2>
-    <table class="listing" width="100%">
-        <tr>
-        <th class="highlight">{% trans "Title" %}</th>
-        <th>{% trans "Description" %}</th>
-        <th>{% trans "Date added" %}</th>
-        </tr>
-        {% for media in course.media.all %}
-            <tr {% if not forloop.counter0|divisibleby:"2" %}class="odd"{% endif %}>
-            <td><a href="{% url telemeta-item-detail media.item.public_id %}">{{ media.item.title }}</a></td>
-            <td>{{ media.item.description }}</td>
-            <td>{{ media.date_added }}</td>
-            </tr>
-        {% endfor %}
-    </table>
-
-
-    <h2><img src="{% url telemeta-images "item_title.png" %}" style="vertical-align:middle" /> {% trans "Conferences"%}</h2>
-    <table class="listing" width="100%">
-        <tr>
-        <th class="highlight">{% trans "Session" %}</th>
-        <th>{% trans "Professor" %}</th>
-        <th>{% trans "Date added" %}</th>
-        </tr>
-        {% for conference in course.conference.all %}
-            <tr {% if not forloop.counter0|divisibleby:"2" %}class="odd"{% endif %}>
-            <td>{{ conference.session }}</td>
-            <td>{{ conference.professor.user.first_name }} {{ conference.professor.user.last_name }}</td>
-            <td>{{ conference.date_begin }}</td>
-            </tr>
-        {% endfor %}
-    </table>
-
+<table class="listing" style="width:100%;margin-top: 1em">
+<tr>
+<td class="course_title" style="font-size: 120%;">{{ course.title }}{% if course.description %} - {{ course.description }}{% endif %}</td>
+</tr>
+</table>
+
+
+{% block document %}
+{% with course as course and %}
+{% include "teleforma/inc/document_list.html" %}
+{% endwith %}
+{% endblock %}
+
+{% block media %}
+{% with course as course and %}
+{% include "teleforma/inc/media_list.html" %}
+{% endwith %}
+{% endblock %}
+
+{% block conference %}
+{% with course as course and %}
+{% include "teleforma/inc/conference_list.html" %}
+{% endwith %}
+{% endblock %}
 
 
 {% endblock course %}
index 470b50dc1d1003e151aa6b06148ef2ead9777dc8..12903412e615354908e2d0c9d19f3297f50022fa 100644 (file)
@@ -28,7 +28,7 @@
    <div id="module-set-left" style="width: 30%">
     <div class="module">
     <h3><img src="{% url telemeta-images "module_playlist.png" %}" alt="playlists" style="vertical-align:middle" />{% trans "My courses" %}</h3>
-    
+
         <div style="background: white;">
         <ul>
         {% block courses %}
         </div>
     </div>
    </div>
-    
+
     <div class="desk_center">
     {% block course %}
+
     {% for course in object_list %}
-    
+
         <table class="listing" style="width:100%;margin-top: 1em">
             <tr>
             <td class="course_title" style="font-size: 120%;">{{ course.title }}{% if course.description %} - {{ course.description }}{% endif %}</td>
             </tr>
         </table>
 
-        <h2><img src="{% url telemeta-images "item_title.png" %}" style="vertical-align:middle" /> {% trans "Documents"%}</h2>
-        <table class="listing" width="100%">
-            <tr>
-            <th class="highlight">{% trans "Title" %}</th>
-            <th>{% trans "Description" %}</th>
-            <th>{% trans "Date added" %}</th>
-            </tr>
-        {% for document in course.document.all %}
-            <tr {% if not forloop.counter0|divisibleby:"2" %}class="odd"{% endif %}>
-            <td>{{ document.title }}</td>
-            <td>{{ document.description }}</td>
-            <td>{{ document.date_added }}</td>
-            </tr>
-        {% endfor %}
-        </table>
+        {% block document %}
+        {% with course as course and %}
+        {% include "teleforma/inc/document_list.html" %}
+        {% endwith %}
+        {% endblock %}
+
+        {% block media %}
+        {% with course as course and %}
+        {% include "teleforma/inc/media_list.html" %}
+        {% endwith %}
+        {% endblock %}
+
+        {% block conference %}
+        {% with course as course and %}
+        {% include "teleforma/inc/conference_list.html" %}
+        {% endwith %}
+        {% endblock %}
 
-    <h2><img src="{% url telemeta-images "item_title.png" %}" style="vertical-align:middle" /> {% trans "Medias"%}</h2>
-    <table class="listing" width="100%">
-        <tr>
-        <th class="highlight">{% trans "Title" %}</th>
-        <th>{% trans "Description" %}</th>
-        <th>{% trans "Date added" %}</th>
-        </tr>
-        {% for media in course.media.all %}
-            <tr {% if not forloop.counter0|divisibleby:"2" %}class="odd"{% endif %}>
-            <td><a href="{% url telemeta-item-detail media.item.public_id %}">{{ media.item.title }}</a></td>
-            <td>{{ media.item.description }}</td>
-            <td>{{ media.date_added }}</td>
-            </tr>
-        {% endfor %}
-    </table>
-
-
-    <h2><img src="{% url telemeta-images "item_title.png" %}" style="vertical-align:middle" /> {% trans "Conferences"%}</h2>
-    <table class="listing" width="100%">
-        <tr>
-        <th class="highlight">{% trans "Session" %}</th>
-        <th>{% trans "Professor" %}</th>
-        <th>{% trans "Date added" %}</th>
-        </tr>
-        {% for conference in course.conference.all %}
-            <tr {% if not forloop.counter0|divisibleby:"2" %}class="odd"{% endif %}>
-            <td>{{ conference.session }}</td>
-            <td>{{ conference.professor.user.first_name }} {{ conference.professor.user.last_name }}</td>
-            <td>{{ conference.date_begin }}</td>
-            </tr>
-        {% endfor %}
-    </table>
 
     {% endfor %}
     {% endblock course %}
diff --git a/teleforma/templates/teleforma/inc/conference_list.html b/teleforma/templates/teleforma/inc/conference_list.html
new file mode 100644 (file)
index 0000000..7496323
--- /dev/null
@@ -0,0 +1,21 @@
+{% load i18n %}
+
+    <h2><img src="{% url telemeta-images "item_title.png" %}" style="vertical-align:middle" /> {% trans "Conferences"%}</h2>
+    <table class="listing" width="100%">
+    <thead>
+        <tr>
+        <th class="highlight">{% trans "Session" %}</th>
+        <th>{% trans "Professor" %}</th>
+        <th>{% trans "Date added" %}</th>
+        </tr>
+    </thead>
+    <tbody>
+        {% for conference in course.conference.all %}
+            <tr {% if not forloop.counter0|divisibleby:"2" %}class="odd"{% endif %}>
+            <td>{{ conference.session }}</td>
+            <td>{{ conference.professor.user.first_name }} {{ conference.professor.user.last_name }}</td>
+            <td>{{ conference.date_begin }}</td>
+            </tr>
+        {% endfor %}
+    </tbody>
+    </table>
diff --git a/teleforma/templates/teleforma/inc/document_list.html b/teleforma/templates/teleforma/inc/document_list.html
new file mode 100644 (file)
index 0000000..5c72ccd
--- /dev/null
@@ -0,0 +1,21 @@
+{% load i18n %}
+
+<h2><img src="{% url telemeta-images "item_title.png" %}" style="vertical-align:middle" /> {% trans "Documents"%}</h2>
+<table class="listing" width="100%">
+    <thead>
+        <tr>
+        <th class="highlight">{% trans "Title" %}</th>
+        <th>{% trans "Description" %}</th>
+        <th>{% trans "Date added" %}</th>
+        </tr>
+    </thead>
+    <tbody>
+        {% for document in course.document.all %}
+        <tr {% if not forloop.counter0|divisibleby:"2" %}class="odd"{% endif %}>
+        <td>{{ document.title }}</td>
+        <td>{{ document.description }}</td>
+        <td>{{ document.date_added }}</td>
+        </tr>
+    {% endfor %}
+    </tbody>
+</table>
diff --git a/teleforma/templates/teleforma/inc/media_list.html b/teleforma/templates/teleforma/inc/media_list.html
new file mode 100644 (file)
index 0000000..94d2d66
--- /dev/null
@@ -0,0 +1,22 @@
+{% load i18n %}
+
+
+    <h2><img src="{% url telemeta-images "item_title.png" %}" style="vertical-align:middle" /> {% trans "Medias"%}</h2>
+    <table class="listing" width="100%">
+    <thead>
+        <tr>
+        <th class="highlight">{% trans "Title" %}</th>
+        <th>{% trans "Description" %}</th>
+        <th>{% trans "Date added" %}</th>
+        </tr>
+    </thead>
+    <tbody>
+        {% for media in course.media.all %}
+            <tr {% if not forloop.counter0|divisibleby:"2" %}class="odd"{% endif %}>
+            <td><a href="{% url telemeta-item-detail media.item.public_id %}">{{ media.item.title }}</a></td>
+            <td>{{ media.item.description }}</td>
+            <td>{{ media.date_added }}</td>
+            </tr>
+        {% endfor %}
+    </tbody>
+    </table>
index a7429c948af085bd44ab8faf2a8374c73dc8235a..d58ce6bdc9b66cc0bd8613dfe24be5afc79dba8d 100644 (file)
@@ -54,8 +54,8 @@
 <ul id="nav">
 
 <div id="logo" style="padding-right:8em; float: left;">
-<img src="{% url telemeta-images "logo_mini_wh.png" %}" style="vertical-align:middle"
-alt="Telemeta Powered"/>
+<!--<img src="{% url telemeta-images "logo_mini_wh.png" %}" style="vertical-align:middle"
+alt="Telemeta Powered"/>-->
 </div>
 
  {% if user.is_authenticated %}