From f0980ad2e73f7fb2eb1af266081e1c9c8855b509 Mon Sep 17 00:00:00 2001 From: yomguy Date: Thu, 19 Apr 2012 18:40:00 +0200 Subject: [PATCH] fix media infos, trans --- teleforma/htdocs/css/teleforma.css | 2 +- teleforma/locale/fr/LC_MESSAGES/django.mo | Bin 3764 -> 3742 bytes teleforma/locale/fr/LC_MESSAGES/django.po | 105 ++++++++++-------- .../templates/teleforma/course_media.html | 4 + .../templates/telemeta/profile_detail.html | 18 ++- teleforma/templatetags/teleforma_tags.py | 9 +- 6 files changed, 84 insertions(+), 54 deletions(-) diff --git a/teleforma/htdocs/css/teleforma.css b/teleforma/htdocs/css/teleforma.css index ec88cdd5..b9eaa991 100644 --- a/teleforma/htdocs/css/teleforma.css +++ b/teleforma/htdocs/css/teleforma.css @@ -586,7 +586,7 @@ color:#FFF; border-bottom: 1px solid #000; height: 30px; padding: 0em 0.5em 10px 0.5em; - margin-top: 1em; + margin-top: 2em; } #footer :link, #footer :visited { color: #FFF; } #footer hr { display: none } diff --git a/teleforma/locale/fr/LC_MESSAGES/django.mo b/teleforma/locale/fr/LC_MESSAGES/django.mo index 9e2a4c7837ca4fcc85467e5894fabafb8d2a72e9..aa1019b1f82d6f86a0c551370a82b4b04f1728ec 100644 GIT binary patch delta 1490 zcmYk*O-NK>6vpv)Y{t>l(M&BrMhOGWOtC;mLriMS3KtrbkWdCvMr8TXLeN2j7G)3( zm5Y?xgb}tGEsBI9uvJAZk|?mC5CRce6cj=KXFQ88p84JL-uLs|>r8Mmcy&+2@0=S? zbZ#x)#uU7dUVMbf_!N_H9@Fs+YTTmbOXe@sI6n{9U@B@{24-L`rePV<)rI^n67SGJ zgEr8N8gLM`kq*mGT7J&*Ap1G4gW5;|s{at8q5c223{7|`wYvo2A+EFDs zj_dF&YT;4KFQZO6fjZGNs#3G4SMV5f@EK~J1ysLpsCkyH{U>TYFS|@cl@#3;8IMo@bgt)QL(_3sj;iP-A&LYFrq#UK{EacLZEvyyF>r(2v^jFs{c- z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- a/teleforma/locale/fr/LC_MESSAGES/django.po +++ b/teleforma/locale/fr/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-04-19 13:24+0200\n" +"POT-Creation-Date: 2012-04-19 18:19+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -210,7 +210,7 @@ msgstr "" msgid "student" msgstr "étudiant" -#: models.py:458 templates/telemeta/profile_detail.html:55 +#: models.py:458 templates/telemeta/profile_detail.html:63 msgid "Address" msgstr "" @@ -226,11 +226,11 @@ msgstr "Ville" msgid "Country" msgstr "Pays" -#: models.py:462 templates/telemeta/profile_detail.html:64 +#: models.py:462 templates/telemeta/profile_detail.html:72 msgid "Language" msgstr "Langue" -#: models.py:463 templates/telemeta/profile_detail.html:56 +#: models.py:463 templates/telemeta/profile_detail.html:64 msgid "Telephone" msgstr "Téléphone" @@ -282,58 +282,58 @@ msgstr "" msgid "New message" msgstr "Nouveau message" -#: templates/postman/base_folder.html:10 +#: templates/postman/base_folder.html:12 msgid "by conversation" msgstr "" -#: templates/postman/base_folder.html:11 +#: templates/postman/base_folder.html:13 #, fuzzy msgid "by message" msgstr "Messages" -#: templates/postman/base_folder.html:16 +#: templates/postman/base_folder.html:18 msgid "Sorry, this page number is invalid." msgstr "" -#: templates/postman/base_folder.html:29 templates/telemeta/lists.html:75 +#: templates/postman/base_folder.html:31 templates/telemeta/lists.html:75 msgid "Action" msgstr "" -#: templates/postman/base_folder.html:30 +#: templates/postman/base_folder.html:32 msgid "Sender" msgstr "" -#: templates/postman/base_folder.html:31 templates/postman/reply.html:4 +#: templates/postman/base_folder.html:33 templates/postman/reply.html:4 msgid "Recipient" msgstr "" -#: templates/postman/base_folder.html:32 +#: templates/postman/base_folder.html:34 msgid "Subject" msgstr "" -#: templates/postman/base_folder.html:33 +#: templates/postman/base_folder.html:35 #: templates/telemeta/inc/module_revisions.html:16 msgid "Date" msgstr "" -#: templates/postman/base_folder.html:48 +#: templates/postman/base_folder.html:50 msgid "g:i A,M j,n/j/y" msgstr "" -#: templates/postman/base_folder.html:56 templates/postman/view.html:39 +#: templates/postman/base_folder.html:58 templates/postman/view.html:39 #: templates/telemeta/lists.html:58 msgid "Delete" msgstr "" -#: templates/postman/base_folder.html:59 templates/postman/view.html:43 +#: templates/postman/base_folder.html:61 templates/postman/view.html:43 msgid "Archive" msgstr "" -#: templates/postman/base_folder.html:62 +#: templates/postman/base_folder.html:64 msgid "Undelete" msgstr "" -#: templates/postman/base_folder.html:68 +#: templates/postman/base_folder.html:70 #, fuzzy msgid "No messages." msgstr "Messages" @@ -342,7 +342,7 @@ msgstr "Messages" #: templates/teleforma/course_conference.html:57 #: templates/teleforma/course_detail.html:69 #: templates/teleforma/course_document.html:45 -#: templates/teleforma/course_media.html:72 +#: templates/teleforma/course_media.html:80 #: templates/teleforma/courses.html:102 msgid "Send" msgstr "" @@ -507,7 +507,7 @@ msgid "Description" msgstr "Description" #: templates/teleforma/course.html:20 templates/teleforma/course.html.py:36 -#: templates/teleforma/course.html:53 +#: templates/teleforma/course.html:53 templates/teleforma/course_media.html:58 msgid "Date added" msgstr "Date d'ajout" @@ -553,7 +553,7 @@ msgstr "" #: templates/teleforma/course_conference.html:50 #: templates/teleforma/course_detail.html:62 #: templates/teleforma/course_document.html:38 -#: templates/teleforma/course_media.html:65 +#: templates/teleforma/course_media.html:73 msgid "Local tweeter" msgstr "Tweeter local" @@ -562,9 +562,20 @@ msgstr "Tweeter local" msgid "No document" msgstr "Aucun document" -#: templates/teleforma/course_media.html:52 -msgid "Recording date" -msgstr "date de d'enregistrement" +#: templates/teleforma/course_media.html:53 +#, fuzzy +msgid "Begin date" +msgstr "date de début" + +#: templates/teleforma/course_media.html:55 +#, fuzzy +msgid "End date" +msgstr "date de fin" + +#: templates/teleforma/course_media.html:60 +#, fuzzy +msgid "Mime type" +msgstr "type mime" #: templates/teleforma/courses.html:22 msgid "My courses" @@ -694,7 +705,7 @@ msgstr "" msgid "Add" msgstr "" -#: templates/telemeta/lists.html:55 templates/telemeta/profile_detail.html:38 +#: templates/telemeta/lists.html:55 templates/telemeta/profile_detail.html:46 msgid "Edit" msgstr "" @@ -722,79 +733,83 @@ msgstr "" msgid "deleted" msgstr "" -#: templates/telemeta/profile_detail.html:5 +#: templates/telemeta/profile_detail.html:6 #, fuzzy msgid "User Profile" msgstr "profil" -#: templates/telemeta/profile_detail.html:24 +#: templates/telemeta/profile_detail.html:16 +msgid "Courses" +msgstr "Matières" + +#: templates/telemeta/profile_detail.html:32 msgid "Send a message" msgstr "Envoyer un message" -#: templates/telemeta/profile_detail.html:33 +#: templates/telemeta/profile_detail.html:41 #, fuzzy msgid "User profile" msgstr "profil" -#: templates/telemeta/profile_detail.html:39 +#: templates/telemeta/profile_detail.html:47 msgid "Change password" msgstr "" -#: templates/telemeta/profile_detail.html:47 +#: templates/telemeta/profile_detail.html:55 #: templates/telemeta/inc/user_list.html:25 msgid "First Name" msgstr "" -#: templates/telemeta/profile_detail.html:48 +#: templates/telemeta/profile_detail.html:56 #: templates/telemeta/inc/user_list.html:24 msgid "Last Name" msgstr "" -#: templates/telemeta/profile_detail.html:49 +#: templates/telemeta/profile_detail.html:57 msgid "Email" msgstr "" -#: templates/telemeta/profile_detail.html:51 +#: templates/telemeta/profile_detail.html:59 msgid "Institution" msgstr "" -#: templates/telemeta/profile_detail.html:52 +#: templates/telemeta/profile_detail.html:60 #, fuzzy msgid "Department" msgstr "département" -#: templates/telemeta/profile_detail.html:53 +#: templates/telemeta/profile_detail.html:61 msgid "Function" msgstr "" -#: templates/telemeta/profile_detail.html:54 +#: templates/telemeta/profile_detail.html:62 msgid "Attachment" msgstr "" -#: templates/telemeta/profile_detail.html:57 +#: templates/telemeta/profile_detail.html:65 #, fuzzy msgid "Expiration date" msgstr "Date d'expiration" -#: templates/telemeta/profile_detail.html:59 +#: templates/telemeta/profile_detail.html:67 msgid "Is staff" msgstr "" -#: templates/telemeta/profile_detail.html:60 +#: templates/telemeta/profile_detail.html:68 msgid "Is superuser" msgstr "" -#: templates/telemeta/profile_detail.html:61 +#: templates/telemeta/profile_detail.html:69 msgid "Group" msgid_plural "Groups" msgstr[0] "" msgstr[1] "" -#: templates/telemeta/profile_detail.html:62 +#: templates/telemeta/profile_detail.html:70 msgid "Last login" msgstr "" -#: templates/telemeta/profile_detail.html:72 +#: templates/telemeta/profile_detail.html:80 msgid "Apply" msgstr "" @@ -870,10 +885,13 @@ msgstr "" msgid "Unknown" msgstr "" -#: templatetags/teleforma_tags.py:89 +#: templatetags/teleforma_tags.py:93 msgid "me" msgstr "moi" +#~ msgid "Recording date" +#~ msgstr "date de d'enregistrement" + #~ msgid "Modify profile" #~ msgstr "Modifier le profil" @@ -890,9 +908,6 @@ msgstr "moi" #~ msgid "course types" #~ msgstr "types de matières" -#~ msgid "Courses" -#~ msgstr "Matières" - #~ msgid "oral specialities" #~ msgstr "spécialités orales" diff --git a/teleforma/templates/teleforma/course_media.html b/teleforma/templates/teleforma/course_media.html index 161dacb0..4018442a 100644 --- a/teleforma/templates/teleforma/course_media.html +++ b/teleforma/templates/teleforma/course_media.html @@ -47,6 +47,10 @@ $(document).ready(function(){
{% dl_field item "title" placeholder %} +{% if media.conference.professor %} +
{% trans "Professor" %}
+
{{ media.conference.professor }}
+{% endif %}
{% field_label item "approx_duration" %}
{{ item.approx_duration }}
{% if media.conference %} diff --git a/teleforma/templates/telemeta/profile_detail.html b/teleforma/templates/telemeta/profile_detail.html index 0d497a7c..314b0582 100644 --- a/teleforma/templates/telemeta/profile_detail.html +++ b/teleforma/templates/telemeta/profile_detail.html @@ -1,6 +1,7 @@ {% extends "telemeta/base.html" %} {% load i18n %} {% load telemeta_utils %} +{% load teleforma_tags %} {% block head_title %}{% trans "User Profile" %} : {{ usr.username }}{% endblock %} @@ -11,11 +12,20 @@
{% block modules %} - {% block module_searches %} - {% with searches as searches and "Searches" as title %} - {% include "telemeta/inc/module_searches.html" %} +
+

