diff options
author | Unknwon <u@gogs.io> | 2015-08-05 20:23:08 +0800 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-08-05 20:23:08 +0800 |
commit | 0705f55ce097b9892a7c4c11faa5396c4e557232 (patch) | |
tree | bbd95cb8bbe5bf1fb76b35417d686d4178050d57 /templates | |
parent | 6d2f25b9f597cb06e7c686bc837e622f059441fb (diff) | |
download | gitea-0705f55ce097b9892a7c4c11faa5396c4e557232.tar.gz gitea-0705f55ce097b9892a7c4c11faa5396c4e557232.zip |
finish new milestone page
Diffstat (limited to 'templates')
-rw-r--r-- | templates/.VERSION | 2 | ||||
-rw-r--r-- | templates/repo/issue/create.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/issue/labels.tmpl | 4 | ||||
-rw-r--r-- | templates/repo/issue/list.tmpl | 47 | ||||
-rw-r--r-- | templates/repo/issue/milestones.tmpl | 42 | ||||
-rw-r--r-- | templates/repo/issue/view.tmpl | 2 |
6 files changed, 70 insertions, 29 deletions
diff --git a/templates/.VERSION b/templates/.VERSION index 2d7fe89874..b7559a24af 100644 --- a/templates/.VERSION +++ b/templates/.VERSION @@ -1 +1 @@ -0.6.3.0805 Beta
\ No newline at end of file +0.6.4.0805 Beta
\ No newline at end of file diff --git a/templates/repo/issue/create.tmpl b/templates/repo/issue/create.tmpl index f38c57d0d5..307be6aa22 100644 --- a/templates/repo/issue/create.tmpl +++ b/templates/repo/issue/create.tmpl @@ -69,7 +69,7 @@ {{else}} <ul class="list-unstyled"> {{range .ClosedMilestones}} - <li class="milestone-item" data-id="{{.Id}}"> + <li class="milestone-item" data-id="{{.ID}}"> <p><strong>{{.Name}}</strong></p> <p>Closed {{TimeSince .ClosedDate $.Lang}}</p> </li> diff --git a/templates/repo/issue/labels.tmpl b/templates/repo/issue/labels.tmpl index 2f3dc25b90..4fcaec0714 100644 --- a/templates/repo/issue/labels.tmpl +++ b/templates/repo/issue/labels.tmpl @@ -38,7 +38,7 @@ <li class="item"> <div class="ui label" style="background-color: {{.Color}}"><i class="octicon octicon-tag"></i> {{.Name}}</div> {{if $.IsRepositoryAdmin}} - <a class="ui right delete-label-button" href="#" data-url="{{$.RepoLink}}/labels/delete" data-id="{{.ID}}"><i class="octicon octicon-trashcan"></i> {{$.i18n.Tr "repo.issues.label_delete"}}</a> + <a class="ui right delete-button" href="#" data-url="{{$.RepoLink}}/labels/delete" data-id="{{.ID}}"><i class="octicon octicon-trashcan"></i> {{$.i18n.Tr "repo.issues.label_delete"}}</a> <a class="ui right edit-label-button" href="#" data-id={{.ID}} data-title={{.Name}} data-color={{.Color}}><i class="octicon octicon-pencil"></i> {{$.i18n.Tr "repo.issues.label_edit"}}</a> {{end}} <a class="ui right open-issues" href="{{$.RepoLink}}/issues?labels={{.ID}}"><i class="octicon octicon-issue-opened"></i> {{$.i18n.Tr "repo.issues.label_open_issues" .NumOpenIssues}}</a> @@ -50,7 +50,7 @@ </div> {{if .IsRepositoryAdmin}} -<div class="ui basic delete-label modal"> +<div class="ui basic delete modal"> <div class="header"> {{.i18n.Tr "repo.issues.label_deletion"}} </div> diff --git a/templates/repo/issue/list.tmpl b/templates/repo/issue/list.tmpl index 0a3eebbdaf..128b3c0ba6 100644 --- a/templates/repo/issue/list.tmpl +++ b/templates/repo/issue/list.tmpl @@ -11,11 +11,11 @@ <div class="ui divider"></div> <div class="ui left"> <div class="ui tiny buttons"> - <a class="ui green basic button {{if not .IsShowClosed}}active{{end}}" href="{{.RepoLink}}/issues?type={{$.ViewType}}&state=open&labels={{.SelectLabels}}"> + <a class="ui green basic button {{if not .IsShowClosed}}active{{end}}" href="{{.RepoLink}}/issues?type={{$.ViewType}}&state=open&labels={{.SelectLabels}}&milestone={{.MilestoneID}}"> <i class="octicon octicon-issue-opened"></i> {{.i18n.Tr "repo.issues.open_tab" .IssueStats.OpenCount}} </a> - <a class="ui red basic button {{if .IsShowClosed}}active{{end}}" href="{{.RepoLink}}/issues?type={{.ViewType}}&state=closed&labels={{.SelectLabels}}"> + <a class="ui red basic button {{if .IsShowClosed}}active{{end}}" href="{{.RepoLink}}/issues?type={{.ViewType}}&state=closed&labels={{.SelectLabels}}&milestone={{.MilestoneID}}"> <i class="octicon octicon-issue-closed"></i> {{.i18n.Tr "repo.issues.close_tab" .IssueStats.ClosedCount}} </a> @@ -28,23 +28,24 @@ <i class="dropdown icon"></i> </span> <div class="menu"> - <a class="item" href="{{$.RepoLink}}/issues?type={{$.ViewType}}&state={{$.State}}">{{.i18n.Tr "repo.issues.filter_label_no_select"}}</a> + <a class="item" href="{{$.RepoLink}}/issues?type={{$.ViewType}}&state={{$.State}}&milestone={{$.MilestoneID}}">{{.i18n.Tr "repo.issues.filter_label_no_select"}}</a> {{range .Labels}} - <a class="item" href="{{$.RepoLink}}/issues?type={{$.ViewType}}&state={{$.State}}&labels={{.ID}}"><span class="octicon {{if eq $.SelectLabels .ID}}octicon-check{{end}}"></span><span class="label color" style="background-color: {{.Color}}"></span> {{.Name}}</a> + <a class="item" href="{{$.RepoLink}}/issues?type={{$.ViewType}}&state={{$.State}}&labels={{.ID}}&milestone={{$.MilestoneID}}"><span class="octicon {{if eq $.SelectLabels .ID}}octicon-check{{end}}"></span><span class="label color" style="background-color: {{.Color}}"></span> {{.Name}}</a> {{end}} </div> </div> - <!-- <div class="ui {{if not .Milestones}}disabled{{end}} pointing dropdown jump item"> + <div class="ui {{if not .Milestones}}disabled{{end}} pointing dropdown jump item"> <span class="text"> {{.i18n.Tr "repo.issues.filter_milestone"}} <i class="dropdown icon"></i> </span> <div class="menu"> + <a class="item" href="{{$.RepoLink}}/issues?type={{$.ViewType}}&state={{$.State}}&labels={{.SelectLabels}}">{{.i18n.Tr "repo.issues.filter_milestone_no_select"}}</a> {{range .Milestones}} - <a class="item" href="{{$.RepoLink}}/issues">{{.Name}}</a> + <a class="clickable item" href="{{$.RepoLink}}/issues?type={{$.ViewType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{.ID}}"><span class="octicon {{if eq $.MilestoneID .ID}}octicon-check{{end}}"></span> <span class="name">{{.Name}}</span></a> {{end}} </div> - </div> --> + </div> <!-- <div class="ui {{if not .Assignees}}disabled{{end}} pointing dropdown jump item"> <span class="text"> {{.i18n.Tr "repo.issues.filter_assignee"}} @@ -62,10 +63,10 @@ <i class="dropdown icon"></i> </span> <div class="menu"> - <a class="{{if eq .ViewType "all"}}active{{end}} item" href="{{$.RepoLink}}/issues?type=all&state={{$.State}}&labels={{.SelectLabels}}">{{.i18n.Tr "repo.issues.filter_type.all_issues"}}</a> - <a class="{{if eq .ViewType "assigned"}}active{{end}} item" href="{{$.RepoLink}}/issues?type=assigned&state={{$.State}}&labels={{.SelectLabels}}">{{.i18n.Tr "repo.issues.filter_type.assigned_to_you"}}</a> - <a class="{{if eq .ViewType "created_by"}}active{{end}} item" href="{{$.RepoLink}}/issues?type=created_by&state={{$.State}}&labels={{.SelectLabels}}">{{.i18n.Tr "repo.issues.filter_type.created_by_you"}}</a> - <a class="{{if eq .ViewType "mentioned"}}active{{end}} item" href="{{$.RepoLink}}/issues?type=mentioned&state={{$.State}}&labels={{.SelectLabels}}">{{.i18n.Tr "repo.issues.filter_type.mentioning_you"}}</a> + <a class="{{if eq .ViewType "all"}}active{{end}} item" href="{{$.RepoLink}}/issues?type=all&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}">{{.i18n.Tr "repo.issues.filter_type.all_issues"}}</a> + <a class="{{if eq .ViewType "assigned"}}active{{end}} item" href="{{$.RepoLink}}/issues?type=assigned&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}">{{.i18n.Tr "repo.issues.filter_type.assigned_to_you"}}</a> + <a class="{{if eq .ViewType "created_by"}}active{{end}} item" href="{{$.RepoLink}}/issues?type=created_by&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}">{{.i18n.Tr "repo.issues.filter_type.created_by_you"}}</a> + <a class="{{if eq .ViewType "mentioned"}}active{{end}} item" href="{{$.RepoLink}}/issues?type=mentioned&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}">{{.i18n.Tr "repo.issues.filter_type.mentioning_you"}}</a> </div> </div> </div> @@ -79,11 +80,23 @@ <a class="title" href="{{$.RepoLink}}/issues/{{.Index}}">{{.Name}}</a> {{range .Labels}} - <a class="ui label" href="{{$.RepoLink}}/issues?type={{$.ViewType}}&state={{$.State}}&labels={{.ID}}" style="background-color: {{.Color}}">{{.Name}}</a> + <a class="ui label" href="{{$.RepoLink}}/issues?type={{$.ViewType}}&state={{$.State}}&labels={{.ID}}&milestone={{$.MilestoneID}}" style="background-color: {{.Color}}">{{.Name}}</a> {{end}} - {{if .NumComments}}<span class="comment ui right"><i class="octicon octicon-comment"></i> {{.NumComments}}</span>{{end}} - <p class="desc">{{$.i18n.Tr "repo.issues.opened_by" $timeStr .Poster.Name|Str2html}}</p> + {{if .NumComments}} + <span class="comment ui right"><i class="octicon octicon-comment"></i> {{.NumComments}}</span> + {{end}} + + <p class="desc"> + {{$.i18n.Tr "repo.issues.opened_by" $timeStr .Poster.Name|Str2html}} + {{if .Milestone}} + {{with .Milestone}} + <a class="milestone" href="{{$.RepoLink}}/issues?type={{$.ViewType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{.ID}}"> + <span class="octicon octicon-milestone"></span> {{.Name}} + </a> + {{end}} + {{end}} + </p> </li> {{end}} @@ -91,17 +104,17 @@ {{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}}?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}}&milestone={{$.MilestoneID}}&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}}?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}}&milestone={{$.MilestoneID}}&page={{.Num}}"{{end}}>{{.Num}}</a> {{end}} {{end}} - <a class="{{if not .HasNext}}disabled{{end}} item" {{if .HasNext}}href="{{$.Link}}?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}}&milestone={{$.MilestoneID}}&page={{.Next}}"{{end}}> {{$.i18n.Tr "repo.issues.next"}} <i class="icon right arrow"></i> </a> </div> diff --git a/templates/repo/issue/milestones.tmpl b/templates/repo/issue/milestones.tmpl index 7237559700..46ba29d88d 100644 --- a/templates/repo/issue/milestones.tmpl +++ b/templates/repo/issue/milestones.tmpl @@ -1,12 +1,12 @@ {{template "base/head" .}} -<div class="repository"> +<div class="repository milestones"> {{template "repo/header" .}} <div class="ui middle page grid body"> <div class="navbar"> {{template "repo/issue/navbar" .}} {{if .IsRepositoryAdmin}} <div class="ui right floated secondary menu"> - <a class="ui green button" href="{{$.RepoLink}}/milestones/new">{{.i18n.Tr "repo.milestones.new"}}</a> + <a class="ui green button" href="{{$.Link}}/new">{{.i18n.Tr "repo.milestones.new"}}</a> </div> {{end}} </div> @@ -29,7 +29,7 @@ <div class="milestone list"> {{range .Milestones}} <li class="item"> - <i class="octicon octicon-milestone"></i> <a href="{{$.RepoLink}}/issues?state={{$.State}}&midx={{.Index}}">{{.Name}}</a> + <i class="octicon octicon-milestone"></i> <a href="{{$.RepoLink}}/issues?state={{$.State}}&milestone={{.ID}}">{{.Name}}</a> <div class="ui right blue progress" data-percent="{{.Completeness}}"> <div class="bar" {{if not .Completeness}}style="background-color: transparent"{{end}}> <div class="progress"></div> @@ -54,13 +54,13 @@ </div> {{if $.IsRepositoryAdmin}} <div class="ui right operate"> - <a href="{{$.RepoLink}}/milestones/{{.Index}}/edit" data-id={{.ID}} data-title={{.Name}}><i class="octicon octicon-pencil"></i> {{$.i18n.Tr "repo.issues.label_edit"}}</a> + <a href="{{$.Link}}/{{.Index}}/edit" data-id={{.ID}} data-title={{.Name}}><i class="octicon octicon-pencil"></i> {{$.i18n.Tr "repo.issues.label_edit"}}</a> {{if .IsClosed}} - <a href="{{$.RepoLink}}/milestones/{{.Index}}/open" data-id={{.ID}} data-title={{.Name}}><i class="octicon octicon-check"></i> {{$.i18n.Tr "repo.milestones.open"}}</a> + <a href="{{$.Link}}/{{.Index}}/open" data-id={{.ID}} data-title={{.Name}}><i class="octicon octicon-check"></i> {{$.i18n.Tr "repo.milestones.open"}}</a> {{else}} - <a href="{{$.RepoLink}}/milestones/{{.Index}}/close" data-id={{.ID}} data-title={{.Name}}><i class="octicon octicon-x"></i> {{$.i18n.Tr "repo.milestones.close"}}</a> + <a href="{{$.Link}}/{{.Index}}/close" data-id={{.ID}} data-title={{.Name}}><i class="octicon octicon-x"></i> {{$.i18n.Tr "repo.milestones.close"}}</a> {{end}} - <a class="delete-milestone-button" href="#" data-url="{{$.RepoLink}}/milestone/delete" data-id="{{.ID}}"><i class="octicon octicon-trashcan"></i> {{$.i18n.Tr "repo.issues.label_delete"}}</a> + <a class="delete-button" href="#" data-url="{{$.RepoLink}}/milestones/delete" data-id="{{.ID}}"><i class="octicon octicon-trashcan"></i> {{$.i18n.Tr "repo.issues.label_delete"}}</a> </div> {{if .Content}} <div class="content"> @@ -96,4 +96,32 @@ </div> </div> </div> + +{{if .IsRepositoryAdmin}} +<div class="ui basic delete modal"> + <div class="header"> + {{.i18n.Tr "repo.milestones.deletion"}} + </div> + <div class="content"> + <div class="image"> + <i class="trash icon"></i> + </div> + <div class="description"> + <p>{{.i18n.Tr "repo.milestones.deletion_desc"}}</p> + </div> + </div> + <div class="actions"> + <div class="two fluid ui inverted buttons"> + <div class="ui red basic inverted button"> + <i class="remove icon"></i> + {{.i18n.Tr "modal.no"}} + </div> + <div class="ui green basic inverted positive button"> + <i class="checkmark icon"></i> + {{.i18n.Tr "modal.yes"}} + </div> + </div> + </div> +</div> +{{end}} {{template "base/footer" .}}
\ No newline at end of file diff --git a/templates/repo/issue/view.tmpl b/templates/repo/issue/view.tmpl index 64a051b57b..61adfe6197 100644 --- a/templates/repo/issue/view.tmpl +++ b/templates/repo/issue/view.tmpl @@ -234,7 +234,7 @@ {{else}} <ul class="list-unstyled"> {{range .ClosedMilestones}} - <li class="milestone-item" data-id="{{.Id}}"> + <li class="milestone-item" data-id="{{.ID}}"> <p><strong>{{.Name}}</strong></p> <p>Closed {{TimeSince .ClosedDate $.Lang}}</p> </li> |