list view: issue, label, milestone

This commit is contained in:
Unknwon 2015-08-09 22:45:38 +08:00
parent 68b9d78386
commit 7372042441
19 changed files with 392 additions and 444 deletions

View File

@ -369,6 +369,7 @@ commits.newer = Newer
issues.new = New Issue
issues.new_label = New Label
issues.new_label_placeholder = Label name...
issues.create_label = Create Label
issues.open_tab = %d Open
issues.close_tab = %d Closed
issues.filter_label = Label

View File

@ -658,6 +658,14 @@ type Milestone struct {
ClosedDate time.Time
}
func (m *Milestone) BeforeUpdate() {
if m.NumIssues > 0 {
m.Completeness = m.NumClosedIssues * 100 / m.NumIssues
} else {
m.Completeness = 0
}
}
func (m *Milestone) AfterSet(colName string, _ xorm.Cell) {
if colName == "deadline" {
if m.Deadline.Year() == 9999 {
@ -804,8 +812,6 @@ func ChangeMilestoneIssueStats(issue *Issue) error {
m.NumClosedIssues--
}
m.Completeness = m.NumClosedIssues * 100 / m.NumIssues
return UpdateMilestone(m)
}
@ -827,13 +833,8 @@ func ChangeMilestoneAssign(oldMid, mid int64, issue *Issue) (err error) {
if issue.IsClosed {
m.NumClosedIssues--
}
if m.NumIssues > 0 {
m.Completeness = m.NumClosedIssues * 100 / m.NumIssues
} else {
m.Completeness = 0
}
if _, err = sess.Id(m.ID).Cols("num_issues,num_completeness,num_closed_issues").Update(m); err != nil {
if _, err = sess.Id(m.ID).AllCols().Update(m); err != nil {
sess.Rollback()
return err
}
@ -860,8 +861,7 @@ func ChangeMilestoneAssign(oldMid, mid int64, issue *Issue) (err error) {
return ErrWrongIssueCounter
}
m.Completeness = m.NumClosedIssues * 100 / m.NumIssues
if _, err = sess.Id(m.ID).Cols("num_issues,num_completeness,num_closed_issues").Update(m); err != nil {
if _, err = sess.Id(m.ID).AllCols().Update(m); err != nil {
sess.Rollback()
return err
}

File diff suppressed because one or more lines are too long

View File

@ -20,6 +20,15 @@ func (repo *Repository) IsTagExist(tagName string) bool {
return IsTagExist(repo.Path, tagName)
}
func (repo *Repository) getTagsReversed() ([]string, error) {
stdout, stderr, err := com.ExecCmdDir(repo.Path, "git", "tag", "-l", "--sort=-v:refname")
if err != nil {
return nil, concatenateError(err, stderr)
}
tags := strings.Split(stdout, "\n")
return tags[:len(tags)-1], nil
}
// GetTags returns all tags of given repository.
func (repo *Repository) GetTags() ([]string, error) {
if gitVer.AtLeast(MustParseVersion("2.0.0")) {
@ -33,15 +42,6 @@ func (repo *Repository) GetTags() ([]string, error) {
return tags[:len(tags)-1], nil
}
func (repo *Repository) getTagsReversed() ([]string, error) {
stdout, stderr, err := com.ExecCmdDir(repo.Path, "git", "tag", "-l", "--sort=-v:refname")
if err != nil {
return nil, errors.New(stderr)
}
tags := strings.Split(stdout, "\n")
return tags[:len(tags)-1], nil
}
func (repo *Repository) CreateTag(tagName, idStr string) error {
_, stderr, err := com.ExecCmdDir(repo.Path, "git", "tag", tagName, idStr)
if err != nil {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -43,6 +43,15 @@ function initRepository() {
// Labels
if ($('.repository.labels').length > 0) {
// Create label
var $new_label_panel = $('.new-label.segment');
$('.new-label.button').click(function () {
$new_label_panel.show();
});
$('.new-label.segment .cancel').click(function () {
$new_label_panel.hide();
});
$('.color-picker').each(function () {
$(this).minicolors();
});
@ -53,8 +62,7 @@ function initRepository() {
});
$('.edit-label-button').click(function () {
$('#label-modal-id').val($(this).data('id'));
$('#label-modal-title').val($(this).data('title'));
$('#label-modal-color').val($(this).data('color'))
$('.edit-label .new-label-input').val($(this).data('title'));
$('.minicolors-swatch-color').css("background-color", $(this).data('color'));
$('.edit-label.modal').modal({
onApprove: function () {

File diff suppressed because one or more lines are too long

View File

@ -9,27 +9,25 @@ img {
}
.full.height {
padding: 0;
margin: 0 0 -87px 0;
margin: 0 0 -@footer-margin*2 0;
min-height: 100%;
}
.following.bar {
z-index: 900;
left: 0;
width: 100%;
padding: 0.7em 0;
padding: 5px 0;
&.light {
background-color: white;
border-bottom: 1px solid #DDDDDD;
box-shadow: 0 2px 3px rgba(0, 0, 0, 0.04);
}
.ui.secondary.menu {
height: 30px;
}
.column .menu {
margin-top: 0;
}
.brand {
float: left;
margin-top: 5px;
margin-right: 5px;
}
.head.link.item {
@ -41,7 +39,6 @@ img {
}
.user.avatar {
padding: 0;
margin-top: 1px;
}
.searchbox {
background-color: rgb(244, 244, 244)!important;
@ -51,7 +48,6 @@ img {
}
.octicon {
width: 16px;
opacity: 1!important;
text-align: center;
}
}
@ -68,14 +64,21 @@ img {
color: #d95c5c!important;
}
}
.message {
text-align: center;
}
}
footer {
margin-top: @footer-margin!important;
height: @footer-margin;
background-color: white;
border-top: 1px solid #d6d6d6;
clear: both;
width: 100%;
color: #888888;
.container {
padding-top: 10px;
.fa {
width: 16px;
text-align: center;
@ -93,6 +96,7 @@ footer {
}
}
}
}
.hide {
display: none;
@ -108,8 +112,8 @@ footer {
.generate-img(16);
.generate-img(@n, @i: 1) when (@i =< @n) {
.img-@{i} {
width: (2px * @i);
height: (2px * @i);
width: (2px * @i)!important;
height: (2px * @i)!important;
}
.generate-img(@n, (@i + 1));
}

View File

@ -4,11 +4,11 @@
padding-top: 15px;
padding-bottom: @footer-margin * 3;
.head {
height: 75px;
padding-top: 20px;
height: 40px;
background-color: #FCFCFC;
.mega-octicon {
width: @mega-octicon-width;
font-size: 30px;
}
a,
.fork-flag {
@ -25,65 +25,13 @@
line-height: 10px;
white-space: nowrap;
}
.button {
margin-left: 10px;
i {
margin-right: 5px;
}
}
.num {
font-weight: bold;
}
.octicon {
height: 5px;
}
}
.navbar {
height: 60px;
padding-top: 20px;
.ui.secondary.menu .item {
margin-left: -10px;
margin-top: -7px;
&>.input {
.new-label-input,
.color-picker {
background-color: white;
border: 1px solid rgba(0,0,0,.15);
}
}
&.input {
margin-right: -7px;
}
.new-label-input {
width: 150px;
}
.color-picker {
height: 35px;
width: auto;
padding-left: 30px;
}
.minicolors-swatch.minicolors-sprite {
top: 10px;
left: 10px;
width: 15px;
height: 15px;
}
&.precolors {
padding-left: 0;
padding-right: 0;
margin-right: 10px;
width: 120px;
.color {
float: left;
width: 15px;
height: 15px;
}
}
}
}
.filter.menu {
.label.color {
margin-left: 17px;
margin-left: 15px;
padding: 0 8px;
}
.octicon {
@ -106,8 +54,8 @@
padding-top: 15px;
}
.issue.list {
clear: both;
list-style: none;
padding-top: 15px;
>.item {
padding-top: 15px;
padding-bottom: 10px;
@ -140,8 +88,8 @@
}
.label.list {
clear: both;
list-style: none;
padding-top: 15px;
.item {
padding-top: 10px;
padding-bottom: 10px;
@ -162,8 +110,8 @@
}
.milestone.list {
clear: both;
list-style: none;
padding-top: 15px;
> .item {
padding-top: 10px;
padding-bottom: 10px;
@ -212,67 +160,77 @@
}
}
}
&.new.milestone {
textarea {
height: 200px;
}
// &.new.milestone {
// textarea {
// height: 200px;
// }
// }
// &.settings {
// .content {
// padding-left: 20px!important;
// }
// }
}
&.settings {
.content {
padding-left: 20px!important;
}
}
}
// .settings .key.list {
// .item:not(:first-child) {
// border-top: 1px solid #eaeaea;
// }
// .ssh-key-state-indicator {
// float: left;
// color: gray;
// padding-left: 10px;
// padding-top: 10px;
// &.active {
// color: #6cc644;
// }
// }
// .meta {
// padding-top: 5px;
// }
// .print {
// color: #767676;
// }
// .activity {
// color: #666;
// }
// }
.settings .key.list {
.item:not(:first-child) {
border-top: 1px solid #eaeaea;
.edit-label.modal,
.new-label.segment {
.form {
.column {
padding-right: 0;
}
.ssh-key-state-indicator {
float: left;
color: gray;
padding-left: 10px;
padding-top: 10px;
&.active {
color: #6cc644;
.buttons {
margin-left: auto;
padding-top: 15px;
}
}
.meta {
padding-top: 5px;
}
.print {
color: #767676;
}
.activity {
color: #666;
}
}
.edit-label.modal {
.color.picker.column {
width: auto;
.color-picker {
margin-top: -8px!important;
height: 35px;
width: auto!important;
padding-left: 30px!important;
width: auto;
padding-left: 30px;
}
}
.minicolors-swatch.minicolors-sprite {
top: 1px;
top: 10px;
left: 10px;
width: 15px;
height: 15px;
}
.precolors {
margin-bottom: -11px!important;
padding-left: 0!important;
padding-right: 0!important;
margin-right: 10px!important;
width: 120px!important;
padding-left: 0;
padding-right: 0;
margin: 3px 10px auto 10px;
width: 120px;
.color {
float: left;
margin: 0!important;
width: 15px;
height: 15px;
}
}
}
}

View File

@ -1,6 +1,6 @@
</div>
<footer class="ui page grid">
<div class="sixteen wide column">
<footer>
<div class="ui container">
<div class="ui left">
© 2015 Gogs · {{.i18n.Tr "version"}}: {{AppVer}} · {{.i18n.Tr "page"}}: <strong>{{LoadTimes .PageStartTime}}</strong> · {{.i18n.Tr "template"}}: <strong>{{call .TmplLoadTimes}}</strong>
</div>

View File

@ -46,15 +46,27 @@
<noscript>Please enable JavaScript in your browser!</noscript>
{{if not .PageIsInstall}}
<div class="following bar light">
<div class="ui page grid">
<div class="ui container">
<div class="column">
<div class="ui secondary menu">
<img class="img-15 ui image brand" src="{{AppSubUrl}}/img/favicon.png">
<a class="view-ui item {{if .PageIsHome}}active{{end}}" href="{{AppSubUrl}}/">{{if .IsSigned}}{{.i18n.Tr "dashboard"}}{{else}}{{.i18n.Tr "home"}}{{end}}</a>
<a class="view-ui item {{if .PageIsExplore}}active{{end}}" href="{{AppSubUrl}}/explore">{{.i18n.Tr "explore"}}</a>
<a class="view-ui item" target="_blank" href="http://gogs.io/docs">{{.i18n.Tr "help"}}</a>
<!-- <div class="item">
<div class="ui icon input">
<input class="searchbox" type="text" placeholder="{{.i18n.Tr "search_project"}}">
<i class="search icon"></i>
</div>
</div> -->
{{if .IsSigned}}
<div class="ui right floated secondary menu">
<div class="right menu">
<a class="view-ui item user avatar poping up" href="{{AppSubUrl}}/{{.SignedUser.Name}}" data-content="{{.SignedUser.Name}}" data-variation="inverted">
<img class="img-15" src="{{.SignedUser.AvatarLink}}"/>
<span class="sr-only">{{.SignedUser.Name}}</span>
</a>
<div class="ui pointing dropdown head link jump item">
<div class="ui dropdown head link jump item">
<span class="text">
<i class="octicon octicon-plus"></i>
<i class="dropdown icon"></i>
@ -79,17 +91,6 @@
<a class="view-ui item {{if .PageIsSignIn}}active{{end}}" href="{{AppSubUrl}}/user/login"><i class="octicon octicon-sign-in"></i> {{.i18n.Tr "sign_in"}}</a>
</div>
{{end}}
<div class="ui secondary menu">
<img class="img-15 ui image brand" src="{{AppSubUrl}}/img/favicon.png">
<a class="view-ui item {{if .PageIsHome}}active{{end}}" href="{{AppSubUrl}}/">{{if .IsSigned}}{{.i18n.Tr "dashboard"}}{{else}}{{.i18n.Tr "home"}}{{end}}</a>
<a class="view-ui item {{if .PageIsExplore}}active{{end}}" href="{{AppSubUrl}}/explore">{{.i18n.Tr "explore"}}</a>
<a class="view-ui item" target="_blank" href="http://gogs.io/docs">{{.i18n.Tr "help"}}</a>
<!-- <div class="item">
<div class="ui icon input">
<input class="searchbox" type="text" placeholder="{{.i18n.Tr "search_project"}}">
<i class="search icon"></i>
</div>
</div> -->
</div>
</div>
</div>

View File

@ -1,7 +1,6 @@
{{with .Repository}}
<div class="ui middle page head grid">
<h2 class="ui left">
<div class="ui breadcrumb">
<div class="ui head container">
<div class="ui huge breadcrumb">
<i class="mega-octicon octicon-{{if .IsPrivate}}lock{{else if .IsMirror}}repo-clone{{else if .IsFork}}repo-forked{{else}}repo{{end}}"></i>
<a href="{{AppSubUrl}}/{{.Owner.Name}}">{{.Owner.Name}}</a>
<div class="divider"> / </div>
@ -9,8 +8,7 @@
{{if .IsMirror}}<div class="ui label">{{$.i18n.Tr "mirror"}}</div>{{end}}
{{if .IsFork}}<div class="fork-flag">{{$.i18n.Tr "repo.forked_from"}} <a href="{{.ForkRepo.RepoLink}}">{{SubStr .ForkRepo.RepoLink 1 -1}}</a></div>{{end}}
</div>
</h2>
<div class="ui right floated secondary menu">
<div class="ui right">
<a class="ui black basic button" href="{{$.RepoLink}}/action/{{if $.IsWatchingRepo}}un{{end}}watch?redirect_to={{$.Link}}">
<i class="fa fa-eye{{if not $.IsWatchingRepo}}-slash{{end}}"></i>
{{if $.IsWatchingRepo}}{{$.i18n.Tr "repo.unwatch"}}{{else}}{{$.i18n.Tr "repo.watch"}}{{end}} <span class="num">{{.NumWatches}}</span>
@ -19,7 +17,7 @@
<i class="fa fa-star{{if not $.IsStaringRepo}}-o{{end}}"></i>
{{if $.IsStaringRepo}}{{$.i18n.Tr "repo.unstar"}}{{else}}{{$.i18n.Tr "repo.star"}}{{end}} <span class="num">{{.NumStars}}</span>
</a>
<a class="ui black basic button {{if $.IsRepositoryOwner}}poping up{{end}}" {{if not $.IsRepositoryOwner}}href="{{AppSubUrl}}/repo/fork/{{.Id}}"{{end}} {{if $.IsRepositoryOwner}}data-content="{{$.i18n.Tr "repo.fork_from_self"}}"{{end}}>
<a class="ui black basic button {{if $.IsRepositoryOwner}}poping up{{end}}" {{if not $.IsRepositoryOwner}}href="{{AppSubUrl}}/repo/fork/{{.Id}}"{{end}} {{if $.IsRepositoryOwner}}data-content="{{$.i18n.Tr "repo.fork_from_self"}}" data-position="top right"{{end}}>
<i class="octicon octicon-repo-forked"></i>
{{$.i18n.Tr "repo.fork"}} <span class="num">{{.NumForks}}</span>
</a>

View File

@ -1,5 +0,0 @@
{{if .Flash}}
<div class="sixteen wide center aligned centered column">
{{template "base/alert" .}}
</div>
{{end}}

View File

@ -1,38 +1,41 @@
{{template "base/head" .}}
<div class="repository labels">
{{template "repo/header" .}}
<div class="ui middle page grid body">
<div class="ui container">
<div class="navbar">
{{template "repo/issue/navbar" .}}
{{if .IsRepositoryAdmin}}
<form class="ui right form" action="{{$.RepoLink}}/labels/new" method="post">
{{.CsrfTokenHtml}}
<div class="ui right floated secondary menu">
<div class="input item">
<div class="ui large input">
<input class="new-label-input" name="title" placeholder="{{.i18n.Tr "repo.issues.new_label_placeholder"}}" required>
<div class="ui right">
<div class="ui green new-label button">{{.i18n.Tr "repo.issues.new_label"}}</div>
</div>
</div>
<div class="item">
<div class="ui large input">
<input class="color-picker" name="color" value="#70c24a" required>
</div>
</div>
<div class="item precolors">
{{template "repo/issue/label_precolors"}}
</div>
<button class="ui green button">{{.i18n.Tr "repo.issues.new_label"}}</button>
</div>
</form>
{{end}}
</div>
<div class="ui divider"></div>
{{template "repo/issue/alert" .}}
<div class="ui left">
<div class="ui black label">{{.i18n.Tr "repo.issues.label_count" .NumLabels}}</div>
<div class="ui new-label segment hide">
<form class="ui form" action="{{$.RepoLink}}/labels/new" method="post">
{{.CsrfTokenHtml}}
<div class="ui grid">
<div class="five wide column">
<div class="ui small input">
<input class="new-label-input" name="title" placeholder="{{.i18n.Tr "repo.issues.new_label_placeholder"}}" autofocus required>
</div>
</div>
<div class="color picker column">
<input class="color-picker" name="color" value="#70c24a" required>
</div>
<div class="column precolors">
{{template "repo/issue/label_precolors"}}
</div>
<div class="buttons">
<div class="ui blue small basic cancel button">{{.i18n.Tr "repo.milestones.cancel"}}</div>
<button class="ui green small button">{{.i18n.Tr "repo.issues.create_label"}}</button>
</div>
</div>
</form>
</div>
<div class="ui divider"></div>
{{template "base/alert" .}}
<div class="ui black label">{{.i18n.Tr "repo.issues.label_count" .NumLabels}}</div>
<div class="sixteen wide column">
<div class="label list">
{{range .Labels}}
<li class="item">
@ -47,34 +50,27 @@
</div>
</div>
</div>
</div>
{{if .IsRepositoryAdmin}}
<div class="ui basic delete modal">
<div class="header">
<div class="ui small basic delete modal">
<div class="ui icon header">
<i class="trash icon"></i>
{{.i18n.Tr "repo.issues.label_deletion"}}
</div>
<div class="content">
<div class="image">
<i class="trash icon"></i>
</div>
<div class="description">
<p>{{.i18n.Tr "repo.issues.label_deletion_desc"}}</p>
</div>
</div>
<div class="actions">
<div class="two fluid ui inverted buttons">
<div class="ui red basic inverted button">
<div class="ui red basic inverted cancel button">
<i class="remove icon"></i>
{{.i18n.Tr "modal.no"}}
</div>
<div class="ui green basic inverted positive button">
<div class="ui green basic inverted ok button">
<i class="checkmark icon"></i>
{{.i18n.Tr "modal.yes"}}
</div>
</div>
</div>
</div>
<div class="ui small edit-label modal">
<div class="header">
@ -84,14 +80,16 @@
<form class="ui edit-label form" action="{{$.RepoLink}}/labels/edit" method="post">
{{.CsrfTokenHtml}}
<input id="label-modal-id" name="id" type="hidden">
<div class="inline fields">
<div class="field">
<input id="label-modal-title" name="title" placeholder="{{.i18n.Tr "repo.issues.new_label_placeholder"}}" required>
<div class="ui grid">
<div class="five wide column">
<div class="ui small input">
<input class="new-label-input" name="title" placeholder="{{.i18n.Tr "repo.issues.new_label_placeholder"}}" autofocus required>
</div>
<div class="field">
<input id="label-modal-color" class="color-picker" name="color" value="#70c24a" required>
</div>
<div class="field precolors">
<div class="color picker column">
<input class="color-picker" name="color" value="#70c24a" required>
</div>
<div class="column precolors">
{{template "repo/issue/label_precolors"}}
</div>
</div>

View File

@ -1,15 +1,14 @@
{{template "base/head" .}}
<div class="repository">
{{template "repo/header" .}}
<div class="ui middle page grid body">
<div class="ui container">
<div class="navbar">
{{template "repo/issue/navbar" .}}
<div class="ui right floated secondary menu">
<div class="ui right">
<a class="ui green button" href="{{$.RepoLink}}/issues/new">{{.i18n.Tr "repo.issues.new"}}</a>
</div>
</div>
<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}}&milestone={{.MilestoneID}}">
<i class="octicon octicon-issue-opened"></i>
@ -20,9 +19,8 @@
{{.i18n.Tr "repo.issues.close_tab" .IssueStats.ClosedCount}}
</a>
</div>
</div>
<div class="ui right floated secondary filter menu">
<div class="ui {{if not .Labels}}disabled{{end}} pointing dropdown jump item">
<div class="ui {{if not .Labels}}disabled{{end}} dropdown jump item">
<span class="text">
{{.i18n.Tr "repo.issues.filter_label"}}
<i class="dropdown icon"></i>
@ -34,7 +32,7 @@
{{end}}
</div>
</div>
<div class="ui {{if not .Milestones}}disabled{{end}} pointing dropdown jump item">
<div class="ui {{if not .Milestones}}disabled{{end}} dropdown jump item">
<span class="text">
{{.i18n.Tr "repo.issues.filter_milestone"}}
<i class="dropdown icon"></i>
@ -46,7 +44,7 @@
{{end}}
</div>
</div>
<!-- <div class="ui {{if not .Assignees}}disabled{{end}} pointing dropdown jump item">
<!-- <div class="ui {{if not .Assignees}}disabled{{end}} dropdown jump item">
<span class="text">
{{.i18n.Tr "repo.issues.filter_assignee"}}
<i class="dropdown icon"></i>
@ -57,7 +55,7 @@
{{end}}
</div>
</div> -->
<div class="ui pointing dropdown type jump item">
<div class="ui dropdown type jump item">
<span class="text">
{{.i18n.Tr "repo.issues.filter_type"}}
<i class="dropdown icon"></i>
@ -71,7 +69,6 @@
</div>
</div>
<div class="sixteen wide column">
<div class="issue list">
{{range .Issues}}
{{ $timeStr:= TimeSince .Created $.Lang }}
@ -124,5 +121,4 @@
</div>
</div>
</div>
</div>
{{template "base/footer" .}}

View File

@ -1,18 +1,17 @@
{{template "base/head" .}}
<div class="repository milestones">
{{template "repo/header" .}}
<div class="ui middle page grid body">
<div class="ui container">
<div class="navbar">
{{template "repo/issue/navbar" .}}
{{if .IsRepositoryAdmin}}
<div class="ui right floated secondary menu">
<div class="ui right">
<a class="ui green button" href="{{$.Link}}/new">{{.i18n.Tr "repo.milestones.new"}}</a>
</div>
{{end}}
</div>
<div class="ui divider"></div>
{{template "repo/issue/alert" .}}
<div class="ui left">
{{template "base/alert" .}}
<div class="ui tiny buttons">
<a class="ui green basic button {{if not .IsShowClosed}}active{{end}}" href="{{.RepoLink}}/milestones?state=open">
<i class="octicon octicon-milestone"></i>
@ -23,14 +22,12 @@
{{.i18n.Tr "repo.milestones.close_tab" .ClosedCount}}
</a>
</div>
</div>
<div class="sixteen wide column">
<div class="milestone list">
{{range .Milestones}}
<li class="item">
<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="ui right green progress" data-percent="{{.Completeness}}">
<div class="bar" {{if not .Completeness}}style="background-color: transparent"{{end}}>
<div class="progress"></div>
</div>
@ -95,33 +92,26 @@
</div>
</div>
</div>
</div>
{{if .IsRepositoryAdmin}}
<div class="ui basic delete modal">
<div class="header">
<div class="ui small basic delete modal">
<div class="ui icon header">
<i class="trash icon"></i>
{{.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">
<div class="ui red basic inverted cancel button">
<i class="remove icon"></i>
{{.i18n.Tr "modal.no"}}
</div>
<div class="ui green basic inverted positive button">
<div class="ui green basic inverted ok button">
<i class="checkmark icon"></i>
{{.i18n.Tr "modal.yes"}}
</div>
</div>
</div>
</div>
{{end}}
{{template "base/footer" .}}

View File

@ -1,7 +1,5 @@
<div class="ui left">
<div class="ui compact menu">
<div class="ui compact small menu">
<a class="{{if .PageIsIssueList}}active{{end}} item" href="{{.RepoLink}}/issues">{{.i18n.Tr "repo.issues"}}</a>
<a class="{{if .PageIsLabels}}active{{end}} item" href="{{.RepoLink}}/labels">{{.i18n.Tr "repo.labels"}}</a>
<a class="{{if .PageIsMilestones}}active{{end}} item" href="{{.RepoLink}}/milestones">{{.i18n.Tr "repo.milestones"}}</a>
</div>
</div>

View File

@ -253,7 +253,7 @@
<h4>Milestone</h4>
{{if .Milestone}}
<p class="completion{{if eq .Milestone.Completeness 0}} hidden{{end}}"><span style="width:{{.Milestone.Completeness}}%">&nbsp;</span></p>
<p class="name"><strong><a href="{{$.RepoLink}}/issues?milestone={{.Milestone.Index}}{{if $.Issue.IsClosed}}&state=closed{{end}}">{{.Milestone.Name}}</a></strong></p>
<p class="name"><strong><a href="{{$.RepoLink}}/issues?milestone={{.Milestone.ID}}{{if $.Issue.IsClosed}}&state=closed{{end}}">{{.Milestone.Name}}</a></strong></p>
{{else}}
<p class="name">No milestone</p>
{{end}}