playlists{% trans "Courses" %}

+
+
    + {% block courses %} + {% with user|user_courses as courses %} + {% for course in courses %} +
  • {{ course.title}} {{ course.type }}
  • + {% endfor %} {% endwith %} - {% endblock %} + {% endblock courses %} +
+
+
{% endblock %} diff --git a/teleforma/templatetags/teleforma_tags.py b/teleforma/templatetags/teleforma_tags.py index 820540dc..3921f590 100644 --- a/teleforma/templatetags/teleforma_tags.py +++ b/teleforma/templatetags/teleforma_tags.py @@ -19,6 +19,7 @@ from django.template.defaultfilters import stringfilter import django.utils.timezone as timezone from timezones.utils import localtime_for_timezone from django.utils.translation import ugettext_lazy as _ +from teleforma.views import get_courses register = template.Library() @@ -58,10 +59,9 @@ class ValueFromSettings(template.Node): def render(self, context): return settings.__getattr__(str(self.arg)) -@register.simple_tag -def trainings(user): - student = user.student.get() - return training.student.all() +@register.filter +def user_courses(user): + return get_courses(user) @register.filter def to_recipients(users): @@ -87,3 +87,4 @@ def or_me(value, arg): if not isinstance(arg, (unicode, str)): arg = unicode(arg) return _('me') if value == arg else value + -- 2.39.5