Added options to hide headers in AnnotationsList and LatestAnnotation widgets + streamlined remie urls and templates for consistency
--- a/server/src/remie/static/remie/metadataplayer/AnnotationsList.js Wed Aug 05 18:00:35 2015 +0200
+++ b/server/src/remie/static/remie/metadataplayer/AnnotationsList.js Fri Aug 07 12:23:58 2015 +0200
@@ -37,6 +37,7 @@
start_visible: true,
show_audio : true,
show_filters : false,
+ show_header : false,
show_creation_date : false,
show_timecode : true,
/*
@@ -84,7 +85,7 @@
};
IriSP.Widgets.AnnotationsList.prototype.template =
- "<p class='Ldt-AnnotationsList-header'>{{l10n.header}}</p>"
+ "{{#show_header}}<p class='Ldt-AnnotationsList-header'>{{l10n.header}}</p>{{/show_header}}"
+ '<div class="Ldt-AnnotationsListWidget">'
+ '{{#show_filters}}'
+ '<div class="Ldt-AnnotationsList-Filters">'
--- a/server/src/remie/static/remie/metadataplayer/LatestAnnotation.js Wed Aug 05 18:00:35 2015 +0200
+++ b/server/src/remie/static/remie/metadataplayer/LatestAnnotation.js Fri Aug 07 12:23:58 2015 +0200
@@ -26,6 +26,7 @@
selectable_annotations: false,
empty_message: false,
starts_hidden: false,
+ show_header: false,
};
IriSP.Widgets.LatestAnnotation.prototype.messages = {
@@ -42,7 +43,7 @@
}
IriSP.Widgets.LatestAnnotation.prototype.template =
- "<p class='Ldt-LatestAnnotation-header'>{{l10n.header}}</p>"
+ "{{#show_header}}<p class='Ldt-LatestAnnotation-header'>{{l10n.header}}</p>{{/show_header}}"
+ "<div class='Ldt-LatestAnnotation'>"
+ "</div>";
--- a/server/src/remie/templates/remie/iframe.html Wed Aug 05 18:00:35 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,163 +0,0 @@
-{% load staticfiles %}
-<html>
-<head>
-<title>Test</title>
-<link rel="stylesheet" type="text/css" href="{% static 'remie/css/style.css' %}" />
-<script type="text/javascript" src="{% static 'remie/js/jquery-1.11.2.min.js' %}"></script>
-</head>
-<body>
-<div id="remie_player_container">
- <div id="media_panel">
- <div id="player_container"></div>
- </div>
- <div id="info_panel">
- <div id="CurrentSegmentInfobox_container"></div>
- <div id="LatestAnnotation_container"></div>
- <div id="AnnotationsController_container"></div>
- <div id="CreateAnnotation_container"></div>
- <div id="AnnotationsList_container"></div>
- </div>
- <script type="text/javascript" src='{% static "remie/metadataplayer/LdtPlayer-core.js" %}'></script>
- <script type="text/javascript">
-
- if (typeof jQuery == "undefined") {
- jQuery = IriSP.jQuery;
- }
- var metadatas = {metadata: {url: "{% url 'projectjson_id' id=project_id %}?from_display=false"}};
- var metadata_key = "metadata";
-
- IriSP.libFiles.defaultDir = '{% static "remie/js/" %}';
- IriSP.libFiles.locations.jwPlayerSWF = '{% static "remie/swf/player.swf" %}';
- IriSP.libFiles.locations.recordMicSwf = '{% static "remie/swf/record_mic.swf" %}';
- IriSP.libFiles.locations.zeroClipboardSwf = '{% static "remie/swf/ZeroClipboard10.swf" %}';
- IriSP.libFiles.locations.cssjQueryUI = '{% static "remie/css/jq-css/themes/base/jquery-ui.css" %}';
- IriSP.language = 'fr-fr';
-
- IriSP.widgetsDir = '{% static "remie/metadataplayer" %}';
- var _metadata = {
- url: metadatas[metadata_key].url,
- format: 'ldt'
- };
- var _config = {
- container: 'player_container',
- css: '{% static "remie/metadataplayer/LdtPlayer-core.css" %}',
- default_options: {
- metadata: _metadata
- },
- widgets:
- [
- {
- type: "AutoPlayer",
- streamer: function(_url) {
- var _matches = _url.match(/^[^\/]+\/\/[^\/]+\/[^\/]+\//);
- if (_matches) {
- return _matches[0];
- } else {
- return _url;
- }
- },
- url_transform: function(url) {
- // Adaptation to jwplayer 6
- if(url.substr(url.length - 4).toLowerCase()=='.flv'){
- return url.replace('/ddc_player/video/','/ddc_player/flv:video/');
- }
- return url.replace('/ddc_player/video/','/ddc_player/mp4:video/');
- },
- default_type: "AdaptivePlayer",
- autostart: false
- },{
- type: "Slider"
- },{
- type: "Controller",
- disable_annotate_btn: true,
- disable_search_btn: true,
- disable_ctrl_f: true
- },{
- type: "Segments",
- annotation_type: "découpage",
- line_height: 24,
- overlap: 1,
- no_tooltip: true,
- use_timerange: true,
-
- },{
- type: "AnnotationsController",
- container: "AnnotationsController_container",
- display_or_write: true,
- starts_hidden: true,
- hide_without_segment: true,
- segments_annotation_type: "découpage",
- },{
- type: "CreateAnnotation",
- container: "CreateAnnotation_container",
- show_title_field : false,
- show_creator_field : false,
- show_time : false,
- start_visible : false,
- always_visible : false,
- show_slice : false,
- show_arrow : false,
- show_mic_record: false,
- show_mic_play: false,
- minimize_annotation_widget : true,
- creator_name : "{{current_user}}",
- creator_field_readonly: true,
- creator_avatar : "",
- tags : true, // This may be counterintuitive but this actually hides tag tool for the widget
- tag_titles : false,
- pause_on_write : true,
- max_tags : 8,
- polemics : false,
- annotation_type : "user_{{current_user}}",
- api_serializer : "ldt_annotate",
- api_endpoint_template : "{% url 'api_dispatch_list' resource_name='annotations' api_name='1.0' %}",
- api_method : "POST",
- post_at_segment_time : true,
- segments_annotation_type: "découpage",
- after_send_timeout : 0,
- close_after_send: true,
- tag_prefix: "#",
- // Change id to a given project id
- project_id: "{{project_id}}",
- pause_when_displaying: true,
- },{
- type: "AnnotationsList",
- container: "AnnotationsList_container",
- annotation_type: "user_{% if not group_mode %}{{current_user}}{% endif %}",
- filter_by_segments: true,
- segments_annotation_type: "découpage",
- show_creation_date: true,
- show_only_annotation_from_user: false,
- show_timecode: false,
- show_filters: true,
- limit_count: false,
- start_visible: false,
- newest_first: true,
- tags: false,
- },{
- type: "LatestAnnotation",
- annotation_type: "user_{% if not group_mode %}{{current_user}}{% endif %}",
- container: "LatestAnnotation_container",
- filter_by_segment: true,
- starts_hidden: true,
- hide_without_segment: true,
- segments_annotation_type: "découpage",
- selectable_annotations: true,
- copy_and_edit_button: true,
- },{
- type: "CurrentSegmentInfobox",
- annotation_type: "découpage",
- container: "CurrentSegmentInfobox_container",
- empty_message: "Clique sur un segment pour ouvrir le chapitre",
- pause_on_segment_end: true
- }
-
- ]
- }
-
- _myPlayer = new IriSP.Metadataplayer(_config);
-
- </script>
-</div>
-</body>
-</html>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/server/src/remie/templates/remie/iframe_markers.html Fri Aug 07 12:23:58 2015 +0200
@@ -0,0 +1,96 @@
+{% load staticfiles %}
+<html>
+<head>
+<title>Test</title>
+<!-- <link rel="stylesheet" type="text/css" href="{% static 'remie/css/style.css' %}" /> -->
+<script type="text/javascript" src="{% static 'remie/js/jquery-1.11.2.min.js' %}"></script>
+</head>
+<body>
+<div id="remie_player_container">
+ <div id="media_panel">
+ <div id="player_container"></div>
+ </div>
+ <div id="info_panel">
+ <div id="CurrentSegmentInfobox_container"></div>
+ <div id="LatestAnnotation_container"></div>
+ <div id="AnnotationsController_container"></div>
+ <div id="CreateAnnotation_container"></div>
+ <div id="AnnotationsList_container"></div>
+ </div>
+ <script type="text/javascript" src='{% static "remie/metadataplayer/LdtPlayer-core.js" %}'></script>
+ <script type="text/javascript">
+
+ if (typeof jQuery == "undefined") {
+ jQuery = IriSP.jQuery;
+ }
+ var metadatas = {metadata: {url: "{% url 'projectjson_id' id=project_id %}?from_display=false"}};
+ var metadata_key = "metadata";
+
+ IriSP.libFiles.defaultDir = '{% static "remie/js/" %}';
+ IriSP.libFiles.locations.jwPlayerSWF = '{% static "remie/swf/player.swf" %}';
+ IriSP.libFiles.locations.recordMicSwf = '{% static "remie/swf/record_mic.swf" %}';
+ IriSP.libFiles.locations.zeroClipboardSwf = '{% static "remie/swf/ZeroClipboard10.swf" %}';
+ IriSP.libFiles.locations.cssjQueryUI = '{% static "remie/css/jq-css/themes/base/jquery-ui.css" %}';
+ IriSP.language = 'fr-fr';
+
+ IriSP.widgetsDir = '{% static "remie/metadataplayer" %}';
+ var _metadata = {
+ url: metadatas[metadata_key].url,
+ format: 'ldt'
+ };
+ var _config = {
+ container: 'player_container',
+ css: '{% static "remie/metadataplayer/LdtPlayer-core.css" %}',
+ default_options: {
+ metadata: _metadata
+ },
+ widgets:
+ [
+ {
+ type: "AutoPlayer",
+ streamer: function(_url) {
+ var _matches = _url.match(/^[^\/]+\/\/[^\/]+\/[^\/]+\//);
+ if (_matches) {
+ return _matches[0];
+ } else {
+ return _url;
+ }
+ },
+ url_transform: function(url) {
+ // Adaptation to jwplayer 6
+ if(url.substr(url.length - 4).toLowerCase()=='.flv'){
+ return url.replace('/ddc_player/video/','/ddc_player/flv:video/');
+ }
+ return url.replace('/ddc_player/video/','/ddc_player/mp4:video/');
+ },
+ default_type: "AdaptivePlayer",
+ autostart: false
+ },{
+ type: "Slider"
+ },{
+ type: "Controller",
+ disable_annotate_btn: true,
+ disable_search_btn: true,
+ disable_ctrl_f: true
+ },{
+ type: "Segments",
+ annotation_type: "découpage",
+ line_height: 24,
+ overlap: 1,
+ no_tooltip: true,
+ use_timerange: true,
+
+ },{
+ type: "Markers",
+ annotation_type: "markers",
+ line_height: 24
+ }
+ ]
+ }
+
+ _myPlayer = new IriSP.Metadataplayer(_config);
+
+ </script>
+</div>
+</body>
+</html>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/server/src/remie/templates/remie/iframe_segments_group.html Fri Aug 07 12:23:58 2015 +0200
@@ -0,0 +1,165 @@
+{% load staticfiles %}
+<html>
+<head>
+<title>Test</title>
+<link rel="stylesheet" type="text/css" href="{% static 'remie/css/style.css' %}" />
+<script type="text/javascript" src="{% static 'remie/js/jquery-1.11.2.min.js' %}"></script>
+</head>
+<body>
+<div id="remie_player_container">
+ <div id="media_panel">
+ <div id="player_container"></div>
+ </div>
+ <div id="info_panel">
+ <div id="CurrentSegmentInfobox_container"></div>
+ <div id="LatestAnnotation_container"></div>
+ <div id="AnnotationsController_container"></div>
+ <div id="CreateAnnotation_container"></div>
+ <div id="AnnotationsList_container"></div>
+ </div>
+ <script type="text/javascript" src='{% static "remie/metadataplayer/LdtPlayer-core.js" %}'></script>
+ <script type="text/javascript">
+
+ if (typeof jQuery == "undefined") {
+ jQuery = IriSP.jQuery;
+ }
+ var metadatas = {metadata: {url: "{% url 'projectjson_id' id=project_id %}?from_display=false"}};
+ var metadata_key = "metadata";
+
+ IriSP.libFiles.defaultDir = '{% static "remie/js/" %}';
+ IriSP.libFiles.locations.jwPlayerSWF = '{% static "remie/swf/player.swf" %}';
+ IriSP.libFiles.locations.recordMicSwf = '{% static "remie/swf/record_mic.swf" %}';
+ IriSP.libFiles.locations.zeroClipboardSwf = '{% static "remie/swf/ZeroClipboard10.swf" %}';
+ IriSP.libFiles.locations.cssjQueryUI = '{% static "remie/css/jq-css/themes/base/jquery-ui.css" %}';
+ IriSP.language = 'fr-fr';
+
+ IriSP.widgetsDir = '{% static "remie/metadataplayer" %}';
+ var _metadata = {
+ url: metadatas[metadata_key].url,
+ format: 'ldt'
+ };
+ var _config = {
+ container: 'player_container',
+ css: '{% static "remie/metadataplayer/LdtPlayer-core.css" %}',
+ default_options: {
+ metadata: _metadata
+ },
+ widgets:
+ [
+ {
+ type: "AutoPlayer",
+ streamer: function(_url) {
+ var _matches = _url.match(/^[^\/]+\/\/[^\/]+\/[^\/]+\//);
+ if (_matches) {
+ return _matches[0];
+ } else {
+ return _url;
+ }
+ },
+ url_transform: function(url) {
+ // Adaptation to jwplayer 6
+ if(url.substr(url.length - 4).toLowerCase()=='.flv'){
+ return url.replace('/ddc_player/video/','/ddc_player/flv:video/');
+ }
+ return url.replace('/ddc_player/video/','/ddc_player/mp4:video/');
+ },
+ default_type: "AdaptivePlayer",
+ autostart: false
+ },{
+ type: "Slider"
+ },{
+ type: "Controller",
+ disable_annotate_btn: true,
+ disable_search_btn: true,
+ disable_ctrl_f: true
+ },{
+ type: "Segments",
+ annotation_type: "découpage",
+ line_height: 24,
+ overlap: 1,
+ no_tooltip: true,
+ use_timerange: true,
+
+ },{
+ type: "AnnotationsController",
+ container: "AnnotationsController_container",
+ display_or_write: true,
+ starts_hidden: true,
+ hide_without_segment: true,
+ segments_annotation_type: "découpage",
+ },{
+ type: "CreateAnnotation",
+ container: "CreateAnnotation_container",
+ show_title_field : false,
+ show_creator_field : false,
+ show_time : false,
+ start_visible : false,
+ always_visible : false,
+ show_slice : false,
+ show_arrow : false,
+ show_mic_record: false,
+ show_mic_play: false,
+ minimize_annotation_widget : true,
+ creator_name : "{{current_user}}",
+ creator_field_readonly: true,
+ creator_avatar : "",
+ tags : true, // This may be counterintuitive but this actually hides tag tool for the widget
+ tag_titles : false,
+ pause_on_write : true,
+ max_tags : 8,
+ polemics : false,
+ annotation_type : "user_{{current_user}}",
+ api_serializer : "ldt_annotate",
+ api_endpoint_template : "{% url 'api_dispatch_list' resource_name='annotations' api_name='1.0' %}",
+ api_method : "POST",
+ post_at_segment_time : true,
+ segments_annotation_type: "découpage",
+ after_send_timeout : 0,
+ close_after_send: true,
+ tag_prefix: "#",
+ // Change id to a given project id
+ project_id: "{{project_id}}",
+ pause_when_displaying: true,
+ },{
+ type: "AnnotationsList",
+ container: "AnnotationsList_container",
+ annotation_type: "user_",
+ filter_by_segments: true,
+ segments_annotation_type: "découpage",
+ show_creation_date: true,
+ show_only_annotation_from_user: false,
+ show_timecode: false,
+ show_filters: true,
+ show_header: false,
+ limit_count: false,
+ start_visible: false,
+ newest_first: true,
+ tags: false,
+ },{
+ type: "LatestAnnotation",
+ annotation_type: "user_",
+ container: "LatestAnnotation_container",
+ filter_by_segment: true,
+ starts_hidden: true,
+ hide_without_segment: true,
+ segments_annotation_type: "découpage",
+ selectable_annotations: true,
+ copy_and_edit_button: true,
+ show_header: false
+ },{
+ type: "CurrentSegmentInfobox",
+ annotation_type: "découpage",
+ container: "CurrentSegmentInfobox_container",
+ empty_message: "Clique sur un segment pour ouvrir le chapitre",
+ pause_on_segment_end: true
+ }
+
+ ]
+ }
+
+ _myPlayer = new IriSP.Metadataplayer(_config);
+
+ </script>
+</div>
+</body>
+</html>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/server/src/remie/templates/remie/iframe_segments_single.html Fri Aug 07 12:23:58 2015 +0200
@@ -0,0 +1,165 @@
+{% load staticfiles %}
+<html>
+<head>
+<title>Test</title>
+<link rel="stylesheet" type="text/css" href="{% static 'remie/css/style.css' %}" />
+<script type="text/javascript" src="{% static 'remie/js/jquery-1.11.2.min.js' %}"></script>
+</head>
+<body>
+<div id="remie_player_container">
+ <div id="media_panel">
+ <div id="player_container"></div>
+ </div>
+ <div id="info_panel">
+ <div id="CurrentSegmentInfobox_container"></div>
+ <div id="LatestAnnotation_container"></div>
+ <div id="AnnotationsController_container"></div>
+ <div id="CreateAnnotation_container"></div>
+ <div id="AnnotationsList_container"></div>
+ </div>
+ <script type="text/javascript" src='{% static "remie/metadataplayer/LdtPlayer-core.js" %}'></script>
+ <script type="text/javascript">
+
+ if (typeof jQuery == "undefined") {
+ jQuery = IriSP.jQuery;
+ }
+ var metadatas = {metadata: {url: "{% url 'projectjson_id' id=project_id %}?from_display=false"}};
+ var metadata_key = "metadata";
+
+ IriSP.libFiles.defaultDir = '{% static "remie/js/" %}';
+ IriSP.libFiles.locations.jwPlayerSWF = '{% static "remie/swf/player.swf" %}';
+ IriSP.libFiles.locations.recordMicSwf = '{% static "remie/swf/record_mic.swf" %}';
+ IriSP.libFiles.locations.zeroClipboardSwf = '{% static "remie/swf/ZeroClipboard10.swf" %}';
+ IriSP.libFiles.locations.cssjQueryUI = '{% static "remie/css/jq-css/themes/base/jquery-ui.css" %}';
+ IriSP.language = 'fr-fr';
+
+ IriSP.widgetsDir = '{% static "remie/metadataplayer" %}';
+ var _metadata = {
+ url: metadatas[metadata_key].url,
+ format: 'ldt'
+ };
+ var _config = {
+ container: 'player_container',
+ css: '{% static "remie/metadataplayer/LdtPlayer-core.css" %}',
+ default_options: {
+ metadata: _metadata
+ },
+ widgets:
+ [
+ {
+ type: "AutoPlayer",
+ streamer: function(_url) {
+ var _matches = _url.match(/^[^\/]+\/\/[^\/]+\/[^\/]+\//);
+ if (_matches) {
+ return _matches[0];
+ } else {
+ return _url;
+ }
+ },
+ url_transform: function(url) {
+ // Adaptation to jwplayer 6
+ if(url.substr(url.length - 4).toLowerCase()=='.flv'){
+ return url.replace('/ddc_player/video/','/ddc_player/flv:video/');
+ }
+ return url.replace('/ddc_player/video/','/ddc_player/mp4:video/');
+ },
+ default_type: "AdaptivePlayer",
+ autostart: false
+ },{
+ type: "Slider"
+ },{
+ type: "Controller",
+ disable_annotate_btn: true,
+ disable_search_btn: true,
+ disable_ctrl_f: true
+ },{
+ type: "Segments",
+ annotation_type: "découpage",
+ line_height: 24,
+ overlap: 1,
+ no_tooltip: true,
+ use_timerange: true,
+
+ },{
+ type: "AnnotationsController",
+ container: "AnnotationsController_container",
+ display_or_write: true,
+ starts_hidden: true,
+ hide_without_segment: true,
+ segments_annotation_type: "découpage",
+ },{
+ type: "CreateAnnotation",
+ container: "CreateAnnotation_container",
+ show_title_field : false,
+ show_creator_field : false,
+ show_time : false,
+ start_visible : false,
+ always_visible : false,
+ show_slice : false,
+ show_arrow : false,
+ show_mic_record: false,
+ show_mic_play: false,
+ minimize_annotation_widget : true,
+ creator_name : "{{current_user}}",
+ creator_field_readonly: true,
+ creator_avatar : "",
+ tags : true, // This may be counterintuitive but this actually hides tag tool for the widget
+ tag_titles : false,
+ pause_on_write : true,
+ max_tags : 8,
+ polemics : false,
+ annotation_type : "user_{{current_user}}",
+ api_serializer : "ldt_annotate",
+ api_endpoint_template : "{% url 'api_dispatch_list' resource_name='annotations' api_name='1.0' %}",
+ api_method : "POST",
+ post_at_segment_time : true,
+ segments_annotation_type: "découpage",
+ after_send_timeout : 0,
+ close_after_send: true,
+ tag_prefix: "#",
+ // Change id to a given project id
+ project_id: "{{project_id}}",
+ pause_when_displaying: true,
+ },{
+ type: "AnnotationsList",
+ container: "AnnotationsList_container",
+ annotation_type: "user_{% if not group_mode %}{{current_user}}{% endif %}",
+ filter_by_segments: true,
+ segments_annotation_type: "découpage",
+ show_creation_date: true,
+ show_only_annotation_from_user: false,
+ show_timecode: false,
+ show_filters: true,
+ show_header: false,
+ limit_count: false,
+ start_visible: false,
+ newest_first: true,
+ tags: false,
+ },{
+ type: "LatestAnnotation",
+ annotation_type: "user_{% if not group_mode %}{{current_user}}{% endif %}",
+ container: "LatestAnnotation_container",
+ filter_by_segment: true,
+ starts_hidden: true,
+ hide_without_segment: true,
+ segments_annotation_type: "découpage",
+ selectable_annotations: true,
+ copy_and_edit_button: true,
+ show_header: false
+ },{
+ type: "CurrentSegmentInfobox",
+ annotation_type: "découpage",
+ container: "CurrentSegmentInfobox_container",
+ empty_message: "Clique sur un segment pour ouvrir le chapitre",
+ pause_on_segment_end: true
+ }
+
+ ]
+ }
+
+ _myPlayer = new IriSP.Metadataplayer(_config);
+
+ </script>
+</div>
+</body>
+</html>
\ No newline at end of file
--- a/server/src/remie/templates/remie/iframe_tester.html Wed Aug 05 18:00:35 2015 +0200
+++ b/server/src/remie/templates/remie/iframe_tester.html Fri Aug 07 12:23:58 2015 +0200
@@ -6,12 +6,30 @@
<script type="text/javascript">
$(document).ready(function(){
$("#iframe_update_button").click(function(){
- var default_url = "{% url 'remie_segment' %}";
+ var segments_single_url = "{% url 'remie_segments_single' %}";
+ var segments_group_url = "{% url 'remie_segments_group' %}";
+ var markers_url = "{% url 'remie_markers' %}";
+ var teacher_url = "{% url 'remie_teacher' %}";
+ var scenario_url = ""
+ switch($('input[name=scenario]:checked').attr('id')){
+ case 'segments_single':
+ scenario_url = segments_single_url;
+ break;
+ case 'segments_group':
+ scenario_url = segments_group_url;
+ break;
+ case 'markers':
+ scenario_url = markers_url;
+ break;
+ case 'teacher':
+ scenario_url = teacher_url;
+ break;
+ }
+
var project_id = $("#project_id_iframe").val();
- var group_mode = $("#group_mode").is(":checked");
- var final_url = default_url+"?project_id="+project_id+"&group_mode="+group_mode;
+ var final_url = scenario_url+"?project_id="+project_id;
$("#remie_workunit_iframe").attr("src", final_url);
});
@@ -88,7 +106,11 @@
<body>
<div>
<label>Id projet (génération d'iframe): </label><input id="project_id_iframe" type="text"></input>
- <br><label>Mode groupe: </label><input id="group_mode" type="checkbox"></input>
+ <br><label>Scénario: </label><br>
+ <input id="segments_single" name="scenario" type="radio" value="Elève - Segments, individuel">Elève - Segments, individuel</input><br>
+ <input id="segments_group" name="scenario" type="radio" value="Elève - Segments, groupe">Elève - Segments, groupe</input><br>
+ <input id="markers" name="scenario" type="radio" value="Elève - Marqueurs" disabled><s>Elève - Marqueurs</s></input><br>
+ <input id="teacher" name="scenario" type="radio" value="Professeur - Segments" disabled><s>Professeur - Segments</s></input>
<br><input id="iframe_update_button" type="button" value="Générer"></input>
</div>
<div hidden="true">
--- a/server/src/remie/views.py Wed Aug 05 18:00:35 2015 +0200
+++ b/server/src/remie/views.py Fri Aug 07 12:23:58 2015 +0200
@@ -12,19 +12,66 @@
def get(self, request):
return render_to_response(self.template_name, context_instance=RequestContext(request))
-class RemieSegmentsView(View):
+
+class RemieSegmentsSingleView(View):
+ """
+ The view with the segment-scenario for single user
"""
- The view with the segment-scenario (will be standardized to be able to generate every view at some point)
+ template_name = "remie/iframe_segments_single.html"
+
+ def get(self, request):
+ project_id = request.GET.get("project_id", "") # id of the project we're working on
+ current_user = request.user
+ render_data = {
+ "project_id": project_id,
+ "current_user": current_user.username,
+ }
+ return render_to_response(self.template_name, render_data, context_instance=RequestContext(request))
+
+
+class RemieSegmentsGroupView(View):
"""
- template_name = "remie/iframe.html"
+ The view with the segment-scenario for group
+ """
+ template_name = "remie/iframe_segments_group.html"
def get(self, request):
project_id = request.GET.get("project_id", "") # id of the project we're working on
current_user = request.user
- group_mode = {'true': True, 'false': False, "0": False, "1": True}.get(request.GET.get("group_mode", "").lower()) # if group_mode, annotations from everybody will be displayed
+ render_data = {
+ "project_id": project_id,
+ "current_user": current_user.username,
+ }
+ return render_to_response(self.template_name, render_data, context_instance=RequestContext(request))
+
+
+class RemieMarkersView(View):
+ """
+ The view with the markers-scenario
+ """
+ template_name = "remie/iframe_markers.html"
+
+ def get(self, request):
+ project_id = request.GET.get("project_id", "") # id of the project we're working on
+ current_user = request.user
render_data = {
"project_id": project_id,
"current_user": current_user.username,
- "group_mode": group_mode
+ }
+ return render_to_response(self.template_name, render_data, context_instance=RequestContext(request))
+
+
+class RemieTeacherView(View):
+ """
+ The view with the teacher-scenario
+ """
+ template_name = "remie/iframe_teacher.html"
+
+ def get(self, request):
+ project_id = request.GET.get("project_id", "") # id of the project we're working on
+ current_user = request.user
+ render_data = {
+ "project_id": project_id,
+ "current_user": current_user.username,
}
return render_to_response(self.template_name, render_data, context_instance=RequestContext(request))
\ No newline at end of file
--- a/server/src/remieplt/urls.py Wed Aug 05 18:00:35 2015 +0200
+++ b/server/src/remieplt/urls.py Fri Aug 07 12:23:58 2015 +0200
@@ -23,7 +23,7 @@
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.views.generic import RedirectView
-from remie.views import RemieSegmentsView, RemieIframeTesterView
+from remie.views import RemieSegmentsSingleView, RemieSegmentsGroupView, RemieMarkersView, RemieTeacherView, RemieIframeTesterView
js_info_dict = {
'packages': ('django.contrib.admin',),
@@ -48,10 +48,10 @@
url(r'^remie/iframetester$', RemieIframeTesterView.as_view(), name="remie_iframe_tester"),
- url(r'^remie/workunit/segments$', RemieSegmentsView.as_view(), name="remie_segment"),
- url(r'^remie/workunit/groupsegment$', RemieSegmentsView.as_view(), name="remie_groupsegment"),
- url(r'^remie/workunit/marker', RemieSegmentsView.as_view(), name="remie_marker"),
- url(r'^remie/workunit/teacher', RemieSegmentsView.as_view(), name="remie_teacher"),
+ url(r'^remie/workunit/segments_group$', RemieSegmentsGroupView.as_view(), name="remie_segments_group"),
+ url(r'^remie/workunit/segments_single$', RemieSegmentsSingleView.as_view(), name="remie_segments_single"),
+ url(r'^remie/workunit/markers', RemieMarkersView.as_view(), name="remie_markers"),
+ url(r'^remie/workunit/teacher', RemieTeacherView.as_view(), name="remie_teacher"),
url(r'^/?$', RedirectView.as_view(url='ldt'), name="remie_iframe_container"),