|
2 | 2 | <div role="main" aria-label="{{.Title}}" class="page-content repository projects milestones"> |
3 | 3 | {{template "repo/header" .}} |
4 | 4 | <div class="ui container"> |
5 | | - <div class="navbar projects-header"> |
6 | | - <div> |
7 | | - <div class="small-menu-items ui compact tiny menu"> |
8 | | - <a class="item{{if not .IsShowClosed}} active{{end}}" href="{{.RepoLink}}/projects?state=open"> |
9 | | - {{svg "octicon-project" 16 "gt-mr-3"}} |
10 | | - {{.locale.PrettyNumber .OpenCount}} {{.locale.Tr "repo.issues.open_title"}} |
11 | | - </a> |
12 | | - <a class="item{{if .IsShowClosed}} active{{end}}" href="{{.RepoLink}}/projects?state=closed"> |
13 | | - {{svg "octicon-check" 16 "gt-mr-3"}} |
14 | | - {{.locale.PrettyNumber .ClosedCount}} {{.locale.Tr "repo.issues.closed_title"}} |
15 | | - </a> |
16 | | - </div> |
17 | | - </div> |
18 | | - <div class="projects-toolbar"> |
19 | | - <!-- Sort --> |
20 | | - <div class="ui small dropdown type jump item"> |
21 | | - <span class="text"> |
22 | | - {{.locale.Tr "repo.issues.filter_sort"}} |
23 | | - {{svg "octicon-triangle-down" 14 "dropdown icon"}} |
24 | | - </span> |
25 | | - <div class="menu"> |
26 | | - <a class="{{if eq .SortType "oldest"}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&sort=oldest&state={{$.State}}">{{.locale.Tr "repo.issues.filter_sort.oldest"}}</a> |
27 | | - <a class="{{if eq .SortType "recentupdate"}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&sort=recentupdate&state={{$.State}}">{{.locale.Tr "repo.issues.filter_sort.recentupdate"}}</a> |
28 | | - <a class="{{if eq .SortType "leastupdate"}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&sort=leastupdate&state={{$.State}}">{{.locale.Tr "repo.issues.filter_sort.leastupdate"}}</a> |
29 | | - </div> |
30 | | - </div> |
31 | | - {{if and .CanWriteProjects (not .Repository.IsArchived)}} |
32 | | - <a class="ui small green button gt-ml-4" href="{{$.Link}}/new">{{.locale.Tr "repo.projects.new"}}</a> |
33 | | - {{end}} |
34 | | - </div> |
35 | | - </div> |
36 | | - {{template "base/alert" .}} |
37 | | - |
38 | | - <div class="milestone-list"> |
39 | | - {{range .Projects}} |
40 | | - <li class="milestone-card"> |
41 | | - <h3 class="flex-text-block gt-m-0"> |
42 | | - {{svg .IconName 16}} |
43 | | - <a class="muted" href="{{.Link}}">{{.Title}}</a> |
44 | | - </h3> |
45 | | - <div class="milestone-toolbar"> |
46 | | - <div class="group"> |
47 | | - <div class="flex-text-block"> |
48 | | - {{svg "octicon-issue-opened" 14}} |
49 | | - {{$.locale.PrettyNumber .NumOpenIssues}} {{$.locale.Tr "repo.issues.open_title"}} |
50 | | - </div> |
51 | | - <div class="flex-text-block"> |
52 | | - {{svg "octicon-check" 14}} |
53 | | - {{$.locale.PrettyNumber .NumClosedIssues}} {{$.locale.Tr "repo.issues.closed_title"}} |
54 | | - </div> |
55 | | - </div> |
56 | | - {{if and $.CanWriteProjects (not $.Repository.IsArchived)}} |
57 | | - <div class="group"> |
58 | | - <a class="flex-text-inline" href="{{.Link}}/edit">{{svg "octicon-pencil" 14}}{{$.locale.Tr "repo.issues.label_edit"}}</a> |
59 | | - {{if .IsClosed}} |
60 | | - <a class="link-action flex-text-inline" href data-url="{{.Link}}/open">{{svg "octicon-check" 14}}{{$.locale.Tr "repo.projects.open"}}</a> |
61 | | - {{else}} |
62 | | - <a class="link-action flex-text-inline" href data-url="{{.Link}}/close">{{svg "octicon-skip" 14}}{{$.locale.Tr "repo.projects.close"}}</a> |
63 | | - {{end}} |
64 | | - <a class="delete-button flex-text-inline" href="#" data-url="{{.Link}}/delete">{{svg "octicon-trash" 14}}{{$.locale.Tr "repo.issues.label_delete"}}</a> |
65 | | - </div> |
66 | | - {{end}} |
67 | | - </div> |
68 | | - {{if .Description}} |
69 | | - <div class="content"> |
70 | | - {{.RenderedContent|Str2html}} |
71 | | - </div> |
72 | | - {{end}} |
73 | | - </li> |
74 | | - {{end}} |
75 | | - |
76 | | - {{template "base/paginate" .}} |
77 | | - </div> |
| 5 | + {{template "projects/list" .}} |
78 | 6 | </div> |
79 | 7 | </div> |
80 | | - |
81 | | -{{if .CanWriteProjects}} |
82 | | -<div class="ui g-modal-confirm delete modal"> |
83 | | - <div class="header"> |
84 | | - {{svg "octicon-trash"}} |
85 | | - {{.locale.Tr "repo.projects.deletion"}} |
86 | | - </div> |
87 | | - <div class="content"> |
88 | | - <p>{{.locale.Tr "repo.projects.deletion_desc"}}</p> |
89 | | - </div> |
90 | | - {{template "base/modal_actions_confirm" .}} |
91 | | -</div> |
92 | | -{{end}} |
93 | 8 | {{template "base/footer" .}} |
0 commit comments