项目--代码评审 显示已关闭的评审功能不可用

This commit is contained in:
linhk 2014-08-16 15:18:46 +08:00
parent fcaeb86687
commit 6b66a205b3
1 changed files with 11 additions and 2 deletions

View File

@ -19,8 +19,8 @@
<script>
function change_option(flag) {
var url = "<%= raw url_for(:controller => 'code_review', :action=>'index', :id => @project) %>";
$('#content').load(url, {'show_closed': flag});
// var url = "<%= raw url_for(:controller => 'code_review', :action=>'index', :id => @project) %>";
// $('#content').load(url, {'show_closed': flag});
}
</script>
<div id="code_review_list">
@ -32,6 +32,15 @@ function change_option(flag) {
<p>
<%= form_tag({:controller => 'code_review', :action=>'index', :id => @project}, :id => 'optionform') do %>
<%= check_box_tag 'show_closed', 'true', @show_closed, :onchange => "change_option($('#show_closed').is(':checked'));"%> <%=h l(:label_show_closed_reviews) %>
<script type="text/javascript">
$(document).ready(function (){
$("#optionform").change(function(){
$("#optionform").submit();
});
});
</script>
<% end %>
<%# observe_field 'show_closed', :with => 'show_closed', :update => 'content' %>
</p>