diff options
Diffstat (limited to 'templates')
34 files changed, 505 insertions, 388 deletions
diff --git a/templates/.VERSION b/templates/.VERSION index e87964c1ef..3e39c8bbb5 100644 --- a/templates/.VERSION +++ b/templates/.VERSION @@ -1 +1 @@ -0.6.1.0719 Beta
\ No newline at end of file +0.6.2.0724 Beta
\ No newline at end of file diff --git a/templates/base/alert.tmpl b/templates/base/alert.tmpl index 15eeb566bd..c845e36dc5 100644 --- a/templates/base/alert.tmpl +++ b/templates/base/alert.tmpl @@ -2,4 +2,9 @@ <div class="ui negative message"> <p>{{.Flash.ErrorMsg}}</p> </div> +{{end}} +{{if .Flash.SuccessMsg}} +<div class="ui positive message"> + <p>{{.Flash.SuccessMsg}}</p> +</div> {{end}}
\ No newline at end of file diff --git a/templates/base/head.tmpl b/templates/base/head.tmpl index 8551801d01..9c05b02a9b 100644 --- a/templates/base/head.tmpl +++ b/templates/base/head.tmpl @@ -30,6 +30,12 @@ <script src="{{AppSubUrl}}/js/semantic.min.js?v={{AppVer}}"></script> <script src="{{AppSubUrl}}/js/gogs.js?v={{AppVer}}"></script> + <!-- Third-party libraries --> + {{if .PageIsLabels}} + <link rel="stylesheet" href="{{AppSubUrl}}/css/jquery.minicolors.css?v={{AppVer}}"> + <script src="{{AppSubUrl}}/js/libs/jquery.minicolors.min.js?v={{AppVer}}"></script> + {{end}} + <title>{{if .Title}}{{.Title}} - {{end}}{{AppName}}</title> </head> <body> @@ -39,12 +45,37 @@ <div class="following bar light"> <div class="ui page grid"> <div class="column"> + {{if .IsSigned}} + <div class="ui right floated secondary 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"> + <span class="text"> + <i class="octicon octicon-plus"></i> + <i class="dropdown icon"></i> + </span> + <div class="menu"> + <a class="item" href="{{AppSubUrl}}/repo/create"><i class="octicon octicon-repo-create"></i> {{.i18n.Tr "new_repo"}}</a> + <a class="item" href="{{AppSubUrl}}/repo/migrate"><i class="octicon octicon-repo-clone"></i> {{.i18n.Tr "new_migrate"}}</a> + <a class="item" href="{{AppSubUrl}}/org/create"><i class="octicon octicon-organization"></i> {{.i18n.Tr "new_org"}}</a> + </div> + </div> + {{if .IsAdmin}} + <a class="view-ui item poping up {{if .PageIsAdmin}}active{{end}}" href="{{AppSubUrl}}/admin" data-content="{{.i18n.Tr "admin_panel"}}" data-variation="inverted"><i class="octicon icon settings"></i><span class="sr-only">{{.i18n.Tr "admin_panel"}}</span></a> + {{end}} + <a class="view-ui item poping up {{if .PageIsSettings}}active{{end}}" href="{{AppSubUrl}}/user/settings" data-content="{{.i18n.Tr "account_settings"}}" data-variation="inverted"><i class="octicon octicon-settings"></i><span class="sr-only">{{.i18n.Tr "account_settings"}}</span></a> + <a class="view-ui item poping up" href="{{AppSubUrl}}/user/logout" data-content="{{.i18n.Tr "sign_out"}}" data-variation="inverted"><i class="octicon octicon-sign-out"></i><span class="sr-only">{{.i18n.Tr "sign_out"}}</span></a> + </div> + {{else}} <div class="ui right floated secondary menu"> {{if .ShowRegistrationButton}} <a class="view-ui item {{if .PageIsSignUp}}active{{end}}" href="{{AppSubUrl}}/user/sign_up"><i class="octicon octicon-person-add"></i> {{.i18n.Tr "register"}}</a> {{end}} <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> diff --git a/templates/install.tmpl b/templates/install.tmpl index df98737626..d82a1e4083 100644 --- a/templates/install.tmpl +++ b/templates/install.tmpl @@ -2,8 +2,6 @@ <div class="install"> <div class="ui middle very relaxed page grid"> <div class="sixteen wide center aligned centered column"> - - <h3 class="ui top attached header"> {{.i18n.Tr "install.title"}} </h3> diff --git a/templates/repo/commits.tmpl b/templates/repo/commits.tmpl index 2f68f1e01c..9d5af3113e 100644 --- a/templates/repo/commits.tmpl +++ b/templates/repo/commits.tmpl @@ -1,7 +1,7 @@ {{template "ng/base/head" .}} {{template "ng/base/header" .}} <div id="repo-wrapper"> - {{template "repo/header" .}} + {{template "repo/header_old" .}} <div class="container clear"> {{template "repo/commits_table" .}} </div> diff --git a/templates/repo/diff.tmpl b/templates/repo/diff.tmpl index f261da55a0..b9dc87de7c 100644 --- a/templates/repo/diff.tmpl +++ b/templates/repo/diff.tmpl @@ -1,7 +1,7 @@ {{template "ng/base/head" .}} {{template "ng/base/header" .}} <div id="repo-wrapper"> - {{template "repo/header" .}} + {{template "repo/header_old" .}} <div class="container clear" id="diff-page"> {{if .IsDiffCompare }} <div class="panel panel-info panel-radius compare-head-box"> diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl index 21f9cea882..4e307a092d 100644 --- a/templates/repo/header.tmpl +++ b/templates/repo/header.tmpl @@ -1,63 +1,29 @@ {{with .Repository}} -<div id="repo-header" class="clear"> - <div class="container clear"> - <h1 id="repo-header-name" class="left public"> - <i class="mega-octicon octicon-{{if .IsPrivate}}lock{{else if .IsMirror}}repo-clone{{else if .IsFork}}repo-forked{{else}}repo{{end}}"></i> - <a class="author" href="{{AppSubUrl}}/{{.Owner.Name}}">{{.Owner.Name}}</a> - <span class="divider">/</span> - <a class="repo text-bold" href="{{$.RepoLink}}">{{.Name}}</a> - {{if .IsMirror}}<span class="label label-gray">{{$.i18n.Tr "mirror"}}</span>{{end}} - {{if .IsFork}}<span class="fork-flag">forked from <a href="{{.ForkRepo.RepoLink}}">{{SubStr .ForkRepo.RepoLink 1 -1}}</a></span>{{end}} - </h1> - <ul id="repo-header-meta" class="right menu menu-line"> - <li id="repo-header-download" class="drop"> - <a id="repo-header-download-btn" href="#"> - <button class="btn btn-black text-bold btn-radius"> - <i class="octicon octicon-cloud-download"></i> - </button> - </a> - <div id="repo-header-download-drop" class="drop-down"> - <div id="repo-clone" class="clear"> - {{if not $.DisableSSH}} - <button class="btn btn-blue left btn-left-radius" id="repo-clone-ssh" data-link="{{$.CloneLink.SSH}}">SSH</button> - {{end}} - <button class="btn {{if $.DisableSSH}}btn-blue{{else}}btn-gray{{end}} left" id="repo-clone-https" data-link="{{$.CloneLink.HTTPS}}">HTTPS</button> - <input id="repo-clone-url" class="ipt ipt-disabled left" value="{{if $.DisableSSH}}{{$.CloneLink.HTTPS}}{{else}}{{$.CloneLink.SSH}}{{end}}" onclick="this.select();" readonly /> - <button id="repo-clone-copy" class="btn btn-black left btn-right-radius" data-copy-val="val" data-copy-from="#repo-clone-url" original-title="{{$.i18n.Tr "repo.click_to_copy"}}" data-original-title="{{$.i18n.Tr "repo.click_to_copy"}}" data-after-title="{{$.i18n.Tr "repo.copied"}}">{{$.i18n.Tr "repo.copy_link"}}</button> - <p class="text-center" id="repo-clone-help">{{$.i18n.Tr "repo.clone_helper" "http://git-scm.com/book/en/Git-Basics-Getting-a-Git-Repository" | Str2html}}</p> - <hr/> - <div class="text-center" id="repo-clone-zip"> - <a class="btn btn-green btn-radius" href="{{$.RepoLink}}/archive/{{EscapePound $.BranchName}}.zip"><i class="octicon octicon-file-zip"></i>ZIP</a> - <a class="btn btn-green btn-radius" href="{{$.RepoLink}}/archive/{{EscapePound $.BranchName}}.tar.gz"><i class="octicon octicon-file-zip"></i>TAR.GZ</a> - </div> - </div> - </div> - </li> - <li id="repo-header-watch"> - <a id="repo-header-watch-btn" href="{{$.RepoLink}}/action/{{if $.IsWatchingRepo}}un{{end}}watch"> - <button class="btn btn-gray text-bold btn-radius"> - <i class="octicon octicon-eye-watch"></i>{{if $.IsWatchingRepo}}{{$.i18n.Tr "repo.unwatch"}}{{else}}{{$.i18n.Tr "repo.watch"}}{{end}}<span class="num">{{.NumWatches}}</span> - </button> - </a> - </li> - <li id="repo-header-star"> - <a id="repo-header-star-btn" href="{{$.RepoLink}}/action/{{if $.IsStaringRepo}}un{{end}}star"> - <button class="btn btn-gray text-bold btn-radius"> - <i class="octicon octicon-star"></i>{{if $.IsStaringRepo}}{{$.i18n.Tr "repo.unstar"}}{{else}}{{$.i18n.Tr "repo.star"}}{{end}} - <span class="num">{{.NumStars}}</span> - </button> - </a> - </li> - <li id="repo-header-fork"> - <a id="repo-header-fork-btn" {{if or (not $.IsRepositoryAdmin) $.Owner.IsOrganization}}href="{{AppSubUrl}}/repo/fork?fork_id={{.Id}}"{{end}}> - <button class="btn btn-gray text-bold btn-radius"> - <i class="octicon octicon-repo-forked"></i>{{$.i18n.Tr "repo.fork"}} - <span class="num">{{.NumForks}}</span> - </button> - </a> - - </li> - </ul> - </div> +<div class="ui middle page head grid"> + <h2 class="ui left"> + <div class="ui 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> + <a href="{{$.RepoLink}}">{{.Name}}</a> + {{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"> + <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> + </a> + <a class="ui black basic button" href="{{$.RepoLink}}/action/{{if $.IsStaringRepo}}un{{end}}star?redirect_to={{$.Link}}"> + <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?fork_id={{.Id}}"{{end}} {{if $.IsRepositoryOwner}}data-content="{{$.i18n.Tr "repo.fork_from_self"}}"{{end}}> + <i class="octicon octicon-repo-forked"></i> + {{$.i18n.Tr "repo.fork"}} <span class="num">{{.NumForks}}</span> + </a> + </div> </div> -{{end}} +<div class="ui divider"></div> +{{end}}
\ No newline at end of file diff --git a/templates/repo/header_old.tmpl b/templates/repo/header_old.tmpl new file mode 100644 index 0000000000..21f9cea882 --- /dev/null +++ b/templates/repo/header_old.tmpl @@ -0,0 +1,63 @@ +{{with .Repository}} +<div id="repo-header" class="clear"> + <div class="container clear"> + <h1 id="repo-header-name" class="left public"> + <i class="mega-octicon octicon-{{if .IsPrivate}}lock{{else if .IsMirror}}repo-clone{{else if .IsFork}}repo-forked{{else}}repo{{end}}"></i> + <a class="author" href="{{AppSubUrl}}/{{.Owner.Name}}">{{.Owner.Name}}</a> + <span class="divider">/</span> + <a class="repo text-bold" href="{{$.RepoLink}}">{{.Name}}</a> + {{if .IsMirror}}<span class="label label-gray">{{$.i18n.Tr "mirror"}}</span>{{end}} + {{if .IsFork}}<span class="fork-flag">forked from <a href="{{.ForkRepo.RepoLink}}">{{SubStr .ForkRepo.RepoLink 1 -1}}</a></span>{{end}} + </h1> + <ul id="repo-header-meta" class="right menu menu-line"> + <li id="repo-header-download" class="drop"> + <a id="repo-header-download-btn" href="#"> + <button class="btn btn-black text-bold btn-radius"> + <i class="octicon octicon-cloud-download"></i> + </button> + </a> + <div id="repo-header-download-drop" class="drop-down"> + <div id="repo-clone" class="clear"> + {{if not $.DisableSSH}} + <button class="btn btn-blue left btn-left-radius" id="repo-clone-ssh" data-link="{{$.CloneLink.SSH}}">SSH</button> + {{end}} + <button class="btn {{if $.DisableSSH}}btn-blue{{else}}btn-gray{{end}} left" id="repo-clone-https" data-link="{{$.CloneLink.HTTPS}}">HTTPS</button> + <input id="repo-clone-url" class="ipt ipt-disabled left" value="{{if $.DisableSSH}}{{$.CloneLink.HTTPS}}{{else}}{{$.CloneLink.SSH}}{{end}}" onclick="this.select();" readonly /> + <button id="repo-clone-copy" class="btn btn-black left btn-right-radius" data-copy-val="val" data-copy-from="#repo-clone-url" original-title="{{$.i18n.Tr "repo.click_to_copy"}}" data-original-title="{{$.i18n.Tr "repo.click_to_copy"}}" data-after-title="{{$.i18n.Tr "repo.copied"}}">{{$.i18n.Tr "repo.copy_link"}}</button> + <p class="text-center" id="repo-clone-help">{{$.i18n.Tr "repo.clone_helper" "http://git-scm.com/book/en/Git-Basics-Getting-a-Git-Repository" | Str2html}}</p> + <hr/> + <div class="text-center" id="repo-clone-zip"> + <a class="btn btn-green btn-radius" href="{{$.RepoLink}}/archive/{{EscapePound $.BranchName}}.zip"><i class="octicon octicon-file-zip"></i>ZIP</a> + <a class="btn btn-green btn-radius" href="{{$.RepoLink}}/archive/{{EscapePound $.BranchName}}.tar.gz"><i class="octicon octicon-file-zip"></i>TAR.GZ</a> + </div> + </div> + </div> + </li> + <li id="repo-header-watch"> + <a id="repo-header-watch-btn" href="{{$.RepoLink}}/action/{{if $.IsWatchingRepo}}un{{end}}watch"> + <button class="btn btn-gray text-bold btn-radius"> + <i class="octicon octicon-eye-watch"></i>{{if $.IsWatchingRepo}}{{$.i18n.Tr "repo.unwatch"}}{{else}}{{$.i18n.Tr "repo.watch"}}{{end}}<span class="num">{{.NumWatches}}</span> + </button> + </a> + </li> + <li id="repo-header-star"> + <a id="repo-header-star-btn" href="{{$.RepoLink}}/action/{{if $.IsStaringRepo}}un{{end}}star"> + <button class="btn btn-gray text-bold btn-radius"> + <i class="octicon octicon-star"></i>{{if $.IsStaringRepo}}{{$.i18n.Tr "repo.unstar"}}{{else}}{{$.i18n.Tr "repo.star"}}{{end}} + <span class="num">{{.NumStars}}</span> + </button> + </a> + </li> + <li id="repo-header-fork"> + <a id="repo-header-fork-btn" {{if or (not $.IsRepositoryAdmin) $.Owner.IsOrganization}}href="{{AppSubUrl}}/repo/fork?fork_id={{.Id}}"{{end}}> + <button class="btn btn-gray text-bold btn-radius"> + <i class="octicon octicon-repo-forked"></i>{{$.i18n.Tr "repo.fork"}} + <span class="num">{{.NumForks}}</span> + </button> + </a> + + </li> + </ul> + </div> +</div> +{{end}} diff --git a/templates/repo/home.tmpl b/templates/repo/home.tmpl index 0eb2bea189..2cc114edcf 100644 --- a/templates/repo/home.tmpl +++ b/templates/repo/home.tmpl @@ -1,7 +1,7 @@ {{template "ng/base/head" .}} {{template "ng/base/header" .}} <div id="repo-wrapper"> - {{template "repo/header" .}} + {{template "repo/header_old" .}} <div id="repo-content" class="clear container"> <div id="repo-main" class="left grid-5-6"> <p id="repo-desc"> diff --git a/templates/repo/issue/alert.tmpl b/templates/repo/issue/alert.tmpl new file mode 100644 index 0000000000..bdc32ce4fc --- /dev/null +++ b/templates/repo/issue/alert.tmpl @@ -0,0 +1,5 @@ +{{if .Flash}} +<div class="sixteen wide center aligned centered column"> + {{template "base/alert" .}} +</div> +{{end}}
\ No newline at end of file diff --git a/templates/repo/issue/label_precolors.tmpl b/templates/repo/issue/label_precolors.tmpl new file mode 100644 index 0000000000..378281b303 --- /dev/null +++ b/templates/repo/issue/label_precolors.tmpl @@ -0,0 +1,16 @@ +<a class="color" style="background-color:#e11d21" data-color-hex="#e11d21"></a> +<a class="color" style="background-color:#eb6420" data-color-hex="#eb6420"></a> +<a class="color" style="background-color:#fbca04" data-color-hex="#fbca04"></a> +<a class="color" style="background-color:#009800" data-color-hex="#009800"></a> +<a class="color" style="background-color:#006b75" data-color-hex="#006b75"></a> +<a class="color" style="background-color:#207de5" data-color-hex="#207de5"></a> +<a class="color" style="background-color:#0052cc" data-color-hex="#0052cc"></a> +<a class="color" style="background-color:#53e917" data-color-hex="#53e917"></a> +<a class="color" style="background-color:#f6c6c7" data-color-hex="#f6c6c7"></a> +<a class="color" style="background-color:#fad8c7" data-color-hex="#fad8c7"></a> +<a class="color" style="background-color:#fef2c0" data-color-hex="#fef2c0"></a> +<a class="color" style="background-color:#bfe5bf" data-color-hex="#bfe5bf"></a> +<a class="color" style="background-color:#bfdadc" data-color-hex="#bfdadc"></a> +<a class="color" style="background-color:#c7def8" data-color-hex="#c7def8"></a> +<a class="color" style="background-color:#bfd4f2" data-color-hex="#bfd4f2"></a> +<a class="color" style="background-color:#d4c5f9" data-color-hex="#d4c5f9"></a>
\ No newline at end of file diff --git a/templates/repo/issue/labels.tmpl b/templates/repo/issue/labels.tmpl new file mode 100644 index 0000000000..b69988cdb9 --- /dev/null +++ b/templates/repo/issue/labels.tmpl @@ -0,0 +1,109 @@ +{{template "base/head" .}} +<div class="repository labels"> + {{template "repo/header" .}} + <div class="ui middle page grid body"> + <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="item"> + <div class="ui large input"> + <input class="new-label-input" name="title" placeholder="{{.i18n.Tr "repo.issues.new_label_placeholder"}}" required> + </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> + + <div class="label list"> + {{range .Labels}} + <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-x"></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> + </li> + {{end}} + </div> + </div> +</div> + +{{if .IsRepositoryAdmin}} +<div class="ui basic delete-label modal"> + <div class="header"> + {{.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"> + <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> + +<div class="ui small edit-label modal"> + <div class="header"> + {{.i18n.Tr "repo.issues.label_modify"}} + </div> + <div class="content"> + <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> + <div class="field"> + <input id="label-modal-color" class="color-picker" name="color" value="#70c24a" required> + </div> + <div class="field precolors"> + {{template "repo/issue/label_precolors"}} + </div> + </div> + </form> + </div> + <div class="actions"> + <div class="ui negative button"> + {{.i18n.Tr "modal.no"}} + </div> + <div class="ui positive right labeled icon button"> + {{.i18n.Tr "modal.modify"}} + <i class="checkmark icon"></i> + </div> + </div> +</div> +{{end}} +{{template "base/footer" .}}
\ No newline at end of file diff --git a/templates/repo/issue/list.tmpl b/templates/repo/issue/list.tmpl index 8c26738279..e62e9534e0 100644 --- a/templates/repo/issue/list.tmpl +++ b/templates/repo/issue/list.tmpl @@ -1,120 +1,92 @@ -{{template "base/head_old" .}} -{{template "base/navbar" .}} -{{template "repo/nav" .}} -{{template "repo/toolbar" .}} -<div id="body" class="container"> - <div id="issue"> - <div class="col-md-3 filters"> - <div class="filter-list"> - <ul class="list-unstyled"> - <li><a href="{{.RepoLink}}/issues?state={{.State}}"{{if eq .ViewType "all"}} class="active"{{end}}>All Issues <strong class="pull-right">{{.IssueStats.AllCount}}</strong></a></li> - <li><a href="{{.RepoLink}}/issues?type=assigned&state={{.State}}"{{if eq .ViewType "assigned"}} class="active"{{end}}>Assigned to you <strong class="pull-right">{{.IssueStats.AssignCount}}</strong></a></li> - <li><a href="{{.RepoLink}}/issues?type=created_by&state={{.State}}"{{if eq .ViewType "created_by"}} class="active"{{end}}>Created by you <strong class="pull-right">{{.IssueStats.CreateCount}}</strong></a></li> - <li><a href="{{.RepoLink}}/issues?type=mentioned&state={{.State}}"{{if eq .ViewType "mentioned"}} class="active"{{end}}>Mentioning you <strong class="pull-right">{{.IssueStats.MentionCount}}</strong></a></li> - </ul> - </div> - <div class="label-filter"> - <h4>Label</h4> - <ul class="list-unstyled" id="label-list" data-ajax="{{$.RepoLink}}/issues/labels/delete"> - {{range .Labels}} - <li class="label-item{{if eq $.SelectLabels .Id}} label-selected{{end}}" id="label-{{.Id}}" data-id="{{.Id}}"> - <a href="?type={{$.ViewType}}&state={{$.State}}{{if not (eq $.SelectLabels .Id)}}&labels={{.Id}}{{end}}"> - <span class="pull-right count">{{if $.IsShowClosed}}{{.NumClosedIssues}}{{else}}{{.NumOpenIssues}}{{end}}</span> - <span class="color" style="background-color: {{.Color}}" data-color="{{.Color}}"></span> - <span class="name">{{.Name}}</span> - </a> - <a class="del pull-right" href="#" data-id="{{.Id}}"><i class="fa fa-times-circle-o"></i></a> - </li> - {{end}} - {{if or .IsRepositoryOwner .IsAdmin}} - <li class="label-change-li" style="display: none"> - <form id="label-change-form" action="{{$.RepoLink}}/issues/labels/edit" method="post"> - {{.CsrfTokenHtml}} - <div class="input-group label-change-color-picker form-group" style="margin-bottom: 2px"> - <input type="text" class="form-control" name="title" required="required" id="label-name-change-ipt"/> - <input type="hidden" name="color" id="label-color-change-ipt" value="#444444"/> - <span class="input-group-addon"><i></i></span> - <input type="hidden" name="id" id="label-change-id-ipt" value="0"/> - </div> - <div class="form-group text-right"> - <input class="form-control input-sm" type="text" id="label-color-change-ipt2" value="#444444"/> - <button class="btn btn-default btn-sm">Save</button> - </div> - </form> - </li> - {{end}} - </ul> - {{if or .IsRepositoryOwner .IsAdmin}} - <button class="btn btn-default btn-block label-button" id="label-manage-btn">Manage Labels</button> - <hr/> - <form id="label-add-form" action="{{$.RepoLink}}/issues/labels/new" method="post"> - {{.CsrfTokenHtml}} - <h5><strong>New Label</strong></h5> - <div class="input-group label-color-picker form-group"> - <input type="text" class="form-control" name="title" required="required" id="label-name-ipt"/> - <input type="hidden" name="color" id="label-color-ipt" value="#444444"/> - <span class="input-group-addon"><i></i></span> - </div> - <div class="form-group text-right"> - <input class="form-control input-sm" type="text" id="label-color-ipt2" value="#444444"/> - <button class="btn btn-default btn-sm">Create</button> - </div> - </form> - {{end}} - </div> - </div> - <div class="col-md-9"> - {{template "base/alert" .}} - <div class="filter-option"> - <div class="btn-group"> - <a class="btn btn-default issue-open{{if not .IsShowClosed}} active{{end}}" href="{{.RepoLink}}/issues?type={{.ViewType}}">{{.IssueStats.OpenCount}} Open</a> - <a class="btn btn-default issue-close{{if .IsShowClosed}} active{{end}}" href="{{.RepoLink}}/issues?type={{.ViewType}}&state=closed">{{.IssueStats.ClosedCount}} Closed</a> - </div> - </div> - <div class="issues list-group"> - {{range .Issues}}{{if .Poster}} - <div class="list-group-item issue-item{{if not .IsRead}} unread{{end}}" id="issue-{{.Id}}"> - <span class="number pull-right">#{{.Index}}</span> - <h5 class="title"> - <a href="{{$.RepoLink}}/issues/{{.Index}}">{{.Name}}</a> - <span class="labels"> - {{range .Labels}} - <span class="label" style="background-color: {{.Color}}">{{.Name}}</span> - {{end}} - </span> - </h5> - <p class="info"> - <span class="author"><img class="avatar" src="{{.Poster.AvatarLink}}" alt="" width="20"/> - <a href="{{AppSubUrl}}/{{.Poster.Name}}">{{.Poster.Name}}</a></span> - <span class="time">{{TimeSince .Created $.Lang}}</span> - <span class="comment"><i class="fa fa-comments"></i> {{.NumComments}}</span> - </p> - </div> - {{end}}{{end}} - </div> - </div> - </div> - </div> +{{template "base/head" .}} +<div class="repository"> + {{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}}/issues/new">{{.i18n.Tr "repo.issues.new"}}</a> + </div> + {{end}} + </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}}"> + <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"> + <i class="octicon octicon-issue-closed"></i> + {{.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"> + <span class="text"> + {{.i18n.Tr "repo.issues.filter_label"}} + <i class="dropdown icon"></i> + </span> + <div class="menu"> + {{range .Labels}} + <a class="item" href="{{$.RepoLink}}/issues?type={{$.ViewType}}&state={{$.State}}&labels={{.ID}}"><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"> + <span class="text"> + {{.i18n.Tr "repo.issues.filter_milestone"}} + <i class="dropdown icon"></i> + </span> + <div class="menu"> + {{range .Milestones}} + <a class="item" href="{{$.RepoLink}}/issues">{{.Name}}</a> + {{end}} + </div> + </div> + <div class="ui {{if not .Assignees}}disabled{{end}} pointing dropdown jump item"> + <span class="text"> + {{.i18n.Tr "repo.issues.filter_assignee"}} + <i class="dropdown icon"></i> + </span> + <div class="menu"> + {{range .Assignees}} + <a class="item" href="{{$.RepoLink}}/issues">{{.Name}}</a> + {{end}} + </div> + </div> + <div class="ui pointing dropdown type jump item"> + <span class="text"> + {{.i18n.Tr "repo.issues.filter_type"}} + <i class="dropdown icon"></i> + </span> + <div class="menu"> + <a class="item" href="{{$.RepoLink}}/issues">{{.i18n.Tr "repo.issues.filter_type.all_issues"}}</a> + <a class="item" href="{{$.RepoLink}}/issues">{{.i18n.Tr "repo.issues.filter_type.assigned_to_you"}}</a> + <a class="item" href="{{$.RepoLink}}/issues">{{.i18n.Tr "repo.issues.filter_type.created_by_you"}}</a> + <a class="item" href="{{$.RepoLink}}/issues">{{.i18n.Tr "repo.issues.filter_type.mentioning_you"}}</a> + </div> + </div> + </div> + + <div class="issue list"> + {{range .Issues}} + {{ $timeStr:= TimeSince .Created $.Lang }} + <li class="item"> + <div class="ui {{if .IsRead}}black{{else}}green{{end}} label">#{{.Index}}</div> + <a class="title" href="{{$.RepoLink}}/issues/{{.Index}}">{{.Name}}</a> + {{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> + </li> + {{end}} + + <div class="center page buttons"> + <a class="ui {{if not .PreviousPage}}disabled{{end}} blue button" href="{{.RepoLink}}/issues?page={{.PreviousPage}}">{{.i18n.Tr "repo.issues.previous"}}</a> + <a class="ui {{if not .NextPage}}disabled{{end}} blue button" href="{{.RepoLink}}/issues?page={{.NextPage}}">{{.i18n.Tr "repo.issues.next"}}</a> + </div> + </div> + </div> </div> -<script src="{{AppSubUrl}}/js/bootstrap-colorpicker.min.js"></script> -<script> - $(function(){ - $('.label-color-picker').colorpicker({ - input: $('#label-color-ipt') - }).on('changeColor', function (ev) { - var $ipt = $('#label-color-ipt2'); - if ($ipt.val().length != 4) { - $ipt.val(ev.color.toHex()); - } - }); - $('.label-change-color-picker').colorpicker({ - input:$('#label-color-change-ipt') - }).on('changeColor', function (ev) { - var $ipt = $('#label-color-change-ipt2'); - if ($ipt.val().length != 4) { - $ipt.val(ev.color.toHex()); - } - }); - }); -</script> -{{template "base/footer_old" .}} +{{template "base/footer" .}}
\ No newline at end of file diff --git a/templates/repo/issue/list_old.tmpl b/templates/repo/issue/list_old.tmpl new file mode 100644 index 0000000000..8c26738279 --- /dev/null +++ b/templates/repo/issue/list_old.tmpl @@ -0,0 +1,120 @@ +{{template "base/head_old" .}} +{{template "base/navbar" .}} +{{template "repo/nav" .}} +{{template "repo/toolbar" .}} +<div id="body" class="container"> + <div id="issue"> + <div class="col-md-3 filters"> + <div class="filter-list"> + <ul class="list-unstyled"> + <li><a href="{{.RepoLink}}/issues?state={{.State}}"{{if eq .ViewType "all"}} class="active"{{end}}>All Issues <strong class="pull-right">{{.IssueStats.AllCount}}</strong></a></li> + <li><a href="{{.RepoLink}}/issues?type=assigned&state={{.State}}"{{if eq .ViewType "assigned"}} class="active"{{end}}>Assigned to you <strong class="pull-right">{{.IssueStats.AssignCount}}</strong></a></li> + <li><a href="{{.RepoLink}}/issues?type=created_by&state={{.State}}"{{if eq .ViewType "created_by"}} class="active"{{end}}>Created by you <strong class="pull-right">{{.IssueStats.CreateCount}}</strong></a></li> + <li><a href="{{.RepoLink}}/issues?type=mentioned&state={{.State}}"{{if eq .ViewType "mentioned"}} class="active"{{end}}>Mentioning you <strong class="pull-right">{{.IssueStats.MentionCount}}</strong></a></li> + </ul> + </div> + <div class="label-filter"> + <h4>Label</h4> + <ul class="list-unstyled" id="label-list" data-ajax="{{$.RepoLink}}/issues/labels/delete"> + {{range .Labels}} + <li class="label-item{{if eq $.SelectLabels .Id}} label-selected{{end}}" id="label-{{.Id}}" data-id="{{.Id}}"> + <a href="?type={{$.ViewType}}&state={{$.State}}{{if not (eq $.SelectLabels .Id)}}&labels={{.Id}}{{end}}"> + <span class="pull-right count">{{if $.IsShowClosed}}{{.NumClosedIssues}}{{else}}{{.NumOpenIssues}}{{end}}</span> + <span class="color" style="background-color: {{.Color}}" data-color="{{.Color}}"></span> + <span class="name">{{.Name}}</span> + </a> + <a class="del pull-right" href="#" data-id="{{.Id}}"><i class="fa fa-times-circle-o"></i></a> + </li> + {{end}} + {{if or .IsRepositoryOwner .IsAdmin}} + <li class="label-change-li" style="display: none"> + <form id="label-change-form" action="{{$.RepoLink}}/issues/labels/edit" method="post"> + {{.CsrfTokenHtml}} + <div class="input-group label-change-color-picker form-group" style="margin-bottom: 2px"> + <input type="text" class="form-control" name="title" required="required" id="label-name-change-ipt"/> + <input type="hidden" name="color" id="label-color-change-ipt" value="#444444"/> + <span class="input-group-addon"><i></i></span> + <input type="hidden" name="id" id="label-change-id-ipt" value="0"/> + </div> + <div class="form-group text-right"> + <input class="form-control input-sm" type="text" id="label-color-change-ipt2" value="#444444"/> + <button class="btn btn-default btn-sm">Save</button> + </div> + </form> + </li> + {{end}} + </ul> + {{if or .IsRepositoryOwner .IsAdmin}} + <button class="btn btn-default btn-block label-button" id="label-manage-btn">Manage Labels</button> + <hr/> + <form id="label-add-form" action="{{$.RepoLink}}/issues/labels/new" method="post"> + {{.CsrfTokenHtml}} + <h5><strong>New Label</strong></h5> + <div class="input-group label-color-picker form-group"> + <input type="text" class="form-control" name="title" required="required" id="label-name-ipt"/> + <input type="hidden" name="color" id="label-color-ipt" value="#444444"/> + <span class="input-group-addon"><i></i></span> + </div> + <div class="form-group text-right"> + <input class="form-control input-sm" type="text" id="label-color-ipt2" value="#444444"/> + <button class="btn btn-default btn-sm">Create</button> + </div> + </form> + {{end}} + </div> + </div> + <div class="col-md-9"> + {{template "base/alert" .}} + <div class="filter-option"> + <div class="btn-group"> + <a class="btn btn-default issue-open{{if not .IsShowClosed}} active{{end}}" href="{{.RepoLink}}/issues?type={{.ViewType}}">{{.IssueStats.OpenCount}} Open</a> + <a class="btn btn-default issue-close{{if .IsShowClosed}} active{{end}}" href="{{.RepoLink}}/issues?type={{.ViewType}}&state=closed">{{.IssueStats.ClosedCount}} Closed</a> + </div> + </div> + <div class="issues list-group"> + {{range .Issues}}{{if .Poster}} + <div class="list-group-item issue-item{{if not .IsRead}} unread{{end}}" id="issue-{{.Id}}"> + <span class="number pull-right">#{{.Index}}</span> + <h5 class="title"> + <a href="{{$.RepoLink}}/issues/{{.Index}}">{{.Name}}</a> + <span class="labels"> + {{range .Labels}} + <span class="label" style="background-color: {{.Color}}">{{.Name}}</span> + {{end}} + </span> + </h5> + <p class="info"> + <span class="author"><img class="avatar" src="{{.Poster.AvatarLink}}" alt="" width="20"/> + <a href="{{AppSubUrl}}/{{.Poster.Name}}">{{.Poster.Name}}</a></span> + <span class="time">{{TimeSince .Created $.Lang}}</span> + <span class="comment"><i class="fa fa-comments"></i> {{.NumComments}}</span> + </p> + </div> + {{end}}{{end}} + </div> + </div> + </div> + </div> +</div> +<script src="{{AppSubUrl}}/js/bootstrap-colorpicker.min.js"></script> +<script> + $(function(){ + $('.label-color-picker').colorpicker({ + input: $('#label-color-ipt') + }).on('changeColor', function (ev) { + var $ipt = $('#label-color-ipt2'); + if ($ipt.val().length != 4) { + $ipt.val(ev.color.toHex()); + } + }); + $('.label-change-color-picker').colorpicker({ + input:$('#label-color-change-ipt') + }).on('changeColor', function (ev) { + var $ipt = $('#label-color-change-ipt2'); + if ($ipt.val().length != 4) { + $ipt.val(ev.color.toHex()); + } + }); + }); +</script> +{{template "base/footer_old" .}} diff --git a/templates/repo/issue/milestone.tmpl b/templates/repo/issue/milestone.tmpl index a09b26001f..6a9e5f3790 100644 --- a/templates/repo/issue/milestone.tmpl +++ b/templates/repo/issue/milestone.tmpl @@ -6,11 +6,11 @@ <div id="issue"> <div class="col-md-3 filter-list"> <ul class="list-unstyled"> - <li><a href="{{.RepoLink}}/issues/milestones"{{if eq .State "open"}} class="active"{{end}}>Open Milestones <strong class="pull-right">{{.Repository.NumOpenMilestones}}</strong></a></li> - <li><a href="{{.RepoLink}}/issues/milestones?state=closed"{{if eq .State "closed"}} class="active"{{end}}>Close Milestones <strong class="pull-right">{{.Repository.NumClosedMilestones}}</strong></a></li> + <li><a href="{{.RepoLink}}/milestones"{{if eq .State "open"}} class="active"{{end}}>Open Milestones <strong class="pull-right">{{.Repository.NumOpenMilestones}}</strong></a></li> + <li><a href="{{.RepoLink}}/milestones?state=closed"{{if eq .State "closed"}} class="active"{{end}}>Close Milestones <strong class="pull-right">{{.Repository.NumClosedMilestones}}</strong></a></li> </ul> <hr/> - <a href="{{.RepoLink}}/issues/milestones/new" class="text-center"> + <a href="{{.RepoLink}}/milestones/new" class="text-center"> <button class="btn btn-default btn-block">Create new milestone</button> </a> </div> @@ -22,13 +22,13 @@ <span class="issue-open label label-success">{{.NumOpenIssues}}</span> <span class="issue-close label label-warning">{{.NumClosedIssues}}</span> <p class="actions pull-right"> - <a href="{{$.RepoLink}}/issues/milestones/{{.Index}}/edit">Edit</a> + <a href="{{$.RepoLink}}/milestones/{{.Index}}/edit">Edit</a> {{if .IsClosed}} - <a href="{{$.RepoLink}}/issues/milestones/{{.Index}}/open">Open</a> + <a href="{{$.RepoLink}}/milestones/{{.Index}}/open">Open</a> {{else}} - <a href="{{$.RepoLink}}/issues/milestones/{{.Index}}/close">Close</a> + <a href="{{$.RepoLink}}/milestones/{{.Index}}/close">Close</a> {{end}} - <a class="text-danger" href="{{$.RepoLink}}/issues/milestones/{{.Index}}/delete">Delete</a> + <a class="text-danger" href="{{$.RepoLink}}/milestones/{{.Index}}/delete">Delete</a> <a href="{{$.RepoLink}}/issues?milestone={{.Index}}{{if .IsClosed}}&state=closed{{end}}">Issues</a> </p> <hr/> diff --git a/templates/repo/issue/milestone_edit.tmpl b/templates/repo/issue/milestone_edit.tmpl index f3898fa800..dee36152e5 100644 --- a/templates/repo/issue/milestone_edit.tmpl +++ b/templates/repo/issue/milestone_edit.tmpl @@ -4,7 +4,7 @@ {{template "repo/toolbar" .}} <div id="body" class="container"> <div id="issue"> - <form class="form" action="{{.RepoLink}}/issues/milestones/{{.Milestone.Index}}/edit" method="post" id="issue-create-form"> + <form class="form" action="{{.RepoLink}}/milestones/{{.Milestone.Index}}/edit" method="post" id="issue-create-form"> {{.CsrfTokenHtml}} {{template "base/alert" .}} <div class="col-md-1"> diff --git a/templates/repo/issue/milestone_new.tmpl b/templates/repo/issue/milestone_new.tmpl index 2d9f60f495..f90772f6db 100644 --- a/templates/repo/issue/milestone_new.tmpl +++ b/templates/repo/issue/milestone_new.tmpl @@ -4,7 +4,7 @@ {{template "repo/toolbar" .}} <div id="body" class="container"> <div id="issue"> - <form class="form" action="{{.RepoLink}}/issues/milestones/new" method="post" id="issue-create-form"> + <form class="form" action="{{.RepoLink}}/milestones/new" method="post" id="issue-create-form"> {{.CsrfTokenHtml}} {{template "base/alert" .}} <div class="col-md-1"> diff --git a/templates/repo/issue/navbar.tmpl b/templates/repo/issue/navbar.tmpl new file mode 100644 index 0000000000..beff907d2f --- /dev/null +++ b/templates/repo/issue/navbar.tmpl @@ -0,0 +1,7 @@ +<div class="ui left"> + <div class="ui compact 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="item" href="{{.RepoLink}}/milestones">{{.i18n.Tr "repo.milestones"}}</a> + </div> +</div>
\ No newline at end of file diff --git a/templates/repo/issue/view.tmpl b/templates/repo/issue/view.tmpl index b52ef5055d..fa505df7fe 100644 --- a/templates/repo/issue/view.tmpl +++ b/templates/repo/issue/view.tmpl @@ -3,15 +3,15 @@ {{template "repo/nav" .}} {{template "repo/toolbar" .}} <div id="body" class="container"> - <div id="issue" data-id="{{.Issue.Id}}"> - <div id="issue-{{.Issue.Id}}" class="issue-whole issue-is-opening"> + <div id="issue" data-id="{{.Issue.ID}}"> + <div id="issue-{{.Issue.ID}}" class="issue-whole issue-is-opening"> <div class="issue-wrap col-md-10"> <div class="issue-head clearfix"> <div class="number pull-right">#{{.Issue.Index}}</div> <a class="author pull-left" href="{{AppSubUrl}}/{{.Issue.Poster.Name}}"><img class="avatar" src="{{.Issue.Poster.AvatarLink}}" alt="" width="30"/></a> <h1 class="title pull-left">{{.Issue.Name}}</h1> <input id="issue-edit-title" class="form-control input-lg pull-left hidden" type="text" value="{{.Issue.Name}}" data-ajax-rel="issue-edit-save" data-ajax-val="val" data-ajax-field="title"/> - <input type="hidden" value="{{.Issue.Id}}" data-ajax-rel="issue-edit-save" data-ajax-val="val" data-ajax-field="issue_id"/> + <input type="hidden" value="{{.Issue.ID}}" data-ajax-rel="issue-edit-save" data-ajax-val="val" data-ajax-field="issue_id"/> <p class="info pull-left"> {{if .IsIssueOwner}}<a class="btn btn-default pull-right issue-edit" href="#" id="issue-edit-btn">Edit</a> <a class="btn btn-danger pull-right issue-edit-cancel hidden" href="#">Cancel</a> @@ -178,7 +178,7 @@ <div class="dropdown-menu dropdown-menu-right no"> <ul class="list-unstyled"> {{range .Labels}} - <li class="{{if not .IsChecked}}no-{{end}}checked" data-id="{{.Id}}"> + <li class="{{if not .IsChecked}}no-{{end}}checked" data-id="{{.ID}}"> {{if .IsChecked}}<span class="check pull-left"><i class="fa fa-check"></i></span>{{end}} <span class="color" style="background-color: {{.Color}}"></span> <span class="name">{{.Name}}</span> @@ -191,7 +191,7 @@ <h4>Labels</h4> {{if .Issue.Labels}} {{range .Issue.Labels}} - <p id="label-{{.Id}}" class="label-item label-white" style="background-color: {{.Color}}"><strong>{{.Name}}</strong></p> + <p id="label-{{.ID}}" class="label-item label-white" style="background-color: {{.Color}}"><strong>{{.Name}}</strong></p> {{end}} {{else}} <p>None yet</p> diff --git a/templates/repo/issue2/labels.tmpl b/templates/repo/issue2/labels.tmpl deleted file mode 100644 index 8c656e297d..0000000000 --- a/templates/repo/issue2/labels.tmpl +++ /dev/null @@ -1,74 +0,0 @@ -{{template "ng/base/head" .}} -{{template "ng/base/header" .}} -<div id="repo-wrapper"> - {{template "repo/header" .}} - <div class="issue-main container repo-wide-wrapper"> - <ul id="issue-list-nav" class="menu menu-line"> - <li><a href="#">Issue</a></li> - <li><a href="#">Pull Request</a></li> - <li class="current"><a href="#">Labels</a></li> - <li><a href="#">Milestones</a></li> - <li class="right" id="label-new"><a href="#"><button id="label-new-btn" class="btn btn-green text-bold">New Label</button></a></li> - </ul> - <form id="label-add-form" action="#" class="form clear hidden"> - <input type="text" class="ipt" name="name" placeholder="label name" id="label-add-name"/> - <div class="inline down drop label-color-drop"> - <label for="label-add-color"></label> - <input class="ipt" name="color" type="text" placeholder="color" id="label-add-color"/> - <div class="drop-down"> - <a href="#" class="color" style="background: red"></a> - <a href="#" class="color" style="background: green"></a> - </div> - </div> - <button class="btn btn-gray right" type="button" id="label-cancel-btn">Cancel</button> - <button class="btn btn-green right" id="label-add-btn">Create</button> - </form> - <div id="issue-list-container"> - <div id="issue-list-menu"> - <div class="left"><span class="label label-black" id="labels-num">6</span><strong>Labels</strong></div> - <div class="clear"></div> - </div> - <ul id="label-list" class="list-no-style"> - <li class="item" id="label-id"> - <a class="right delete" href="#"><i class="octicon octicon-x"></i>Delete</a> - <a class="right edit" href="#"><i class="octicon octicon-pencil"></i>Edit</a> - <a class="right issue-num" href="#"><i class="octicon octicon-issue-opened"></i><strong class="num">12</strong>Issues</a> - <a class="left label clear" href="#" style="background-color: #0052cc" data-color-hex="#0052cc"><i class="octicon octicon-tag"></i><strong>bug</strong></a> - </li> - <li class="item" id="label-id"> - <a class="right" href="#"><i class="octicon octicon-x"></i>Delete</a> - <a class="right" href="#"><i class="octicon octicon-pencil"></i>Edit</a> - <a class="right issue-num" href="#"><i class="octicon octicon-issue-opened"></i><strong class="num">12</strong>Issues</a> - <a class="left label clear" href="#" style="background-color: red"><i class="octicon octicon-tag"></i><strong>bug</strong></a> - </li> - </ul> - </div> - </div> -</div> -<div id="label-edit-form-tpl" class="hidden"> - <li class="item"><form id="label-edit-form" action="#" class="form clear"> - <input type="text" class="ipt" name="name" placeholder="label name" id="label-edit-name"/> - <input type="hidden" name="id" value="id"/> - <div class="inline down drop label-color-drop"> - <label for="label-add-color"></label> - <input class="ipt" name="color" type="text" placeholder="color" id="label-edit-color"/> - <div class="drop-down"> - <a href="#" class="color" style="background: red"></a> - <a href="#" class="color" style="background: green"></a> - </div> - </div> - <button class="btn btn-gray right" type="button" id="label-edit-cancel-btn">Cancel</button> - <button class="btn btn-green right" id="label-edit-btn">Save Changes</button> - </form></li> -</div> -<div id="label-delete-form-tpl" class="hidden"> - <li class="item"> - <form id="label-delete-form" action="#"> - <input type="hidden" name="id" value="id"/> - <span><strong class="text-red">Are you sure?</strong> Deleting a label will remove it from all issues and pull requests.</span> - <button class="btn btn-gray right" type="button" id="label-del-cancel-btn">Cancel</button> - <button class="btn btn-red right" id="label-del-btn">Delete</button> - </form> - </li> -</div> -{{template "ng/base/footer" .}}
\ No newline at end of file diff --git a/templates/repo/issue2/list.tmpl b/templates/repo/issue2/list.tmpl deleted file mode 100644 index c7a271d14a..0000000000 --- a/templates/repo/issue2/list.tmpl +++ /dev/null @@ -1,101 +0,0 @@ -{{template "ng/base/head" .}} -{{template "ng/base/header" .}} -<div id="repo-wrapper"> - {{template "repo/header" .}} - <div class="issue-main container repo-wide-wrapper"> - <ul id="issue-list-nav" class="menu menu-line"> - <li class="current"><a href="#">Issue</a></li> - <li><a href="#">Pull Request</a></li> - <li><a href="#">Labels</a></li> - <li><a href="#">Milestones</a></li> - <li class="right" id="issue-new"><a href="#"><button id="issue-new-btn" class="btn btn-green text-bold">New Issue</button></a></li> - <!--<li class="right"><a href="#">Filter</a></li>--> - </ul> - <div id="issue-list-container"> - <div id="issue-list-menu"> - <div class="left"> - <span class="mark open hover"><a href="#"> - <i class="octicon octicon-issue-opened"></i> 88 Open - </a></span> - <span class="mark close"><a href=""> - <i class="octicon octicon-issue-closed"></i> 12 Close - </a></span> - </div> - <ul id="issue-list-filter" class="right menu menu-line"> - <li class="down drop label-filter"> - <a href="#">Labels</a> - <div class="drop-down"> - <h4>Labels</h4> - <ul class="labels list-no-style"> - <li class="no-label"><strong>no label</strong></li> - <li><a href="#"><span class="color"></span><span class="name">bug</span></a></li> - <li><a href="#"><span class="color"></span><span class="name">feature</span></a></li> - <li><a href="#"><span class="color"></span><span class="name">roadmap</span></a></li> - </ul> - </div> - </li> - <li class="down drop milestone-filter"> - <a href="#">Milestones</a> - <div class="drop-down"> - <h4>Milestones</h4> - <ul class="milestones list-no-style"> - <li class="no-label"><strong>no milestone</strong></li> - <li><a href="#">v1</a></li> - </ul> - </div> - </li> - <li class="down drop assignee-list"> - <a href="#">Assignee</a> - <div class="drop-down"> - aabbcc - </div> - </li> - </ul> - <div class="clear"></div> - </div> - <ul id="issue-list" class="list-no-style"> - <li class="item" id="issue-id"> - <a class="comment" href="#"> - <i class="octicon octicon-comment"></i> 7 - </a> - <p class="title text-bold"> - <span class="label label-black index-num">#588</span> - <a href="#" class="title-text">Delete account text and/or translations missing</a> - <span class="label label-red issue-label"><a href="#">bug</a></span> - </p> - <p class="desc">opened 7 days ago by <a href="#">marcuspoehls</a></p> - </li> - <li class="item" id="issue-id2"> - <a class="comment" href="#"> - <i class="octicon octicon-comment"></i> 7 - </a> - <p class="title text-bold"> - <span class="label label-black index-num">#588</span> - <a href="#" class="title-text">Delete account text and/or translations missing</a> - <span class="label label-red issue-label"><a href="#">bug</a></span> - </p> - <p class="desc">opened 7 days ago by <a href="#">marcuspoehls</a></p> - </li> - <li class="item" id="issue-id3"> - <a class="comment" href="#"> - <i class="octicon octicon-comment"></i> 7 - </a> - <p class="title text-bold"> - <span class="label label-black index-num">#588</span> - <a href="#" class="title-text">Disabling attachments breaks issues and comments ajax submit</a> - <span class="label label-red issue-label"><a href="#">bug</a></span> - </p> - <p class="desc">opened 7 days ago by <a href="#">marcuspoehls</a></p> - </li> - </ul> - <div id="issue-list-pager" class="pager text-center"> - <a class="prev invalid" href="#">Prev</a> - <a class="page" href="#">1</a> - <a class="page hover" href="#">2</a> - <a class="page" href="#">3</a> - <a class="next" href="#">Next</a> - </div> - </div> - </div> -</div> -{{template "ng/base/footer" .}}
\ No newline at end of file diff --git a/templates/repo/milestone2/list.tmpl b/templates/repo/milestone2/list.tmpl index 5aa0e646e4..6864442457 100644 --- a/templates/repo/milestone2/list.tmpl +++ b/templates/repo/milestone2/list.tmpl @@ -1,7 +1,7 @@ {{template "ng/base/head" .}} {{template "ng/base/header" .}} <div id="repo-wrapper"> - {{template "repo/header" .}} + {{template "repo/header_old" .}} <div class="issue-main container repo-wide-wrapper"> <ul id="issue-list-nav" class="menu menu-line"> <li><a href="#">Issue</a></li> diff --git a/templates/repo/pr2/list.tmpl b/templates/repo/pr2/list.tmpl index 938682562e..36c49cc168 100644 --- a/templates/repo/pr2/list.tmpl +++ b/templates/repo/pr2/list.tmpl @@ -1,7 +1,7 @@ {{template "ng/base/head" .}} {{template "ng/base/header" .}} <div id="repo-wrapper"> - {{template "repo/header" .}} + {{template "repo/header_old" .}} <div class="issue-main container repo-wide-wrapper"> <ul id="issue-list-nav" class="menu menu-line"> <li><a href="#">Issue</a></li> diff --git a/templates/repo/pulls.tmpl b/templates/repo/pulls.tmpl index bfb0905557..d5f3276a70 100644 --- a/templates/repo/pulls.tmpl +++ b/templates/repo/pulls.tmpl @@ -1,7 +1,7 @@ {{template "ng/base/head" .}} {{template "ng/base/header" .}} <div id="repo-wrapper"> - {{template "repo/header" .}} + {{template "repo/header_old" .}} <div class="clear container repo-wide-wrapper repo-pr"> <div class="pr-main"> <div class="pr-title clear"> diff --git a/templates/repo/release/edit.tmpl b/templates/repo/release/edit.tmpl index 44f2d7b748..c1dfd0d98d 100644 --- a/templates/repo/release/edit.tmpl +++ b/templates/repo/release/edit.tmpl @@ -1,7 +1,7 @@ {{template "ng/base/head" .}} {{template "ng/base/header" .}} <div id="repo-wrapper"> - {{template "repo/header" .}} + {{template "repo/header_old" .}} <div id="repo-content" class="clear container"> <div id="repo-main" class="left grid-5-6"> {{template "ng/base/alert" .}} diff --git a/templates/repo/release/list.tmpl b/templates/repo/release/list.tmpl index 5ac1be35d6..eb3ba91d6b 100644 --- a/templates/repo/release/list.tmpl +++ b/templates/repo/release/list.tmpl @@ -1,7 +1,7 @@ {{template "ng/base/head" .}} {{template "ng/base/header" .}} <div id="repo-wrapper"> - {{template "repo/header" .}} + {{template "repo/header_old" .}} <div id="repo-content" class="clear container"> <div id="repo-main" class="left grid-5-6"> <div id="release"> diff --git a/templates/repo/release/new.tmpl b/templates/repo/release/new.tmpl index 101a22456c..82cad3ca8b 100644 --- a/templates/repo/release/new.tmpl +++ b/templates/repo/release/new.tmpl @@ -1,7 +1,7 @@ {{template "ng/base/head" .}} {{template "ng/base/header" .}} <div id="repo-wrapper"> - {{template "repo/header" .}} + {{template "repo/header_old" .}} <div id="repo-content" class="clear container"> <div id="repo-main" class="left grid-5-6"> {{template "ng/base/alert" .}} diff --git a/templates/repo/settings/collaboration.tmpl b/templates/repo/settings/collaboration.tmpl index 98091c35c8..4781f667bb 100644 --- a/templates/repo/settings/collaboration.tmpl +++ b/templates/repo/settings/collaboration.tmpl @@ -1,7 +1,7 @@ {{template "ng/base/head" .}} {{template "ng/base/header" .}} <div id="repo-wrapper"> - {{template "repo/header" .}} + {{template "repo/header_old" .}} <div id="setting-wrapper" class="main-wrapper"> <div id="repo-setting" class="container clear"> {{template "repo/settings/nav" .}} diff --git a/templates/repo/settings/githook_edit.tmpl b/templates/repo/settings/githook_edit.tmpl index 23fc26e36e..11915c767c 100644 --- a/templates/repo/settings/githook_edit.tmpl +++ b/templates/repo/settings/githook_edit.tmpl @@ -1,7 +1,7 @@ {{template "ng/base/head" .}} {{template "ng/base/header" .}} <div id="repo-wrapper"> - {{template "repo/header" .}} + {{template "repo/header_old" .}} <div id="setting-wrapper" class="main-wrapper"> <div id="repo-setting" class="container clear"> {{template "repo/settings/nav" .}} diff --git a/templates/repo/settings/githooks.tmpl b/templates/repo/settings/githooks.tmpl index a059b0e77d..3298d992ab 100644 --- a/templates/repo/settings/githooks.tmpl +++ b/templates/repo/settings/githooks.tmpl @@ -1,7 +1,7 @@ {{template "ng/base/head" .}} {{template "ng/base/header" .}} <div id="repo-wrapper"> - {{template "repo/header" .}} + {{template "repo/header_old" .}} <div id="setting-wrapper" class="main-wrapper"> <div id="repo-setting" class="container clear"> {{template "repo/settings/nav" .}} diff --git a/templates/repo/settings/hook_new.tmpl b/templates/repo/settings/hook_new.tmpl index 2bce97a26b..e4534a6468 100644 --- a/templates/repo/settings/hook_new.tmpl +++ b/templates/repo/settings/hook_new.tmpl @@ -1,7 +1,7 @@ {{template "ng/base/head" .}} {{template "ng/base/header" .}} <div id="repo-wrapper"> - {{template "repo/header" .}} + {{template "repo/header_old" .}} <div id="setting-wrapper" class="main-wrapper"> <div id="repo-setting" class="container clear"> {{template "repo/settings/nav" .}} diff --git a/templates/repo/settings/hooks.tmpl b/templates/repo/settings/hooks.tmpl index 6fcedab7d8..e23c0ccd63 100644 --- a/templates/repo/settings/hooks.tmpl +++ b/templates/repo/settings/hooks.tmpl @@ -1,7 +1,7 @@ {{template "ng/base/head" .}} {{template "ng/base/header" .}} <div id="repo-wrapper"> - {{template "repo/header" .}} + {{template "repo/header_old" .}} <div id="setting-wrapper" class="main-wrapper"> <div id="repo-setting" class="container clear"> {{template "repo/settings/nav" .}} diff --git a/templates/repo/settings/options.tmpl b/templates/repo/settings/options.tmpl index 41683f8450..0ba86a080b 100644 --- a/templates/repo/settings/options.tmpl +++ b/templates/repo/settings/options.tmpl @@ -1,7 +1,7 @@ {{template "ng/base/head" .}} {{template "ng/base/header" .}} <div id="repo-wrapper"> - {{template "repo/header" .}} + {{template "repo/header_old" .}} <div id="setting-wrapper" class="main-wrapper"> <div id="repo-setting" class="container clear"> {{template "repo/settings/nav" .}} diff --git a/templates/repo/toolbar.tmpl b/templates/repo/toolbar.tmpl index f2254d21dd..44df6815f2 100644 --- a/templates/repo/toolbar.tmpl +++ b/templates/repo/toolbar.tmpl @@ -12,7 +12,7 @@ {{if .IsRepoToolbarIssues}} <li class="tmp">{{if .IsRepoToolbarIssuesList}} <a href="{{.RepoLink}}/issues/new"><button class="btn btn-primary btn-sm">New Issue</button></a> - <a href="{{.RepoLink}}/issues/milestones"><button class="btn btn-success btn-sm">Milestones</button></a> + <a href="{{.RepoLink}}/milestones"><button class="btn btn-success btn-sm">Milestones</button></a> {{end}}</li> {{end}} <li class="{{if .IsRepoToolbarReleases}}active{{end}}"><a href="{{.RepoLink}}/releases">{{if .Repository.NumTags}}<span class="badge">{{.Repository.NumTags}}</span> {{end}}Releases</a></li> |