From 83cb34171bf57c6682ee459ef8a3298f5b98d6f8 Mon Sep 17 00:00:00 2001 From: yomguy Date: Fri, 20 Apr 2012 13:03:31 +0200 Subject: [PATCH] add static files, try document view, pdf.js, etc.. --- teleforma/context_processors.py | 7 -- teleforma/locale/fr/LC_MESSAGES/django.mo | Bin 3742 -> 3995 bytes teleforma/locale/fr/LC_MESSAGES/django.po | 85 +++++++++--------- .../teleforma}/css/teleforma.css | 68 +++++++------- .../images/1pixelout-player-colour-scheme.png | Bin .../images/twitter_web_sprite_bgs.png | Bin teleforma/static/teleforma/js/inline.js | 38 ++++++++ .../teleforma}/js/pdf-min.js | 0 .../static/teleforma/swf/1pixeloutplayer.xml | 38 ++++++++ teleforma/static/teleforma/swf/player.swf | Bin 0 -> 5260 bytes .../templates/teleforma/course_document.html | 60 +++++++++++-- .../teleforma/inc/conference_list.html | 2 +- .../teleforma/inc/document_list.html | 4 +- teleforma/templates/telemeta/base.html | 4 +- teleforma/urls.py | 19 ++-- teleforma/views.py | 25 +++++- 16 files changed, 240 insertions(+), 110 deletions(-) delete mode 100644 teleforma/context_processors.py rename teleforma/{htdocs => static/teleforma}/css/teleforma.css (94%) rename teleforma/{htdocs => static/teleforma}/images/1pixelout-player-colour-scheme.png (100%) rename teleforma/{htdocs => static/teleforma}/images/twitter_web_sprite_bgs.png (100%) create mode 100644 teleforma/static/teleforma/js/inline.js rename teleforma/{htdocs => static/teleforma}/js/pdf-min.js (100%) create mode 100755 teleforma/static/teleforma/swf/1pixeloutplayer.xml create mode 100755 teleforma/static/teleforma/swf/player.swf diff --git a/teleforma/context_processors.py b/teleforma/context_processors.py deleted file mode 100644 index bbb960ca..00000000 --- a/teleforma/context_processors.py +++ /dev/null @@ -1,7 +0,0 @@ -from django.contrib.sites.models import Site - -def main(request): - return {'site': Site.objects.get_current()} - - - diff --git a/teleforma/locale/fr/LC_MESSAGES/django.mo b/teleforma/locale/fr/LC_MESSAGES/django.mo index aa1019b1f82d6f86a0c551370a82b4b04f1728ec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#>~8I;}~We#)jDow&8f&d_b|X;%MTmwRzbT;qjIaOv#B> zUgC=;@c|>E_%fdmANXJyp_N)Iic-q&e|9NX&;R*7*Zp$c*L~ghITt5i$?-m<`_4P8 z4rQZ*3C?YYy*^&pt`W|q!rf3!9t^+}&=1cVJ7Eg`RqMYAHU0rihL2$q?15?U6=c5W z`mCYf_zP;HpWfjx2sLpO90eypB~%C*>dLIY3MzqB=5K&Xw88wH=I=KDP~7*NJIRMK zJZHQFN8(?HJg(c?pBSIRMA~1Q{|;)QPjC|)u>LSvE1_EBMyQQMcxi)8YG-}d%7=Dx z04mT?NDOzzcpfUyWvHEZnSUQ@{4>boUhq=jw@{UP4;7~ma;mQ1`oBTN8-$)Ze)FL- z`2&M6m2#*e6OGfL0u`BG3bjzRwTGbst~I|Ns)AdgD%A=J?b@N{9fs-fcrxc79p>Bx z8phI~?Px+KR3h0>6ABbxK^_<8rOK^?>aT~Y&^9<4?t)tQnE9unHhLLqL$?Cd zU#04%L4h8^O!yQk&^sIW6)Mnxwf}@#&_|XEI1+07B&eOwg6gk?40U0s3av9XKviIe z$A>aG05#zl)PxSGN_0X^ykfiox8UD{N;rd6wO|(1yh5n)rBIctvGx^E8(0tZE7}aT zp4V(0`yer$2Qy%Y`PZNV-!?viO1KBAaxb9*y)nPn_z^0RFHm=E5NgNYq1H(xYx+Hx zKJ?*opmvlGwZI&x3M@2#G1SB`)Pn1w&bR?;T#L20K_z?`j)A8jSIo^tc_raY&bCGMb4d zpnS9%twOS5G!f}cS0I^=qXy|7=*X6#Ho9i+v8{C50MiM4DRL+hQ|= OC9!Dm$lV{ou7tl+VT9=b diff --git a/teleforma/locale/fr/LC_MESSAGES/django.po b/teleforma/locale/fr/LC_MESSAGES/django.po index a1b93b25..866b9b7f 100644 --- 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 18:19+0200\n" +"POT-Creation-Date: 2012-04-19 21:48+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:63 +#: models.py:458 templates/telemeta/profile_detail.html:65 msgid "Address" msgstr "" @@ -226,11 +226,11 @@ msgstr "Ville" msgid "Country" msgstr "Pays" -#: models.py:462 templates/telemeta/profile_detail.html:72 +#: models.py:462 templates/telemeta/profile_detail.html:74 msgid "Language" msgstr "Langue" -#: models.py:463 templates/telemeta/profile_detail.html:64 +#: models.py:463 templates/telemeta/profile_detail.html:66 msgid "Telephone" msgstr "Téléphone" @@ -314,7 +314,7 @@ msgstr "" #: templates/postman/base_folder.html:35 #: templates/telemeta/inc/module_revisions.html:16 msgid "Date" -msgstr "" +msgstr "Date" #: templates/postman/base_folder.html:50 msgid "g:i A,M j,n/j/y" @@ -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:80 +#: templates/teleforma/course_media.html:84 #: templates/teleforma/courses.html:102 msgid "Send" msgstr "" @@ -488,7 +488,7 @@ msgstr "" #: templates/teleforma/course.html:15 #: templates/teleforma/inc/document_list.html:6 msgid "Documents" -msgstr "Documents" +msgstr "Supports écrits" #: templates/teleforma/course.html:18 templates/teleforma/course.html.py:34 #: templates/teleforma/course_conference.html:33 @@ -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_media.html:58 +#: templates/teleforma/course.html:53 templates/teleforma/course_media.html:62 msgid "Date added" msgstr "Date d'ajout" @@ -530,6 +530,7 @@ msgstr "Session" #: templates/teleforma/course.html:52 #: templates/teleforma/course_conference.html:35 #: templates/teleforma/course_document.html:23 +#: templates/teleforma/course_media.html:51 #: templates/teleforma/inc/conference_list.html:14 #: templates/telemeta/inc/user_list.html:51 msgid "Professor" @@ -553,7 +554,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:73 +#: templates/teleforma/course_media.html:77 msgid "Local tweeter" msgstr "Tweeter local" @@ -562,20 +563,18 @@ msgstr "Tweeter local" msgid "No document" msgstr "Aucun document" -#: templates/teleforma/course_media.html:53 -#, fuzzy +#: templates/teleforma/course_media.html:57 +#: templates/teleforma/inc/conference_list.html:15 msgid "Begin date" -msgstr "date de début" +msgstr "Date de début" -#: templates/teleforma/course_media.html:55 -#, fuzzy +#: templates/teleforma/course_media.html:59 msgid "End date" -msgstr "date de fin" +msgstr "Date de fin" -#: templates/teleforma/course_media.html:60 -#, fuzzy +#: templates/teleforma/course_media.html:64 msgid "Mime type" -msgstr "type mime" +msgstr "Type mime" #: templates/teleforma/courses.html:22 msgid "My courses" @@ -607,25 +606,18 @@ msgstr "" msgid "Room" msgstr "" -#: templates/teleforma/inc/conference_list.html:15 -#, fuzzy -msgid "Date begin" -msgstr "Date d'ajout" - #: templates/teleforma/inc/conference_list.html:16 msgid "Streaming" msgstr "Diffusion" #: templates/teleforma/inc/document_list.html:13 -#, fuzzy msgid "Annal" -msgstr "annale" +msgstr "Annale" #: templates/teleforma/inc/document_list.html:14 #: templates/teleforma/inc/media_list.html:13 -#, fuzzy msgid "Date modified" -msgstr "date de modification" +msgstr "Date de modification" #: templates/teleforma/inc/document_list.html:15 msgid "Download" @@ -705,7 +697,7 @@ msgstr "" msgid "Add" msgstr "" -#: templates/telemeta/lists.html:55 templates/telemeta/profile_detail.html:46 +#: templates/telemeta/lists.html:55 templates/telemeta/profile_detail.html:48 msgid "Edit" msgstr "" @@ -742,74 +734,74 @@ msgstr "profil" msgid "Courses" msgstr "Matières" -#: templates/telemeta/profile_detail.html:32 +#: templates/telemeta/profile_detail.html:34 msgid "Send a message" msgstr "Envoyer un message" -#: templates/telemeta/profile_detail.html:41 +#: templates/telemeta/profile_detail.html:43 #, fuzzy msgid "User profile" msgstr "profil" -#: templates/telemeta/profile_detail.html:47 +#: templates/telemeta/profile_detail.html:49 msgid "Change password" msgstr "" -#: templates/telemeta/profile_detail.html:55 +#: templates/telemeta/profile_detail.html:57 #: templates/telemeta/inc/user_list.html:25 msgid "First Name" msgstr "" -#: templates/telemeta/profile_detail.html:56 +#: templates/telemeta/profile_detail.html:58 #: templates/telemeta/inc/user_list.html:24 msgid "Last Name" msgstr "" -#: templates/telemeta/profile_detail.html:57 +#: templates/telemeta/profile_detail.html:59 msgid "Email" msgstr "" -#: templates/telemeta/profile_detail.html:59 +#: templates/telemeta/profile_detail.html:61 msgid "Institution" msgstr "" -#: templates/telemeta/profile_detail.html:60 +#: templates/telemeta/profile_detail.html:62 #, fuzzy msgid "Department" msgstr "département" -#: templates/telemeta/profile_detail.html:61 +#: templates/telemeta/profile_detail.html:63 msgid "Function" msgstr "" -#: templates/telemeta/profile_detail.html:62 +#: templates/telemeta/profile_detail.html:64 msgid "Attachment" msgstr "" -#: templates/telemeta/profile_detail.html:65 +#: templates/telemeta/profile_detail.html:67 #, fuzzy msgid "Expiration date" msgstr "Date d'expiration" -#: templates/telemeta/profile_detail.html:67 +#: templates/telemeta/profile_detail.html:69 msgid "Is staff" msgstr "" -#: templates/telemeta/profile_detail.html:68 +#: templates/telemeta/profile_detail.html:70 msgid "Is superuser" msgstr "" -#: templates/telemeta/profile_detail.html:69 +#: templates/telemeta/profile_detail.html:71 msgid "Group" msgid_plural "Groups" msgstr[0] "" msgstr[1] "" -#: templates/telemeta/profile_detail.html:70 +#: templates/telemeta/profile_detail.html:72 msgid "Last login" msgstr "" -#: templates/telemeta/profile_detail.html:80 +#: templates/telemeta/profile_detail.html:82 msgid "Apply" msgstr "" @@ -885,10 +877,13 @@ msgstr "" msgid "Unknown" msgstr "" -#: templatetags/teleforma_tags.py:93 +#: templatetags/teleforma_tags.py:89 msgid "me" msgstr "moi" +#~ msgid "Date begin" +#~ msgstr "Date de début" + #~ msgid "Recording date" #~ msgstr "date de d'enregistrement" diff --git a/teleforma/htdocs/css/teleforma.css b/teleforma/static/teleforma/css/teleforma.css similarity index 94% rename from teleforma/htdocs/css/teleforma.css rename to teleforma/static/teleforma/css/teleforma.css index b9eaa991..c159bf7f 100644 --- a/teleforma/htdocs/css/teleforma.css +++ b/teleforma/static/teleforma/css/teleforma.css @@ -10,7 +10,7 @@ body { color: #333; background: #FFF; margin: 0em; - background:no-repeat url(../images/bg_yt.png) 0 0; + background:no-repeat url(/images/bg_yt.png) 0 0; background-color:#ebebeb; background-repeat:repeat } @@ -115,7 +115,7 @@ a img { border: none; } #header { padding: 0em; -/* background: url("../images/waves.png") 100% 0% no-repeat; */ +/* background: url("/images/waves.png") 100% 0% no-repeat; */ } #content_header, #header{ @@ -180,7 +180,7 @@ a img { border: none; } #collection_player { background: transparent; - /* background-image: url(../images/grid_bg_2.png); */ + /* background-image: url(/images/grid_bg_2.png); */ } #collection_player .title { @@ -445,7 +445,7 @@ form.login .submit { /* Main navigation bar (borrowed from Trac) */ #menu { background-color: #000000 ; - background:no-repeat url(../images/tw_hd.png) 0 0; + background:no-repeat url(/images/tw_hd.png) 0 0; background-color:#ebebeb; background-repeat:repeat; font: normal verdana,'Bitstream Vera Sans',helvetica,arial,sans-serif; @@ -540,7 +540,7 @@ color:#FFF; width: 100%; float:left; border-bottom:0px solid #fff; - background:no-repeat url(../images/tw_hd.png) 0 0; + background:no-repeat url(/images/tw_hd.png) 0 0; background-color:#ebebeb; background-repeat:repeat; } @@ -576,7 +576,7 @@ color:#FFF; /* Footer (borrowed from Trac) */ #footer { background: #000000; - background:no-repeat url(../images/tw_hd.png) 0 0; + background:no-repeat url(/images/tw_hd.png) 0 0; background-color:#ebebeb; background-repeat:repeat; clear: both; @@ -860,8 +860,8 @@ table.listing th.asc a, table.listing th.desc a { background-position: 100% 50%; background-repeat: no-repeat; } -table.listing th.asc a { background-image: url(../images/asc.png) } -table.listing th.desc a { background-image: url(../images/desc.png) } +table.listing th.asc a { background-image: url(/images/asc.png) } +table.listing th.desc a { background-image: url(/images/desc.png) } table.listing tbody td, table.listing tbody th { padding: .33em .5em; vertical-align: top; @@ -1045,7 +1045,7 @@ a.image-link { padding:2px; } .markerdiv .ts-marker{ - background-image: url('../images/marker_tiny.png'); text-align: center; min-width:3ex; + background-image: url('/images/marker_tiny.png'); text-align: center; min-width:3ex; } .markerdiv .ts-marker, .markerdiv .markersdivOffset, .markerdiv .markersdivTitle, .markerdiv .markersdivAddPlaylist, .markerdiv .markersdivEdit{margin-right:.8ex;} .markerdiv div a, .markerdiv div a:visited, .markerdiv div a:hover{ @@ -1060,9 +1060,9 @@ a.image-link { .markerdiv .ts-marker, .markerdiv .ts-marker:hover, .markerdiv .ts-marker:visited{ font-family: monospace; background: #e65911;color: #FFF;padding-left: .3ex; padding-right:.3ex; } -.markersdivDelete{ background-image: url('../images/del_marker.png');width:15px;height:2ex;background-repeat: no-repeat;} +.markersdivDelete{ background-image: url('/images/del_marker.png');width:15px;height:2ex;background-repeat: no-repeat;} /*backfround-repeat is redundant with .markerDiv a,.. defined above but this way .markersDivDelete is re-usable in other context (eg popupdiv*/ -.markersdivAddPlaylist{ background-image: url('../images/add_playlist_marker.png');width:13px;height:2ex; } +.markersdivAddPlaylist{ background-image: url('/images/add_playlist_marker.png');width:13px;height:2ex; } .markersdivTitle{ font-weight:bold;} .markersdivEdit, .markersdivEdit:hover, .markersdivEdit:visited{ line-height: normal; @@ -1072,7 +1072,7 @@ a.image-link { font-size: 65%; border:2px solid #666; background-color: #fff; - background-image: url('../images/edit_marker.png'); + background-image: url('/images/edit_marker.png'); -moz-border-radius: 1ex; -webkit-border-radius: 1ex; border-radius: 1ex; } .markersdivSave, .markersdivSave:hover, .markersdivSave:visited{ @@ -1082,7 +1082,7 @@ a.image-link { padding:.7ex; padding-left: 20px; background-position: 5px center; -moz-border-radius: 1ex;-webkit-border-radius: 1ex;border-radius: 1ex; - background-image: url('../images/ok.png'); + background-image: url('/images/ok.png'); } .markerdiv{ border: 1px solid #aaaaaa; @@ -1182,58 +1182,58 @@ a.image-link { } .icon_edit{ - background-image: url('../images/edit_page.png'); + background-image: url('/images/edit_page.png'); } .icon_copy{ - background-image: url('../images/copy_page.png'); + background-image: url('/images/copy_page.png'); } .icon_previous{ - background-image: url('../images/previous.png'); + background-image: url('/images/previous.png'); } .icon_next{ - background-image: url('../images/next.png'); + background-image: url('/images/next.png'); } .icon_dublin_core{ - background-image: url('../images/dublin_core.png'); + background-image: url('/images/dublin_core.png'); } .icon_cancel{ - background-image: url('../images/cancel.png'); + background-image: url('/images/cancel.png'); } .icon_save{ - background-image: url('../images/save.png'); + background-image: url('/images/save.png'); } .icon_add{ - background-image: url('../images/add.png'); + background-image: url('/images/add.png'); } .icon_add_to_playlist{ - background-image: url('../images/add_to_playlist.png'); + background-image: url('/images/add_to_playlist.png'); } .icon_login{ - background-image: url('../images/password.png'); + background-image: url('/images/password.png'); } .icon_search{ - background-image: url('../images/find.png'); + background-image: url('/images/find.png'); } .icon_ok{ - background-image: url('../images/ok.png'); + background-image: url('/images/ok.png'); } .icon_csv{ - background-image: url('../images/csv.png'); + background-image: url('/images/csv.png'); } .icon_playlist{ - background-image: url('../images/playlist.png'); + background-image: url('/images/playlist.png'); } .icon_filter{ - background-image: url('../images/filter.png'); + background-image: url('/images/filter.png'); } .icon_delete{ - background-image: url('../images/delete.png'); + background-image: url('/images/delete.png'); } .icon_download{ - background-image: url('../images/download.png'); + background-image: url('/images/download.png'); } .icon_rss,.icon_rss:hover{ - background: url('../images/feed-icon-14x14.png') no-repeat; + background: url('/images/feed-icon-14x14.png') no-repeat; background-position: 0ex .8ex; padding:.0ex 0ex .8ex .7ex; text-decoration: none; @@ -1322,7 +1322,7 @@ input,textarea{ #module-set .module { border: 1px solid #000; background-color: #000000 ; - background:no-repeat url(../images/tw_hd.png) 0 0; + background:no-repeat url(/images/tw_hd.png) 0 0; background-color:#ebebeb; background-repeat:repeat; padding: 0.2em; @@ -1352,7 +1352,7 @@ input,textarea{ #module-set-left .module { border: 1px solid #000; - background-image: url(../images/tw_hd.png); + background-image: url(/images/tw_hd.png); padding: 0.2em; margin: 0em 0em 1.5em 0em; -moz-border-radius: 8px 0px 8px 8px; @@ -1431,7 +1431,7 @@ input,textarea{ -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:no-repeat url(/images/bg_yt.png) 0 0; background-color:#ebebeb; background-repeat:repeat; } diff --git a/teleforma/htdocs/images/1pixelout-player-colour-scheme.png b/teleforma/static/teleforma/images/1pixelout-player-colour-scheme.png similarity index 100% rename from teleforma/htdocs/images/1pixelout-player-colour-scheme.png rename to teleforma/static/teleforma/images/1pixelout-player-colour-scheme.png diff --git a/teleforma/htdocs/images/twitter_web_sprite_bgs.png b/teleforma/static/teleforma/images/twitter_web_sprite_bgs.png similarity index 100% rename from teleforma/htdocs/images/twitter_web_sprite_bgs.png rename to teleforma/static/teleforma/images/twitter_web_sprite_bgs.png diff --git a/teleforma/static/teleforma/js/inline.js b/teleforma/static/teleforma/js/inline.js new file mode 100644 index 00000000..f211a4ac --- /dev/null +++ b/teleforma/static/teleforma/js/inline.js @@ -0,0 +1,38 @@ +var django_inline_edit_mode = false; + +function form_submit() { + var options = { + target : $('#django_inline:parent'), + success : function() { + $('.editable').click(place_widget) + } + }; + $(this).ajaxSubmit(options); + return false; +} +function place_widget() { + $(this).load('/django_inline/widget/' + $(this).attr('id'), {}, function() { + $('#django_inline').submit(form_submit) + }); + $(this).unbind('click'); +} +function toggle_mode() { + if(django_inline_edit_mode == true) + { + $('.editable').unbind('click'); + $('.editable').removeClass('active_edit'); + django_inline_edit_mode = false; + } else { + $('.editable').click(place_widget); + $('.editable').addClass('active_edit'); + django_inline_edit_mode = true; + } +} +function django_inline() { + $(document).keypress(function(e) { + if(e.ctrlKey && e.which==13) + { + toggle_mode(); + } + }); +} \ No newline at end of file diff --git a/teleforma/htdocs/js/pdf-min.js b/teleforma/static/teleforma/js/pdf-min.js similarity index 100% rename from teleforma/htdocs/js/pdf-min.js rename to teleforma/static/teleforma/js/pdf-min.js diff --git a/teleforma/static/teleforma/swf/1pixeloutplayer.xml b/teleforma/static/teleforma/swf/1pixeloutplayer.xml new file mode 100755 index 00000000..e5fb1fc0 --- /dev/null +++ b/teleforma/static/teleforma/swf/1pixeloutplayer.xml @@ -0,0 +1,38 @@ + + + Content - 1pixeloutplayer + Duvien + June 2008 + (C) 2008 duvien.com + http://www.gnu.org/copyleft/gpl.html GNU/GPL + contact@duvien.com + http://duvien.com + 1.5.2 + DESC1PIXELOUT + + 1pixeloutplayer.php + 1pixelout + + + en-GB.plg_content_1pixeloutplayer.ini + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/teleforma/static/teleforma/swf/player.swf b/teleforma/static/teleforma/swf/player.swf new file mode 100755 index 0000000000000000000000000000000000000000..7e166e8fdb02d3226bac2f3983e9c0965b75fb49 GIT binary patch literal 5260 zcmV;76m#oCS5pQqJpcfBob5Xca9dS&=Si0I{E_20cKnI#IBYf_2q7UMKp=@6$FWTk zNyrHy5O8EmRus#UkmSVS(-?{gkPlfFoF4)2vRf$A*{19iwxu&>*k&;$yF=S$3WeD$ z%j_(j-5IjeHf^T`_ndq0d+)xdr+i9(Gc94B?mfSI&bjBFd+zmn87SWjFb$x-5!xJ6 zQ&Vf4PcH&^e1ZG-VO=C2gPrN2Yz{K%Tq2)Hryv*0cgOnDsc4Rxn-Zy^e2g_a8C~2! z#|?B`Lob1Rx;vjuq~fp=a@jt}rH4|{^@(H*ATpFs=kk$k9`+&&^@5pL3i^`iTr8A~ z?2Tn{rwQ^-4*N0!{FX-k^-&SY-BHFh%`Ewi}gVw6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d}q&|wdI?m@wI4t3-Ngs z^7W3WRbsr_MIq0qjf;nzYF z?q*((H9^sDj70h6LeJHlIXq(eREd{gSeng&GhfV|axOgBWcT^fgu9N&O40tBKR&#} z{9)9Dn^M!fa+*F^<^OB{avO|?c)Urao2`y$Rusk#(f51gC zzYz%@Z$a0HFV4i5gW{_){fk68!2mnpDfH{$Z~x+tlijtu!F}9;UZtdmB`p8&EDDF* zu39bMx477Nr0ZA(7?NG+^{v=6j!Ya|ce)m_IT@Sr>)6?! z5_aJ9Asy@OWJ{N$=kFkNpNzg^+(0j$N9Z0I-8X5Vm)}6>yJd9xh=IQOFrl}~=)LC+ z^y($gBDz~bSGEot=(WBrhz`o=_D%!ce*3dlbZ68+cf3dF4Kn(+pBm_{V}$OI(HjpM z=-XZ?KyNw*Y@QBLT(sdS!yFgv^FsC^s{VZ@rpsbq7c#tk=*U-UP6nk)v?Zitdp7y5?`* zx6Wx>&1FZ#(w}Xy#?t^8=mqa=u?Fk59R|8NP!Q_v5_k3B`_^@G_j_zg%V~S_XlqlD SYnKKFIVA~79{&#g&F8%@-(v6p literal 0 HcmV?d00001 diff --git a/teleforma/templates/teleforma/course_document.html b/teleforma/templates/teleforma/course_document.html index 2132afce..8794dbc2 100644 --- a/teleforma/templates/teleforma/course_document.html +++ b/teleforma/templates/teleforma/course_document.html @@ -1,7 +1,56 @@ {% extends "teleforma/course_media.html" %} {% load telemeta_utils %} +{% load teleforma_tags %} {% load i18n %} +{% block extra_javascript %} + + + + + + + + + + +{% endblock extra_javascript %} {% block course %}
@@ -10,20 +59,13 @@
- - - +
{% block general_info %}
-
{% trans "Title" %}
{{ conference.course.title }}
-
{% trans "Session" %}
{{ conference.session }}
-
{% trans "Professor" %}
{{ conference.professor }}
-
{% trans "Begin" %}
{{ conference.date_begin }}
-
{% trans "End" %}
{{ conference.date_end }}
-
{% trans "Live" %}
{{ conference.streaming }}
+
{% trans "Title" %}
{{ document.title }}
{% endblock general_info %} diff --git a/teleforma/templates/teleforma/inc/conference_list.html b/teleforma/templates/teleforma/inc/conference_list.html index 3a46aeca..661b062a 100644 --- a/teleforma/templates/teleforma/inc/conference_list.html +++ b/teleforma/templates/teleforma/inc/conference_list.html @@ -12,7 +12,7 @@ {% trans "Room" %} {% trans "Session" %} {% trans "Professor" %} - {% trans "Date begin" %} + {% trans "Begin date" %} {% trans "Streaming" %} diff --git a/teleforma/templates/teleforma/inc/document_list.html b/teleforma/templates/teleforma/inc/document_list.html index a037678f..f0781494 100644 --- a/teleforma/templates/teleforma/inc/document_list.html +++ b/teleforma/templates/teleforma/inc/document_list.html @@ -18,7 +18,7 @@ {% for document in course.document.all %} - {{ document.title }} + {{ document.title }} {{ document.description }} {% if document.is_annal %} @@ -26,7 +26,7 @@ {% endif %} {{ document.date_added }} -   + {% endfor %} diff --git a/teleforma/templates/telemeta/base.html b/teleforma/templates/telemeta/base.html index dc45114d..be5c3d29 100644 --- a/teleforma/templates/telemeta/base.html +++ b/teleforma/templates/telemeta/base.html @@ -16,8 +16,8 @@ {% block stylesheets %} - - + + diff --git a/teleforma/urls.py b/teleforma/urls.py index 552496d3..559ab0d2 100644 --- a/teleforma/urls.py +++ b/teleforma/urls.py @@ -40,7 +40,7 @@ from teleforma.models import * from teleforma.views import * from jsonrpc import jsonrpc_site -htdocs_forma = os.path.dirname(__file__) + '/htdocs' +htdocs_forma = os.path.dirname(__file__) + '/static/teleforma/' user_export = UsersXLSExport() urlpatterns = patterns('', @@ -49,11 +49,12 @@ urlpatterns = patterns('', url(r'^', include('telemeta.urls')), url(r'^desk/$', CoursesView.as_view(), name="teleforma-desk"), - url(r'^desk/courses/(?P.*)$', CourseView.as_view(), name="teleforma-course-detail"), - url(r'^desk/medias/(?P.*)$', MediaView.as_view(), name="teleforma-media-detail"), - url(r'^desk/documents/(?P.*)/download/', document_download, name="teleforma-document-download"), - url(r'^desk/documents/(?P.*)/view/', document_view, name="teleforma-document-view"), - url(r'^desk/conferences/(?P.*)$', ConferenceView.as_view(), name="teleforma-conference-detail"), + url(r'^desk/courses/(?P.*)/$', CourseView.as_view(), name="teleforma-course-detail"), + url(r'^desk/medias/(?P.*)/$', MediaView.as_view(), name="teleforma-media-detail"), + url(r'^desk/documents/(?P.*)/view/$', document_view, name="teleforma-document-detail"), + url(r'^desk/documents/(?P.*)/download/$', document_download, name="teleforma-document-download"), +# url(r'^desk/documents/(?P.*)/view/$', document_view, name="teleforma-document-view"), + url(r'^desk/conferences/(?P.*)/$', ConferenceView.as_view(), name="teleforma-conference-detail"), # Postman url(r'^messages/', include('postman.urls')), @@ -66,13 +67,13 @@ urlpatterns = patterns('', # CSS+Images (FIXME: for developement only) url(r'^teleforma/css/(?P.*)$', 'django.views.static.serve', - {'document_root': htdocs_forma+'/css'}, + {'document_root': htdocs_forma+'css'}, name="teleforma-css"), url(r'images/(?P.*)$', 'django.views.static.serve', - {'document_root': htdocs_forma+'/images'}, + {'document_root': htdocs_forma+'images'}, name="teleforma-images"), url(r'^js/(?P.*)$', 'django.views.static.serve', - {'document_root': htdocs_forma+'/js'}, + {'document_root': htdocs_forma+'js'}, name="teleforma-js"), # JSON RPC diff --git a/teleforma/views.py b/teleforma/views.py index bc49887c..6935785c 100755 --- a/teleforma/views.py +++ b/teleforma/views.py @@ -70,7 +70,7 @@ def document_download(request, pk): extension = mimetypes.guess_extension(mimetype) response = HttpResponse(fsock, mimetype=mimetype) response['Content-Disposition'] = "attachment; filename=%s%s" % \ - (unicode(document), extension) + (unicode(document.title.decode('utf8')), extension) return response def document_view(request, pk): @@ -152,6 +152,29 @@ class MediaView(DetailView): def dispatch(self, *args, **kwargs): return super(MediaView, self).dispatch(*args, **kwargs) + +class DocumentView(DetailView): + + model = Document + template_name='teleforma/course_document.html' + + def get_context_data(self, **kwargs): + context = super(DocumentView, self).get_context_data(**kwargs) + context['courses'] = get_courses(self.request.user) + document = self.get_object() + +# context['mime_type'] = view.item_analyze(media.item) + context['course'] = document.course + context['notes'] = document.notes.all().filter(author=self.request.user) + content_type = ContentType.objects.get(app_label="teleforma", model="document") + context['room'] = get_room(name=document.title, content_type=content_type, + id=document.id) + return context + + @method_decorator(login_required) + def dispatch(self, *args, **kwargs): + return super(DocumentView, self).dispatch(*args, **kwargs) + class ConferenceView(DetailView): model = Conference -- 2.39.5