--- a/server/src/remie/views.py Mon Jul 20 11:03:56 2015 +0200
+++ b/server/src/remie/views.py Mon Jul 20 11:38:11 2015 +0200
@@ -20,11 +20,11 @@
def get(self, request):
project_id = request.GET.get("project_id", "") # id of the project we're working on
- current_user = request.GET.get("current_user", "") # current username
+ 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,
+ "current_user": current_user.username,
"group_mode": group_mode
}
return render_to_response(self.template_name, render_data, context_instance=RequestContext(request))
\ No newline at end of file
--- a/server/src/remieplt/templates/remie/iframe_tester.html Mon Jul 20 11:03:56 2015 +0200
+++ b/server/src/remieplt/templates/remie/iframe_tester.html Mon Jul 20 11:38:11 2015 +0200
@@ -8,11 +8,10 @@
$("#iframe_update_button").click(function(){
var default_url = "{% url 'remie_segment' %}";
var project_id = $("#project_id").val();
- var current_user = $("#current_user").val();
var group_mode = $("#group_mode").is(":checked");
- var final_url = default_url+"?project_id="+project_id+"¤t_user="+current_user+"&group_mode="+group_mode;
+ var final_url = default_url+"?project_id="+project_id+"&group_mode="+group_mode;
$("#remie_workunit_iframe").attr("src", final_url);
});
});
@@ -21,7 +20,6 @@
<body>
<div style="float:left; width:1191px; height:200px;">
<label>Id projet: </label><br><input id="project_id" type="text"></input><br><br>
-<label>Utilisateur: </label><br><input id="current_user" type="text"></input><br><br>
<label>Mode groupe: </label><input id="group_mode" type="checkbox"></input><br><br>
<input id="iframe_update_button" type="button" value="Générer"></input>
<input id="copy_button" type="button" value="Copier"></input>