1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-23 07:09:43 +02:00
documize/core/section/github/commits_template.go
2016-08-22 17:29:43 +01:00

69 lines
1.7 KiB
Go
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
package github
const commitsTemplate = `
<h3>Contributor activity since {{.Config.Since}}{{.Config.DateMessage}}</h3>
<div class="section-github-render">
<table style="width:80%">
<tr>
<th></th>
    <th>Author</th>
<th>Open Issues</th>
<th>Closed Issues</th>
    <th>#commits</th>
    <th>Branches</th>
  </tr>
{{range $stats := .AuthorStats}}
<tr>
<td>
<div class="github-avatar">
<img alt="@{{$stats.Author}}" src="{{$stats.Avatar}}" height="36" width="36">
</div>
</td>
<td>{{$stats.Author}}</td>
<td>{{$stats.OpenIssues}}</td>
<td>{{$stats.ClosedIssues}}</td>
<td>{{$stats.CommitCount}}</td>
<td>
{{range $repo := $stats.Repos}}
{{$repo}}<br>
{{end}}
</td>
</tr>
{{end}}
</table>
<table>
{{range $commit := .BranchCommits}}
<tr>
<td>
{{if $commit.ShowRepo}}{{$commit.Repo}}{{end}}
</td>
<td>
{{if $commit.ShowBranch}}{{$commit.Branch}}{{end}}
</td>
<td>
{{if $commit.ShowDate}}{{$commit.Date}}{{end}}
</td>
<td>
{{if $commit.ShowUser}}
<img alt="@{{$commit.Name}}" src="{{$commit.Avatar}}" height="36" width="36"> {{$commit.Name}}
{{end}}
</td>
<td>
<a class="link" href="{{$commit.URL}}">{{$commit.Message}}</a>
</td>
</tr>
{{end}}
</table>
</div>
`