mirror of
https://github.com/documize/community.git
synced 2025-07-22 06:39:43 +02:00
Final tweaks to GitHub n Trello section
This commit is contained in:
parent
26a548598b
commit
25b66f77a1
11 changed files with 69 additions and 67 deletions
|
@ -71,7 +71,7 @@ const commitsTemplate = `
|
|||
<table class="github-table" style="width: 100%;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="title">Commits <span>{{len .BranchCommits}} commits by {{.NumContributors}} contributors</span>
|
||||
<th class="title">Commits <span>· {{len .BranchCommits}} commits by {{.NumContributors}} contributors</span>
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
@ -79,11 +79,11 @@ const commitsTemplate = `
|
|||
<tbody>
|
||||
{{range $commit := .BranchCommits}}
|
||||
<tr>
|
||||
<td style="no-width">
|
||||
<td>
|
||||
<a href="{{$commit.URL}}">{{$commit.Message}}</a>
|
||||
<span class="dataid"> {{$commit.Branch}}</span>
|
||||
<span class="data"> {{$commit.Branch}}</span>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<td class="right-column">
|
||||
<div class="contributor-meta">
|
||||
<img class="github-avatar" alt="@{{$commit.Name}}" src="{{$commit.Avatar}}" />
|
||||
{{$commit.Name}}
|
||||
|
|
|
@ -33,10 +33,9 @@ const (
|
|||
<thead>
|
||||
<tr>
|
||||
<th class="title">
|
||||
Issues <span>{{.ClosedIssues}} closed {{if eq 1 .ClosedIssues}}{{else}}issues{{end}} and {{.OpenIssues}} open
|
||||
Issues <span>· {{.ClosedIssues}} closed {{if eq 1 .ClosedIssues}}{{else}}issues{{end}} and {{.OpenIssues}} open
|
||||
{{if eq 1 .OpenIssues}}issue{{else}}{{end}}</span>
|
||||
</th>
|
||||
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
@ -50,10 +49,10 @@ const (
|
|||
{{else}}
|
||||
` + closedIsvg + `
|
||||
{{end}}
|
||||
<a href="{{$data.URL}}">{{$data.Message}}</a> <span class="dataid">#{{$data.ID}}</span>
|
||||
<a href="{{$data.URL}}">{{$data.Message}}</a> <span class="data">#{{$data.ID}}</span>
|
||||
{{$data.Labels}}
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<td class="right-column">
|
||||
<div class="milestone-meta">
|
||||
<span class="meta-milestone">{{$data.Milestone}}</span> ·
|
||||
<span class="meta-creator">{{$data.Creator}}</span> · <span class="meta-date">{{$data.Date}}</span>
|
||||
|
|
|
@ -119,7 +119,7 @@ func getMilestones(client *gogithub.Client, config *githubConfig) ([]githubMiles
|
|||
dd := "no due date"
|
||||
if v.DueOn != nil {
|
||||
// TODO refactor to add message in red if the milestone is overdue
|
||||
dd = "due on " + (*v.DueOn).Format(milestonesTimeFormat) + ""
|
||||
dd = "due " + (*v.DueOn).Format(milestonesTimeFormat) + ""
|
||||
}
|
||||
up := ""
|
||||
if v.UpdatedAt != nil {
|
||||
|
@ -210,10 +210,10 @@ func renderMilestones(payload *githubRender, c *githubConfig) error {
|
|||
}
|
||||
}
|
||||
if issuesClosed+issuesOpen > 0 {
|
||||
payload.Milestones = append(payload.Milestones, githubMilestone{
|
||||
Repo: orb.Repo, Private: orb.Private, Name: noMilestone, IsOpen: true,
|
||||
OpenIssues: issuesOpen, ClosedIssues: issuesClosed, URL: template.URL(orb.URL),
|
||||
})
|
||||
//payload.Milestones = append(payload.Milestones, githubMilestone{
|
||||
// Repo: orb.Repo, Private: orb.Private, Name: noMilestone, IsOpen: true,
|
||||
// OpenIssues: issuesOpen, ClosedIssues: issuesClosed, URL: template.URL(orb.URL),
|
||||
//})
|
||||
}
|
||||
|
||||
hadRepo[rName] = true
|
||||
|
|
|
@ -14,15 +14,15 @@ package github
|
|||
const (
|
||||
rawMSsvg = `<path d="M8 2H6V0h2v2zm4 5H2c-.55 0-1-.45-1-1V4c0-.55.45-1 1-1h10l2 2-2 2zM8 4H6v2h2V4zM6 16h2V8H6v8z"></path>`
|
||||
openMSsvg = `
|
||||
<span title="Open milestone">
|
||||
<span class="issue-state" title="Open Milestone">
|
||||
<svg height="16" width="14" version="1.1" viewBox="0 0 14 16">
|
||||
` + rawMSsvg + `
|
||||
</svg>
|
||||
</span>
|
||||
`
|
||||
closedMSsvg = `
|
||||
<span title="Closed milestone">
|
||||
<svg aria-hidden="true" class="octicon octicon-check" height="16" version="1.1" viewBox="0 0 12 16" width="12">
|
||||
<span class="issue-state" title="Closed Milestone">
|
||||
<svg aria-hidden="true" class="octicon octicon-check" height="16" height="14" version="1.1" viewBox="0 0 12 16">
|
||||
<path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path>
|
||||
</svg>
|
||||
</span>
|
||||
|
@ -33,7 +33,7 @@ const (
|
|||
<table class="github-table" style="width: 100%;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="title">Milestones <span> {{.ClosedMS}} closed and {{.OpenMS}} open</span>
|
||||
<th class="title">Milestones <span>· {{.ClosedMS}} closed and {{.OpenMS}} open</span>
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
@ -50,21 +50,20 @@ const (
|
|||
` + closedMSsvg + `
|
||||
{{end}}
|
||||
{{end}}
|
||||
<a class="link" href="{{$data.URL}}">{{$data.Name}}</a>
|
||||
<span class="data"> · {{if $data.IsMilestone}} {{$data.DueDate}}{{end}} </span>
|
||||
</td>
|
||||
<td>
|
||||
<div class="milestone-name"><a class="link" href="{{$data.URL}}">{{$data.Name}}</a></div>
|
||||
<span class="milestone-meta">{{$data.Repo}}</span>
|
||||
<td class="right-column">
|
||||
{{if $data.IsMilestone}}
|
||||
<span class="milestone-meta"> · {{$data.DueDate}}</span>
|
||||
{{end}}
|
||||
</td>
|
||||
<td class="no-width">
|
||||
{{if $data.IsMilestone}}
|
||||
<progress value="{{$data.Progress}}" max="100"></progress>
|
||||
<div class="progress-meta"><span class="bold color-off-black">{{$data.CompleteMsg}}</span> complete <span class="bold color-off-black">{{$data.OpenIssues}}</span> open <span class="bold color-off-black">{{$data.ClosedIssues}}</span> closed</div>
|
||||
<span class="bold color-off-black">{{$data.CompleteMsg}}</span> complete
|
||||
<span class="bold color-off-black">{{$data.OpenIssues}}</span> open
|
||||
<span class="bold color-off-black">{{$data.ClosedIssues}}</span> closed
|
||||
{{else}}
|
||||
<div class="progress-meta"><span class="bold color-off-black">{{$data.OpenIssues}}</span> open <span class="bold color-off-black">{{$data.ClosedIssues}}</span> closed</div>
|
||||
<span class="bold color-off-black">{{$data.OpenIssues}}</span> open <span class="bold color-off-black">{{$data.ClosedIssues}}</span> closed
|
||||
{{end}}
|
||||
<div class="progress-bar">
|
||||
<div class="progress" style="width:{{$data.Progress}}%;"></div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue