]> git.parisson.com Git - teleforma.git/commitdiff
smoother tw style, add tags and a good messaging thx to postman
authoryomguy <yomguy@parisson.com>
Wed, 4 Apr 2012 16:08:12 +0000 (18:08 +0200)
committeryomguy <yomguy@parisson.com>
Wed, 4 Apr 2012 16:08:12 +0000 (18:08 +0200)
29 files changed:
doc/teleforma-all.dot
doc/teleforma-all.pdf
doc/teleforma.dot
doc/teleforma.pdf
example/settings.py
setup.py
teleforma/admin.py
teleforma/context_processors.py [new file with mode: 0644]
teleforma/htdocs/css/teleforma_black.css
teleforma/htdocs/images/1pixelout-player-colour-scheme.png [new file with mode: 0755]
teleforma/htdocs/images/twitter_web_sprite_bgs.png [new file with mode: 0644]
teleforma/locale/fr/LC_MESSAGES/django.po
teleforma/models.py
teleforma/templates/postman/base.html
teleforma/templates/postman/base_folder.html
teleforma/templates/postman/base_write.html
teleforma/templates/postman/email_user.txt
teleforma/templates/postman/view.html
teleforma/templates/teleforma/course_media.html [new file with mode: 0644]
teleforma/templates/teleforma/courses.html
teleforma/templates/teleforma/inc/conference_list.html
teleforma/templates/teleforma/inc/document_list.html
teleforma/templates/teleforma/inc/media_list.html
teleforma/templates/telemeta/base.html
teleforma/templates/telemeta/inc/user_list.html [new file with mode: 0644]
teleforma/templatetags/__init__.py [new file with mode: 0644]
teleforma/templatetags/teleforma_tags.py [new file with mode: 0644]
teleforma/urls.py
teleforma/views.py

index 12c4015547159d8961cca554fa42143ed240127a..46b8625bf746c9bafe3bf206d7d0bbfa35247869 100644 (file)
@@ -161,31 +161,6 @@ digraph name {
     </TABLE>
     >]
 
-    django_contrib_auth_models_Message [label=<
-    <TABLE BGCOLOR="palegoldenrod" BORDER="0" CELLBORDER="0" CELLSPACING="0">
-     <TR><TD COLSPAN="2" CELLPADDING="4" ALIGN="CENTER" BGCOLOR="olivedrab4"
-     ><FONT FACE="Helvetica Bold" COLOR="white"
-     >Message</FONT></TD></TR>
-    
-        
-        <TR><TD ALIGN="LEFT" BORDER="0"
-        ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">id</FONT
-        ></TD>
-        <TD ALIGN="LEFT"
-        ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">AutoField</FONT
-        ></TD></TR>
-        
-        <TR><TD ALIGN="LEFT" BORDER="0"
-        ><FONT FACE="Helvetica Bold">message</FONT
-        ></TD>
-        <TD ALIGN="LEFT"
-        ><FONT FACE="Helvetica Bold">TextField</FONT
-        ></TD></TR>
-        
-    
-    </TABLE>
-    >]
-
 
 
 
