<commit_before>{% extends "baselayout.html" %}

{% block script %}

jQuery(document).ready(function(){
	$(".showbutton").click(function() {
		$(this).parent().find('.commentbody').toggle();
	});
	$('.commentbody').hide();
});

{% endblock %}


{% block content %}

  <h3>General Feedback</h3>
  <ul>
  {% for fb in general %}
    <li class="comment">
    <div class="head">
      {{fb.date|date:"d M Y"}}: 
      {{fb.user.first_name}} {{fb.user.last_name}} (<a href="mailto:{{fb.user.email}}">Email</a>)
      <button class="showbutton">Show</button>
      <a href="/feedback/general/delete/{{fb.id}}">Delete</a>
    </div>
    
    <div class="commentbody">
    {% if fb.video %}
    
     <object type="application/x-shockwave-flash" data="{% auslan_static_prefix %}flowplayer/FlowPlayer.swf" 
		      width="192" height="144" id="FlowPlayer">
		  <param name="allowScriptAccess" value="always" />
		  <param name="movie" value="{% auslan_static_prefix %}flowplayer/FlowPlayer.swf" />
		  <param name="quality" value="high" />
		  <param name="scale" value="noScale" />
		  <param name="wmode" value="transparent" /> 
		  <param name="flashvars"
			value="config={ playList: [ { url: '{% auslan_media_prefix %}{{ fb.video }}' }  ], 
					autoPlay: true, 
					autoBuffering: false, 
					loop: false, 
					autoRewind: true,   
					hideControls: true}" 
		  />
	       </object>
     
     
    {% endif %} 
    
    <p>{{fb.comment}}</p>
    
    </div>
    </li>          
  {% endfor %}
  </ul>
  
  <h3>Sign Feedback</h3>
  <ul>
  {% for fb in signfb %}
    <li class="comment">
    <div class="head">
      {{fb.date|date:"d M Y"}}: 
      {{fb.user.first_name}} {{fb.user.last_name}} (<a href="mailto:{{fb.user.email}}">Email</a>)
      on <a href="{{fb.translation.get_absolute_url}}">{{fb.translation}}</a>
      <a href="/feedback/sign/delete/{{fb.id}}">Delete</a>	
    </div>
    <div class="commentbody">
    <p>{{fb.comment}}</p>     
    <ul> 
	<li>Auslan Sign: {{fb.get_isAuslan_display}}</li>
	<li>Where Used: {{fb.get_whereused_display}}</li>
	<li>Liked: {{fb.get_like_display}}</li>
	<li>Used: {{fb.get_use_display}}</li>
	<li>Use Suggested: {{fb.get_suggested_display}}</li>
	<li>Correct: {{fb.get_correct_display}}</li>
    </ul>
    </div>
    </li>
  {% endfor %}
  
  </ul>
  
  <h3>Missing Sign Feedback</h3>
  <ul>
  {% for fb in missing %}
    <li class="comment">
    
    <div class="head">
       {{fb.date|date:"d M Y"}}: 
       {{fb.user.first_name}} {{fb.user.last_name}} 
       (<a href="mailto:{{fb.user.email}}">Email</a>)
       <a href="/feedback/missingsign/delete/{{fb.id}}">Delete</a>
    </div>
    <div class="commentbody">
    {% if fb.video %}  
    <div class="commentvideo">
      <object type="application/x-shockwave-flash" data="{% auslan_static_prefix %}flowplayer/FlowPlayer.swf" 
	      width="192" height="144" id="FlowPlayer">
	  <param name="allowScriptAccess" value="always" />
	  <param name="movie" value="{% auslan_static_prefix %}flowplayer/FlowPlayer.swf" />
	  <param name="quality" value="high" />
	  <param name="scale" value="noScale" />
	  <param name="wmode" value="transparent" /> 
	  <param name="flashvars"
		value="config={ playList: [ { url: '{% auslan_media_prefix %}{{ fb.video.name }}' }  ], <commit_msg>fixed javascript in feedback display, ajaxic deletion of feedback.<commit_after>{% extends "baselayout.html" %}

{% block script %}

jQuery(document).ready(function(){
	$(".showbutton").toggle(
	    /* I don't understand why the button labels need to be transposed here */
	    function(){ $(this).html("Hide"); $(this).parents(".head").next().show(); },
	    function(){ $(this).html("Show"); $(this).parents(".head").next().hide(); }
	);
	$('.commentbody').hide();
	
	$('.delete').click(function() {
	  parent = $(this).parents(".head");
	  parts = parent.attr("id").split("-");
	  kind = parts[0];
	  id = parts[1];
	  url = "/feedback/"+kind+"/delete/"+id;
	  /* perform the deletion with a get request */
	  $.get(url, function(data) {
	     $(parent).parents("li").remove();
	  })
	})
	
	
});

