<% # Code Review plugin for Redmine # Copyright (C) 2009-2012 Haruyuki Iida # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -%>

<%=h l(:code_reviews) %>

<% if @all_review_count > 0 %>

<%= 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) %> <% end %> <%# observe_field 'show_closed', :with => 'show_closed', :update => 'content' %>

<% end %> <% if @reviews == nil or @reviews.length == 0 %>

<%= l(:label_no_data) %>

<% else %> <%= sort_header_tag "#{Issue.table_name}.id", :caption => '#' %> <%= sort_header_tag "#{Issue.table_name}.status_id", :caption => l(:field_status)%> <%= sort_header_tag "#{Issue.table_name}.subject", :caption => l(:field_subject)%> <%= sort_header_tag 'path', :caption => l(:label_code_path)%> <%= sort_header_tag "#{Changeset.table_name}.revision", :caption => l(:label_revision)%> <%= sort_header_tag "#{Changeset.table_name}.committer", :caption => l(:label_code_author)%> <%= sort_header_tag 'user_id', :caption => l(:label_code_reviewer)%> <%= sort_header_tag 'updated_at', :caption => l(:label_date) %> <% for review in @reviews %> <% end %>
<%=h l(:label_code_line)%>
<%= link_to review.issue.id.to_s, {:controller => 'issues', :action => 'show', :id => review.issue.id}, :title => review.issue.subject %> <%=h review.issue.status %> <%=h review.issue.subject %> <% review_path = URI.decode(review.path) codepath = review_path if (review_path.length > 55) codepath = review_path[0, 15] + '...' + review_path[review_path.length - 35, 35] end -%> <%= link_to(raw(codepath), {:controller => 'code_review', :action => 'show', :id => @project, :review_id => review.id}, :title => review_path) -%> <%=h review.line %> <%=h review.revision %> <%=h review.committer %> <%=h review.user.name %> <%=h format_time(review.created_at) %>

<%= pagination_links_full @review_pages, @review_count %>

<% end %> <% content_for :header_tags do %> <%= stylesheet_link_tag "code_review.css", :plugin => "redmine_code_review", :media => "screen" %> <% end %>