summaryrefslogtreecommitdiffstats
path: root/templates/repo/issue
diff options
context:
space:
mode:
Diffstat (limited to 'templates/repo/issue')
-rw-r--r--templates/repo/issue/create.tmpl2
-rw-r--r--templates/repo/issue/list.tmpl8
-rw-r--r--templates/repo/issue/milestone.tmpl26
3 files changed, 29 insertions, 7 deletions
diff --git a/templates/repo/issue/create.tmpl b/templates/repo/issue/create.tmpl
index de0c47ac20..f38c57d0d5 100644
--- a/templates/repo/issue/create.tmpl
+++ b/templates/repo/issue/create.tmpl
@@ -54,7 +54,7 @@
{{else}}
<ul class="list-unstyled">
{{range .OpenMilestones}}
- <li class="milestone-item" data-id="{{.Id}}">
+ <li class="milestone-item" data-id="{{.ID}}">
<p><strong>{{.Name}}</strong></p>
<!-- <p>due to 3 days later</p> -->
</li>
diff --git a/templates/repo/issue/list.tmpl b/templates/repo/issue/list.tmpl
index e24f8bb926..0a3eebbdaf 100644
--- a/templates/repo/issue/list.tmpl
+++ b/templates/repo/issue/list.tmpl
@@ -88,20 +88,20 @@
{{end}}
{{with .Page}}
- {{if gt .Total 1}}
+ {{if gt .TotalPages 1}}
<div class="center page buttons">
<div class="ui borderless pagination menu">
- <a class="{{if not .HasPrevious}}disabled{{end}} item" {{if .HasPrevious}}href="{{$.RepoLink}}/issues?type={{$.ViewType}}&state={{$.State}}&labels={{$.SelectLabels}}&page={{.Previous}}"{{end}}>
+ <a class="{{if not .HasPrevious}}disabled{{end}} item" {{if .HasPrevious}}href="{{$.Link}}?type={{$.ViewType}}&state={{$.State}}&labels={{$.SelectLabels}}&page={{.Previous}}"{{end}}>
<i class="left arrow icon"></i> {{$.i18n.Tr "repo.issues.previous"}}
</a>
{{range .Pages}}
{{if eq .Num -1}}
<a class="disabled item">...</a>
{{else}}
- <a class="{{if .IsCurrent}}active{{end}} item" {{if not .IsCurrent}}href="{{$.RepoLink}}/issues?type={{$.ViewType}}&state={{$.State}}&labels={{$.SelectLabels}}&page={{.Num}}"{{end}}>{{.Num}}</a>
+ <a class="{{if .IsCurrent}}active{{end}} item" {{if not .IsCurrent}}href="{{$.Link}}?type={{$.ViewType}}&state={{$.State}}&labels={{$.SelectLabels}}&page={{.Num}}"{{end}}>{{.Num}}</a>
{{end}}
{{end}}
- <a class="{{if not .HasNext}}disabled{{end}} item" {{if .HasNext}}href="{{$.RepoLink}}/issues?type={{$.ViewType}}&state={{$.State}}&labels={{$.SelectLabels}}&page={{.Next}}"{{end}}>
+ <a class="{{if not .HasNext}}disabled{{end}} item" {{if .HasNext}}href="{{$.Link}}?type={{$.ViewType}}&state={{$.State}}&labels={{$.SelectLabels}}&page={{.Next}}"{{end}}>
{{$.i18n.Tr "repo.issues.next"}} <i class="icon right arrow"></i>
</a>
</div>
diff --git a/templates/repo/issue/milestone.tmpl b/templates/repo/issue/milestone.tmpl
index 3add7cd807..d5b22806aa 100644
--- a/templates/repo/issue/milestone.tmpl
+++ b/templates/repo/issue/milestone.tmpl
@@ -28,8 +28,8 @@
{{range .Milestones}}
<li class="item">
<i class="octicon octicon-milestone"></i> <a href="{{$.RepoLink}}/issues?state={{$.State}}&midx={{.Index}}">{{.Name}}</a>
- <div class="ui right blue progress" data-percent="{{if .Completeness}}{{.Completeness}}{{else}}100{{end}}">
- <div class="bar">
+ <div class="ui right blue progress" data-percent="{{.Completeness}}">
+ <div class="bar" {{if not .Completeness}}style="background-color: transparent"{{end}}>
<div class="progress"></div>
</div>
</div>
@@ -63,6 +63,28 @@
{{end}}
</li>
{{end}}
+
+ {{with .Page}}
+ {{if gt .TotalPages 1}}
+ <div class="center page buttons">
+ <div class="ui borderless pagination menu">
+ <a class="{{if not .HasPrevious}}disabled{{end}} item" {{if .HasPrevious}}href="{{$.Link}}?state={{$.State}}&page={{.Previous}}"{{end}}>
+ <i class="left arrow icon"></i> {{$.i18n.Tr "repo.issues.previous"}}
+ </a>
+ {{range .Pages}}
+ {{if eq .Num -1}}
+ <a class="disabled item">...</a>
+ {{else}}
+ <a class="{{if .IsCurrent}}active{{end}} item" {{if not .IsCurrent}}href="{{$.Link}}?state={{$.State}}&page={{.Num}}"{{end}}>{{.Num}}</a>
+ {{end}}
+ {{end}}
+ <a class="{{if not .HasNext}}disabled{{end}} item" {{if .HasNext}}href="{{$.Link}}?state={{$.State}}&page={{.Next}}"{{end}}>
+ {{$.i18n.Tr "repo.issues.next"}} <i class="icon right arrow"></i>
+ </a>
+ </div>
+ </div>
+ {{end}}
+ {{end}}
</div>
</div>
</div>