<% # 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. -%>
<%= error_messages_for 'review' -%> <%= error_messages_for 'reply' -%> <% if @notice -%>
<%= @notice -%>
<% end -%> <% if @error -%>
<%= @error -%>
<% end -%>
<% if authorize_for('code_review', 'update') -%> <%= link_to_function l(:button_update), "$('#update-form-#{@review.id}').show();return false;", :class => 'icon icon-edit' %> <% end %> <% if authorize_for('code_review', 'destroy') -%> <%= link_to(l(:button_delete), {:controller => 'code_review', :action => 'destroy', :id => @project, :review_id => @review}, :update => "show_review_#{@review.id}", :remote => true, :confirm => l(:text_are_you_sure), :success => "deleteReview(#{@review.id})", :class => 'icon icon-del') %> <% end -%>

<%= link_to h(@issue.tracker.name) + ' #' +@issue.id.to_s + ' (' + h(@review.issue.status) + ')', :controller => 'issues', :action => 'show', :id => @review.issue.id %>:
<%=h @review.subject %>

<%= avatar(@review.user, :size => "64") %>
<%= authoring @review.created_at, @review.user %>. <%= l(:label_updated_time, distance_of_time_in_words(Time.now, @review.updated_at)) + '.' if @review.created_at != @review.updated_at %>


<%= textilizable @review, :comment %>
<% journals = @review.issue.journals.sort {|a, b| a.id <=> b.id } %> <% if respond_to?('render_journal') %> <% # ChiliProject -%> <% if journals.length > 0 %>

<%= l(:label_history) %>

<%= render :partial => 'history', :locals => { :issue => @review.issue, :journals => journals } %>
<% end %> <% else %> <% # Redmine -%> <% if journals.length > 0 %>

<%= l(:label_history) %>

<% end %> <%= render :partial => 'reply', :collection => journals %> <% end %> <% if authorize_for('code_review', 'reply') -%>

<%= toggle_link l(:button_reply), "reply_#{@review.id}", :focus => 'reply_comment_' + @review.id.to_s %>

<% message_form_id = "message-form-#{@review.id}" -%> <% end %>