@@ -304,6 +279,9 @@ digraph name {
 
 
 
+
+
+
     django_contrib_admin_models_LogEntry [label=<
     <TABLE BGCOLOR="palegoldenrod" BORDER="0" CELLBORDER="0" CELLSPACING="0">
      <TR><TD COLSPAN="2" CELLPADDING="4" ALIGN="CENTER" BGCOLOR="olivedrab4"
@@ -432,17 +410,6 @@ digraph name {
         ></TD></TR>
         
     
-    </TABLE>
-    >]
-
-    telemeta_models_media_MediaResource [label=<
-    <TABLE BGCOLOR="palegoldenrod" BORDER="0" CELLBORDER="0" CELLSPACING="0">
-     <TR><TD COLSPAN="2" CELLPADDING="4" ALIGN="CENTER" BGCOLOR="olivedrab4"
-     ><FONT FACE="Helvetica Bold" COLOR="white"
-     >MediaResource<BR/>&lt;<FONT FACE="Helvetica Italic">ModelCore</FONT>&gt;</FONT></TD></TR>
-    
-        
-    
     </TABLE>
     >]
 
@@ -503,6 +470,17 @@ digraph name {
         ></TD></TR>
         
     
+    </TABLE>
+    >]
+
+    telemeta_models_media_MediaResource [label=<
+    <TABLE BGCOLOR="palegoldenrod" BORDER="0" CELLBORDER="0" CELLSPACING="0">
+     <TR><TD COLSPAN="2" CELLPADDING="4" ALIGN="CENTER" BGCOLOR="olivedrab4"
+     ><FONT FACE="Helvetica Bold" COLOR="white"
+     >MediaResource<BR/>&lt;<FONT FACE="Helvetica Italic">ModelCore</FONT>&gt;</FONT></TD></TR>
+    
+        
+    
     </TABLE>
     >]
 
@@ -2790,6 +2768,38 @@ digraph name {
         ></TD></TR>
         
     
+    </TABLE>
+    >]
+
+    teleforma_models_CourseType [label=<
+    <TABLE BGCOLOR="palegoldenrod" BORDER="0" CELLBORDER="0" CELLSPACING="0">
+     <TR><TD COLSPAN="2" CELLPADDING="4" ALIGN="CENTER" BGCOLOR="olivedrab4"
+     ><FONT FACE="Helvetica Bold" COLOR="white"
+     >CourseType</FONT></TD></TR>
+    
+        
+        <TR><TD ALIGN="LEFT" BORDER="0"
+        ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">id</FONT
+        ></TD>
+        <TD ALIGN="LEFT"
+        ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">AutoField</FONT
+        ></TD></TR>
+        
+        <TR><TD ALIGN="LEFT" BORDER="0"
+        ><FONT FACE="Helvetica Bold">name</FONT
+        ></TD>
+        <TD ALIGN="LEFT"
+        ><FONT FACE="Helvetica Bold">CharField</FONT
+        ></TD></TR>
+        
+        <TR><TD ALIGN="LEFT" BORDER="0"
+        ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">description</FONT
+        ></TD>
+        <TD ALIGN="LEFT"
+        ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">CharField</FONT
+        ></TD></TR>
+        
+    
     </TABLE>
     >]
 
@@ -2822,10 +2832,10 @@ digraph name {
         ></TD></TR>
         
         <TR><TD ALIGN="LEFT" BORDER="0"
-        ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">public_id</FONT
+        ><FONT FACE="Helvetica Bold">code</FONT
         ></TD>
         <TD ALIGN="LEFT"
-        ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">CharField</FONT
+        ><FONT FACE="Helvetica Bold">CharField</FONT
         ></TD></TR>
         
     
@@ -3108,6 +3118,13 @@ digraph name {
         ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">AutoField</FONT
         ></TD></TR>
         
+        <TR><TD ALIGN="LEFT" BORDER="0"
+        ><FONT FACE="Helvetica Bold">code</FONT
+        ></TD>
+        <TD ALIGN="LEFT"
+        ><FONT FACE="Helvetica Bold">CharField</FONT
+        ></TD></TR>
+        
         <TR><TD ALIGN="LEFT" BORDER="0"
         ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">name</FONT
         ></TD>
@@ -3115,6 +3132,20 @@ digraph name {
         ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">CharField</FONT
         ></TD></TR>
         
+        <TR><TD ALIGN="LEFT" BORDER="0"
+        ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">synthesis_note</FONT
+        ></TD>
+        <TD ALIGN="LEFT"
+        ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">BooleanField</FONT
+        ></TD></TR>
+        
+        <TR><TD ALIGN="LEFT" BORDER="0"
+        ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">obligation</FONT
+        ></TD>
+        <TD ALIGN="LEFT"
+        ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">BooleanField</FONT
+        ></TD></TR>
+        
     
     </TABLE>
     >]
@@ -3140,6 +3171,13 @@ digraph name {
         ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">CharField</FONT
         ></TD></TR>
         
+        <TR><TD ALIGN="LEFT" BORDER="0"
+        ><FONT FACE="Helvetica Bold">code</FONT
+        ></TD>
+        <TD ALIGN="LEFT"
+        ><FONT FACE="Helvetica Bold">CharField</FONT
+        ></TD></TR>
+        
     
     </TABLE>
     >]
@@ -3165,15 +3203,22 @@ digraph name {
         ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">CharField</FONT
         ></TD></TR>
         
+        <TR><TD ALIGN="LEFT" BORDER="0"
+        ><FONT FACE="Helvetica Bold">code</FONT
+        ></TD>
+        <TD ALIGN="LEFT"
+        ><FONT FACE="Helvetica Bold">CharField</FONT
+        ></TD></TR>
+        
     
     </TABLE>
     >]
 
-    teleforma_models_Student [label=<
+    teleforma_models_Oral [label=<
     <TABLE BGCOLOR="palegoldenrod" BORDER="0" CELLBORDER="0" CELLSPACING="0">
      <TR><TD COLSPAN="2" CELLPADDING="4" ALIGN="CENTER" BGCOLOR="olivedrab4"
      ><FONT FACE="Helvetica Bold" COLOR="white"
-     >Student</FONT></TD></TR>
+     >Oral</FONT></TD></TR>
     
         
         <TR><TD ALIGN="LEFT" BORDER="0"
@@ -3184,17 +3229,35 @@ digraph name {
         ></TD></TR>
         
         <TR><TD ALIGN="LEFT" BORDER="0"
-        ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">oral_1</FONT
+        ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">name</FONT
         ></TD>
         <TD ALIGN="LEFT"
         ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">CharField</FONT
         ></TD></TR>
         
         <TR><TD ALIGN="LEFT" BORDER="0"
-        ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">oral_2</FONT
+        ><FONT FACE="Helvetica Bold">code</FONT
         ></TD>
         <TD ALIGN="LEFT"
-        ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">CharField</FONT
+        ><FONT FACE="Helvetica Bold">CharField</FONT
+        ></TD></TR>
+        
+    
+    </TABLE>
+    >]
+
+    teleforma_models_Student [label=<
+    <TABLE BGCOLOR="palegoldenrod" BORDER="0" CELLBORDER="0" CELLSPACING="0">
+     <TR><TD COLSPAN="2" CELLPADDING="4" ALIGN="CENTER" BGCOLOR="olivedrab4"
+     ><FONT FACE="Helvetica Bold" COLOR="white"
+     >Student</FONT></TD></TR>
+    
+        
+        <TR><TD ALIGN="LEFT" BORDER="0"
+        ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">id</FONT
+        ></TD>
+        <TD ALIGN="LEFT"
+        ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">AutoField</FONT
         ></TD></TR>
         
     
@@ -3308,6 +3371,132 @@ digraph name {
 
 
 
+
+
+
+
+    postman_models_Message [label=<
+    <TABLE BGCOLOR="palegoldenrod" BORDER="0" CELLBORDER="0" CELLSPACING="0">
+     <TR><TD COLSPAN="2" CELLPADDING="4" ALIGN="CENTER" BGCOLOR="olivedrab4"
+     ><FONT FACE="Helvetica Bold" COLOR="white"
+     >Message</FONT></TD></TR>
+    
+        
+        <TR><TD ALIGN="LEFT" BORDER="0"
+        ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">id</FONT
+        ></TD>
+        <TD ALIGN="LEFT"
+        ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">AutoField</FONT
+        ></TD></TR>
+        
+        <TR><TD ALIGN="LEFT" BORDER="0"
+        ><FONT FACE="Helvetica Bold">subject</FONT
+        ></TD>
+        <TD ALIGN="LEFT"
+        ><FONT FACE="Helvetica Bold">CharField</FONT
+        ></TD></TR>
+        
+        <TR><TD ALIGN="LEFT" BORDER="0"
+        ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">body</FONT
+        ></TD>
+        <TD ALIGN="LEFT"
+        ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">TextField</FONT
+        ></TD></TR>
+        
+        <TR><TD ALIGN="LEFT" BORDER="0"
+        ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">email</FONT
+        ></TD>
+        <TD ALIGN="LEFT"
+        ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">EmailField</FONT
+        ></TD></TR>
+        
+        <TR><TD ALIGN="LEFT" BORDER="0"
+        ><FONT FACE="Helvetica Bold">sent_at</FONT
+        ></TD>
+        <TD ALIGN="LEFT"
+        ><FONT FACE="Helvetica Bold">DateTimeField</FONT
+        ></TD></TR>
+        
+        <TR><TD ALIGN="LEFT" BORDER="0"
+        ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">read_at</FONT
+        ></TD>
+        <TD ALIGN="LEFT"
+        ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">DateTimeField</FONT
+        ></TD></TR>
+        
+        <TR><TD ALIGN="LEFT" BORDER="0"
+        ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">replied_at</FONT
+        ></TD>
+        <TD ALIGN="LEFT"
+        ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">DateTimeField</FONT
+        ></TD></TR>
+        
+        <TR><TD ALIGN="LEFT" BORDER="0"
+        ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">sender_archived</FONT
+        ></TD>
+        <TD ALIGN="LEFT"
+        ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">BooleanField</FONT
+        ></TD></TR>
+        
+        <TR><TD ALIGN="LEFT" BORDER="0"
+        ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">recipient_archived</FONT
+        ></TD>
+        <TD ALIGN="LEFT"
+        ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">BooleanField</FONT
+        ></TD></TR>
+        
+        <TR><TD ALIGN="LEFT" BORDER="0"
+        ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">sender_deleted_at</FONT
+        ></TD>
+        <TD ALIGN="LEFT"
+        ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">DateTimeField</FONT
+        ></TD></TR>
+        
+        <TR><TD ALIGN="LEFT" BORDER="0"
+        ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">recipient_deleted_at</FONT
+        ></TD>
+        <TD ALIGN="LEFT"
+        ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">DateTimeField</FONT
+        ></TD></TR>
+        
+        <TR><TD ALIGN="LEFT" BORDER="0"
+        ><FONT FACE="Helvetica Bold">moderation_status</FONT
+        ></TD>
+        <TD ALIGN="LEFT"
+        ><FONT FACE="Helvetica Bold">CharField</FONT
+        ></TD></TR>
+        
+        <TR><TD ALIGN="LEFT" BORDER="0"
+        ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">moderation_date</FONT
+        ></TD>
+        <TD ALIGN="LEFT"
+        ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">DateTimeField</FONT
+        ></TD></TR>
+        
+        <TR><TD ALIGN="LEFT" BORDER="0"
+        ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">moderation_reason</FONT
+        ></TD>
+        <TD ALIGN="LEFT"
+        ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">CharField</FONT
+        ></TD></TR>
+        
+    
+    </TABLE>
+    >]
+
+    postman_models_PendingMessage [label=<
+    <TABLE BGCOLOR="palegoldenrod" BORDER="0" CELLBORDER="0" CELLSPACING="0">
+     <TR><TD COLSPAN="2" CELLPADDING="4" ALIGN="CENTER" BGCOLOR="olivedrab4"
+     ><FONT FACE="Helvetica Bold" COLOR="white"
+     >PendingMessage</FONT></TD></TR>
+    
+        
+    
+    </TABLE>
+    >]
+
+
+
   
   
   django_contrib_auth_models_Permission -> django_contrib_contenttypes_models_ContentType
@@ -3330,12 +3519,6 @@ digraph name {
   [label="user_permissions (user)"] [arrowhead=dot arrowtail=dot, dir=both];
   
 
-  
-  
-  django_contrib_auth_models_Message -> django_contrib_auth_models_User
-  [label="user (_message_set)"] [arrowhead=none, arrowtail=dot];
-  
-
 
   
 
@@ -3347,6 +3530,7 @@ digraph name {
 
 
 
+
   
   
   django_contrib_admin_models_LogEntry -> django_contrib_auth_models_User
@@ -3703,6 +3887,8 @@ digraph name {
   
 
   
+
+  
   
   teleforma_models_Course -> teleforma_models_Department
   [label="department (course)"] [arrowhead=none, arrowtail=dot];
@@ -3711,6 +3897,10 @@ digraph name {
   teleforma_models_Course -> teleforma_models_Category
   [label="category (course)"] [arrowhead=none, arrowtail=dot];
   
+  
+  teleforma_models_Course -> teleforma_models_CourseType
+  [label="type (course)"] [arrowhead=none, arrowtail=dot];
+  
 
   
   
@@ -3747,9 +3937,17 @@ digraph name {
   teleforma_models_Document -> teleforma_models_Course
   [label="course (document)"] [arrowhead=none, arrowtail=dot];
   
+  
+  teleforma_models_Document -> teleforma_models_Conference
+  [label="conference (document)"] [arrowhead=none, arrowtail=dot];
+  
 
   
   
+  teleforma_models_Media -> teleforma_models_Course
+  [label="course (media)"] [arrowhead=none, arrowtail=dot];
+  
+  
   teleforma_models_Media -> teleforma_models_Conference
   [label="conference (media)"] [arrowhead=none, arrowtail=dot];
   
@@ -3771,6 +3969,8 @@ digraph name {
   
 
   
+
+  
   
   teleforma_models_Student -> django_contrib_auth_models_User
   [label="user (student)"] [arrowhead=none, arrowtail=dot];
@@ -3799,6 +3999,14 @@ digraph name {
   teleforma_models_Student -> teleforma_models_Speciality
   [label="written_speciality (student_written_spe)"] [arrowhead=none, arrowtail=dot];
   
+  
+  teleforma_models_Student -> teleforma_models_Oral
+  [label="oral_1 (oral_1)"] [arrowhead=none, arrowtail=dot];
+  
+  
+  teleforma_models_Student -> teleforma_models_Oral
+  [label="oral_2 (oral_2)"] [arrowhead=none, arrowtail=dot];
+  
 
   
   
@@ -3810,4 +4018,30 @@ digraph name {
   
 
 
+
+
+  
+  
+  postman_models_Message -> django_contrib_auth_models_User
+  [label="sender (sent_messages)"] [arrowhead=none, arrowtail=dot];
+  
+  
+  postman_models_Message -> django_contrib_auth_models_User
+  [label="recipient (received_messages)"] [arrowhead=none, arrowtail=dot];
+  
+  
+  postman_models_Message -> postman_models_Message
+  [label="parent (next_messages)"] [arrowhead=none, arrowtail=dot];
+  
+  
+  postman_models_Message -> postman_models_Message
+  [label="thread (child_messages)"] [arrowhead=none, arrowtail=dot];
+  
+  
+  postman_models_Message -> django_contrib_auth_models_User
+  [label="moderation_by (moderated_messages)"] [arrowhead=none, arrowtail=dot];
+  
+
+  
+
 }
index 02ae4db686cc223a682fc7fce9de8399e9261e44..c028ffedb3b9f0717ce447ac203261a6b51955dd 100644 (file)
Binary files a/doc/teleforma-all.pdf and b/doc/teleforma-all.pdf differ
index 8234bf21735313b517ab796a7e32e28a66d60b22..59a0f8a5124126ba87f9cfde684fc1025e565fbb 100644 (file)
@@ -148,6 +148,38 @@ digraph name {
         ></TD></TR>
         
     
+    </TABLE>
+    >]
+
+    teleforma_models_CourseType [label=<
+    <TABLE BGCOLOR="palegoldenrod" BORDER="0" CELLBORDER="0" CELLSPACING="0">
+     <TR><TD COLSPAN="2" CELLPADDING="4" ALIGN="CENTER" BGCOLOR="olivedrab4"
+     ><FONT FACE="Helvetica Bold" COLOR="white"
+     >CourseType</FONT></TD></TR>
+    
+        
+        <TR><TD ALIGN="LEFT" BORDER="0"
+        ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">id</FONT
+        ></TD>
+        <TD ALIGN="LEFT"
+        ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">AutoField</FONT
+        ></TD></TR>
+        
+        <TR><TD ALIGN="LEFT" BORDER="0"
+        ><FONT FACE="Helvetica Bold">name</FONT
+        ></TD>
+        <TD ALIGN="LEFT"
+        ><FONT FACE="Helvetica Bold">CharField</FONT
+        ></TD></TR>
+        
+        <TR><TD ALIGN="LEFT" BORDER="0"
+        ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">description</FONT
+        ></TD>
+        <TD ALIGN="LEFT"
+        ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">CharField</FONT
+        ></TD></TR>
+        
+    
     </TABLE>
     >]
 
@@ -180,10 +212,10 @@ digraph name {
         ></TD></TR>
         
         <TR><TD ALIGN="LEFT" BORDER="0"
-        ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">public_id</FONT
+        ><FONT FACE="Helvetica Bold">code</FONT
         ></TD>
         <TD ALIGN="LEFT"
-        ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">CharField</FONT
+        ><FONT FACE="Helvetica Bold">CharField</FONT
         ></TD></TR>
         
     
@@ -466,6 +498,13 @@ digraph name {
         ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">AutoField</FONT
         ></TD></TR>
         
+        <TR><TD ALIGN="LEFT" BORDER="0"
+        ><FONT FACE="Helvetica Bold">code</FONT
+        ></TD>
+        <TD ALIGN="LEFT"
+        ><FONT FACE="Helvetica Bold">CharField</FONT
+        ></TD></TR>
+        
         <TR><TD ALIGN="LEFT" BORDER="0"
         ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">name</FONT
         ></TD>
@@ -473,6 +512,20 @@ digraph name {
         ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">CharField</FONT
         ></TD></TR>
         
+        <TR><TD ALIGN="LEFT" BORDER="0"
+        ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">synthesis_note</FONT
+        ></TD>
+        <TD ALIGN="LEFT"
+        ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">BooleanField</FONT
+        ></TD></TR>
+        
+        <TR><TD ALIGN="LEFT" BORDER="0"
+        ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">obligation</FONT
+        ></TD>
+        <TD ALIGN="LEFT"
+        ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">BooleanField</FONT
+        ></TD></TR>
+        
     
     </TABLE>
     >]
@@ -498,6 +551,13 @@ digraph name {
         ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">CharField</FONT
         ></TD></TR>
         
+        <TR><TD ALIGN="LEFT" BORDER="0"
+        ><FONT FACE="Helvetica Bold">code</FONT
+        ></TD>
+        <TD ALIGN="LEFT"
+        ><FONT FACE="Helvetica Bold">CharField</FONT
+        ></TD></TR>
+        
     
     </TABLE>
     >]
@@ -523,15 +583,22 @@ digraph name {
         ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">CharField</FONT
         ></TD></TR>
         
+        <TR><TD ALIGN="LEFT" BORDER="0"
+        ><FONT FACE="Helvetica Bold">code</FONT
+        ></TD>
+        <TD ALIGN="LEFT"
+        ><FONT FACE="Helvetica Bold">CharField</FONT
+        ></TD></TR>
+        
     
     </TABLE>
     >]
 
-    teleforma_models_Student [label=<
+    teleforma_models_Oral [label=<
     <TABLE BGCOLOR="palegoldenrod" BORDER="0" CELLBORDER="0" CELLSPACING="0">
      <TR><TD COLSPAN="2" CELLPADDING="4" ALIGN="CENTER" BGCOLOR="olivedrab4"
      ><FONT FACE="Helvetica Bold" COLOR="white"
-     >Student</FONT></TD></TR>
+     >Oral</FONT></TD></TR>
     
         
         <TR><TD ALIGN="LEFT" BORDER="0"
@@ -542,17 +609,35 @@ digraph name {
         ></TD></TR>
         
         <TR><TD ALIGN="LEFT" BORDER="0"
-        ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">oral_1</FONT
+        ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">name</FONT
         ></TD>
         <TD ALIGN="LEFT"
         ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">CharField</FONT
         ></TD></TR>
         
         <TR><TD ALIGN="LEFT" BORDER="0"
-        ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">oral_2</FONT
+        ><FONT FACE="Helvetica Bold">code</FONT
         ></TD>
         <TD ALIGN="LEFT"
-        ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">CharField</FONT
+        ><FONT FACE="Helvetica Bold">CharField</FONT
+        ></TD></TR>
+        
+    
+    </TABLE>
+    >]
+
+    teleforma_models_Student [label=<
+    <TABLE BGCOLOR="palegoldenrod" BORDER="0" CELLBORDER="0" CELLSPACING="0">
+     <TR><TD COLSPAN="2" CELLPADDING="4" ALIGN="CENTER" BGCOLOR="olivedrab4"
+     ><FONT FACE="Helvetica Bold" COLOR="white"
+     >Student</FONT></TD></TR>
+    
+        
+        <TR><TD ALIGN="LEFT" BORDER="0"
+        ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">id</FONT
+        ></TD>
+        <TD ALIGN="LEFT"
+        ><FONT COLOR="#7B7B7B" FACE="Helvetica Bold">AutoField</FONT
         ></TD></TR>
         
     
@@ -648,6 +733,8 @@ digraph name {
   
 
   
+
+  
   
   teleforma_models_Course -> teleforma_models_Department
   [label="department (course)"] [arrowhead=none, arrowtail=dot];
@@ -656,6 +743,10 @@ digraph name {
   teleforma_models_Course -> teleforma_models_Category
   [label="category (course)"] [arrowhead=none, arrowtail=dot];
   
+  
+  teleforma_models_Course -> teleforma_models_CourseType
+  [label="type (course)"] [arrowhead=none, arrowtail=dot];
+  
 
   
   
@@ -700,9 +791,17 @@ digraph name {
   teleforma_models_Document -> teleforma_models_Course
   [label="course (document)"] [arrowhead=none, arrowtail=dot];
   
+  
+  teleforma_models_Document -> teleforma_models_Conference
+  [label="conference (document)"] [arrowhead=none, arrowtail=dot];
+  
 
   
   
+  teleforma_models_Media -> teleforma_models_Course
+  [label="course (media)"] [arrowhead=none, arrowtail=dot];
+  
+  
   teleforma_models_Media -> teleforma_models_Conference
   [label="conference (media)"] [arrowhead=none, arrowtail=dot];
   
@@ -732,6 +831,8 @@ digraph name {
   
 
   
+
+  
   
   django_contrib_auth_models_User [label=<
       <TABLE BGCOLOR="palegoldenrod" BORDER="0" CELLBORDER="0" CELLSPACING="0">
@@ -768,6 +869,14 @@ digraph name {
   teleforma_models_Student -> teleforma_models_Speciality
   [label="written_speciality (student_written_spe)"] [arrowhead=none, arrowtail=dot];
   
+  
+  teleforma_models_Student -> teleforma_models_Oral
+  [label="oral_1 (oral_1)"] [arrowhead=none, arrowtail=dot];
+  
+  
+  teleforma_models_Student -> teleforma_models_Oral
+  [label="oral_2 (oral_2)"] [arrowhead=none, arrowtail=dot];
+  
 
   
   
index b8303e5bda16f4b5177e4c5b288db2f96e3f92ff..368f810e9aeb33f26fdb72b4da7fd335f280f98e 100644 (file)
Binary files a/doc/teleforma.pdf and b/doc/teleforma.pdf differ
index a94f047df8a81103631d651f1a964916a8b33a4a..4c38b4d4ade3f4675b32e344cc83235259eadf53 100644 (file)
@@ -3,6 +3,7 @@
 
 import os
 import sys
+from django.core.urlresolvers import reverse_lazy
 
 sys.dont_write_bytecode = True
 
@@ -17,10 +18,10 @@ MANAGERS = ADMINS
 
 DATABASES = {
     'default': {
-        'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
-        'NAME': 'sandbox.sql',                      # Or path to database file if using sqlite3.
-        'USER': '',                      # Not used with sqlite3.
-        'PASSWORD': '',                  # Not used with sqlite3.
+        'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
+        'NAME': 'teleforma',                      # Or path to database file if using sqlite3.
+        'USER': 'teleforma',                      # Not used with sqlite3.
+        'PASSWORD': 'HMYsrZLEtYeBrvER',                  # Not used with sqlite3.
         'HOST': '',                      # Set to empty string for localhost. Not used with sqlite3.
         'PORT': '',                      # Set to empty string for default. Not used with sqlite3.
     }
@@ -140,6 +141,7 @@ INSTALLED_APPS = (
 TEMPLATE_CONTEXT_PROCESSORS = (
     'django.core.context_processors.request',
     'django.contrib.auth.context_processors.auth',
+    'postman.context_processors.inbox',
 )
 
 TELEMETA_ORGANIZATION = 'Parisson'
@@ -154,13 +156,14 @@ TELEMETA_DOWNLOAD_ENABLED = True
 TELEMETA_STREAMING_FORMATS = ('mp3', 'webm')
 TELEMETA_DOWNLOAD_FORMATS = ('wav', 'mp3', 'webm')
 TELEMETA_PUBLIC_ACCESS_PERIOD = 51
+
 AUTH_PROFILE_MODULE = 'telemeta.userprofile'
+LOGIN_URL = '/login/'
+LOGIN_REDIRECT_URL = reverse_lazy('teleforma-courses')
 SESSION_EXPIRE_AT_BROWSER_CLOSE = False
 
-LOGIN_URL = '/login'
-LOGIN_REDIRECT_URL = '/desk/courses'
-
 EMAIL_HOST = 'localhost'
 DEFAULT_FROM_EMAIL = 'webmaster@parisson.com'
 
 POSTMAN_AUTO_MODERATE_AS=True
+
index c0a1fedf8b9fcc556f98023ed7848a0fed5c238b..e9c06a92d30d4011bfc23e949947c6eb9ec4b7bd 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -3,13 +3,13 @@ from setuptools import setup, find_packages
 import os
 import teleforma
 
-CLASSIFIERS = ['Environment :: Web Environment', 'Framework :: Django', 'Intended Audience :: Science/Research', 'Intended Audience :: Education', 'Programming Language :: Python', 'Programming Language :: JavaScript', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', 'Topic :: Internet :: WWW/HTTP :: WSGI :: Application', 'Topic :: Multimedia :: Sound/Audio', 'Topic :: Multimedia :: Sound/Audio :: Analysis', 'Topic :: Multimedia :: Sound/Audio :: Players', 'Topic :: Scientific/Engineering :: Information Analysis', 'Topic :: System :: Archiving',  ]
+CLASSIFIERS = ['Environment :: Web Environment', 'Framework :: Django', 'Intended Audience :: Education', 'Programming Language :: Python', 'Programming Language :: JavaScript', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', 'Topic :: Internet :: WWW/HTTP :: WSGI :: Application', 'Topic :: Multimedia :: Sound/Audio', 'Topic :: Multimedia :: Sound/Audio :: Analysis', 'Topic :: Multimedia :: Sound/Audio :: Players', 'Topic :: Scientific/Engineering :: Information Analysis', 'Topic :: System :: Archiving',  ]
 
 README = os.path.join(os.path.dirname(__file__), 'README.rst')
 
 setup(
   name = "TeleForma",
-  url = "http://parisson.com/products/teleforma",
+  url = "http://parisson.com",
   description = "open multimedia e-leaning system",
   long_description = open(README).read(),
   author = "Guillaume Pellerin",
index 6dd8bba55f30fa7506c533974cecdd2eb5c4b8d4..ee190aaa04fecd6c7af70c7230dbf87bc34f8410 100644 (file)
@@ -29,6 +29,10 @@ class TrainingAdmin(admin.ModelAdmin):
 class CourseAdmin(admin.ModelAdmin):
     model = Course
 
+class ProfessorAdmin(admin.ModelAdmin):
+    model = Professor
+    filter_horizontal = ['courses']
+
 admin.site.register(Organization)
 admin.site.register(Department)
 admin.site.register(Category)
@@ -43,6 +47,8 @@ admin.site.register(Training, TrainingAdmin)
 admin.site.register(Procedure)
 admin.site.register(Speciality)
 admin.site.register(CourseType)
+admin.site.register(Oral)
+admin.site.register(Professor, ProfessorAdmin)
 
 
 
diff --git a/teleforma/context_processors.py b/teleforma/context_processors.py
new file mode 100644 (file)
index 0000000..bbb960c
--- /dev/null
@@ -0,0 +1,7 @@
+from django.contrib.sites.models import Site
+
+def main(request):
+    return {'site': Site.objects.get_current()}
+
+
+
index a352994332337c672eea953ea50f348de64642d2..a1fc7e3998ebe4577afd517f7ed40ca6da0cd078 100644 (file)
@@ -58,16 +58,12 @@ a img { border: none; }
 
 #content {
     /*margin-top: 1em;*/
-    margin-bottom: 0em;
-}
-
-#content {
     position: relative;
-    margin-left: 2em;
+    margin-left: 10%;
     margin-right: 2em;
+    margin-bottom: 0em;
 }
 
-
 #content ul, #content ul ul, #content ol {
     list-style: square;
     padding: .7em;
@@ -147,9 +143,9 @@ a img { border: none; }
     float: right;
     border: 1px solid #999;
     background-color: #eee;
-    -moz-border-radius: 8px 8px 8px 8px;
-    -webkit-border-radius: 8px 8px 8px 8px;
-    border-radius: 8px 8px 8px 8px;
+    -moz-border-radius: 8px 0px 8px 8px;
+    -webkit-border-radius: 8px 0px 8px 8px;
+    border-radius: 8px 0px 8px 8px;
 }
 
 #rightcol .analyzer, #rightcol .exporter, .markers {
@@ -299,9 +295,9 @@ label.disabled { color: #d7d7d7 }
     left: 35%;
     background-color: #000000;
     padding: 0.3em 0em 0.3em 0.3em;
-    -moz-border-radius: 8px 8px 8px 8px;
-    -webkit-border-radius: 8px 8px 8px 8px;
-    border-radius: 8px 8px 8px 8px;
+    -moz-border-radius: 8px 0px 8px 8px;
+    -webkit-border-radius: 8px 0px 8px 8px;
+    border-radius: 8px 0px 8px 8px;
 }
 #quick_search form {
     float: left;
@@ -346,9 +342,9 @@ label.disabled { color: #d7d7d7 }
     font-size: 0.9em;
     background-color: #000000;
     padding: 1em;
-    -moz-border-radius: 8px 8px 8px 8px;
-    -webkit-border-radius: 8px 8px 8px 8px;
-    border-radius: 8px 8px 8px 8px;
+    -moz-border-radius: 8px 0px 8px 8px;
+    -webkit-border-radius: 8px 0px 8px 8px;
+    border-radius: 8px 0px 8px 8px;
 }
 
 #auth_info a {
@@ -395,9 +391,9 @@ form.login .submit {
     border: none;
     border: 1px solid #000000;
     margin-bottom: 1em;
-    -moz-border-radius: 8px 8px 8px 8px;
-    -webkit-border-radius: 8px 8px 8px 8px;
-    border-radius: 8px 8px 8px 8px;
+    -moz-border-radius: 8px 0px 8px 8px;
+    -webkit-border-radius: 8px 0px 8px 8px;
+    border-radius: 8px 0px 8px 8px;
 }
 #searchform p {
     background-color: transparent;
@@ -437,9 +433,12 @@ form.login .submit {
 /* Main navigation bar  (borrowed from Trac) */
 #menu {
     background-color: #000000 ;
+    background:no-repeat url(http://si0.twimg.com/a/1333470865/t1/img/twitter_web_sprite_bgs.png) 0 0;
+    background-color:#ebebeb;
+    background-repeat:repeat;
     font: normal verdana,'Bitstream Vera Sans',helvetica,arial,sans-serif;
-    border-top: .25em solid #000000;
-    padding-left:200px;
+    border-top: 1px solid #333;
+    padding-left:15%;
 }
 
 #menu a, #menu a:visited{
@@ -448,7 +447,7 @@ form.login .submit {
     text-decoration:none;
     border-bottom-width:.5em;
     border-bottom-style: solid;
-    background-color: #000000;
+    background-color: transparent;
     -webkit-border-top-left-radius:5px 5px;
     moz-border-radius-topleft: 5px 5px;
     border-top-left-radius: 5px 5px;
@@ -473,7 +472,7 @@ form.login .submit {
 #menu .black { border-bottom-color:  #000000; }
 #menu .red { border-bottom-color:  #DD0000; }
 #menu .violet { border-bottom-color:  #A00020; }
-#menu .origin { border-bottom-color: #000000; }
+#menu .origin { border-bottom-color: transparent; }
 
 * html #menu :link, * html #menu :visited { background-position: 1px 0 }
 
@@ -516,10 +515,10 @@ color:#FFF;
     margin:0 0 0 -2px;
     padding:0;
     list-style: none outside none;
-    border-left:2px solid #000000;
-    border-right:2px solid #000000;
-    border-bottom:2px solid #000000;
-    background-color: #000000;
+    border-left:3px solid #333;
+    border-right:3px solid #333;
+    border-bottom:3px solid #333;
+    background-color: #333;
     color: #FFF;
     width:100%;
 }
@@ -528,6 +527,9 @@ color:#FFF;
     width: 100%;
     float:left;
     border-bottom:0px solid #fff;
+    background:no-repeat url(http://si0.twimg.com/a/1333470865/t1/img/twitter_web_sprite_bgs.png) 0 0;
+    background-color:#ebebeb;
+    background-repeat:repeat;
 }
 
 /* display block will make the link fill the whole area of LI */
@@ -561,12 +563,15 @@ color:#FFF;
 /* Footer (borrowed from Trac) */
 #footer {
     background: #000000;
+    background:no-repeat url(http://si0.twimg.com/a/1333470865/t1/img/twitter_web_sprite_bgs.png) 0 0;
+    background-color:#ebebeb;
+    background-repeat:repeat;
     clear: both;
     color: #FFF;
     font-size: 10px;
     border-top: 1px solid;
     height: 31px;
-    padding: 0.5em 0.5em 1.1em 0.5em;
+    padding: 0em 0.5em 0.9em 0.5em;
     margin-top: 2.5em;
 }
 #footer :link, #footer :visited { color: #FFF; }
@@ -799,7 +804,7 @@ table.instruments tbody td {
 table.listing {
 
     border-spacing: 0;
-    padding: 0em 1em 1em 2em;
+    padding: 0em 1em 1em 1em;
 }
 
 .fullpage table.listing {
@@ -920,9 +925,9 @@ img.align-left {
     background-image: url(../images/grid_bg_2.png);
     padding: 0.3em 0.4em 0.4em 0.4em;
     margin: 3.5em 0em 1.5em 1.5em;
-    -moz-border-radius: 8px 8px 8px 8px;
-    -webkit-border-radius: 8px 8px 8px 8px;
-    border-radius: 8px 8px 8px 8px;
+    -moz-border-radius: 8px 0px 8px 8px;
+    -webkit-border-radius: 8px 0px 8px 8px;
+    border-radius: 8px 0px 8px 8px;
 }
 
 #module-set .module h3 {
@@ -948,7 +953,7 @@ a.image-link {
 }
 
 .home-description {
-    padding-right: 33%;
+    padding-right: 15%;
     display: block;
 }
 
@@ -1015,9 +1020,9 @@ a.image-link {
     /*padding: 0.3em 0.8em 0.8em 0.8em;
     margin: 0 0 1.5em 1.5em;*/
 
-    -moz-border-radius: 8px 8px 8px 8px;
-    -webkit-border-radius: 8px 8px 8px 8px;
-    border-radius: 8px 8px 8px 8px;
+    -moz-border-radius: 8px 0px 8px 8px;
+    -webkit-border-radius: 8px 0px 8px 8px;
+    border-radius: 8px 0px 8px 8px;
 }
 .roundBorder10{
     /*padding: 0.3em 0.8em 0.8em 0.8em;
@@ -1278,7 +1283,7 @@ input,textarea{
 #module-set-left {
     float: left;
     clear: left;
-    padding: 1.3em 0.8em 0.8em 0em;
+    padding: 0em 0.8em 0.8em 0em;
     }
 
 #module-set-left .module {
@@ -1286,9 +1291,9 @@ input,textarea{
         background-image: url(../images/grid_bg_2.png);
         padding: 0.3em 0.4em 0.4em 0.4em;
         margin: 0em 0em 1.5em 0em;
-        -moz-border-radius: 8px 8px 8px 8px;
-        -webkit-border-radius: 8px 8px 8px 8px;
-        border-radius: 8px 8px 8px 8px;
+        -moz-border-radius: 8px 0px 8px 8px;
+        -webkit-border-radius: 8px 0px 8px 8px;
+        border-radius: 8px 0px 8px 8px;
         }
 
 #module-set-left .module h3 {
@@ -1309,39 +1314,51 @@ input,textarea{
     display:inline-block;
     }
 
+
 .desk_center {
-    float: right;
-    width:68%;
+    float: left;
+    width:60%;
+    padding: 0em 0em 0em 1em;
     }
 
 .course {
     margin: 0em 0em 2em 0em;
     background-color: #FFF;
-    -moz-border-radius: 8px 8px 8px 8px;
-    -webkit-border-radius: 8px 8px 8px 8px;
-    border-radius: 8px 8px 8px 8px;
-
-    }
+    -moz-border-radius: 8px 0px 8px 8px;
+    -webkit-border-radius: 8px 0px 8px 8px;
+    border-radius: 8px 0px 8px 8px;
+    background:no-repeat url(../images/bg_yt.png) 0 0;
+    background-color:#ebebeb;
+    background-repeat:repeat
+   }
 
 
 .course_title {
-    color:#FFFFFF;
-    background-image: url(../images/grid_bg_2.png);
-    -moz-border-radius: 8px 8px 0px 0px;
-    -webkit-border-radius: 8px 8px 0px 0px;
-    border-radius: 8px 8px 0px 0px;
-    padding: 0.3em 0.8em 0.3em 0.8em;
+    color: #000;
+    -moz-border-radius: 8px 0px 0px 0px;
+    -webkit-border-radius: 8px 0px 0px 0px;
+    border-radius: 8px 0px 0px 0px;
+    padding: 0em 0.8em 0em 0em;
     font-weight: bold;
     font-size: 1.2em;
     }
 
+.course_content {
+    /*max-height: 200px;
+    overflow-y: scroll;*/
+    background-color: #FFF;
+    -moz-border-radius: 8px 0px 8px 8px;
+    -webkit-border-radius: 8px 0px 8px 8px;
+    border-radius: 8px 0px 8px 8px;
+
+}
+
 .course_media {
     background-color: transparent;
-    background-image: url(../images/grid_bg_2.png);
     margin: 0em 0em 2em 0em;
-    -moz-border-radius: 8px 8px 8px 8px;
-    -webkit-border-radius: 8px 8px 8px 8px;
-    border-radius: 8px 8px 8px 8px;
+    -moz-border-radius: 8px 0px 8px 8px;
+    -webkit-border-radius: 8px 0px 8px 8px;
+    border-radius: 8px 0px 8px 8px;
 /*     border: 2px solid #CCC; */
     }
 
@@ -1352,16 +1369,31 @@ input,textarea{
 
 .video {
     background-color: transparent;
-    margin-left: auto;
-    margin-right: auto;
-    width: 360px;
-    padding: 1em 1em 1em 1em;
+    padding: 0.8em 1em 1em 0em;
     }
 
 .audio {
-    padding: 1em 1em 1em 1em;
+    padding: 0.8em 1em 1em 0em;
     background-color: transparent;
-    margin-left: auto;
-    margin-right: auto;
-    width: 550px;
+
     }
+
+/* POSTMAN */
+
+.pm_header {
+    font-weight: bold;
+    }
+
+.pm_body {
+    padding: 0em 0em 0em 1em;
+    }
+
+#pm_messages td {
+    font-weight: normal;
+    font-size: 1em;
+    }
+
+#pm_write {
+    text-align: center;
+    margin: 0em 0em 3em 0em;
+}
\ No newline at end of file
diff --git a/teleforma/htdocs/images/1pixelout-player-colour-scheme.png b/teleforma/htdocs/images/1pixelout-player-colour-scheme.png
new file mode 100755 (executable)
index 0000000..7f00141
Binary files /dev/null and b/teleforma/htdocs/images/1pixelout-player-colour-scheme.png differ
diff --git a/teleforma/htdocs/images/twitter_web_sprite_bgs.png b/teleforma/htdocs/images/twitter_web_sprite_bgs.png
new file mode 100644 (file)
index 0000000..4ad9e47
Binary files /dev/null and b/teleforma/htdocs/images/twitter_web_sprite_bgs.png differ
index b6e1d6ee183cbef52d626fb7ba7bb011544baf0c..a60ffd0f8ffa544ae3acf476b764a52ef9dab4e0 100644 (file)
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-04-02 17:51+0200\n"
+"POT-Creation-Date: 2012-04-04 13:32+0200\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -18,25 +18,25 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=(n > 1)\n"
 
-#: models.py:61 models.py:73 models.py:87 models.py:100 models.py:145
-#: models.py:261 models.py:276 models.py:293 models.py:306 models.py:319
+#: models.py:61 models.py:73 models.py:87 models.py:100 models.py:144
+#: models.py:257 models.py:272 models.py:289 models.py:302 models.py:315
 msgid "name"
 msgstr "nom"
 
-#: models.py:62 models.py:74 models.py:88 models.py:101 models.py:115
-#: models.py:146 models.py:203 models.py:262
+#: models.py:62 models.py:74 models.py:88 models.py:101 models.py:114
+#: models.py:145 models.py:202 models.py:258
 msgid "description"
 msgstr "description"
 
-#: models.py:69 models.py:75 models.py:144
+#: models.py:69 models.py:75 models.py:143
 msgid "organization"
 msgstr "organisation"
 
-#: models.py:82 models.py:113
+#: models.py:82 models.py:112
 msgid "department"
 msgstr "département"
 
-#: models.py:95 models.py:116 models.py:333
+#: models.py:95 models.py:115 models.py:329
 msgid "category"
 msgstr "catégorie"
 
@@ -44,173 +44,174 @@ msgstr "catégorie"
 msgid "categories"
 msgstr "catégories"
 
-#: models.py:108 models.py:117
-msgid "course type"
-msgstr "type de matière"
-
-#: models.py:109
-msgid "course types"
-msgstr "types de matières"
+#: models.py:108
+#, fuzzy
+msgid "type"
+msgstr "type mime"
 
-#: models.py:114 models.py:202
+#: models.py:113 models.py:201
 msgid "title"
 msgstr "titre"
 
-#: models.py:118 models.py:204 models.py:275 models.py:294 models.py:307
-#: models.py:320
+#: models.py:116
+msgid "course type"
+msgstr "type de matière"
+
+#: models.py:117 models.py:203 models.py:271 models.py:290 models.py:303
+#: models.py:316
 msgid "code"
 msgstr "cote"
 
-#: models.py:125 models.py:158
+#: models.py:124 models.py:157
 msgid "course"
 msgstr "matière"
 
-#: models.py:130 models.py:332 models.py:359
+#: models.py:129 models.py:328 models.py:355
 msgid "user"
 msgstr "utilisateur"
 
-#: models.py:131 models.py:277
+#: models.py:130 models.py:273
 msgid "courses"
 msgstr "matières"
 
-#: models.py:139 models.py:159
+#: models.py:138 models.py:158
 msgid "professor"
 msgstr "professeur"
 
-#: models.py:153 models.py:162
+#: models.py:152 models.py:161
 msgid "room"
 msgstr "salle"
 
-#: models.py:160
+#: models.py:159
 msgid "session"
 msgstr "session"
 
-#: models.py:164
+#: models.py:163
 msgid "comment"
 msgstr ""
 
-#: models.py:165
+#: models.py:164
 msgid "begin date"
 msgstr "date de début"
 
-#: models.py:166
+#: models.py:165
 msgid "end date"
 msgstr "date de fin"
 
-#: models.py:179 models.py:206 models.py:240
+#: models.py:178 models.py:205 models.py:236
 msgid "conference"
 msgstr "conférence"
 
-#: models.py:185
+#: models.py:184
 msgid "credits"
 msgstr "crédits"
 
-#: models.py:186
+#: models.py:185
 msgid "published"
 msgstr "publié"
 
-#: models.py:187
+#: models.py:186
 msgid "date added"
 msgstr "date d'ajout"
 
-#: models.py:188
+#: models.py:187
 msgid "date modified"
 msgstr "date de modification"
 
-#: models.py:208
+#: models.py:207
 msgid "annal"
 msgstr "annale"
 
-#: models.py:209
+#: models.py:208
 msgid "file"
 msgstr "fichier"
 
-#: models.py:244
+#: models.py:240
 msgid "is live"
 msgstr "en direct"
 
-#: models.py:269 models.py:270
+#: models.py:265 models.py:266
 msgid "IEJ"
 msgstr "IEJ"
 
-#: models.py:279
+#: models.py:275
 msgid "synthesis note"
 msgstr ""
 
-#: models.py:280
+#: models.py:276
 #, fuzzy
 msgid "obligation"
 msgstr "organisation"
 
-#: models.py:288 models.py:336
+#: models.py:284 models.py:332
 msgid "training"
 msgstr "formation"
 
-#: models.py:301 models.py:338
+#: models.py:297 models.py:334
 msgid "procedure"
 msgstr "procédure"
 
-#: models.py:314
+#: models.py:310
 msgid "speciality"
 msgstr "spécialité"
 
-#: models.py:327
+#: models.py:323
 msgid "oral"
 msgstr ""
 
-#: models.py:334
+#: models.py:330
 msgid "iej"
 msgstr "iej"
 
-#: models.py:340
+#: models.py:336
 msgid "oral speciality"
 msgstr "spécialité orale"
 
-#: models.py:342
+#: models.py:338
 msgid "written speciality"
 msgstr "spécialité Ã©crit"
 
-#: models.py:344 models.py:346
+#: models.py:340 models.py:342
 msgid "oral 1"
 msgstr ""
 
-#: models.py:353
+#: models.py:349
 msgid "student"
 msgstr "étudiant"
 
-#: models.py:360
+#: models.py:356
 msgid "Address"
 msgstr ""
 
-#: models.py:361
+#: models.py:357
 msgid "Postal code"
 msgstr "Code postal"
 
-#: models.py:362
+#: models.py:358
 msgid "City"
 msgstr "Ville"
 
-#: models.py:363
+#: models.py:359
 msgid "Country"
 msgstr "Pays"
 
-#: models.py:364
+#: models.py:360
 msgid "Language"
 msgstr "Langue"
 
-#: models.py:365
+#: models.py:361
 msgid "Telephone"
 msgstr "Téléphone"
 
-#: models.py:366
+#: models.py:362
 msgid "Expiration_date"
 msgstr "Date d'expiration"
 
-#: models.py:367
+#: models.py:363
 msgid "Password initialization"
 msgstr ""
 
-#: models.py:371
+#: models.py:367
 msgid "profile"
 msgstr "profil"
 
@@ -225,28 +226,28 @@ msgid ""
 "long term storage."
 msgstr ""
 
-#: templates/postman/base.html:6 templates/telemeta/base.html:70
+#: templates/postman/base.html:7 templates/telemeta/base.html:71
 msgid "Messages"
 msgstr "Messages"
 
-#: templates/postman/base.html:14
+#: templates/postman/base.html:15
 msgid "Inbox"
 msgstr ""
 
-#: templates/postman/base.html:15 templates/postman/sent.html:3
+#: templates/postman/base.html:16 templates/postman/sent.html:3
 #, fuzzy
 msgid "Sent Messages"
 msgstr "Messages"
 
-#: templates/postman/base.html:16 templates/postman/write.html:3
+#: templates/postman/base.html:17 templates/postman/write.html:3
 msgid "Write"
 msgstr ""
 
-#: templates/postman/base.html:17 templates/telemeta/base.html:78
+#: templates/postman/base.html:18 templates/telemeta/base.html:79
 msgid "Archives"
 msgstr ""
 
-#: templates/postman/base.html:18
+#: templates/postman/base.html:19
 msgid "Trash"
 msgstr ""
 
@@ -287,11 +288,11 @@ msgstr ""
 msgid "g:i A,M j,n/j/y"
 msgstr ""
 
-#: templates/postman/base_folder.html:52 templates/postman/view.html:25
+#: templates/postman/base_folder.html:52 templates/postman/view.html:28
 msgid "Delete"
 msgstr ""
 
-#: templates/postman/base_folder.html:53 templates/postman/view.html:26
+#: templates/postman/base_folder.html:53 templates/postman/view.html:29
 msgid "Archive"
 msgstr ""
 
@@ -344,15 +345,19 @@ msgstr ""
 msgid "You have received a message from the user '%(sender)s'."
 msgstr ""
 
-#: templates/postman/email_user.txt:16 templates/postman/email_visitor.txt:14
+#: templates/postman/email_user.txt:17 templates/postman/email_visitor.txt:14
 msgid "Thank you again for your interest in our services."
 msgstr ""
 
-#: templates/postman/email_user.txt:17 templates/postman/email_visitor.txt:16
+#: templates/postman/email_user.txt:18 templates/postman/email_visitor.txt:16
 msgid "The site administrator"
 msgstr ""
 
-#: templates/postman/email_user.txt:19 templates/postman/email_visitor.txt:18
+#: templates/postman/email_user.txt:18
+msgid "of"
+msgstr "de"
+
+#: templates/postman/email_user.txt:20 templates/postman/email_visitor.txt:18
 msgid ""
 "Note: This message is issued by an automated system.\n"
 "Do not reply, this would not be taken into account."
@@ -389,8 +394,8 @@ msgstr "Messages"
 msgid "Received"
 msgstr ""
 
-#: templates/postman/reply.html:3 templates/postman/view.html:28
-#: templates/postman/view.html.py:31 templates/postman/view.html:34
+#: templates/postman/reply.html:3 templates/postman/view.html:31
+#: templates/postman/view.html.py:34 templates/postman/view.html:37
 msgid "Reply"
 msgstr ""
 
@@ -409,24 +414,24 @@ msgid ""
 "storage, use instead the archive folder."
 msgstr ""
 
-#: templates/postman/view.html:5
+#: templates/postman/view.html:8
 msgid "Conversation"
 msgstr ""
 
-#: templates/postman/view.html:5
+#: templates/postman/view.html:8
 #, fuzzy
 msgid "Message"
 msgstr "Messages"
 
-#: templates/postman/view.html:14
+#: templates/postman/view.html:17
 msgid "Rejected"
 msgstr ""
 
-#: templates/postman/view.html:14
+#: templates/postman/view.html:17
 msgid ":"
 msgstr ""
 
-#: templates/postman/view.html:23
+#: templates/postman/view.html:26
 msgid "Back"
 msgstr ""
 
@@ -493,78 +498,78 @@ msgstr ""
 msgid "My courses"
 msgstr "Mes matières"
 
-#: templates/telemeta/base.html:62
+#: templates/telemeta/base.html:63
 msgid "Desk"
 msgstr ""
 
-#: templates/telemeta/base.html:65
+#: templates/telemeta/base.html:66
 msgid "Home"
 msgstr ""
 
-#: templates/telemeta/base.html:66
+#: templates/telemeta/base.html:67
 msgid "Sign in"
 msgstr ""
 
-#: templates/telemeta/base.html:72
+#: templates/telemeta/base.html:73
 msgid "Users"
 msgstr ""
 
-#: templates/telemeta/base.html:74
+#: templates/telemeta/base.html:75
 msgid "Advanced search"
 msgstr ""
 
-#: templates/telemeta/base.html:80
+#: templates/telemeta/base.html:81
 msgid "Fonds"
 msgstr ""
 
-#: templates/telemeta/base.html:81
+#: templates/telemeta/base.html:82
 msgid "Corpus"
 msgstr ""
 
-#: templates/telemeta/base.html:82
+#: templates/telemeta/base.html:83
 msgid "Collections"
 msgstr ""
 
-#: templates/telemeta/base.html:83
+#: templates/telemeta/base.html:84
 msgid "Items"
 msgstr ""
 
-#: templates/telemeta/base.html:87
+#: templates/telemeta/base.html:88
 msgid "Admin"
 msgstr ""
 
-#: templates/telemeta/base.html:89
-msgid "Generale"
+#: templates/telemeta/base.html:90
+msgid "General"
 msgstr ""
 
-#: templates/telemeta/base.html:101
+#: templates/telemeta/base.html:102
 #, fuzzy
 msgid "Profile"
 msgstr "profil"
 
-#: templates/telemeta/base.html:102
+#: templates/telemeta/base.html:103
 msgid "Help"
 msgstr ""
 
-#: templates/telemeta/base.html:103
+#: templates/telemeta/base.html:104
 msgid "Sign out"
 msgstr ""
 
-#: templates/telemeta/base.html:143
+#: templates/telemeta/base.html:144
 msgid "Powered by"
 msgstr ""
 
-#: templates/telemeta/base.html:144
+#: templates/telemeta/base.html:145
 msgid "By"
 msgstr ""
 
-#: templates/telemeta/base.html:149
+#: templates/telemeta/base.html:150
 msgid ""
 "Usage of the archives in the respect of cultural heritage of the original "
 "communities."
 msgstr ""
 
-#: templates/telemeta/base.html:155
+#: templates/telemeta/base.html:156
 msgid "Legal notices"
 msgstr ""
 
@@ -572,6 +577,9 @@ msgstr ""
 msgid "Musical selection"
 msgstr ""
 
+#~ msgid "course types"
+#~ msgstr "types de matières"
+
 #~ msgid "Courses"
 #~ msgstr "Matières"
 
@@ -580,6 +588,3 @@ msgstr ""
 
 #~ msgid "written specialities"
 #~ msgstr "spécialités Ã©crites"
-
-#~ msgid "mime type"
-#~ msgstr "type mime"
index a4891ce06b77fcbac25758f7b617a961f262f0bb..7ca8f2dc45766a2c84874c7d22fff6d868bdc2de 100755 (executable)
@@ -105,8 +105,7 @@ class CourseType(Model):
 
     class Meta:
         db_table = app_label + '_' + 'course_type'
-        verbose_name = _('course type')
-        verbose_name_plural = _('course types')
+        verbose_name = _('type')
 
 class Course(Model):
 
@@ -118,7 +117,7 @@ class Course(Model):
     code            = CharField(_('code'), max_length=255)
 
     def __unicode__(self):
-        return self.department.name + ' - '  + self.category.name + ' - ' + self.title
+        return ' - '.join([self.department.name, self.category.name, self.title, self.type.name])
 
     class Meta:
         db_table = app_label + '_' + 'course'
@@ -167,9 +166,9 @@ class Conference(Model):
 
     @property
     def description(self):
-        return self.course.department.name + ' - ' + self.course.title + ' - ' + \
-                self.professor.user.first_name +  ' - ' + \
-                self.professor.user.last_name +  ' - ' + str(self.date_begin)
+        return ' - '.join([self.course.department.name, self.course.title, self.course.type.name,
+                           self.session, self.professor.user.first_name, self.professor.user.last_name,
+                           str(self.date_begin)])
 
     def __unicode__(self):
         return self.description
@@ -222,10 +221,7 @@ class Document(MediaBase):
             self.mime_type = mimetypes.guess_type(self.file.path)[0]
 
     def __unicode__(self):
-        if self.title and not re.match('^ *N *$', self.title):
-            return  self.title
-        else:
-            return  unicode(self.title)
+        return  ' - '.join([self.title, unicode(self.course)])
 
     class Meta:
         db_table = app_label + '_' + 'document'
index 5213340e1f2bab49eacdae1d1dde4eeb64c3b5fd..2019a9d548bab08b1fdc8b369bc6a4ab59748d43 100644 (file)
@@ -1,20 +1,29 @@
-{% extends "telemeta/base.html" %}
-{% load i18n %}{% load postman_tags %}
+{% extends "teleforma/base.html" %}
+{% load i18n %}
+{% load postman_tags %}
 
-{% block title %}
-<img src="{% url telemeta-images "item.png" %}" alt="item" style="vertical-align:middle" />
-{% trans "Messages"%}
-{% endblock %}
+{% block postman_menu %}
 
+<div id="module-set-left" style="width: 20%;">
 
+<div class="module">
+<h3><img src="{% url telemeta-images "module_playlist.png" %}" alt="playlists" style="vertical-align:middle" />{% trans "Folders" %}</h3>
 
-{% block title_buttons %}
-<div id="postman_menu" style="padding-left: 20px;">
+<div style="background: white;">
 {% postman_unread as unread_count %}
-<a href="{% url postman_inbox %}" class="component_icon button icon_edit">{% trans "Inbox" %}{% if unread_count %} <strong>({{ unread_count }})</strong>{% endif %}</a></li>
-<a href="{% url postman_sent %}" class="component_icon button icon_edit">{% trans "Sent Messages" %}</a>
+<ul>
+<li><a href="{% url postman_inbox %}">{% trans "Inbox" %}{% if unread_count %} <strong>({{ unread_count }})</strong>{% endif %}</a></li>
+<li><a href="{% url postman_sent %}">{% trans "Sent Messages" %}</a></li>
+<li><a href="{% url postman_archives %}">{% trans "Archives" %}</a></li>
+<li><a href="{% url postman_trash %}">{% trans "Trash" %}</a></li>
+</ul>
+</div>
+</div>
+<div id="pm_write">
 <a href="{% url postman_write %}" class="component_icon button icon_edit">{% trans "Write" %}</a>
-<a href="{% url postman_archives %}" class="component_icon button icon_edit">{% trans "Archives" %}</a>
-<a href="{% url postman_trash %}" class="component_icon button icon_edit">{% trans "Trash" %}</a>
 </div>
-{% endblock %}
\ No newline at end of file
+</div>
+
+
+
+{% endblock postman_menu %}
\ No newline at end of file
index b481c1eb06a8adaa4b22122ad9c0133c2a042faf..4597105d10b880af61745cf33368146567997c9f 100644 (file)
@@ -3,7 +3,7 @@
 
 {% block content %}
 
-<div id="postman">
+<div id="postman" class="desk_center">
 <h1>{% block pm_folder_title %}{% endblock %}</h1>
 {% autopaginate pm_messages %}
 {% if invalid_page %}
index d454e9e1621e6de44cca192f6b4fdac3a646ea1e..f89d57492db51395b4ab78705dbeb7e6c93efdcd 100644 (file)
@@ -10,7 +10,7 @@
 {% endif %}
 {% endblock %}
 {% block content %}
-<div id="postman">
+<div id="postman" class="desk_center">
 <h1>{% block pm_write_title %}{% endblock %}</h1>
 <form action="{% if next_url %}?next={{ next_url|urlencode }}{% endif %}" method="post">{% csrf_token %}
 <table>
index c62111bb9cfbc5a0ca65e110438e51fe9596c9b2..c9da23b0e230b3bda3b74148e4595b8d945a0c3e 100644 (file)
@@ -1,4 +1,4 @@
-{% load i18n %}{% autoescape off %}{% trans "Dear user," %}
+{% load i18n %}{% load telemeta_utils %}{% load teleforma_tags %}{% autoescape off %}{% trans "Dear user," %}
 {% if action == 'rejection' %}
 {% blocktrans with object.sent_at|date:"DATETIME_FORMAT" as date and object.obfuscated_recipient as recipient %}On {{ date }}, you asked to send a message to the user '{{ recipient }}'.{% endblocktrans %}
 
 {% else %}{% blocktrans with object.obfuscated_sender as sender %}You have received a copy of a response from the user '{{ sender }}'.{% endblocktrans %}
 {% endif %}
 {% else %}{% blocktrans with object.obfuscated_sender as sender %}You have received a message from the user '{{ sender }}'.{% endblocktrans %}
-{% endif %}
-{% endif %}{# 'acceptance' #}
+{% endif %}{% endif %}{# 'acceptance' #}{% trans "You can read and respond to this message from your online desk" %}:
+http://{{ site.name }}/messages/inbox/
+
 {% trans "Thank you again for your interest in our services." %}
-{% trans "The site administrator" %}
+{% trans "The site administrator" %} {% trans "of" %} {% organization %}
 
 {% blocktrans %}Note: This message is issued by an automated system.
 Do not reply, this would not be taken into account.{% endblocktrans %}{% endautoescape %}
\ No newline at end of file
index 23c7264cc3ae707e1417d2986a6c7e28aa5f9105..d7fb23219f014c439c86a64f44cfd0d84a9bbbd3 100644 (file)
@@ -1,5 +1,8 @@
 {% extends "postman/base.html" %}
-{% load i18n %}{% load postman_tags %}
+{% load i18n %}
+{% load teleforma_tags %}
+{% load postman_tags %}
+
 {% block content %}
 <div id="postman">
 <h1>{% if pm_messages|length > 1 %}{% trans "Conversation" %}{% else %}{% trans "Message" %}{% endif %}</h1>
diff --git a/teleforma/templates/teleforma/course_media.html b/teleforma/templates/teleforma/course_media.html
new file mode 100644 (file)
index 0000000..2ff34b4
--- /dev/null
@@ -0,0 +1,59 @@
+{% extends "teleforma/course_detail.html" %}
+{% load telemeta_utils %}
+{% load i18n %}
+
+
+{% block extra_javascript %}
+{% if "video" in mime_type %}
+<link href="http://vjs.zencdn.net/c/video-js.css" rel="stylesheet">
+<script src="http://vjs.zencdn.net/c/video.js"></script>
+{% endif %}
+{% endblock extra_javascript %}
+
+{% block course %}
+
+<div class="course_media">
+
+<div class="course_title">{{ course.title }}{% if course.description %} - {{ course.description }}{% endif %}
+</div>
+
+<div class="media">
+
+{% if "video" in mime_type %}
+<div class="video">
+<video id="my_video_1" class="video-js vjs-default-skin" width="640" height="360" controls preload="auto" data-setup="{}">
+<!-- Hello Chrome and Firefox (and Opera?) -->
+<source src="{% url telemeta-item-export media.item.public_id mime_type|mime_to_ext %}" type="{{ mime_type }}" />
+</video>
+</div>
+
+
+{% elif "audio" in mime_type %}
+
+<div class="audio">
+<iframe width='640' height='200' frameborder='0' scrolling='no' marginheight='0' marginwidth='0' src="{% url telemeta-item-player-simple  media.item.public_id 640 130 %}"></iframe>
+</div>
+
+{% endif %}
+
+</div>
+
+<div class="media_infos">
+
+{% block general_info %}
+<dl class="listing">
+{% dl_field item "title" placeholder %}
+<dt>{% field_label item "collection" %}</dt>
+<dd><a href="{% url telemeta-collection-detail item.collection.public_id %}">{{ item.collection }}</a></dd>
+<dt>{% trans "Recording date" %}</dt>
+
+<dd>{% if item.recorded_from_date %}{{ item.recorded_from_date }}{% endif %}{% if item.recorded_from_date and item.recorded_to_date%} - {% endif %}{% if item.recorded_to_date %}{{ item.recorded_to_date}}{% endif %}</dd>
+
+</dl>
+{% endblock general_info %}
+
+</div>
+
+
+</div>
+{% endblock course %}
index 0673747c1e20a1275ad4e9eae116843406bee6d7..59abe8cc5c61918a90584870ffebf27c35c64947 100644 (file)
@@ -6,19 +6,8 @@
 
 
 {% block content %}
-<div id="module-set" style="width: 33%">
-    {% block module_all_revisions %}
-    {% with revisions as revisions and "All last changes" as title %}
-    {% include "telemeta/inc/module_revisions.html" %}
-    {% endwith %}
-    {% endblock %}
-</div>
 
 <div class="home-description">
-<h1><img src="{% url telemeta-images "playlist_title.png" %}" alt="playlists" style="vertical-align:middle" /> {% trans "Bureau" %}</h1>
-<br />
-
-
    <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>
@@ -60,6 +49,7 @@
         {% include "teleforma/inc/conference_list.html" %}
         {% endwith %}
         {% endblock %}
+
       </div>
 
     {% endfor %}
index 74963237ea3004bb4340bb44b200083b43278457..5af6bbe1f454e7764ec980baa4c388a94dca6441 100644 (file)
@@ -1,5 +1,6 @@
 {% load i18n %}
 
+<div class="course_content">
     <h2><img src="{% url telemeta-images "item_title.png" %}" style="vertical-align:middle" /> {% trans "Conferences"%}</h2>
     <table class="listing" width="100%">
     <thead>
@@ -19,3 +20,4 @@
         {% endfor %}
     </tbody>
     </table>
+</div>
\ No newline at end of file
index 5c72ccd195e0572a954a0683eff6c4f436efee93..f5d010d816492bb13b30f199a04cc6fc07eeba6c 100644 (file)
@@ -1,5 +1,6 @@
 {% load i18n %}
 
+<div class="course_content">
 <h2><img src="{% url telemeta-images "item_title.png" %}" style="vertical-align:middle" /> {% trans "Documents"%}</h2>
 <table class="listing" width="100%">
     <thead>
     <tbody>
         {% for document in course.document.all %}
         <tr {% if not forloop.counter0|divisibleby:"2" %}class="odd"{% endif %}>
-        <td>{{ document.title }}</td>
+        <td><a href="{% url teleforma-document-view document.id %}">{{ document.title }}</a></td>
         <td>{{ document.description }}</td>
         <td>{{ document.date_added }}</td>
         </tr>
     {% endfor %}
     </tbody>
 </table>
+</div>
\ No newline at end of file
index 92c595826a36a7c189bfdb6c548f1046959ef729..7c55cd7880a9ed6c6359a71bfc51d39341f054c3 100644 (file)
@@ -1,6 +1,6 @@
 {% load i18n %}
 
-
+<div class="course_content">
     <h2><img src="{% url telemeta-images "item_title.png" %}" style="vertical-align:middle" /> {% trans "Medias"%}</h2>
     <table class="listing" width="100%">
     <thead>
@@ -20,3 +20,4 @@
         {% endfor %}
     </tbody>
     </table>
+</div>
\ No newline at end of file
index bd40dbf4f4e3ff36aa39d0fa11b8f156b3349178..931af9f3dde58ebc069bed39a46e09d25626a33a 100644 (file)
@@ -1,6 +1,7 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!DOCTYPE html>
 {% load i18n %}
 {% load telemeta_utils %}
+
 {% get_current_language as LANGUAGE_CODE %}
 {% get_available_languages as LANGUAGES %}
 <html xmlns="http://www.w3.org/1999/xhtml" lang="{{ LANGUAGE_CODE }}" xml:lang="{{ LANGUAGE_CODE }}" {% if LANGUAGE_BIDI %}dir="rtl"{% endif %}>
@@ -63,11 +64,11 @@ alt="Telemeta Powered"/>-->
  </li>
  {% else %}
   <li><a href="{% url telemeta-home %}" class="blue">{% trans "Home" %}</a></li>
-  <li><a href="{% url telemeta-login %}?next={{ request.path|urlencode }}" class="violet">{% trans "Sign in" %}</a></li>
+  <li><a href="{% url telemeta-login %}" class="violet">{% trans "Sign in" %}</a></li>
  {% endif %}
 
  {% if user.is_authenticated %}
- <li><a href="/messages" class="green">{% trans "Messages" %}</a></li>
+ <li><a href="/messages" class="green">{% trans "Messages" %}{% if postman_unread_count %} ({{ postman_unread_count }}){% endif %}</a></li>
 
  <li><a href="{% url telemeta-users %}" class="yellow">{% trans "Users" %}</a></li>
 
@@ -86,7 +87,7 @@ alt="Telemeta Powered"/>-->
 
  <li><a href="#admin#" class="violet">{% trans "Admin" %}</a>
   <ul>
-    <li><a href="{% url telemeta-admin-general %}">{% trans "Generale" %}</a></li>
+    <li><a href="{% url telemeta-admin-general %}">{% trans "General" %}</a></li>
   </ul>
  </li>
  {% endif %}
@@ -115,14 +116,15 @@ alt="Telemeta Powered"/>-->
 </div>
 {% endblock header %}
 
-{% block postman_menu %}
-{% endblock postman_menu %}
-
 <div id="content">
     <table id="content_header"><tr>
             <td class="leftcol"><h1>{% block title %}{% endblock %}</h1></td>
             <td class="rightcol">{% block title_buttons %}{% endblock %}</td>
     </tr></table>
+
+{% block postman_menu %}
+{% endblock postman_menu %}
+
 {% block content %}{% endblock %}
 <div class="nett"></div>
 {% block delete %}{% endblock %}
diff --git a/teleforma/templates/telemeta/inc/user_list.html b/teleforma/templates/telemeta/inc/user_list.html
new file mode 100644 (file)
index 0000000..db33602
--- /dev/null
@@ -0,0 +1,24 @@
+{% load i18n %}
+{% load telemeta_utils %}
+{% load teleforma_tags %}
+
+  <table class="listing" width="100%">
+   <thead>
+    <tr><th>{% trans "User"%}</th>
+    <th>{% trans "First Name"%}</th>
+    <th>{% trans "Last Name"%}</th>
+    <th>{% trans "Messages"%}</th>
+    <th>{% trans "Training"%}</th>
+    </tr>
+   </thead><tbody>
+    {% for user in users %}
+    <tr>
+     <td><a href="{% url telemeta-profile-detail user.username %}">{{user.username}}</a></td>
+     <td>{{ user.first_name }}</td>
+     <td>{{ user.last_name }}</td>
+     <td><a href="{% url postman_write user.username %}" class="component_icon button icon_edit">Write</a></td>
+     <td>{% for training in user__student.training %}{{ training }} {% endfor %}</td>
+    </tr>
+    {% endfor %}
+    </tbody>
+  </table>
\ No newline at end of file
diff --git a/teleforma/templatetags/__init__.py b/teleforma/templatetags/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/teleforma/templatetags/teleforma_tags.py b/teleforma/templatetags/teleforma_tags.py
new file mode 100644 (file)
index 0000000..322d8c7
--- /dev/null
@@ -0,0 +1,51 @@
+
+from django import template
+from django.utils.http import urlquote
+from teleforma.models import *
+from django.core.urlresolvers import reverse
+from django.utils import html
+from django import template
+from django.utils.text import capfirst
+from django.utils.translation import ungettext
+from docutils.core import publish_parts
+from django.utils.encoding import smart_str, force_unicode
+from django.utils.safestring import mark_safe
+from django import db
+import re
+import os
+import datetime
+from django.conf import settings
+from django.template.defaultfilters import stringfilter
+
+register = template.Library()
+
+@register.filter
+def parse_urls(text):
+    output = ''
+    for block in text.split(' '):
+        if 'http://' in block:
+            output += '<a href="' + block + '">' + block + '</a>'
+        else:
+            output += block
+    return output
+
+
+@register.tag
+def value_from_settings(parser, token):
+    try:
+        # split_contents() knows not to split quoted strings.
+        tag_name, var = token.split_contents()
+    except ValueError:
+        raise template.TemplateSyntaxError, "%r tag requires a single argument" % token.contents.split()[0]
+    return ValueFromSettings(var)
+
+class ValueFromSettings(template.Node):
+    def __init__(self, var):
+        self.arg = template.Variable(var)
+    def render(self, context):
+        return settings.__getattr__(str(self.arg))
+
+@register.simple_tag
+def trainings(user):
+    student = user.student.get()
+    return training.student.all()
index 4b5418df8f423674a8b1b33daf114e392b2bd044..8094631a86147cad213aac646297e204e5f39bf5 100644 (file)
@@ -47,6 +47,8 @@ urlpatterns = patterns('',
     url(r'^desk/courses/$', CoursesView.as_view(), name="teleforma-courses"),
     url(r'^desk/courses/(?P<pk>.*)$', CourseView.as_view(), name="teleforma-course-detail"),
     url(r'^desk/medias/(?P<pk>.*)$', MediaView.as_view(), name="teleforma-media-detail"),
+    url(r'^desk/documents/(?P<pk>.*)/download/', document_download, name="teleforma-document-download"),
+    url(r'^desk/documents/(?P<pk>.*)/view/', document_view, name="teleforma-document-view"),
 
 # CSS+Images (FIXME: for developement only)
     url(r'^teleforma/css/(?P<path>.*)$', 'django.views.static.serve',
index f04138900cf3d3f92b7b476ef83661c084d1dc02..eb0c2f97f3025aaf517b035bf2267245f926fab9 100755 (executable)
@@ -1,5 +1,7 @@
 # Create your views here.
 
+import mimetypes
+
 from jsonrpc import jsonrpc_method
 
 from django.utils.decorators import method_decorator
@@ -32,6 +34,47 @@ def render(request, template, data = None, mimetype = None):
     return render_to_response(template, data, context_instance=RequestContext(request),
                               mimetype=mimetype)
 
+def get_courses(user):
+    professor = user.professor.all()
+    student = user.student.all()
+    if professor:
+        courses = user.professor.get().courses.all()
+    elif student:
+        courses = user.student.get().training.courses.all()
+    elif user.is_staff:
+        courses = Course.objects.all()
+    else:
+        courses = None
+    return courses
+
+def stream_from_file(__file):
+    chunk_size = 0x10000
+    f = open(__file, 'r')
+    while True:
+        __chunk = f.read(chunk_size)
+        if not len(__chunk):
+            f.close()
+            break
+        yield __chunk
+
+def document_download(request, pk):
+    document = Document.objects.get(id=pk)
+    fsock = open(document.file.path, 'r')
+    mimetype = mimetypes.guess_type(document.file.path)[0]
+    extension = mimetypes.guess_extension(mimetype)
+    response = HttpResponse(fsock, mimetype=mimetype)
+    response['Content-Disposition'] = "attachment; filename=%s%s" % \
+                                     (unicode(document), extension)
+    return response
+
+def document_view(request, pk):
+    document = Document.objects.get(id=pk)
+    fsock = open(document.file.path, 'r')
+    mimetype = mimetypes.guess_type(document.file.path)[0]
+    extension = mimetypes.guess_extension(mimetype)
+    response = HttpResponse(fsock, mimetype=mimetype)
+    return response
+
 
 class CourseView(DetailView):
 
@@ -39,7 +82,7 @@ class CourseView(DetailView):
 
     def get_context_data(self, **kwargs):
         context = super(CourseView, self).get_context_data(**kwargs)
-        context['courses'] = Course.objects.all()
+        context['courses'] = get_courses(self.request.user)
         return context
 
 class CoursesView(ListView):
@@ -49,7 +92,7 @@ class CoursesView(ListView):
 
     def get_context_data(self, **kwargs):
         context = super(CoursesView, self).get_context_data(**kwargs)
-        context['courses'] = Course.objects.all()
+        context['object_list'] = get_courses(self.request.user)
         return context
 
 class MediaView(DetailView):
@@ -59,10 +102,13 @@ class MediaView(DetailView):
 
     def get_context_data(self, **kwargs):
         context = super(MediaView, self).get_context_data(**kwargs)
-        context['courses'] = Course.objects.all()
+        context['courses'] = get_courses(self.request.user)
         media = self.get_object()
         view = ItemView()
+        print media.item.file
+        print view.item_analyze(media.item)
         context['mime_type'] = view.item_analyze(media.item)
         context['course'] = media.course
         context['item'] = media.item
         return context
+