mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Save and view issue/comment content history (#16909)
* issue content history * Use timeutil.TimeStampNow() for content history time instead of issue/comment.UpdatedUnix (which are not updated in time) * i18n for frontend * refactor * clean up * fix refactor * re-format * temp refactor * follow db refactor * rename IssueContentHistory to ContentHistory, remove empty model tags * fix html * use avatar refactor to generate avatar url * add unit test, keep at most 20 history revisions. * re-format * syntax nit * Add issue content history table * Update models/migrations/v197.go Co-authored-by: 6543 <6543@obermui.de> * fix merge Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Lauris BH <lauris@nix.lv>
This commit is contained in:
		@@ -8,6 +8,13 @@
 | 
			
		||||
		{{template "repo/issue/view_title" .}}
 | 
			
		||||
	{{end}}
 | 
			
		||||
 | 
			
		||||
	<!-- I know, there is probably a better way to do this (moved from sidebar.tmpl, original author: 6543 @ 2021-02-28) -->
 | 
			
		||||
	<!-- Agree, there should be a better way, eg: introduce window.config.PageData (original author: wxiaoguang @ 2021-09-05) -->
 | 
			
		||||
	<input type="hidden" id="repolink" value="{{$.RepoRelPath}}">
 | 
			
		||||
	<input type="hidden" id="repoId" value="{{.Repository.ID}}">
 | 
			
		||||
	<input type="hidden" id="issueIndex" value="{{.Issue.Index}}"/>
 | 
			
		||||
	<input type="hidden" id="type" value="{{.IssueType}}">
 | 
			
		||||
 | 
			
		||||
	{{ $createdStr:= TimeSinceUnix .Issue.CreatedUnix $.Lang }}
 | 
			
		||||
	<div class="twelve wide column comment-list prevent-before-timeline">
 | 
			
		||||
		<ui class="ui timeline">
 | 
			
		||||
 
 | 
			
		||||
@@ -535,12 +535,7 @@
 | 
			
		||||
			</div>
 | 
			
		||||
 | 
			
		||||
			{{if and .CanCreateIssueDependencies (not .Repository.IsArchived)}}
 | 
			
		||||
				<input type="hidden" id="repolink" value="{{$.RepoRelPath}}">
 | 
			
		||||
				<input type="hidden" id="repoId" value="{{.Repository.ID}}">
 | 
			
		||||
				<input type="hidden" id="crossRepoSearch" value="{{.AllowCrossRepositoryDependencies}}">
 | 
			
		||||
				<input type="hidden" id="type" value="{{.IssueType}}">
 | 
			
		||||
				<!-- I know, there is probably a better way to do this -->
 | 
			
		||||
				<input type="hidden" id="issueIndex" value="{{.Issue.Index}}"/>
 | 
			
		||||
 | 
			
		||||
				<div class="ui basic modal remove-dependency">
 | 
			
		||||
					<div class="ui icon header">
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user