# HG changeset patch # User cavaliet # Date 1354121733 -3600 # Node ID 37d464b8cb829505cbe515d1d8707e67660c2313 # Parent 475e5fb0ea2be384ee2201a619f7db7f0ce5354e clean images in bpi folder, add media view and template diff -r 475e5fb0ea2b -r 37d464b8cb82 src/hashcut/static/hashcut/bpi/css/common.css --- a/src/hashcut/static/hashcut/bpi/css/common.css Wed Nov 28 17:21:26 2012 +0100 +++ b/src/hashcut/static/hashcut/bpi/css/common.css Wed Nov 28 17:55:33 2012 +0100 @@ -463,7 +463,7 @@ margin-right: 4px; max-width: 80px; max-height: 60px; - box-shadow: 2px 2px 2px #333333; + box-shadow: 1px 1px 2px #808080; } .item-video .video-info{ margin-left: 88px; @@ -486,13 +486,13 @@ color: #de2500; } .item-video .media-count-wrap { + display: none; + height: 15px; + left: 66px; + position: absolute; + text-align: right; + top: 45px; width: 30px; - text-align: center; - position: absolute; - top: 45px; - left: 75px; - height: 15px; - display: none; } .item-video .media-count{ color: #FFF; @@ -502,8 +502,9 @@ -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; - padding: 0 3px; - border: 1px solid #DE2500; + padding: 0 2px; + border: 1px solid #C81000; + text-shadow: 1px 1px 1px #330000; } .item-video .subtitle{ margin-bottom: 2px; @@ -629,15 +630,22 @@ background: #333333; position: relative; } -.video-wait { - display: none; - position: absolute; left: 0; top: 0; width: 100%; height: 100%; +.video-wait, .full-wait { + left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(120, 120, 140, .6); background-image: url(../img/reel.gif); background-position: center; background-repeat: no-repeat; - z-index: 3; +} + +.video-wait { + position: absolute; display: none; z-index: 3; } + +.full-wait { + position: fixed; z-index: 300; +} + .widget { position: relative; } diff -r 475e5fb0ea2b -r 37d464b8cb82 src/hashcut/static/hashcut/bpi/css/edition.css --- a/src/hashcut/static/hashcut/bpi/css/edition.css Wed Nov 28 17:21:26 2012 +0100 +++ b/src/hashcut/static/hashcut/bpi/css/edition.css Wed Nov 28 17:55:33 2012 +0100 @@ -3,7 +3,9 @@ .empty-mode .bloc-pvw, .empty-mode .bloc-segmentation, .segment-mode .bloc-pvw, -.pvw-mode .bloc-segmentation { +.pvw-mode .bloc-segmentation, +.empty-mode .publier-button, +.segment-mode .publier-button { display: none; } @@ -40,7 +42,7 @@ } .col-middle-header{ height: 35px; - font-size: 16px; + font-size: 15px; clear: both; } /* Tabs */ @@ -241,9 +243,6 @@ .tutorial ol{ padding-left: 22px; } -.tutorial li:first-child{ - width: 324px; -} .tutorial li{ list-style: decimal; font-size: 14px; @@ -267,7 +266,7 @@ padding-top: 8px; margin-bottom: 12px; color: #30036d; - font-size: 16px; + font-size: 15px; font-weight: 600; } .left-head input { @@ -309,7 +308,7 @@ text-align: right; color: #30036D; font-weight: 600; - font-size: 16px; + font-size: 15px; margin-bottom: 12px; padding-top: 8px; } diff -r 475e5fb0ea2b -r 37d464b8cb82 src/hashcut/static/hashcut/bpi/img/apercu-video.jpg Binary file src/hashcut/static/hashcut/bpi/img/apercu-video.jpg has changed diff -r 475e5fb0ea2b -r 37d464b8cb82 src/hashcut/static/hashcut/bpi/img/bg-degrade.png Binary file src/hashcut/static/hashcut/bpi/img/bg-degrade.png has changed diff -r 475e5fb0ea2b -r 37d464b8cb82 src/hashcut/static/hashcut/bpi/img/border-right-segment.png Binary file src/hashcut/static/hashcut/bpi/img/border-right-segment.png has changed diff -r 475e5fb0ea2b -r 37d464b8cb82 src/hashcut/static/hashcut/bpi/img/visuel-home-last.jpg Binary file src/hashcut/static/hashcut/bpi/img/visuel-home-last.jpg has changed diff -r 475e5fb0ea2b -r 37d464b8cb82 src/hashcut/static/hashcut/bpi/img/visuel-home-news.jpg Binary file src/hashcut/static/hashcut/bpi/img/visuel-home-news.jpg has changed diff -r 475e5fb0ea2b -r 37d464b8cb82 src/hashcut/static/hashcut/bpi/img/visuel-player-bar.jpg Binary file src/hashcut/static/hashcut/bpi/img/visuel-player-bar.jpg has changed diff -r 475e5fb0ea2b -r 37d464b8cb82 src/hashcut/static/hashcut/bpi/img/visuel-segment.png Binary file src/hashcut/static/hashcut/bpi/img/visuel-segment.png has changed diff -r 475e5fb0ea2b -r 37d464b8cb82 src/hashcut/templates/bpi_mashup_content.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hashcut/templates/bpi_mashup_content.html Wed Nov 28 17:55:33 2012 +0100 @@ -0,0 +1,119 @@ +{% extends "bpi_mashup_edit.html" %} +{% load static %} +{% load i18n %} +{% load analytics %} +{% load thumbnail %} + {% block title %}Hashcut Media - BPI{% endblock %} + + +{% block content %} +
+ +
+

