1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

[API] Extend times API (#9200)

Extensively extend the times API.

close #8833; close #8513; close #8559
This commit is contained in:
6543
2019-12-27 21:30:58 +01:00
committed by zeripath
parent 0bcf644da4
commit f2d03cda96
19 changed files with 916 additions and 194 deletions

View File

@@ -6,7 +6,8 @@
5 = COMMENT_REF, 6 = PULL_REF, 7 = COMMENT_LABEL, 12 = START_TRACKING,
13 = STOP_TRACKING, 14 = ADD_TIME_MANUAL, 16 = ADDED_DEADLINE, 17 = MODIFIED_DEADLINE,
18 = REMOVED_DEADLINE, 19 = ADD_DEPENDENCY, 20 = REMOVE_DEPENDENCY, 21 = CODE,
22 = REVIEW, 23 = ISSUE_LOCKED, 24 = ISSUE_UNLOCKED, 25 = TARGET_BRANCH_CHANGED -->
22 = REVIEW, 23 = ISSUE_LOCKED, 24 = ISSUE_UNLOCKED, 25 = TARGET_BRANCH_CHANGED,
26 = DELETE_TIME_MANUAL -->
{{if eq .Type 0}}
<div class="comment" id="{{.HashTag}}">
{{if .OriginalAuthor }}
@@ -421,5 +422,17 @@
{{$.i18n.Tr "repo.pulls.change_target_branch_at" (.OldRef|Escape) (.NewRef|Escape) $createdStr | Safe}}
</span>
</div>
{{else if eq .Type 26}}
<div class="event" id="{{.HashTag}}">
<span class="octicon octicon-primitive-dot"></span>
<a class="ui avatar image" href="{{.Poster.HomeLink}}">
<img src="{{.Poster.RelAvatarLink}}">
</a>
<span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a> {{$.i18n.Tr "repo.issues.del_time_history" $createdStr | Safe}}</span>
<div class="detail">
<span class="octicon octicon-clock"></span>
<span class="text grey">{{.Content}}</span>
</div>
</div>
{{end}}
{{end}}