|
|
@ -24,10 +24,14 @@
|
|
|
|
<%= error_messages_for 'review' -%>
|
|
|
|
<%= error_messages_for 'review' -%>
|
|
|
|
<%= error_messages_for 'reply' -%>
|
|
|
|
<%= error_messages_for 'reply' -%>
|
|
|
|
<% if @notice -%>
|
|
|
|
<% if @notice -%>
|
|
|
|
<div class="flash notice"><%= @notice -%></div>
|
|
|
|
<div class="flash notice">
|
|
|
|
|
|
|
|
<%= @notice -%>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<% end -%>
|
|
|
|
<% end -%>
|
|
|
|
<% if @error -%>
|
|
|
|
<% if @error -%>
|
|
|
|
<div class="flash error"><%= @error -%></div>
|
|
|
|
<div class="flash error">
|
|
|
|
|
|
|
|
<%= @error -%>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<% end -%>
|
|
|
|
<% end -%>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- code review view -->
|
|
|
|
<!-- code review view -->
|
|
|
@ -77,9 +81,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
<!-- review comment edit form -->
|
|
|
|
<!-- review comment edit form -->
|
|
|
|
<div class="box" id="update-form-<%= @review.id %>" style="display:none;">
|
|
|
|
<div class="box" id="update-form-<%= @review.id %>" style="display:none;">
|
|
|
|
<%
|
|
|
|
<% review_form_id = "review_form_#{@review.id}" -%>
|
|
|
|
review_form_id = "review_form_#{@review.id}"
|
|
|
|
|
|
|
|
-%>
|
|
|
|
|
|
|
|
<%= form_for :review,
|
|
|
|
<%= form_for :review,
|
|
|
|
:url => {:controller => 'code_review',
|
|
|
|
:url => {:controller => 'code_review',
|
|
|
|
:action => 'update',
|
|
|
|
:action => 'update',
|
|
|
@ -90,12 +92,20 @@
|
|
|
|
<%= hidden_field :issue, :lock_version%>
|
|
|
|
<%= hidden_field :issue, :lock_version%>
|
|
|
|
<%= hidden_field_tag :review_id, @review.id %>
|
|
|
|
<%= hidden_field_tag :review_id, @review.id %>
|
|
|
|
<p>
|
|
|
|
<p>
|
|
|
|
<label><b><%=h l(:field_subject)%>:</b></label>
|
|
|
|
<label>
|
|
|
|
|
|
|
|
<b>
|
|
|
|
|
|
|
|
<%=h l(:field_subject)%>:
|
|
|
|
|
|
|
|
</b>
|
|
|
|
|
|
|
|
</label>
|
|
|
|
<%= f.text_field :subject, :size => 70, :value => @review.subject%>
|
|
|
|
<%= f.text_field :subject, :size => 70, :value => @review.subject%>
|
|
|
|
</p>
|
|
|
|
</p>
|
|
|
|
<% if @allowed_statuses and @allowed_statuses.any? %>
|
|
|
|
<% if @allowed_statuses and @allowed_statuses.any? %>
|
|
|
|
<p>
|
|
|
|
<p>
|
|
|
|
<label><b><%=h l(:field_status)%>:</b></label>
|
|
|
|
<label>
|
|
|
|
|
|
|
|
<b>
|
|
|
|
|
|
|
|
<%=h l(:field_status)%>:
|
|
|
|
|
|
|
|
</b>
|
|
|
|
|
|
|
|
</label>
|
|
|
|
<%= f.select :status_id, (@allowed_statuses.collect {|p| [p.name, p.id]}), :required => true %>
|
|
|
|
<%= f.select :status_id, (@allowed_statuses.collect {|p| [p.name, p.id]}), :required => true %>
|
|
|
|
</p>
|
|
|
|
</p>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
@ -108,10 +118,8 @@
|
|
|
|
:id => 'review_comment_' + @review.id.to_s %>
|
|
|
|
:id => 'review_comment_' + @review.id.to_s %>
|
|
|
|
</p>
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
<p>
|
|
|
|
<%
|
|
|
|
<% submit_url = url_for(:controller => 'code_review', :action => 'update', :id => @project) -%>
|
|
|
|
submit_url = url_for(:controller => 'code_review', :action => 'update', :id => @project)
|
|
|
|
<%= button_to_function l(:button_submit), "$('#show_review_#{@review.id}').load('#{submit_url}', $('##{review_form_id}').serialize())" %>
|
|
|
|
-%>
|
|
|
|
|
|
|
|
<%= button_to_function l(:button_apply), "$('#show_review_#{@review.id}').load('#{submit_url}', $('##{review_form_id}').serialize())" %>
|
|
|
|
|
|
|
|
<input type="button" value="<%=h l(:button_cancel) %>" onclick='$("#review_form_<%= @review.id %>").hide();' />
|
|
|
|
<input type="button" value="<%=h l(:button_cancel) %>" onclick='$("#review_form_<%= @review.id %>").hide();' />
|
|
|
|
<%= link_to_function l(:label_preview), "$('#preview_#{@review.id}').load('#{url_for(:controller => 'code_review', :action => 'preview', :id => @project)}', $('##{review_form_id}').serialize())" %>
|
|
|
|
<%= link_to_function l(:label_preview), "$('#preview_#{@review.id}').load('#{url_for(:controller => 'code_review', :action => 'preview', :id => @project)}', $('##{review_form_id}').serialize())" %>
|
|
|
|
</p>
|
|
|
|
</p>
|
|
|
@ -127,14 +135,18 @@
|
|
|
|
<% # ChiliProject -%>
|
|
|
|
<% # ChiliProject -%>
|
|
|
|
<% if journals.length > 0 %>
|
|
|
|
<% if journals.length > 0 %>
|
|
|
|
<div id="history">
|
|
|
|
<div id="history">
|
|
|
|
<h3 class="rounded-background"><%= l(:label_history) %></h3>
|
|
|
|
<h3 class="rounded-background">
|
|
|
|
|
|
|
|
<%= l(:label_history) %>
|
|
|
|
|
|
|
|
</h3>
|
|
|
|
<%= render :partial => 'history', :locals => { :issue => @review.issue, :journals => journals } %>
|
|
|
|
<%= render :partial => 'history', :locals => { :issue => @review.issue, :journals => journals } %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% else %>
|
|
|
|
<% else %>
|
|
|
|
<% # Redmine -%>
|
|
|
|
<% # Redmine -%>
|
|
|
|
<% if journals.length > 0 %>
|
|
|
|
<% if journals.length > 0 %>
|
|
|
|
<h3><%= l(:label_history) %></h3>
|
|
|
|
<h3>
|
|
|
|
|
|
|
|
<%= l(:label_history) %>
|
|
|
|
|
|
|
|
</h3>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<%= render :partial => 'reply', :collection => journals %>
|
|
|
|
<%= render :partial => 'reply', :collection => journals %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
@ -144,9 +156,7 @@
|
|
|
|
<p>
|
|
|
|
<p>
|
|
|
|
<%= toggle_link l(:button_reply), "reply_#{@review.id}", :focus => 'reply_comment_' + @review.id.to_s %>
|
|
|
|
<%= toggle_link l(:button_reply), "reply_#{@review.id}", :focus => 'reply_comment_' + @review.id.to_s %>
|
|
|
|
</p>
|
|
|
|
</p>
|
|
|
|
<%
|
|
|
|
<% message_form_id = "message-form-#{@review.id}" -%>
|
|
|
|
message_form_id = "message-form-#{@review.id}"
|
|
|
|
|
|
|
|
-%>
|
|
|
|
|
|
|
|
<div id="reply_<%= @review.id %>" style="display:none;" class="box">
|
|
|
|
<div id="reply_<%= @review.id %>" style="display:none;" class="box">
|
|
|
|
<%= form_for @reply, :as => :reply, :url => {:action => 'reply', :id => @project, :review_id => @review.id}, :html => {:id => message_form_id} do |f| %>
|
|
|
|
<%= form_for @reply, :as => :reply, :url => {:action => 'reply', :id => @project, :review_id => @review.id}, :html => {:id => message_form_id} do |f| %>
|
|
|
|
<%= hidden_field_tag :review_id, @review.id %>
|
|
|
|
<%= hidden_field_tag :review_id, @review.id %>
|
|
|
@ -154,8 +164,9 @@
|
|
|
|
<%= hidden_field :issue, :lock_version%>
|
|
|
|
<%= hidden_field :issue, :lock_version%>
|
|
|
|
<% if @allowed_statuses and @allowed_statuses.any? %>
|
|
|
|
<% if @allowed_statuses and @allowed_statuses.any? %>
|
|
|
|
<p>
|
|
|
|
<p>
|
|
|
|
<label><%=h l(:field_status) %>:</label>
|
|
|
|
<label>
|
|
|
|
<% # select :review, :status, {l(:label_review_closed) => CodeReview::STATUS_CLOSED, l(:label_review_open) => CodeReview::STATUS_OPEN} %>
|
|
|
|
<%=h l(:field_status) %>:
|
|
|
|
|
|
|
|
</label>
|
|
|
|
<%= select :review, :status_id, (@allowed_statuses.collect {|p| [p.name, p.id]}), :required => true %>
|
|
|
|
<%= select :review, :status_id, (@allowed_statuses.collect {|p| [p.name, p.id]}), :required => true %>
|
|
|
|
</p>
|
|
|
|
</p>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
@ -168,13 +179,9 @@
|
|
|
|
:id => 'reply_comment_' + @review.id.to_s %>
|
|
|
|
:id => 'reply_comment_' + @review.id.to_s %>
|
|
|
|
</p>
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
<p>
|
|
|
|
<%
|
|
|
|
<% submit_url = url_for(:controller => 'code_review', :action => 'reply', :id => @project)-%>
|
|
|
|
submit_url = url_for(:controller => 'code_review', :action => 'reply', :id => @project)
|
|
|
|
|
|
|
|
-%>
|
|
|
|
|
|
|
|
<%= button_to_function l(:button_apply), "$('#show_review_#{@review.id}').load('#{submit_url}', $('##{message_form_id}').serialize())" %>
|
|
|
|
<%= button_to_function l(:button_apply), "$('#show_review_#{@review.id}').load('#{submit_url}', $('##{message_form_id}').serialize())" %>
|
|
|
|
<%
|
|
|
|
<% reply_preview_id = "reply_preview_#{@review.id}" -%>
|
|
|
|
reply_preview_id = "reply_preview_#{@review.id}"
|
|
|
|
|
|
|
|
-%>
|
|
|
|
|
|
|
|
<%= link_to_function l(:label_preview), "$('##{reply_preview_id}').load('#{url_for(:controller => 'code_review', :action => 'preview', :id => @project)}', $('##{message_form_id}').serialize())" %>
|
|
|
|
<%= link_to_function l(:label_preview), "$('##{reply_preview_id}').load('#{url_for(:controller => 'code_review', :action => 'preview', :id => @project)}', $('##{message_form_id}').serialize())" %>
|
|
|
|
</p>
|
|
|
|
</p>
|
|
|
|
<div id="<%= reply_preview_id %>" class="wiki"></div>
|
|
|
|
<div id="<%= reply_preview_id %>" class="wiki"></div>
|
|
|
@ -182,7 +189,5 @@
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|