mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Add comment replies (#5104)
* Add comment replies * Replace reviewID with review.ID
This commit is contained in:
		
				
					committed by
					
						
						techknowlogick
					
				
			
			
				
	
			
			
			
						parent
						
							9458880c06
						
					
				
				
					commit
					f38fce916e
				
			@@ -151,7 +151,7 @@
 | 
			
		||||
																			{{ template "repo/diff/comments" dict "root" $ "comments" $line.Comments}}
 | 
			
		||||
																			</ui>
 | 
			
		||||
																		</div>
 | 
			
		||||
																	{{template "repo/diff/comment_form_datahandler" dict "hidden" true "root" $ "comment" (index $line.Comments 0)}}
 | 
			
		||||
																	{{template "repo/diff/comment_form_datahandler" dict "reply" (index $line.Comments 0).ReviewID "hidden" true "root" $ "comment" (index $line.Comments 0)}}
 | 
			
		||||
																	</div>
 | 
			
		||||
																{{end}}
 | 
			
		||||
															</td>
 | 
			
		||||
@@ -164,7 +164,7 @@
 | 
			
		||||
																			{{ template "repo/diff/comments" dict "root" $ "comments" $line.Comments}}
 | 
			
		||||
																			</ui>
 | 
			
		||||
																		</div>
 | 
			
		||||
																		{{template "repo/diff/comment_form_datahandler" dict "hidden" true "root" $ "comment" (index $line.Comments 0)}}
 | 
			
		||||
																		{{template "repo/diff/comment_form_datahandler" dict "reply" (index $line.Comments 0).ReviewID "hidden" true "root" $ "comment" (index $line.Comments 0)}}
 | 
			
		||||
																	</div>
 | 
			
		||||
																{{end}}
 | 
			
		||||
															</td>
 | 
			
		||||
 
 | 
			
		||||
@@ -25,19 +25,19 @@
 | 
			
		||||
		<div class="footer">
 | 
			
		||||
			<span class="markdown-info"><i class="octicon octicon-markdown"></i> {{$.root.i18n.Tr "repo.diff.comment.markdown_info"}}</span>
 | 
			
		||||
			<div class="ui right floated">
 | 
			
		||||
				{{if not $.reply}}
 | 
			
		||||
				{{if $.reply}}
 | 
			
		||||
					<button name="reply" value="{{$.reply}}" class="ui submit green tiny button btn-reply">{{$.root.i18n.Tr "repo.diff.comment.reply"}}</button>
 | 
			
		||||
				{{else}}
 | 
			
		||||
					{{if $.root.CurrentReview}}
 | 
			
		||||
						<button name="is_review" value="true" type="submit"
 | 
			
		||||
								class="ui submit green tiny button btn-add-comment">{{$.root.i18n.Tr "repo.diff.comment.add_review_comment"}}</button>
 | 
			
		||||
					{{else}}
 | 
			
		||||
						<button name="is_review" value="true"  type="submit"
 | 
			
		||||
								class="ui submit green tiny button btn-start-review">{{$.root.i18n.Tr "repo.diff.comment.start_review"}}</button>
 | 
			
		||||
						<button type="submit"
 | 
			
		||||
								class="ui submit tiny basic button btn-add-single">{{$.root.i18n.Tr "repo.diff.comment.add_single_comment"}}</button>
 | 
			
		||||
					{{end}}
 | 
			
		||||
				{{end}}
 | 
			
		||||
				{{if not $.root.CurrentReview}}
 | 
			
		||||
				<button type="submit"
 | 
			
		||||
					class="ui submit tiny basic button btn-add-single">{{$.root.i18n.Tr "repo.diff.comment.add_single_comment"}}</button>
 | 
			
		||||
				{{end}}
 | 
			
		||||
				{{if or (not $.HasComments) $.hidden}}
 | 
			
		||||
					<button type="button" class="ui submit tiny basic button btn-cancel" onclick="cancelCodeComment(this);">{{$.root.i18n.Tr "cancel"}}</button>
 | 
			
		||||
				{{end}}
 | 
			
		||||
 
 | 
			
		||||
@@ -32,7 +32,7 @@
 | 
			
		||||
						{{ template "repo/diff/comments" dict "root" $.root "comments" $line.Comments}}
 | 
			
		||||
						</ui>
 | 
			
		||||
					</div>
 | 
			
		||||
					{{template "repo/diff/comment_form_datahandler" dict "hidden" true "root" $.root "comment" (index $line.Comments 0)}}
 | 
			
		||||
					{{template "repo/diff/comment_form_datahandler" dict "hidden" true "reply" (index $line.Comments 0).ReviewID "root" $.root "comment" (index $line.Comments 0)}}
 | 
			
		||||
				</div>
 | 
			
		||||
			</td>
 | 
			
		||||
		</tr>
 | 
			
		||||
 
 | 
			
		||||
@@ -342,7 +342,7 @@
 | 
			
		||||
										</div>
 | 
			
		||||
									{{end}}
 | 
			
		||||
								</div>
 | 
			
		||||
								{{template "repo/diff/comment_form_datahandler" dict "hidden" true "reply" true "root" $ "comment" (index $comms 0)}}
 | 
			
		||||
								{{template "repo/diff/comment_form_datahandler" dict "hidden" true "reply" (index $comms 0).ReviewID "root" $ "comment" (index $comms 0)}}
 | 
			
		||||
							</div>
 | 
			
		||||
						</div>
 | 
			
		||||
				{{end}}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user