Show dropdown with all statuses for commit (#13977)
* Show dropdown with all statuses for commit * Use popups * Remove unnecessary change * Style popup * Use divided list * As per @silverwind * Refactor GetLastCommitStatus * Missing dropdown on repo home and commit page * Fix tests * Make status icon be a part of a link on PR list * Fix missing translation call * Indent fix Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
parent
029836c34c
commit
f3c4baa84b
18 changed files with 63 additions and 23 deletions
|
@ -252,7 +252,8 @@ func NewCommitStatus(opts NewCommitStatusOptions) error {
|
|||
|
||||
// SignCommitWithStatuses represents a commit with validation of signature and status state.
|
||||
type SignCommitWithStatuses struct {
|
||||
Status *CommitStatus
|
||||
Status *CommitStatus
|
||||
Statuses []*CommitStatus
|
||||
*SignCommit
|
||||
}
|
||||
|
||||
|
@ -272,6 +273,7 @@ func ParseCommitsWithStatus(oldCommits *list.List, repo *Repository) *list.List
|
|||
if err != nil {
|
||||
log.Error("GetLatestCommitStatus: %v", err)
|
||||
} else {
|
||||
commit.Statuses = statuses
|
||||
commit.Status = CalcCommitStatus(statuses)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue