diff options
author | Lauris BH <lauris@nix.lv> | 2017-05-07 17:40:31 +0300 |
---|---|---|
committer | Bo-Yi Wu <appleboy.tw@gmail.com> | 2017-05-07 22:40:31 +0800 |
commit | 79494047b062069fd8e692152d29773a22877d76 (patch) | |
tree | 59f8f66828e25ee9f9c13f2baf50494e5474bbcd /templates/repo | |
parent | c864ccf9b1414dfdae1fd271511853e058b9e7c9 (diff) | |
download | gitea-79494047b062069fd8e692152d29773a22877d76.tar.gz gitea-79494047b062069fd8e692152d29773a22877d76.zip |
Show commit status icon in commits table (#1688)
* Show commit status icon in commits table
* Add comments
* Fix icons
* Few more places where commit table is displayed
* Change integration test to use goquery for parsing html
* Add integration tests for commit table and status icons
* Fix status to return lates status correctly on all databases
* Rewrote lates commit status selects
Diffstat (limited to 'templates/repo')
-rw-r--r-- | templates/repo/commits_table.tmpl | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/templates/repo/commits_table.tmpl b/templates/repo/commits_table.tmpl index 45cfe1890d..e33ffcdaa3 100644 --- a/templates/repo/commits_table.tmpl +++ b/templates/repo/commits_table.tmpl @@ -61,6 +61,21 @@ </td> <td class="message collapsing"> <span class="has-emoji{{if gt .ParentCount 1}} grey text{{end}}">{{RenderCommitMessage false .Summary $.RepoLink $.Repository.ComposeMetas}}</span> + {{if eq .State "pending"}} + <i class="commit-status circle icon yellow"></i> + {{end}} + {{if eq .State "success"}} + <i class="commit-status check icon green"></i> + {{end}} + {{if eq .State "error"}} + <i class="commit-status warning icon red"></i> + {{end}} + {{if eq .State "failure"}} + <i class="commit-status remove icon red"></i> + {{end}} + {{if eq .State "warning"}} + <i class="commit-status warning sign icon yellow"></i> + {{end}} </td> <td class="grey text right aligned">{{TimeSince .Author.When $.Lang}}</td> </tr> |