Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve project/milestone list #24655

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions templates/projects/list.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,20 @@
<div class="milestone list">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's a blatant copy as seen here. Possible to fix these to projects? CSS may need adjustment.

{{range .Projects}}
<li class="item">
{{svg .IconName}} <a href="{{.Link}}">{{.Title}}</a>
<div class="gt-df gt-ac gt-sb">
<h3 class="gt-df gt-ac gt-m-0 gt-fw">
{{svg .IconName 16 "gt-mr-3"}} <a class="muted" href="{{.Link}}">{{.Title}}</a>
</h3>
</div>
<div class="meta">
{{$closedDate:= TimeSinceUnix .ClosedDateUnix $.locale}}
{{if .IsClosed}}
{{svg "octicon-clock"}} {{$.locale.Tr "repo.milestones.closed" $closedDate | Safe}}
{{end}}
<span class="issue-stats">
{{svg "octicon-issue-opened" 16 "gt-mr-3"}}
{{svg "octicon-issue-opened" 19 "gt-ml-3"}}
{{$.locale.PrettyNumber .NumOpenIssues}}&nbsp;{{$.locale.Tr "repo.issues.open_title"}}
{{svg "octicon-check" 16 "gt-mr-3"}}
{{svg "octicon-check" 19 "gt-ml-3"}}
{{$.locale.PrettyNumber .NumClosedIssues}}&nbsp;{{$.locale.Tr "repo.issues.closed_title"}}
</span>
</div>
Expand All @@ -63,7 +67,7 @@
</div>
{{end}}
{{if .Description}}
<div class="content">
<div class="markup content">
{{.RenderedContent|Str2html}}
</div>
{{end}}
Expand Down
8 changes: 4 additions & 4 deletions templates/repo/issue/milestones.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@
{{end}}
{{end}}
<span class="issue-stats">
{{svg "octicon-issue-opened" 16 "gt-mr-3"}}
{{svg "octicon-issue-opened" 19 "gt-ml-3"}}
{{$.locale.PrettyNumber .NumOpenIssues}}&nbsp;{{$.locale.Tr "repo.issues.open_title"}}
{{svg "octicon-check" 16 "gt-mr-3"}}
{{svg "octicon-check" 19 "gt-ml-3"}}
{{$.locale.PrettyNumber .NumClosedIssues}}&nbsp;{{$.locale.Tr "repo.issues.closed_title"}}
{{if .TotalTrackedTime}}{{svg "octicon-clock"}} {{.TotalTrackedTime|Sec2Time}}{{end}}
{{if .UpdatedUnix}}{{svg "octicon-clock"}} {{$.locale.Tr "repo.milestones.update_ago" (TimeSinceUnix .UpdatedUnix $.locale) | Safe}}{{end}}
{{if .TotalTrackedTime}}{{svg "octicon-clock" 19 "gt-ml-3"}} {{.TotalTrackedTime|Sec2Time}}{{end}}
{{if .UpdatedUnix}}{{svg "octicon-clock" 19 "gt-ml-3"}} {{$.locale.Tr "repo.milestones.update_ago" (TimeSinceUnix .UpdatedUnix $.locale) | Safe}}{{end}}
</span>
</div>
{{if and (or $.CanWriteIssues $.CanWritePulls) (not $.Repository.IsArchived)}}
Expand Down
12 changes: 8 additions & 4 deletions templates/repo/projects/list.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,20 @@
<div class="milestone list">
{{range .Projects}}
<li class="item">
{{svg .IconName}} <a href="{{.Link}}">{{.Title}}</a>
<div class="gt-df gt-ac gt-sb">
<h3 class="gt-df gt-ac gt-m-0 gt-fw">
{{svg .IconName 16 "gt-mr-3"}} <a class="muted" href="{{.Link}}">{{.Title}}</a>
</h3>
</div>
<div class="meta">
{{$closedDate:= TimeSinceUnix .ClosedDateUnix $.locale}}
{{if .IsClosed}}
{{svg "octicon-clock"}} {{$.locale.Tr "repo.milestones.closed" $closedDate | Safe}}
{{end}}
<span class="issue-stats">
{{svg "octicon-issue-opened" 16 "gt-mr-3"}}
{{svg "octicon-issue-opened" 19 "gt-ml-3"}}
{{$.locale.PrettyNumber .NumOpenIssues}}&nbsp;{{$.locale.Tr "repo.issues.open_title"}}
{{svg "octicon-check" 16 "gt-mr-3"}}
{{svg "octicon-check" 19 "gt-ml-3"}}
{{$.locale.PrettyNumber .NumClosedIssues}}&nbsp;{{$.locale.Tr "repo.issues.closed_title"}}
</span>
</div>
Expand All @@ -63,7 +67,7 @@
</div>
{{end}}
{{if .Description}}
<div class="content">
<div class="markup content">
{{.RenderedContent|Str2html}}
</div>
{{end}}
Expand Down