Lire le Média

+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
00:00
+
/
+
1:03:30
+
+
+
+
+
+
+
+
+ +
+
+
+
+ +
+

Plus d’informations

+
+ + + + + + + + + + + + + + + + + + + +
Titre :Titre du Média
Durée :
Description :
Tags :
+
+ +

Hashcuts utilisant le média

+ +
+
+{% endblock %} + +{% block js_import %} + + + + + + + + +{% endblock %} + diff -r 475e5fb0ea2b -r 37d464b8cb82 src/hashcut/templates/bpi_mashup_edit.html --- a/src/hashcut/templates/bpi_mashup_edit.html Wed Nov 28 17:21:26 2012 +0100 +++ b/src/hashcut/templates/bpi_mashup_edit.html Wed Nov 28 17:55:33 2012 +0100 @@ -3,7 +3,7 @@ {% load i18n %} {% load analytics %} {% load thumbnail %} - {% block title %}Hashcut Edition - BPI{% endblock %} + {% block title %}Hashcut Edition - BPI{% endblock %} {% block css_import %} {{ block.super }} @@ -275,9 +275,9 @@ return newurl; }; var hashcut = IriSP.editor({ + creator: "{{creator}}", + csrf_token: "{{csrf_token}}", filter: { - creator: "{{creator}}", - csrf_token: "{{csrf_token}}", tags__icontains: "BPI" } }); diff -r 475e5fb0ea2b -r 37d464b8cb82 src/hashcut/templates/bpi_mashup_hashcut.html --- a/src/hashcut/templates/bpi_mashup_hashcut.html Wed Nov 28 17:21:26 2012 +0100 +++ b/src/hashcut/templates/bpi_mashup_hashcut.html Wed Nov 28 17:55:33 2012 +0100 @@ -3,7 +3,7 @@ {% load i18n %} {% load analytics %} {% load thumbnail %} - {% block title %}Hashcut Playing - BPI{% endblock %} + {% block title %}Hashcut Playing - BPI{% endblock %} {% block css_import %} {{ block.super }} @@ -170,7 +170,7 @@ project: "{% url api_dispatch_list api_name='1.0' resource_name='projects' %}", segment: "{% url api_dispatch_list api_name='1.0' resource_name='segments' %}", ldt: "{% url projectjson_id id='' %}", - media_page: "media.html?media=" + media_page: "{% url mashup_content branding=branding ctt_id='' %}" }; $(function() { diff -r 475e5fb0ea2b -r 37d464b8cb82 src/hashcut/templates/partial/bpi_mashup_popin_user.html --- a/src/hashcut/templates/partial/bpi_mashup_popin_user.html Wed Nov 28 17:21:26 2012 +0100 +++ b/src/hashcut/templates/partial/bpi_mashup_popin_user.html Wed Nov 28 17:55:33 2012 +0100 @@ -3,7 +3,7 @@
-

Mashup75

+

{{creator}}

mash@cinecast.fr

12 Hashcuts

diff -r 475e5fb0ea2b -r 37d464b8cb82 src/hashcut/urls.py --- a/src/hashcut/urls.py Wed Nov 28 17:21:26 2012 +0100 +++ b/src/hashcut/urls.py Wed Nov 28 17:55:33 2012 +0100 @@ -1,9 +1,10 @@ from django.conf.urls.defaults import patterns, url -from hashcut.views import MashupHome, MashupEdit, MashupHashcut +from hashcut.views import MashupHome, MashupEdit, MashupHashcut, MashupContent urlpatterns = patterns('', url(r'^(?P.*)/edit/$', MashupEdit.as_view(), name="mashup_edit"), url(r'^(?P.*)/hashcut/(?P.*)/$', MashupHashcut.as_view(), name="mashup_hashcut"), + url(r'^(?P.*)/media/(?P.*)/$', MashupContent.as_view(), name="mashup_content"), url(r'^(?P.*)/$', MashupHome.as_view(), name="mashup_home"), url(r'^$', MashupHome.as_view()), ) diff -r 475e5fb0ea2b -r 37d464b8cb82 src/hashcut/views.py --- a/src/hashcut/views.py Wed Nov 28 17:21:26 2012 +0100 +++ b/src/hashcut/views.py Wed Nov 28 17:55:33 2012 +0100 @@ -67,7 +67,7 @@ def get(self, request, branding="iri", **kwargs): logging.debug("COUCOU") self.branding = branding - context = {"branding":self.branding} + context = {"branding":self.branding, "creator":request.user.username} return self.render_to_response(context) @@ -102,6 +102,38 @@ context = {"branding":self.branding, "ldt_id":ldt_id} return self.render_to_response(context) + + +class MashupContent(TemplateResponseMixin, View): + + # iri = default brand name + branding = "iri" + template_suffix = "mashup_content.html" + template_name = "iri_mashup_content.html" + + def get_template_names(self): + """ + Return a list of template names to be used for the request. Must return + a list. May not be called if get_template is overridden. + """ + try: + names = super(MashupContent, self).get_template_names() + except ImproperlyConfigured: + raise ImproperlyConfigured("Class MashupContent requires either a definition of 'template_name'") + + # the branding template is supposed to override the default template. So we insert instead of append + if self.branding and self.branding != "": + names.insert(0,"%s_%s" % (self.branding, self.template_suffix)) + + return names + + def get(self, request, branding="iri", ctt_id=None, **kwargs): + self.branding = branding + if not ctt_id: + return HttpResponseNotFound("A content id must be given.") + context = {"branding":self.branding, "ctt_id":ctt_id} + return self.render_to_response(context) +