summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-07-24 04:50:05 +0800
committerUnknwon <u@gogs.io>2015-07-24 04:50:05 +0800
commit4447a20f872776123c42d5b8ca987c114fb4b80b (patch)
tree3692ada9ffe5bbc54d35cb98ea57a95450f8c99d /templates
parent548b95f7b593d80a241c9a1027eda6b4549ca995 (diff)
downloadgitea-4447a20f872776123c42d5b8ca987c114fb4b80b.tar.gz
gitea-4447a20f872776123c42d5b8ca987c114fb4b80b.zip
UI: issues - finish basic frame
Diffstat (limited to 'templates')
-rw-r--r--templates/.VERSION2
-rw-r--r--templates/base/head.tmpl25
-rw-r--r--templates/install.tmpl2
-rw-r--r--templates/repo/commits.tmpl2
-rw-r--r--templates/repo/diff.tmpl2
-rw-r--r--templates/repo/header.tmpl88
-rw-r--r--templates/repo/header_old.tmpl63
-rw-r--r--templates/repo/home.tmpl2
-rw-r--r--templates/repo/issue/list.tmpl203
-rw-r--r--templates/repo/issue/list_old.tmpl120
-rw-r--r--templates/repo/issue/navbar.tmpl7
-rw-r--r--templates/repo/issue2/labels.tmpl2
-rw-r--r--templates/repo/issue2/list.tmpl2
-rw-r--r--templates/repo/milestone2/list.tmpl2
-rw-r--r--templates/repo/pr2/list.tmpl2
-rw-r--r--templates/repo/pulls.tmpl2
-rw-r--r--templates/repo/release/edit.tmpl2
-rw-r--r--templates/repo/release/list.tmpl2
-rw-r--r--templates/repo/release/new.tmpl2
-rw-r--r--templates/repo/settings/collaboration.tmpl2
-rw-r--r--templates/repo/settings/githook_edit.tmpl2
-rw-r--r--templates/repo/settings/githooks.tmpl2
-rw-r--r--templates/repo/settings/hook_new.tmpl2
-rw-r--r--templates/repo/settings/hooks.tmpl2
-rw-r--r--templates/repo/settings/options.tmpl2
25 files changed, 344 insertions, 200 deletions
diff --git a/templates/.VERSION b/templates/.VERSION
index e87964c1ef..7793c8a2e4 100644
--- a/templates/.VERSION
+++ b/templates/.VERSION
@@ -1 +1 @@
-0.6.1.0719 Beta \ No newline at end of file
+0.6.1.0724 Beta \ No newline at end of file
diff --git a/templates/base/head.tmpl b/templates/base/head.tmpl
index d057754410..7eff5f4c77 100644
--- a/templates/base/head.tmpl
+++ b/templates/base/head.tmpl
@@ -38,12 +38,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 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 ece78859e9..01c2224a45 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/list.tmpl b/templates/repo/issue/list.tmpl
index 8c26738279..6f16a6c7e6 100644
--- a/templates/repo/issue/list.tmpl
+++ b/templates/repo/issue/list.tmpl
@@ -1,120 +1,85 @@
-{{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" .}}
+ <div class="ui right floated secondary menu">
+ <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}}">
+ <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 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 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 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 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 black label">#{{.Id}}</div>
+ <a class="title" href="{{$.RepoLink}}/issues/{{.Index}}">{{.Name}}</a>
+ <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}}
+ </li>
+ {{end}}
+ </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/navbar.tmpl b/templates/repo/issue/navbar.tmpl
new file mode 100644
index 0000000000..e4a58f7730
--- /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="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/issue2/labels.tmpl b/templates/repo/issue2/labels.tmpl
index 8c656e297d..4044bdb3ee 100644
--- a/templates/repo/issue2/labels.tmpl
+++ b/templates/repo/issue2/labels.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/issue2/list.tmpl b/templates/repo/issue2/list.tmpl
index c7a271d14a..dbe46a5ab8 100644
--- a/templates/repo/issue2/list.tmpl
+++ b/templates/repo/issue2/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 class="current"><a href="#">Issue</a></li>
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" .}}