{% endblock %}


{% block content %}

  <h3>General Feedback</h3>
  <ul>
  {% for fb in general %}
    <li class="comment">
    <div class="head" id="general-{{fb.id}}">
      {{fb.date|date:"d M Y"}}: 
      {{fb.user.first_name}} {{fb.user.last_name}} (<a href="mailto:{{fb.user.email}}">Email</a>)
      <button class="showbutton">Show</button>
      <button class="delete">Delete</button> 
    </div>
    
    <div class="commentbody">
    {% if fb.video %}
    
     <object type="application/x-shockwave-flash" data="{% auslan_static_prefix %}flowplayer/FlowPlayer.swf" 
		      width="192" height="144" id="FlowPlayer">
		  <param name="allowScriptAccess" value="always" />
		  <param name="movie" value="{% auslan_static_prefix %}flowplayer/FlowPlayer.swf" />
		  <param name="quality" value="high" />
		  <param name="scale" value="noScale" />
		  <param name="wmode" value="transparent" /> 
		  <param name="flashvars"
			value="config={ playList: [ { url: '{% auslan_media_prefix %}{{ fb.video }}' }  ], 
					autoPlay: true, 
					autoBuffering: false, 
					loop: false, 
					autoRewind: true,   
					hideControls: true}" 
		  />
	       </object>
     
     
    {% endif %} 
    
    <p>{{fb.comment}}</p>
    
    </div>
    </li>          
  {% endfor %}
  </ul>
  
  <h3>Sign Feedback</h3>
  <ul>
  {% for fb in signfb %}
    <li class="comment">
    <div class="head" id="sign-{{fb.id}}">
      {{fb.date|date:"d M Y"}}: 
      {{fb.user.first_name}} {{fb.user.last_name}} (<a href="mailto:{{fb.user.email}}">Email</a>)
      on <a href="{{fb.translation.get_absolute_url}}">{{fb.translation}}</a>
      <button class="showbutton">Show</button>
      <button class="delete">Delete</button> 
    </div>
    <div class="commentbody">
    <p>{{fb.comment}}</p>     
    <ul> 
	<li>Auslan Sign: {{fb.get_isAuslan_display}}</li>
	<li>Where Used: {{fb.get_whereused_display}}</li>
	<li>Liked: {{fb.get_like_display}}</li>
	<li>Used: {{fb.get_use_display}}</li>
	<li>Use Suggested: {{fb.get_suggested_display}}</li>
	<li>Correct: {{fb.get_correct_display}}</li>
    </ul>
    </div>
    </li>
  {% endfor %}
  
  </ul>
  
  <h3>Missing Sign Feedback</h3>
  <ul>
  {% for fb in missing %}
    <li class="comment">
    
    <div class="head" id="missingsign-{{fb.id}}">
       {{fb.date|date:"d M Y"}}: 
       {{fb.user.first_name}} {{fb.user.last_name}} 
       (<a href="mailto:{{fb.user.email}}">Email</a>)
      <button class="showbutton">Show</button>
      <button class="delete">Delete</button> 
    </div>
    <div class="commentbody">
    {% if fb.video %}  
    <div class="commentvideo">
      <object type="application/x-shockwave-flash" data="{% auslan_static_prefix %}flowplayer/FlowPlayer.swf" 
	      width="192" height="144" id="FlowPlayer">
	  <param name="allowScriptAccess" value="always" />
	  <param name="movie" value="{% auslan_static_prefix %}flowplayer/FlowPlayer.swf" />
	  <param name="quality" value="high" />
	  <param name="scale" value="noScale" />
	  <param name="wmode" value="transparent" /> 
	  <param name="flashvars"
		value="config={ playList: [ { url: '{% auslan_media_prefix %}{{ fb.video.name }}' }  ], 
{'fraction_non_alphanumeric': 0.21692902513117923, 'fraction_numerical': 0.005247169290251312, 'mean_word_length': 3.27063679245283, 'pattern_counts': {'":': 0, '<': 161, '<?xml version=': 0, '>': 159, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2947829', 'n_tokens_mistral': 2839, 'n_tokens_neox': 2551, 'n_words': 445}