aboutsummaryrefslogtreecommitdiffstats
path: root/templates/repo
diff options
context:
space:
mode:
authorAdam Strzelecki <ono@java.pl>2015-12-07 23:30:52 +0100
committerAdam Strzelecki <ono@java.pl>2015-12-08 00:57:46 +0100
commitda2585c11e11023ffa7a8c69d21c6fecac520a8e (patch)
tree1c2a575dfc00e0e78f47c497a6d9347b3edeca9a /templates/repo
parentdd8a06a397e26c46639eba1313102560dfa49c95 (diff)
downloadgitea-da2585c11e11023ffa7a8c69d21c6fecac520a8e.tar.gz
gitea-da2585c11e11023ffa7a8c69d21c6fecac520a8e.zip
Indent all templates with tabs
This commit improves templates readability, since all of them use consistent indent with all template command blocks indented too. 1. Indents both HTML containers such as <div>, <p> and Go HTML template blocks such as {{if}} {{with}} 2. Cleans all trailing white-space 3. Adds trailing last line-break to each file
Diffstat (limited to 'templates/repo')
-rw-r--r--templates/repo/bare.tmpl98
-rw-r--r--templates/repo/commits.tmpl8
-rw-r--r--templates/repo/commits_table.tmpl124
-rw-r--r--templates/repo/create.tmpl218
-rw-r--r--templates/repo/diff.tmpl82
-rw-r--r--templates/repo/diff_box.tmpl180
-rw-r--r--templates/repo/forks.tmpl36
-rw-r--r--templates/repo/header.tmpl162
-rw-r--r--templates/repo/home.tmpl216
-rw-r--r--templates/repo/issue/comment_tab.tmpl26
-rw-r--r--templates/repo/issue/label_precolors.tmpl2
-rw-r--r--templates/repo/issue/labels.tmpl126
-rw-r--r--templates/repo/issue/list.tmpl164
-rw-r--r--templates/repo/issue/milestone_new.tmpl88
-rw-r--r--templates/repo/issue/milestones.tmpl180
-rw-r--r--templates/repo/issue/navbar.tmpl6
-rw-r--r--templates/repo/issue/new.tmpl2
-rw-r--r--templates/repo/issue/new_form.tmpl118
-rw-r--r--templates/repo/issue/view.tmpl18
-rw-r--r--templates/repo/issue/view_content.tmpl508
-rw-r--r--templates/repo/issue/view_title.tmpl52
-rw-r--r--templates/repo/migrate.tmpl158
-rw-r--r--templates/repo/pulls/commits.tmpl6
-rw-r--r--templates/repo/pulls/compare.tmpl80
-rw-r--r--templates/repo/pulls/files.tmpl6
-rw-r--r--templates/repo/pulls/fork.tmpl110
-rw-r--r--templates/repo/pulls/tab_menu.tmpl32
-rw-r--r--templates/repo/release/list.tmpl154
-rw-r--r--templates/repo/release/new.tmpl184
-rw-r--r--templates/repo/settings/collaboration.tmpl60
-rw-r--r--templates/repo/settings/deploy_keys.tmpl94
-rw-r--r--templates/repo/settings/githook_edit.tmpl40
-rw-r--r--templates/repo/settings/githooks.tmpl30
-rw-r--r--templates/repo/settings/hook_delete_modal.tmpl36
-rw-r--r--templates/repo/settings/hook_gogs.tmpl52
-rw-r--r--templates/repo/settings/hook_history.tmpl128
-rw-r--r--templates/repo/settings/hook_list.tmpl70
-rw-r--r--templates/repo/settings/hook_new.tmpl24
-rw-r--r--templates/repo/settings/hook_settings.tmpl102
-rw-r--r--templates/repo/settings/hook_slack.tmpl50
-rw-r--r--templates/repo/settings/hooks.tmpl4
-rw-r--r--templates/repo/settings/nav.tmpl26
-rw-r--r--templates/repo/settings/navbar.tmpl34
-rw-r--r--templates/repo/settings/options.tmpl316
-rw-r--r--templates/repo/view_file.tmpl98
-rw-r--r--templates/repo/view_list.tmpl104
-rw-r--r--templates/repo/watchers.tmpl104
-rw-r--r--templates/repo/wiki/new.tmpl60
-rw-r--r--templates/repo/wiki/pages.tmpl44
-rw-r--r--templates/repo/wiki/start.tmpl20
-rw-r--r--templates/repo/wiki/view.tmpl128
51 files changed, 2383 insertions, 2385 deletions
diff --git a/templates/repo/bare.tmpl b/templates/repo/bare.tmpl
index af839cbaf8..936ed859a6 100644
--- a/templates/repo/bare.tmpl
+++ b/templates/repo/bare.tmpl
@@ -1,61 +1,61 @@
{{template "base/head" .}}
<div class="repository quickstart">
- {{template "repo/header" .}}
- <div class="ui container">
- <div class="ui grid">
- <div class="sixteen wide column content">
- {{template "base/alert" .}}
- {{if .IsRepositoryAdmin}}
- <h4 class="ui top attached header">
- {{.i18n.Tr "repo.quick_guide"}}
- <div class="ui right">
- <a class="ui black tiny button" href="{{.RepoLink}}/settings">{{.i18n.Tr "repo.settings"}}</a>
- </div>
- </h4>
- <div class="ui attached guide table segment">
- <div class="item">
- <h3>{{.i18n.Tr "repo.clone_this_repo"}} <small>{{.i18n.Tr "repo.clone_helper" "http://git-scm.com/book/en/Git-Basics-Getting-a-Git-Repository" | Str2html}}</small></h3>
- <div class="ui action small input">
- {{if not $.DisableSSH}}
- <button class="ui blue basic clone button" id="repo-clone-ssh" data-link="{{.CloneLink.SSH}}">
- SSH
- </button>
- {{end}}
- <button class="ui {{if $.DisableSSH}}blue{{end}} basic clone button" id="repo-clone-https" data-link="{{.CloneLink.HTTPS}}">
- {{if UseHTTPS}}HTTPS{{else}}HTTP{{end}}
- </button>
- <input id="repo-clone-url" value="{{if $.DisableSSH}}{{$.CloneLink.HTTPS}}{{else}}{{$.CloneLink.SSH}}{{end}}" readonly>
- <button class="ui basic button poping up clipboard" id="clipboard-btn" data-original="{{.i18n.Tr "repo.copy_link"}}" data-success="{{.i18n.Tr "repo.copy_link_success"}}" data-error="{{.i18n.Tr "repo.copy_link_error"}}" data-content="{{.i18n.Tr "repo.copy_link"}}" data-variation="inverted tiny" data-clipboard-target="#repo-clone-url">
- <i class="octicon octicon-clippy"></i>
- </button>
- </div>
- </div>
- <div class="ui divider"></div>
+ {{template "repo/header" .}}
+ <div class="ui container">
+ <div class="ui grid">
+ <div class="sixteen wide column content">
+ {{template "base/alert" .}}
+ {{if .IsRepositoryAdmin}}
+ <h4 class="ui top attached header">
+ {{.i18n.Tr "repo.quick_guide"}}
+ <div class="ui right">
+ <a class="ui black tiny button" href="{{.RepoLink}}/settings">{{.i18n.Tr "repo.settings"}}</a>
+ </div>
+ </h4>
+ <div class="ui attached guide table segment">
+ <div class="item">
+ <h3>{{.i18n.Tr "repo.clone_this_repo"}} <small>{{.i18n.Tr "repo.clone_helper" "http://git-scm.com/book/en/Git-Basics-Getting-a-Git-Repository" | Str2html}}</small></h3>
+ <div class="ui action small input">
+ {{if not $.DisableSSH}}
+ <button class="ui blue basic clone button" id="repo-clone-ssh" data-link="{{.CloneLink.SSH}}">
+ SSH
+ </button>
+ {{end}}
+ <button class="ui {{if $.DisableSSH}}blue{{end}} basic clone button" id="repo-clone-https" data-link="{{.CloneLink.HTTPS}}">
+ {{if UseHTTPS}}HTTPS{{else}}HTTP{{end}}
+ </button>
+ <input id="repo-clone-url" value="{{if $.DisableSSH}}{{$.CloneLink.HTTPS}}{{else}}{{$.CloneLink.SSH}}{{end}}" readonly>
+ <button class="ui basic button poping up clipboard" id="clipboard-btn" data-original="{{.i18n.Tr "repo.copy_link"}}" data-success="{{.i18n.Tr "repo.copy_link_success"}}" data-error="{{.i18n.Tr "repo.copy_link_error"}}" data-content="{{.i18n.Tr "repo.copy_link"}}" data-variation="inverted tiny" data-clipboard-target="#repo-clone-url">
+ <i class="octicon octicon-clippy"></i>
+ </button>
+ </div>
+ </div>
+ <div class="ui divider"></div>
- <div class="item">
- <h3>{{.i18n.Tr "repo.create_new_repo_command"}}</h3>
- <div class="markdown">
- <pre><code>touch README.md
+ <div class="item">
+ <h3>{{.i18n.Tr "repo.create_new_repo_command"}}</h3>
+ <div class="markdown">
+ <pre><code>touch README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin <span class="clone-url">{{if $.DisableSSH}}{{$.CloneLink.HTTPS}}{{else}}{{$.CloneLink.SSH}}{{end}}</span>
git push -u origin master</code></pre>
- </div>
- </div>
- <div class="ui divider"></div>
+ </div>
+ </div>
+ <div class="ui divider"></div>
- <div class="item">
- <h3>{{.i18n.Tr "repo.push_exist_repo"}}</h3>
- <div class="markdown">
- <pre><code>git remote add origin <span class="clone-url">{{if $.DisableSSH}}{{$.CloneLink.HTTPS}}{{else}}{{$.CloneLink.SSH}}{{end}}</span>
+ <div class="item">
+ <h3>{{.i18n.Tr "repo.push_exist_repo"}}</h3>
+ <div class="markdown">
+ <pre><code>git remote add origin <span class="clone-url">{{if $.DisableSSH}}{{$.CloneLink.HTTPS}}{{else}}{{$.CloneLink.SSH}}{{end}}</span>
git push -u origin master</code></pre>
- </div>
- </div>
- {{end}}
- </div>
- </div>
- </div>
- </div>
+ </div>
+ </div>
+ {{end}}
+ </div>
+ </div>
+ </div>
+ </div>
</div>
{{template "base/footer" .}}
diff --git a/templates/repo/commits.tmpl b/templates/repo/commits.tmpl
index 07762606fa..879f762dfa 100644
--- a/templates/repo/commits.tmpl
+++ b/templates/repo/commits.tmpl
@@ -1,8 +1,8 @@
{{template "base/head" .}}
<div class="repository commits">
- {{template "repo/header" .}}
- <div class="ui container">
- {{template "repo/commits_table" .}}
- </div>
+ {{template "repo/header" .}}
+ <div class="ui container">
+ {{template "repo/commits_table" .}}
+ </div>
</div>
{{template "base/footer" .}}
diff --git a/templates/repo/commits_table.tmpl b/templates/repo/commits_table.tmpl
index 8bab2be00f..4ca25e8e1e 100644
--- a/templates/repo/commits_table.tmpl
+++ b/templates/repo/commits_table.tmpl
@@ -1,70 +1,70 @@
<h4 class="ui top attached header">
- {{.CommitCount}} {{.i18n.Tr "repo.commits.commits"}} {{if .Branch}}({{.Branch}}){{end}}
- {{if .PageIsCommits}}
- <div class="ui right">
- <form action="{{.RepoLink}}/commits/{{.BranchName}}/search">
- <div class="ui tiny search input">
- <input name="q" placeholder="{{.i18n.Tr "repo.commits.search"}}" value="{{.Keyword}}" autofocus>
- </div>
- <button class="ui black tiny button" data-panel="#add-deploy-key-panel">{{.i18n.Tr "repo.commits.find"}}</button>
- </form>
- </div>
- {{else if .IsDiffCompare}}
- <a href="{{$.CommitRepoLink}}/commit/{{.BeforeCommitID}}" class="ui green sha label">{{ShortSha .BeforeCommitID}}</a> ... <a href="{{$.CommitRepoLink}}/commit/{{.AfterCommitID}}" class="ui green sha label">{{ShortSha .AfterCommitID}}</a>
- {{end}}
+ {{.CommitCount}} {{.i18n.Tr "repo.commits.commits"}} {{if .Branch}}({{.Branch}}){{end}}
+ {{if .PageIsCommits}}
+ <div class="ui right">
+ <form action="{{.RepoLink}}/commits/{{.BranchName}}/search">
+ <div class="ui tiny search input">
+ <input name="q" placeholder="{{.i18n.Tr "repo.commits.search"}}" value="{{.Keyword}}" autofocus>
+ </div>
+ <button class="ui black tiny button" data-panel="#add-deploy-key-panel">{{.i18n.Tr "repo.commits.find"}}</button>
+ </form>
+ </div>
+ {{else if .IsDiffCompare}}
+ <a href="{{$.CommitRepoLink}}/commit/{{.BeforeCommitID}}" class="ui green sha label">{{ShortSha .BeforeCommitID}}</a> ... <a href="{{$.CommitRepoLink}}/commit/{{.AfterCommitID}}" class="ui green sha label">{{ShortSha .AfterCommitID}}</a>
+ {{end}}
</h4>
{{if .Commits}}
-<div class="ui attached table segment">
- <table class="ui very basic striped fixed table single line" id="commits-table">
- <thead>
- <tr>
- <th class="four wide">{{.i18n.Tr "repo.commits.author"}}</th>
- <th class="nine wide message"><span class="sha">SHA1</span> {{.i18n.Tr "repo.commits.message"}}</th>
- <th class="three wide right aligned">{{.i18n.Tr "repo.commits.date"}}</th>
- </tr>
- </thead>
- <tbody>
- {{ $r:= List .Commits}}
- {{range $r}}
- <tr>
- <td class="author">
- {{if .User}}
- <img class="ui avatar image" src="{{.User.AvatarLink}}" alt=""/>&nbsp;&nbsp;<a href="{{AppSubUrl}}/{{.User.Name}}">{{.Author.Name}}</a>
- {{else}}
- <img class="ui avatar image" src="{{AvatarLink .Author.Email}}" alt=""/>&nbsp;&nbsp;{{.Author.Name}}
- {{end}}
- </td>
- <td class="message collapsing">
- <a rel="nofollow" class="ui sha label" href="{{AppSubUrl}}/{{$.Username}}/{{$.Reponame}}/commit/{{.ID}}">{{ShortSha .ID.String}}</a>
- {{RenderCommitMessage false .Summary $.RepoLink $.Repository.ComposeMetas}}
- </td>
- <td class="grey text right aligned">{{TimeSince .Author.When $.Lang}}</td>
- </tr>
- {{end}}
- </tbody>
- </table>
-</div>
+ <div class="ui attached table segment">
+ <table class="ui very basic striped fixed table single line" id="commits-table">
+ <thead>
+ <tr>
+ <th class="four wide">{{.i18n.Tr "repo.commits.author"}}</th>
+ <th class="nine wide message"><span class="sha">SHA1</span> {{.i18n.Tr "repo.commits.message"}}</th>
+ <th class="three wide right aligned">{{.i18n.Tr "repo.commits.date"}}</th>
+ </tr>
+ </thead>
+ <tbody>
+ {{ $r:= List .Commits}}
+ {{range $r}}
+ <tr>
+ <td class="author">
+ {{if .User}}
+ <img class="ui avatar image" src="{{.User.AvatarLink}}" alt=""/>&nbsp;&nbsp;<a href="{{AppSubUrl}}/{{.User.Name}}">{{.Author.Name}}</a>
+ {{else}}
+ <img class="ui avatar image" src="{{AvatarLink .Author.Email}}" alt=""/>&nbsp;&nbsp;{{.Author.Name}}
+ {{end}}
+ </td>
+ <td class="message collapsing">
+ <a rel="nofollow" class="ui sha label" href="{{AppSubUrl}}/{{$.Username}}/{{$.Reponame}}/commit/{{.ID}}">{{ShortSha .ID.String}}</a>
+ {{RenderCommitMessage false .Summary $.RepoLink $.Repository.ComposeMetas}}
+ </td>
+ <td class="grey text right aligned">{{TimeSince .Author.When $.Lang}}</td>
+ </tr>
+ {{end}}
+ </tbody>
+ </table>
+ </div>
{{end}}
{{with .Page}}
-{{if gt .TotalPages 1}}
-<div class="center page buttons">
- <div class="ui borderless pagination menu">
- <a class="{{if not .HasPrevious}}disabled{{end}} item" {{if .HasPrevious}}href="{{$.RepoLink}}/commits/{{$.BranchName}}{{if $.FileName}}/{{$.FileName}}{{end}}?page={{.Previous}}"{{end}}>
- <i class="left arrow icon"></i> {{$.i18n.Tr "repo.issues.previous"}}
- </a>
- {{range .Pages}}
- {{if eq .Num -1}}
- <a class="disabled item">...</a>
- {{else}}
- <a class="{{if .IsCurrent}}active{{end}} item" {{if not .IsCurrent}}href="{{$.RepoLink}}/commits/{{$.BranchName}}{{if $.FileName}}/{{$.FileName}}{{end}}?page={{.Num}}"{{end}}>{{.Num}}</a>
- {{end}}
- {{end}}
- <a class="{{if not .HasNext}}disabled{{end}} item" {{if .HasNext}}href="{{$.RepoLink}}/commits/{{$.BranchName}}{{if $.FileName}}/{{$.FileName}}{{end}}?page={{.Next}}"{{end}}>
- {{$.i18n.Tr "repo.issues.next"}} <i class="icon right arrow"></i>
- </a>
- </div>
-</div>
+ {{if gt .TotalPages 1}}
+ <div class="center page buttons">
+ <div class="ui borderless pagination menu">
+ <a class="{{if not .HasPrevious}}disabled{{end}} item" {{if .HasPrevious}}href="{{$.RepoLink}}/commits/{{$.BranchName}}{{if $.FileName}}/{{$.FileName}}{{end}}?page={{.Previous}}"{{end}}>
+ <i class="left arrow icon"></i> {{$.i18n.Tr "repo.issues.previous"}}
+ </a>
+ {{range .Pages}}
+ {{if eq .Num -1}}
+ <a class="disabled item">...</a>
+ {{else}}
+ <a class="{{if .IsCurrent}}active{{end}} item" {{if not .IsCurrent}}href="{{$.RepoLink}}/commits/{{$.BranchName}}{{if $.FileName}}/{{$.FileName}}{{end}}?page={{.Num}}"{{end}}>{{.Num}}</a>
+ {{end}}
+ {{end}}
+ <a class="{{if not .HasNext}}disabled{{end}} item" {{if .HasNext}}href="{{$.RepoLink}}/commits/{{$.BranchName}}{{if $.FileName}}/{{$.FileName}}{{end}}?page={{.Next}}"{{end}}>
+ {{$.i18n.Tr "repo.issues.next"}} <i class="icon right arrow"></i>
+ </a>
+ </div>
+ </div>
+ {{end}}
{{end}}
-{{end}} \ No newline at end of file
diff --git a/templates/repo/create.tmpl b/templates/repo/create.tmpl
index 07a9c0919d..8cd466f3d1 100644
--- a/templates/repo/create.tmpl
+++ b/templates/repo/create.tmpl
@@ -1,116 +1,116 @@
{{template "base/head" .}}
<div class="repository new repo">
- <div class="ui middle very relaxed page grid">
- <div class="column">
- <form class="ui form" action="{{.Link}}" method="post">
- {{.CsrfTokenHtml}}
- <h3 class="ui top attached header">
- {{.i18n.Tr "new_repo"}}
- </h3>
- <div class="ui attached segment">
- {{template "base/alert" .}}
- <div class="inline required field {{if .Err_Owner}}error{{end}}">
- <label>{{.i18n.Tr "repo.owner"}}</label>
- <div class="ui selection owner dropdown">
- <input type="hidden" id="uid" name="uid" value="{{.ContextUser.Id}}" required>
- <span class="text">
- <img class="ui mini image" src="{{.ContextUser.AvatarLink}}">
- {{.ContextUser.ShortName 20}}
- </span>
- <i class="dropdown icon"></i>
- <div class="menu">
- <div class="item" data-value="{{.SignedUser.Id}}">
- <img class="ui mini image" src="{{.SignedUser.AvatarLink}}">
- {{.SignedUser.ShortName 20}}
- </div>
- {{range .Orgs}}
- <div class="item" data-value="{{.Id}}">
- <img class="ui mini image" src="{{.AvatarLink}}">
- {{.ShortName 20}}
- </div>
- {{end}}
- </div>
- </div>
- </div>
+ <div class="ui middle very relaxed page grid">
+ <div class="column">
+ <form class="ui form" action="{{.Link}}" method="post">
+ {{.CsrfTokenHtml}}
+ <h3 class="ui top attached header">
+ {{.i18n.Tr "new_repo"}}
+ </h3>
+ <div class="ui attached segment">
+ {{template "base/alert" .}}
+ <div class="inline required field {{if .Err_Owner}}error{{end}}">
+ <label>{{.i18n.Tr "repo.owner"}}</label>
+ <div class="ui selection owner dropdown">
+ <input type="hidden" id="uid" name="uid" value="{{.ContextUser.Id}}" required>
+ <span class="text">
+ <img class="ui mini image" src="{{.ContextUser.AvatarLink}}">
+ {{.ContextUser.ShortName 20}}
+ </span>
+ <i class="dropdown icon"></i>
+ <div class="menu">
+ <div class="item" data-value="{{.SignedUser.Id}}">
+ <img class="ui mini image" src="{{.SignedUser.AvatarLink}}">
+ {{.SignedUser.ShortName 20}}
+ </div>
+ {{range .Orgs}}
+ <div class="item" data-value="{{.Id}}">
+ <img class="ui mini image" src="{{.AvatarLink}}">
+ {{.ShortName 20}}
+ </div>
+ {{end}}
+ </div>
+ </div>
+ </div>
- <div class="inline required field {{if .Err_RepoName}}error{{end}}">
- <label for="repo_name">{{.i18n.Tr "repo.repo_name"}}</label>
- <input id="repo_name" name="repo_name" value="{{.repo_name}}" autofocus required>
- <span class="help">{{.i18n.Tr "repo.repo_name_helper" | Safe}}</span>
- </div>
- <div class="inline field">
- <label>{{.i18n.Tr "repo.visibility"}}</label>
- <div class="ui checkbox">
- {{if .IsForcedPrivate}}
- <input name="private" type="checkbox" checked readonly>
- <label>{{.i18n.Tr "repo.visiblity_helper_forced" | Safe}}</label>
- {{else}}
- <input name="private" type="checkbox" {{if .private}}checked{{end}}>
- <label>{{.i18n.Tr "repo.visiblity_helper" | Safe}}</label>
- {{end}}
- </div>
- </div>
- <div class="inline field {{if .Err_Description}}error{{end}}">
- <label for="description">{{.i18n.Tr "repo.repo_desc"}}</label>
- <textarea id="description" name="description">{{.description}}</textarea>
- </div>
-
- <div class="ui divider"></div>
+ <div class="inline required field {{if .Err_RepoName}}error{{end}}">
+ <label for="repo_name">{{.i18n.Tr "repo.repo_name"}}</label>
+ <input id="repo_name" name="repo_name" value="{{.repo_name}}" autofocus required>
+ <span class="help">{{.i18n.Tr "repo.repo_name_helper" | Safe}}</span>
+ </div>
+ <div class="inline field">
+ <label>{{.i18n.Tr "repo.visibility"}}</label>
+ <div class="ui checkbox">
+ {{if .IsForcedPrivate}}
+ <input name="private" type="checkbox" checked readonly>
+ <label>{{.i18n.Tr "repo.visiblity_helper_forced" | Safe}}</label>
+ {{else}}
+ <input name="private" type="checkbox" {{if .private}}checked{{end}}>
+ <label>{{.i18n.Tr "repo.visiblity_helper" | Safe}}</label>
+ {{end}}
+ </div>
+ </div>
+ <div class="inline field {{if .Err_Description}}error{{end}}">
+ <label for="description">{{.i18n.Tr "repo.repo_desc"}}</label>
+ <textarea id="description" name="description">{{.description}}</textarea>
+ </div>
- <div class="inline field">
- <label>{{.i18n.Tr "repo.repo_lang"}}</label>
- <div class="ui multiple search normal selection dropdown">
- <input type="hidden" name="gitignores" value="{{.gitignores}}">
- <div class="default text">{{.i18n.Tr "repo.repo_lang_helper"}}</div>
- <div class="menu">
- {{range .Gitignores}}
- <div class="item" data-value="{{.}}">{{.}}</div>
- {{end}}
- </div>
- </div>
- </div>
- <div class="inline field">
- <label>{{.i18n.Tr "repo.license"}}</label>
- <div class="ui search selection dropdown">
- <input type="hidden" name="license" value="{{.license}}">
- <div class="default text">{{.i18n.Tr "repo.license_helper"}}</div>
- <div class="menu">
- {{range .Licenses}}
- <div class="item" data-value="{{.}}">{{.}}</div>
- {{end}}
- </div>
- </div>
- </div>
+ <div class="ui divider"></div>
- <div class="inline field">
- <label>{{.i18n.Tr "repo.readme"}} <a target="_blank" href="https://github.com/gogits/go-gogs-client/wiki/Repositories#litte-notes-on-readme-template"><span class="octicon octicon-question"></span></a></label>
- <div class="ui selection dropdown">
- <input type="hidden" name="readme" value="{{.readme}}">
- <div class="default text">{{.i18n.Tr "repo.readme_helper"}}</div>
- <div class="menu">
- {{range .Readmes}}
- <div class="item" data-value="{{.}}">{{.}}</div>
- {{end}}
- </div>
- </div>
- </div>
- <div class="inline field">
- <div class="ui checkbox" id="auto-init">
- <input class="hidden" name="auto_init" type="checkbox" tabindex="0" {{if .auto_init}}checked{{end}}>
- <label>{{.i18n.Tr "repo.auto_init"}}</label>
- </div>
- </div>
+ <div class="inline field">
+ <label>{{.i18n.Tr "repo.repo_lang"}}</label>
+ <div class="ui multiple search normal selection dropdown">
+ <input type="hidden" name="gitignores" value="{{.gitignores}}">
+ <div class="default text">{{.i18n.Tr "repo.repo_lang_helper"}}</div>
+ <div class="menu">
+ {{range .Gitignores}}
+ <div class="item" data-value="{{.}}">{{.}}</div>
+ {{end}}
+ </div>
+ </div>
+ </div>
+ <div class="inline field">
+ <label>{{.i18n.Tr "repo.license"}}</label>
+ <div class="ui search selection dropdown">
+ <input type="hidden" name="license" value="{{.license}}">
+ <div class="default text">{{.i18n.Tr "repo.license_helper"}}</div>
+ <div class="menu">
+ {{range .Licenses}}
+ <div class="item" data-value="{{.}}">{{.}}</div>
+ {{end}}
+ </div>
+ </div>
+ </div>
- <div class="inline field">
- <label></label>
- <button class="ui green button">
- {{.i18n.Tr "repo.create_repo"}}
- </button>
- <a class="ui button" href="{{AppSubUrl}}/">{{.i18n.Tr "cancel"}}</a>
- </div>
- </div>
- </form>
- </div>
- </div>
+ <div class="inline field">
+ <label>{{.i18n.Tr "repo.readme"}} <a target="_blank" href="https://github.com/gogits/go-gogs-client/wiki/Repositories#litte-notes-on-readme-template"><span class="octicon octicon-question"></span></a></label>
+ <div class="ui selection dropdown">
+ <input type="hidden" name="readme" value="{{.readme}}">
+ <div class="default text">{{.i18n.Tr "repo.readme_helper"}}</div>
+ <div class="menu">
+ {{range .Readmes}}
+ <div class="item" data-value="{{.}}">{{.}}</div>
+ {{end}}
+ </div>
+ </div>
+ </div>
+ <div class="inline field">
+ <div class="ui checkbox" id="auto-init">
+ <input class="hidden" name="auto_init" type="checkbox" tabindex="0" {{if .auto_init}}checked{{end}}>
+ <label>{{.i18n.Tr "repo.auto_init"}}</label>
+ </div>
+ </div>
+
+ <div class="inline field">
+ <label></label>
+ <button class="ui green button">
+ {{.i18n.Tr "repo.create_repo"}}
+ </button>
+ <a class="ui button" href="{{AppSubUrl}}/">{{.i18n.Tr "cancel"}}</a>
+ </div>
+ </div>
+ </form>
+ </div>
+ </div>
</div>
-{{template "base/footer" .}} \ No newline at end of file
+{{template "base/footer" .}}
diff --git a/templates/repo/diff.tmpl b/templates/repo/diff.tmpl
index 18de976ebc..544e3b6030 100644
--- a/templates/repo/diff.tmpl
+++ b/templates/repo/diff.tmpl
@@ -1,45 +1,45 @@
{{template "base/head" .}}
<div class="repository diff">
- {{template "repo/header" .}}
- <div class="ui container">
- {{if .IsDiffCompare }}
- {{template "repo/commits_table" .}}
- {{else}}
- <div class="ui top attached info clearing segment">
- <a class="ui floated right blue tiny button" href="{{EscapePound .SourcePath}}">
- {{.i18n.Tr "repo.diff.browse_source"}}
- </a>
- {{RenderCommitMessage true .Commit.Message $.RepoLink $.Repository.ComposeMetas}}
- </div>
- <div class="ui attached info segment">
- {{if .Author}}
- <img class="ui avatar image" src="{{.Author.AvatarLink}}" />
- <a href="{{.Author.HomeLink}}"><strong>{{.Commit.Author.Name}}</strong></a>
- {{else}}
- <img class="ui avatar image" src="{{AvatarLink .Commit.Author.Email}}" />
- <strong>{{.Commit.Author.Name}}</strong>
- {{end}}
- <span class="text grey" id="authored-time">{{TimeSince .Commit.Author.When $.Lang}}</span>
- <div class="ui right">
- <div class="ui horizontal list">
- {{if .Parents}}
- <div class="item">
- {{.i18n.Tr "repo.diff.parent"}}
- </div>
- <div class="item">
- {{range .Parents}}
- <a class="ui blue sha label" href="{{$.RepoLink}}/commit/{{.}}">{{ShortSha .}}</a>
- {{end}}
- </div>
- {{end}}
- <div class="item">{{.i18n.Tr "repo.diff.commit"}}</div>
- <div class="item"><span class="ui blue sha label">{{ShortSha .CommitID}}</span></div>
- </div>
- </div>
- </div>
- {{end}}
-
- {{template "repo/diff_box" .}}
- </div>
+ {{template "repo/header" .}}
+ <div class="ui container">
+ {{if .IsDiffCompare }}
+ {{template "repo/commits_table" .}}
+ {{else}}
+ <div class="ui top attached info clearing segment">
+ <a class="ui floated right blue tiny button" href="{{EscapePound .SourcePath}}">
+ {{.i18n.Tr "repo.diff.browse_source"}}
+ </a>
+ {{RenderCommitMessage true .Commit.Message $.RepoLink $.Repository.ComposeMetas}}
+ </div>
+ <div class="ui attached info segment">
+ {{if .Author}}
+ <img class="ui avatar image" src="{{.Author.AvatarLink}}" />
+ <a href="{{.Author.HomeLink}}"><strong>{{.Commit.Author.Name}}</strong></a>
+ {{else}}
+ <img class="ui avatar image" src="{{AvatarLink .Commit.Author.Email}}" />
+ <strong>{{.Commit.Author.Name}}</strong>
+ {{end}}
+ <span class="text grey" id="authored-time">{{TimeSince .Commit.Author.When $.Lang}}</span>
+ <div class="ui right">
+ <div class="ui horizontal list">
+ {{if .Parents}}
+ <div class="item">
+ {{.i18n.Tr "repo.diff.parent"}}
+ </div>
+ <div class="item">
+ {{range .Parents}}
+ <a class="ui blue sha label" href="{{$.RepoLink}}/commit/{{.}}">{{ShortSha .}}</a>
+ {{end}}
+ </div>
+ {{end}}
+ <div class="item">{{.i18n.Tr "repo.diff.commit"}}</div>
+ <div class="item"><span class="ui blue sha label">{{ShortSha .CommitID}}</span></div>
+ </div>
+ </div>
+ </div>
+ {{end}}
+
+ {{template "repo/diff_box" .}}
+ </div>
</div>
{{template "base/footer" .}}
diff --git a/templates/repo/diff_box.tmpl b/templates/repo/diff_box.tmpl
index a1d106b7f2..c0b106aff9 100644
--- a/templates/repo/diff_box.tmpl
+++ b/templates/repo/diff_box.tmpl
@@ -1,94 +1,94 @@
{{if .DiffNotAvailable}}
-<h4>{{.i18n.Tr "repo.diff.data_not_available"}}</h4>
+ <h4>{{.i18n.Tr "repo.diff.data_not_available"}}</h4>
{{else}}
-<div class="diff-detail-box diff-box">
- <div>
- <i class="fa fa-retweet"></i>
- {{.i18n.Tr "repo.diff.stats_desc" .Diff.NumFiles .Diff.TotalAddition .Diff.TotalDeletion | Str2html}}
- <div class="ui right">
- <a class="ui tiny basic black toggle button" data-target="#diff-files">{{.i18n.Tr "repo.diff.show_diff_stats"}}</a>
- </div>
- </div>
- <ol class="detail-files hide" id="diff-files">
- {{range .Diff.Files}}
- <li>
- <div class="diff-counter count pull-right">
- {{if not .IsBin}}
- <span class="add" data-line="{{.Addition}}">{{.Addition}}</span>
- <span class="bar">
- <span class="pull-left add"></span>
- <span class="pull-left del"></span>
- </span>
- <span class="del" data-line="{{.Deletion}}">{{.Deletion}}</span>
- {{else}}
- <span>{{$.i18n.Tr "repo.diff.bin"}}</span>
- {{end}}
- </div>
- <!-- todo finish all file status, now modify, add, delete and rename -->
- <span class="status {{DiffTypeToStr .Type}} poping up" data-content="{{DiffTypeToStr .Type}}" data-variation="inverted tiny" data-position="right center">&nbsp;</span>
- <a class="file" href="#diff-{{.Index}}">{{.Name}}</a>
- </li>
- {{end}}
- </ol>
-</div>
+ <div class="diff-detail-box diff-box">
+ <div>
+ <i class="fa fa-retweet"></i>
+ {{.i18n.Tr "repo.diff.stats_desc" .Diff.NumFiles .Diff.TotalAddition .Diff.TotalDeletion | Str2html}}
+ <div class="ui right">
+ <a class="ui tiny basic black toggle button" data-target="#diff-files">{{.i18n.Tr "repo.diff.show_diff_stats"}}</a>
+ </div>
+ </div>
+ <ol class="detail-files hide" id="diff-files">
+ {{range .Diff.Files}}
+ <li>
+ <div class="diff-counter count pull-right">
+ {{if not .IsBin}}
+ <span class="add" data-line="{{.Addition}}">{{.Addition}}</span>
+ <span class="bar">
+ <span class="pull-left add"></span>
+ <span class="pull-left del"></span>
+ </span>
+ <span class="del" data-line="{{.Deletion}}">{{.Deletion}}</span>
+ {{else}}
+ <span>{{$.i18n.Tr "repo.diff.bin"}}</span>
+ {{end}}
+ </div>
+ <!-- todo finish all file status, now modify, add, delete and rename -->
+ <span class="status {{DiffTypeToStr .Type}} poping up" data-content="{{DiffTypeToStr .Type}}" data-variation="inverted tiny" data-position="right center">&nbsp;</span>
+ <a class="file" href="#diff-{{.Index}}">{{.Name}}</a>
+ </li>
+ {{end}}
+ </ol>
+ </div>
-{{range $i, $file := .Diff.Files}}
-<div class="diff-file-box diff-box file-content" id="diff-{{.Index}}">
- <h4 class="ui top attached normal header">
- <div class="diff-counter count ui left">
- {{if $file.IsBin}}
- {{$.i18n.Tr "repo.diff.bin"}}
- {{else if not $file.IsRenamed}}
- <span class="add" data-line="{{.Addition}}">+ {{.Addition}}</span>
- <span class="bar">
- <span class="pull-left add"></span>
- <span class="pull-left del"></span>
- </span>
- <span class="del" data-line="{{.Deletion}}">- {{.Deletion}}</span>
- {{end}}
- </div>
- <span class="file">{{if $file.IsRenamed}}{{$file.OldName}} &rarr; {{end}}{{$file.Name}}</span>
- <div class="ui right">
- {{if $file.IsDeleted}}
- <a class="ui basic tiny button" rel="nofollow" href="{{EscapePound $.BeforeSourcePath}}/{{EscapePound .Name}}">{{$.i18n.Tr "repo.diff.view_file"}}</a>
- {{else}}
- <a class="ui basic tiny button" rel="nofollow" href="{{EscapePound $.SourcePath}}/{{EscapePound .Name}}">{{$.i18n.Tr "repo.diff.view_file"}}</a>
- {{end}}
- </div>
- </h4>
- <div class="ui attached table segment">
- {{if not $file.IsRenamed}}
- {{$isImage := (call $.IsImageFile $file.Name)}}
- {{if and $isImage}}
- <div class="center">
- <img src="{{$.RawPath}}/{{EscapePound .Name}}">
- </div>
- {{else}}
- <div class="file-body file-code code-view code-diff">
- <table>
- <tbody>
- {{range .Sections}}
- {{range $k, $line := .Lines}}
- <tr class="{{DiffLineTypeToStr .Type}}-code nl-{{$k}} ol-{{$k}}">
- <td class="lines-num lines-num-old">
- <span rel="{{if $line.LeftIdx}}diff-{{Sha1 $file.Name}}L{{$line.LeftIdx}}{{end}}">{{if $line.LeftIdx}}{{$line.LeftIdx}}{{end}}</span>
- </td>
- <td class="lines-num lines-num-new">
- <span rel="{{if $line.RightIdx}}diff-{{Sha1 $file.Name}}R{{$line.RightIdx}}{{end}}">{{if $line.RightIdx}}{{$line.RightIdx}}{{end}}</span>
- </td>
- <td class="lines-code">
- <pre>{{$line.Content}}</pre>
- </td>
- </tr>
- {{end}}
- {{end}}
- </tbody>
- </table>
- </div>
- {{end}}
- {{end}}
- </div>
-</div>
-<br>
+ {{range $i, $file := .Diff.Files}}
+ <div class="diff-file-box diff-box file-content" id="diff-{{.Index}}">
+ <h4 class="ui top attached normal header">
+ <div class="diff-counter count ui left">
+ {{if $file.IsBin}}
+ {{$.i18n.Tr "repo.diff.bin"}}
+ {{else if not $file.IsRenamed}}
+ <span class="add" data-line="{{.Addition}}">+ {{.Addition}}</span>
+ <span class="bar">
+ <span class="pull-left add"></span>
+ <span class="pull-left del"></span>
+ </span>
+ <span class="del" data-line="{{.Deletion}}">- {{.Deletion}}</span>
+ {{end}}
+ </div>
+ <span class="file">{{if $file.IsRenamed}}{{$file.OldName}} &rarr; {{end}}{{$file.Name}}</span>
+ <div class="ui right">
+ {{if $file.IsDeleted}}
+ <a class="ui basic tiny button" rel="nofollow" href="{{EscapePound $.BeforeSourcePath}}/{{EscapePound .Name}}">{{$.i18n.Tr "repo.diff.view_file"}}</a>
+ {{else}}
+ <a class="ui basic tiny button" rel="nofollow" href="{{EscapePound $.SourcePath}}/{{EscapePound .Name}}">{{$.i18n.Tr "repo.diff.view_file"}}</a>
+ {{end}}
+ </div>
+ </h4>
+ <div class="ui attached table segment">
+ {{if not $file.IsRenamed}}
+ {{$isImage := (call $.IsImageFile $file.Name)}}
+ {{if and $isImage}}
+ <div class="center">
+ <img src="{{$.RawPath}}/{{EscapePound .Name}}">
+ </div>
+ {{else}}
+ <div class="file-body file-code code-view code-diff">
+ <table>
+ <tbody>
+ {{range .Sections}}
+ {{range $k, $line := .Lines}}
+ <tr class="{{DiffLineTypeToStr .Type}}-code nl-{{$k}} ol-{{$k}}">
+ <td class="lines-num lines-num-old">
+ <span rel="{{if $line.LeftIdx}}diff-{{Sha1 $file.Name}}L{{$line.LeftIdx}}{{end}}">{{if $line.LeftIdx}}{{$line.LeftIdx}}{{end}}</span>
+ </td>
+ <td class="lines-num lines-num-new">
+ <span rel="{{if $line.RightIdx}}diff-{{Sha1 $file.Name}}R{{$line.RightIdx}}{{end}}">{{if $line.RightIdx}}{{$line.RightIdx}}{{end}}</span>
+ </td>
+ <td class="lines-code">
+ <pre>{{$line.Content}}</pre>
+ </td>
+ </tr>
+ {{end}}
+ {{end}}
+ </tbody>
+ </table>
+ </div>
+ {{end}}
+ {{end}}
+ </div>
+ </div>
+ <br>
+ {{end}}
{{end}}
-{{end}} \ No newline at end of file
diff --git a/templates/repo/forks.tmpl b/templates/repo/forks.tmpl
index 91085b9d22..e8b57e1af3 100644
--- a/templates/repo/forks.tmpl
+++ b/templates/repo/forks.tmpl
@@ -1,22 +1,22 @@
{{template "base/head" .}}
<div class="repository forks">
- {{template "repo/header" .}}
- <div class="ui container">
- <h2 class="ui dividing header">
- {{.i18n.Tr "repo.forks"}}
- </h2>
- <div class="ui list">
- {{range .Forks}}
- <div class="item">
- <img class="ui avatar image" src="{{.Owner.AvatarLink}}">
- <div class="link">
- <a href="{{AppSubUrl}}/{{.Owner.Name}}">{{.Owner.Name}}</a>
- /
- <a href="{{AppSubUrl}}/{{.Owner.Name}}/{{.Name}}">{{.Name}}</a>
- </div>
- </div>
- {{end}}
- </div>
- </div>
+ {{template "repo/header" .}}
+ <div class="ui container">
+ <h2 class="ui dividing header">
+ {{.i18n.Tr "repo.forks"}}
+ </h2>
+ <div class="ui list">
+ {{range .Forks}}
+ <div class="item">
+ <img class="ui avatar image" src="{{.Owner.AvatarLink}}">
+ <div class="link">
+ <a href="{{AppSubUrl}}/{{.Owner.Name}}">{{.Owner.Name}}</a>
+ /
+ <a href="{{AppSubUrl}}/{{.Owner.Name}}/{{.Name}}">{{.Name}}</a>
+ </div>
+ </div>
+ {{end}}
+ </div>
+ </div>
</div>
{{template "base/footer" .}}
diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl
index fb25b94bf0..74448ced04 100644
--- a/templates/repo/header.tmpl
+++ b/templates/repo/header.tmpl
@@ -1,87 +1,87 @@
{{with .Repository}}
-<div class="ui container"><!-- start container -->
- <div class="ui vertically padded grid head"><!-- start grid -->
- <div class="column"><!-- start column -->
- <div class="ui header">
- <div class="ui huge breadcrumb">
- <i class="mega-octicon octicon-{{if .IsPrivate}}lock{{else if .IsMirror}}repo-clone{{else if .IsFork}}repo-forked{{else}}repo{{end}}"></i>
- <a href="{{AppSubUrl}}/{{.Owner.Name}}">{{.Owner.Name}}</a>
- <div class="divider"> / </div>
- <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="{{.BaseRepo.RepoLink}}">{{SubStr .BaseRepo.RepoLink 1 -1}}</a></div>{{end}}
- </div>
+ <div class="ui container"><!-- start container -->
+ <div class="ui vertically padded grid head"><!-- start grid -->
+ <div class="column"><!-- start column -->
+ <div class="ui header">
+ <div class="ui huge breadcrumb">
+ <i class="mega-octicon octicon-{{if .IsPrivate}}lock{{else if .IsMirror}}repo-clone{{else if .IsFork}}repo-forked{{else}}repo{{end}}"></i>
+ <a href="{{AppSubUrl}}/{{.Owner.Name}}">{{.Owner.Name}}</a>
+ <div class="divider"> / </div>
+ <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="{{.BaseRepo.RepoLink}}">{{SubStr .BaseRepo.RepoLink 1 -1}}</a></div>{{end}}
+ </div>
- <div class="ui right">
- <div class="ui labeled button" tabindex="0">
- <a class="ui button" href="{{$.RepoLink}}/action/{{if $.IsWatchingRepo}}un{{end}}watch?redirect_to={{$.Link}}">
- <i class="icon fa fa-eye{{if not $.IsWatchingRepo}}-slash{{end}}"></i>{{if $.IsWatchingRepo}}{{$.i18n.Tr "repo.unwatch"}}{{else}}{{$.i18n.Tr "repo.watch"}}{{end}}
- </a>
- <a class="ui basic label" href="{{.RepoLink}}/watchers">
- {{.NumWatches}}
- </a>
- </div>
- <div class="ui labeled button" tabindex="0">
- <a class="ui button" href="{{$.RepoLink}}/action/{{if $.IsStaringRepo}}un{{end}}star?redirect_to={{$.Link}}">
- <i class="icon fa-star{{if not $.IsStaringRepo}}-o{{end}}"></i>{{if $.IsStaringRepo}}{{$.i18n.Tr "repo.unstar"}}{{else}}{{$.i18n.Tr "repo.star"}}{{end}}
- </a>
- <a class="ui basic label" href="{{.RepoLink}}/stars">
- {{.NumStars}}
- </a>
- </div>
- {{if .CanBeForked}}
- <div class="ui labeled button" tabindex="0">
- <a class="ui button {{if eq .OwnerID $.SignedUserID}}poping up{{end}}" {{if not (eq .OwnerID $.SignedUserID)}}href="{{AppSubUrl}}/repo/fork/{{.ID}}"{{else}} data-content="{{$.i18n.Tr "repo.fork_from_self"}}" data-position="top center" data-variation="tiny"{{end}}>
- <i class="icon octicon octicon-repo-forked"></i>{{$.i18n.Tr "repo.fork"}}
- </a>
- <a class="ui basic label" href="{{.RepoLink}}/forks">
- {{.NumForks}}
- </a>
- </div>
- {{end}}
- </div>
- </div>
- </div><!-- end column -->
- </div><!-- end grid -->
-</div><!-- end container -->
+ <div class="ui right">
+ <div class="ui labeled button" tabindex="0">
+ <a class="ui button" href="{{$.RepoLink}}/action/{{if $.IsWatchingRepo}}un{{end}}watch?redirect_to={{$.Link}}">
+ <i class="icon fa fa-eye{{if not $.IsWatchingRepo}}-slash{{end}}"></i>{{if $.IsWatchingRepo}}{{$.i18n.Tr "repo.unwatch"}}{{else}}{{$.i18n.Tr "repo.watch"}}{{end}}
+ </a>
+ <a class="ui basic label" href="{{.RepoLink}}/watchers">
+ {{.NumWatches}}
+ </a>
+ </div>
+ <div class="ui labeled button" tabindex="0">
+ <a class="ui button" href="{{$.RepoLink}}/action/{{if $.IsStaringRepo}}un{{end}}star?redirect_to={{$.Link}}">
+ <i class="icon fa-star{{if not $.IsStaringRepo}}-o{{end}}"></i>{{if $.IsStaringRepo}}{{$.i18n.Tr "repo.unstar"}}{{else}}{{$.i18n.Tr "repo.star"}}{{end}}
+ </a>
+ <a class="ui basic label" href="{{.RepoLink}}/stars">
+ {{.NumStars}}
+ </a>
+ </div>
+ {{if .CanBeForked}}
+ <div class="ui labeled button" tabindex="0">
+ <a class="ui button {{if eq .OwnerID $.SignedUserID}}poping up{{end}}" {{if not (eq .OwnerID $.SignedUserID)}}href="{{AppSubUrl}}/repo/fork/{{.ID}}"{{else}} data-content="{{$.i18n.Tr "repo.fork_from_self"}}" data-position="top center" data-variation="tiny"{{end}}>
+ <i class="icon octicon octicon-repo-forked"></i>{{$.i18n.Tr "repo.fork"}}
+ </a>
+ <a class="ui basic label" href="{{.RepoLink}}/forks">
+ {{.NumForks}}
+ </a>
+ </div>
+ {{end}}
+ </div>
+ </div>
+ </div><!-- end column -->
+ </div><!-- end grid -->
+ </div><!-- end container -->
{{end}}
{{if not (or .IsBareRepo .IsDiffCompare)}}
-<div class="ui tabs container">
- <div class="ui tabular menu navbar">
- <a class="{{if .PageIsViewCode}}active{{end}} item" href="{{.RepoLink}}">
- <i class="icon octicon octicon-code"></i> {{.i18n.Tr "repo.code"}}
- </a>
- {{if .Repository.EnableIssues}}
- <a class="{{if .PageIsIssueList}}active{{end}} item" href="{{.RepoLink}}/issues">
- <i class="icon octicon octicon-issue-opened"></i> {{.i18n.Tr "repo.issues"}} <span class="ui {{if not .Repository.NumOpenIssues}}gray{{else}}blue{{end}} small label">{{.Repository.NumOpenIssues}}</span>
- </a>
- {{end}}
- {{if .Repository.EnablePulls}}
- <a class="{{if .PageIsPullList}}active{{end}} item" href="{{.RepoLink}}/pulls">
- <i class="icon octicon octicon-git-pull-request"></i> {{.i18n.Tr "repo.pulls"}} <span class="ui {{if not .Repository.NumOpenPulls}}gray{{else}}blue{{end}} small label">{{.Repository.NumOpenPulls}}</span>
- </a>
- {{end}}
- <a class="{{if .PageIsCommits}}active{{end}} item" href="{{.RepoLink}}/commits/{{EscapePound .BranchName}}">
- <i class="icon octicon octicon-history"></i> {{.i18n.Tr "repo.commits"}} <span class="ui {{if not .CommitsCount}}gray{{else}}blue{{end}} small label">{{.CommitsCount}}</span>
- </a>
- <a class="{{if .PageIsReleaseList}}active{{end}} item" href="{{.RepoLink}}/releases">
- <i class="icon octicon octicon-tag"></i> {{.i18n.Tr "repo.releases"}} <span class="ui {{if not .Repository.NumTags}}gray{{else}}blue{{end}} small label">{{.Repository.NumTags}}</span>
- </a>
- {{if .Repository.EnableWiki}}
- <a class="{{if .PageIsWiki}}active{{end}} item" href="{{.RepoLink}}/wiki">
- <i class="icon octicon octicon-book"></i> {{.i18n.Tr "repo.wiki"}}
- </a>
- {{end}}
- {{if .IsRepositoryAdmin}}
- <div class="right menu">
- <a class="{{if .PageIsSettings}}active{{end}} item" href="{{.RepoLink}}/settings">
- <i class="icon octicon octicon-tools"></i> {{.i18n.Tr "repo.settings"}}
- </a>
- </div>
- {{end}}
- </div>
-</div>
-<div class="ui tabs divider"></div>
+ <div class="ui tabs container">
+ <div class="ui tabular menu navbar">
+ <a class="{{if .PageIsViewCode}}active{{end}} item" href="{{.RepoLink}}">
+ <i class="icon octicon octicon-code"></i> {{.i18n.Tr "repo.code"}}
+ </a>
+ {{if .Repository.EnableIssues}}
+ <a class="{{if .PageIsIssueList}}active{{end}} item" href="{{.RepoLink}}/issues">
+ <i class="icon octicon octicon-issue-opened"></i> {{.i18n.Tr "repo.issues"}} <span class="ui {{if not .Repository.NumOpenIssues}}gray{{else}}blue{{end}} small label">{{.Repository.NumOpenIssues}}</span>
+ </a>
+ {{end}}
+ {{if .Repository.EnablePulls}}
+ <a class="{{if .PageIsPullList}}active{{end}} item" href="{{.RepoLink}}/pulls">
+ <i class="icon octicon octicon-git-pull-request"></i> {{.i18n.Tr "repo.pulls"}} <span class="ui {{if not .Repository.NumOpenPulls}}gray{{else}}blue{{end}} small label">{{.Repository.NumOpenPulls}}</span>
+ </a>
+ {{end}}
+ <a class="{{if .PageIsCommits}}active{{end}} item" href="{{.RepoLink}}/commits/{{EscapePound .BranchName}}">
+ <i class="icon octicon octicon-history"></i> {{.i18n.Tr "repo.commits"}} <span class="ui {{if not .CommitsCount}}gray{{else}}blue{{end}} small label">{{.CommitsCount}}</span>
+ </a>
+ <a class="{{if .PageIsReleaseList}}active{{end}} item" href="{{.RepoLink}}/releases">
+ <i class="icon octicon octicon-tag"></i> {{.i18n.Tr "repo.releases"}} <span class="ui {{if not .Repository.NumTags}}gray{{else}}blue{{end}} small label">{{.Repository.NumTags}}</span>
+ </a>
+ {{if .Repository.EnableWiki}}
+ <a class="{{if .PageIsWiki}}active{{end}} item" href="{{.RepoLink}}/wiki">
+ <i class="icon octicon octicon-book"></i> {{.i18n.Tr "repo.wiki"}}
+ </a>
+ {{end}}
+ {{if .IsRepositoryAdmin}}
+ <div class="right menu">
+ <a class="{{if .PageIsSettings}}active{{end}} item" href="{{.RepoLink}}/settings">
+ <i class="icon octicon octicon-tools"></i> {{.i18n.Tr "repo.settings"}}
+ </a>
+ </div>
+ {{end}}
+ </div>
+ </div>
+ <div class="ui tabs divider"></div>
{{else}}
-<div class="ui divider"></div>
+ <div class="ui divider"></div>
{{end}}
diff --git a/templates/repo/home.tmpl b/templates/repo/home.tmpl
index 6a3d0f1295..12820e46b3 100644
--- a/templates/repo/home.tmpl
+++ b/templates/repo/home.tmpl
@@ -1,111 +1,111 @@
{{template "base/head" .}}
<div class="repository file list">
- {{template "repo/header" .}}
- <div class="ui container">
- <p id="repo-desc">
- {{if .Repository.DescriptionHtml}}<span class="description">{{.Repository.DescriptionHtml}}</span>{{else}}<span class="no-description text-italic">{{.i18n.Tr "repo.no_desc"}}</span>{{end}}
- <a class="link" href="{{.Repository.Website}}">{{.Repository.Website}}</a>
- </p>
- <div class="ui secondary menu">
- {{if .CanPullRequest}}
- <div class="fitted item">
- {{ $baseRepo := .Repository.BaseRepo}}
- <a href="{{AppSubUrl}}/{{$baseRepo.Owner.Name}}/{{$baseRepo.Name}}/compare/{{$.BaseDefaultBranch}}...{{$.Owner.Name}}:{{$.BranchName}}">
- <button class="ui green small button"><i class="octicon octicon-git-compare"></i></button>
- </a>
- </div>
- {{end}}
- <div class="fitted item choose reference">
- <div class="ui floating filter dropdown" data-no-results="{{.i18n.Tr "repo.pulls.no_results"}}">
- <div class="ui basic small button">
- <span class="text">
- <i class="octicon octicon-git-branch"></i>
- {{if .IsViewBranch}}{{.i18n.Tr "repo.branch"}}{{else}}{{.i18n.Tr "repo.tree"}}{{end}}:
- <strong>{{if .IsViewBranch}}{{.BranchName}}{{else}}{{ShortSha .BranchName}}{{end}}</strong>
- </span>
- <i class="dropdown icon"></i>
- </div>
- <div class="menu">
- <div class="ui icon search input">
- <i class="filter icon"></i>
- <input name="search" placeholder="{{.i18n.Tr "repo.filter_branch_and_tag"}}...">
- </div>
- <div class="header">
- <div class="ui grid">
- <div class="two column row">
- <a class="reference column" href="#" data-target="#branch-list">
- <span class="text {{if .IsViewBranch}}black{{end}}">
- <i class="icon octicon octicon-git-branch"></i> {{.i18n.Tr "repo.branches"}}
- </span>
- </a>
- <a class="reference column" href="#" data-target="#tag-list">
- <span class="text {{if .IsTag}}black{{end}}">
- <i class="reference tags icon"></i> {{.i18n.Tr "repo.tags"}}
- </span>
- </a>
- </div>
- </div>
- </div>
- <div id="branch-list" class="scrolling menu" {{if .IsTag}}style="display: none"{{end}}>
- {{range .Branches}}
- <div class="item {{if eq $.BranchName .}}selected{{end}}" data-url="{{$.RepoLink}}/src/{{EscapePound .}}">{{.}}</div>
- {{end}}
- </div>
- <div id="tag-list" class="scrolling menu" {{if .IsViewBranch}}style="display: none"{{end}}>
- {{range .Tags}}
- <div class="item {{if eq $.BranchName .}}selected{{end}}" data-url="{{$.RepoLink}}/src/{{EscapePound .}}">{{.}}</div>
- {{end}}
- </div>
- </div>
- </div>
- </div>
- <div class="item fitted">
- <div class="ui breadcrumb">
- <a class="section" href="{{.RepoLink}}/src/{{EscapePound .BranchName}}">{{.Repository.Name}}</a>
- {{ $n := len .Treenames}}
- {{ $l := Subtract $n 1}}
- {{range $i, $v := .Treenames}}
- <div class="divider"> / </div>
- {{if eq $i $l}}
- <span class="active section">{{$v}}</span>
- {{else}}
- {{ $p := index $.Paths $i}}
- <span class="section"><a href="{{EscapePound $.BranchLink}}/{{EscapePound $p}}">{{$v}}</a></span>
- {{end}}
- {{end}}
- </div>
- </div>
- {{if eq $n 0}}
- <div class="right fitted item">
- <div class="ui action small input" id="clone-panel">
- {{if not $.DisableSSH}}
- <button class="ui blue basic clone button" id="repo-clone-ssh" data-link="{{.CloneLink.SSH}}">
- SSH
- </button>
- {{end}}
- <button class="ui {{if $.DisableSSH}}blue{{end}} basic clone button" id="repo-clone-https" data-link="{{.CloneLink.HTTPS}}">
- {{if UseHTTPS}}HTTPS{{else}}HTTP{{end}}
- </button>
- <input id="repo-clone-url" value="{{if $.DisableSSH}}{{$.CloneLink.HTTPS}}{{else}}{{$.CloneLink.SSH}}{{end}}" readonly>
- <button class="ui basic icon button poping up clipboard" id="clipboard-btn" data-original="{{.i18n.Tr "repo.copy_link"}}" data-success="{{.i18n.Tr "repo.copy_link_success"}}" data-error="{{.i18n.Tr "repo.copy_link_error"}}" data-content="{{.i18n.Tr "repo.copy_link"}}" data-variation="inverted tiny" data-clipboard-target="#repo-clone-url">
- <i class="octicon octicon-clippy"></i>
- </button>
- <div class="ui basic jump dropdown icon button">
- <i class="download icon"></i>
- <div class="menu">
- <a class="item" href="{{$.RepoLink}}/archive/{{EscapePound $.BranchName}}.zip"><i class="icon octicon octicon-file-zip"></i> ZIP</a>
- <a class="item" href="{{$.RepoLink}}/archive/{{EscapePound $.BranchName}}.tar.gz"><i class="icon octicon octicon-file-zip"></i> TAR.GZ</a>
- </div>
- </div>
- </div>
- </div>
- {{end}}
- </div>
- {{if .IsFile}}
- {{template "repo/view_file" .}}
- {{else}}
- {{template "repo/view_list" .}}
- {{end}}
- </div>
+ {{template "repo/header" .}}
+ <div class="ui container">
+ <p id="repo-desc">
+ {{if .Repository.DescriptionHtml}}<span class="description">{{.Repository.DescriptionHtml}}</span>{{else}}<span class="no-description text-italic">{{.i18n.Tr "repo.no_desc"}}</span>{{end}}
+ <a class="link" href="{{.Repository.Website}}">{{.Repository.Website}}</a>
+ </p>
+ <div class="ui secondary menu">
+ {{if .CanPullRequest}}
+ <div class="fitted item">
+ {{ $baseRepo := .Repository.BaseRepo}}
+ <a href="{{AppSubUrl}}/{{$baseRepo.Owner.Name}}/{{$baseRepo.Name}}/compare/{{$.BaseDefaultBranch}}...{{$.Owner.Name}}:{{$.BranchName}}">
+ <button class="ui green small button"><i class="octicon octicon-git-compare"></i></button>
+ </a>
+ </div>
+ {{end}}
+ <div class="fitted item choose reference">
+ <div class="ui floating filter dropdown" data-no-results="{{.i18n.Tr "repo.pulls.no_results"}}">
+ <div class="ui basic small button">
+ <span class="text">
+ <i class="octicon octicon-git-branch"></i>
+ {{if .IsViewBranch}}{{.i18n.Tr "repo.branch"}}{{else}}{{.i18n.Tr "repo.tree"}}{{end}}:
+ <strong>{{if .IsViewBranch}}{{.BranchName}}{{else}}{{ShortSha .BranchName}}{{end}}</strong>
+ </span>
+ <i class="dropdown icon"></i>
+ </div>
+ <div class="menu">
+ <div class="ui icon search input">
+ <i class="filter icon"></i>
+ <input name="search" placeholder="{{.i18n.Tr "repo.filter_branch_and_tag"}}...">
+ </div>
+ <div class="header">
+ <div class="ui grid">
+ <div class="two column row">
+ <a class="reference column" href="#" data-target="#branch-list">
+ <span class="text {{if .IsViewBranch}}black{{end}}">
+ <i class="icon octicon octicon-git-branch"></i> {{.i18n.Tr "repo.branches"}}
+ </span>
+ </a>
+ <a class="reference column" href="#" data-target="#tag-list">
+ <span class="text {{if .IsTag}}black{{end}}">
+ <i class="reference tags icon"></i> {{.i18n.Tr "repo.tags"}}
+ </span>
+ </a>
+ </div>
+ </div>
+ </div>
+ <div id="branch-list" class="scrolling menu" {{if .IsTag}}style="display: none"{{end}}>
+ {{range .Branches}}
+ <div class="item {{if eq $.BranchName .}}selected{{end}}" data-url="{{$.RepoLink}}/src/{{EscapePound .}}">{{.}}</div>
+ {{end}}
+ </div>
+ <div id="tag-list" class="scrolling menu" {{if .IsViewBranch}}style="display: none"{{end}}>
+ {{range .Tags}}
+ <div class="item {{if eq $.BranchName .}}selected{{end}}" data-url="{{$.RepoLink}}/src/{{EscapePound .}}">{{.}}</div>
+ {{end}}
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="item fitted">
+ <div class="ui breadcrumb">
+ <a class="section" href="{{.RepoLink}}/src/{{EscapePound .BranchName}}">{{.Repository.Name}}</a>
+ {{ $n := len .Treenames}}
+ {{ $l := Subtract $n 1}}
+ {{range $i, $v := .Treenames}}
+ <div class="divider"> / </div>
+ {{if eq $i $l}}
+ <span class="active section">{{$v}}</span>
+ {{else}}
+ {{ $p := index $.Paths $i}}
+ <span class="section"><a href="{{EscapePound $.BranchLink}}/{{EscapePound $p}}">{{$v}}</a></span>
+ {{end}}
+ {{end}}
+ </div>
+ </div>
+ {{if eq $n 0}}
+ <div class="right fitted item">
+ <div class="ui action small input" id="clone-panel">
+ {{if not $.DisableSSH}}
+ <button class="ui blue basic clone button" id="repo-clone-ssh" data-link="{{.CloneLink.SSH}}">
+ SSH
+ </button>
+ {{end}}
+ <button class="ui {{if $.DisableSSH}}blue{{end}} basic clone button" id="repo-clone-https" data-link="{{.CloneLink.HTTPS}}">
+ {{if UseHTTPS}}HTTPS{{else}}HTTP{{end}}
+ </button>
+ <input id="repo-clone-url" value="{{if $.DisableSSH}}{{$.CloneLink.HTTPS}}{{else}}{{$.CloneLink.SSH}}{{end}}" readonly>
+ <button class="ui basic icon button poping up clipboard" id="clipboard-btn" data-original="{{.i18n.Tr "repo.copy_link"}}" data-success="{{.i18n.Tr "repo.copy_link_success"}}" data-error="{{.i18n.Tr "repo.copy_link_error"}}" data-content="{{.i18n.Tr "repo.copy_link"}}" data-variation="inverted tiny" data-clipboard-target="#repo-clone-url">
+ <i class="octicon octicon-clippy"></i>
+ </button>
+ <div class="ui basic jump dropdown icon button">
+ <i class="download icon"></i>
+ <div class="menu">
+ <a class="item" href="{{$.RepoLink}}/archive/{{EscapePound $.BranchName}}.zip"><i class="icon octicon octicon-file-zip"></i> ZIP</a>
+ <a class="item" href="{{$.RepoLink}}/archive/{{EscapePound $.BranchName}}.tar.gz"><i class="icon octicon octicon-file-zip"></i> TAR.GZ</a>
+ </div>
+ </div>
+ </div>
+ </div>
+ {{end}}
+ </div>
+ {{if .IsFile}}
+ {{template "repo/view_file" .}}
+ {{else}}
+ {{template "repo/view_list" .}}
+ {{end}}
+ </div>
</div>
-{{template "base/footer" .}} \ No newline at end of file
+{{template "base/footer" .}}
diff --git a/templates/repo/issue/comment_tab.tmpl b/templates/repo/issue/comment_tab.tmpl
index a3f80edfb5..8f6c8ca778 100644
--- a/templates/repo/issue/comment_tab.tmpl
+++ b/templates/repo/issue/comment_tab.tmpl
@@ -1,16 +1,16 @@
<div class="field">
- <div class="ui top attached tabular menu" data-write="write" data-preview="preview">
- <a class="active item" data-tab="write">{{.i18n.Tr "repo.release.write"}}</a>
- <a class="item" data-tab="preview" data-url="{{AppSubUrl}}/api/v1/markdown" data-context="{{.RepoLink}}">{{.i18n.Tr "repo.release.preview"}}</a>
- </div>
- <div class="ui bottom attached active tab segment" data-tab="write">
- <textarea id="content" name="content" tabindex="4"></textarea>
- </div>
- <div class="ui bottom attached tab segment markdown" data-tab="preview">
- {{.i18n.Tr "repo.release.loading"}}
- </div>
+ <div class="ui top attached tabular menu" data-write="write" data-preview="preview">
+ <a class="active item" data-tab="write">{{.i18n.Tr "repo.release.write"}}</a>
+ <a class="item" data-tab="preview" data-url="{{AppSubUrl}}/api/v1/markdown" data-context="{{.RepoLink}}">{{.i18n.Tr "repo.release.preview"}}</a>
+ </div>
+ <div class="ui bottom attached active tab segment" data-tab="write">
+ <textarea id="content" name="content" tabindex="4"></textarea>
+ </div>
+ <div class="ui bottom attached tab segment markdown" data-tab="preview">
+ {{.i18n.Tr "repo.release.loading"}}
+ </div>
</div>
{{if .IsAttachmentEnabled}}
-<div class="attachments"></div>
-<div class="ui basic button dropzone" id="dropzone" data-upload-url="{{AppSubUrl}}/issues/attachments" data-accepts="{{.AttachmentAllowedTypes}}" data-max-file="{{.AttachmentMaxFiles}}" data-max-size="{{.AttachmentMaxSize}}" data-default-message="{{.i18n.Tr "dropzone.default_message"}}" data-invalid-input-type="{{.i18n.Tr "dropzone.invalid_input_type"}}" data-file-too-big="{{.i18n.Tr "dropzone.file_too_big"}}" data-remove-file="{{.i18n.Tr "dropzone.remove_file"}}"></div>
-{{end}} \ No newline at end of file
+ <div class="attachments"></div>
+ <div class="ui basic button dropzone" id="dropzone" data-upload-url="{{AppSubUrl}}/issues/attachments" data-accepts="{{.AttachmentAllowedTypes}}" data-max-file="{{.AttachmentMaxFiles}}" data-max-size="{{.AttachmentMaxSize}}" data-default-message="{{.i18n.Tr "dropzone.default_message"}}" data-invalid-input-type="{{.i18n.Tr "dropzone.invalid_input_type"}}" data-file-too-big="{{.i18n.Tr "dropzone.file_too_big"}}" data-remove-file="{{.i18n.Tr "dropzone.remove_file"}}"></div>
+{{end}}
diff --git a/templates/repo/issue/label_precolors.tmpl b/templates/repo/issue/label_precolors.tmpl
index 378281b303..d0e165068d 100644
--- a/templates/repo/issue/label_precolors.tmpl
+++ b/templates/repo/issue/label_precolors.tmpl
@@ -13,4 +13,4 @@
<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
+<a class="color" style="background-color:#d4c5f9" data-color-hex="#d4c5f9"></a>
diff --git a/templates/repo/issue/labels.tmpl b/templates/repo/issue/labels.tmpl
index dd84ce416c..d7f758ae65 100644
--- a/templates/repo/issue/labels.tmpl
+++ b/templates/repo/issue/labels.tmpl
@@ -5,9 +5,9 @@
<div class="navbar">
{{template "repo/issue/navbar" .}}
{{if .IsRepositoryAdmin}}
- <div class="ui right">
- <div class="ui green new-label button">{{.i18n.Tr "repo.issues.new_label"}}</div>
- </div>
+ <div class="ui right">
+ <div class="ui green new-label button">{{.i18n.Tr "repo.issues.new_label"}}</div>
+ </div>
{{end}}
</div>
<div class="ui new-label segment hide">
@@ -16,11 +16,11 @@
<div class="ui grid">
<div class="five wide column">
<div class="ui small input">
- <input class="new-label-input" name="title" placeholder="{{.i18n.Tr "repo.issues.new_label_placeholder"}}" autofocus required>
+ <input class="new-label-input" name="title" placeholder="{{.i18n.Tr "repo.issues.new_label_placeholder"}}" autofocus required>
</div>
</div>
<div class="color picker column">
- <input class="color-picker" name="color" value="#70c24a" required>
+ <input class="color-picker" name="color" value="#70c24a" required>
</div>
<div class="column precolors">
{{template "repo/issue/label_precolors"}}
@@ -38,72 +38,72 @@
<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-button" href="#" data-url="{{$.RepoLink}}/labels/delete" data-id="{{.ID}}"><i class="octicon octicon-trashcan"></i> {{$.i18n.Tr "repo.issues.label_delete"}}</a>
- <a class="ui right edit-label-button" href="#" data-id={{.ID}} data-title={{.Name}} data-color={{.Color}}><i class="octicon octicon-pencil"></i> {{$.i18n.Tr "repo.issues.label_edit"}}</a>
- {{end}}
- <a class="ui right open-issues" href="{{$.RepoLink}}/issues?labels={{.ID}}"><i class="octicon octicon-issue-opened"></i> {{$.i18n.Tr "repo.issues.label_open_issues" .NumOpenIssues}}</a>
- </li>
+ <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-button" href="#" data-url="{{$.RepoLink}}/labels/delete" data-id="{{.ID}}"><i class="octicon octicon-trashcan"></i> {{$.i18n.Tr "repo.issues.label_delete"}}</a>
+ <a class="ui right edit-label-button" href="#" data-id={{.ID}} data-title={{.Name}} data-color={{.Color}}><i class="octicon octicon-pencil"></i> {{$.i18n.Tr "repo.issues.label_edit"}}</a>
+ {{end}}
+ <a class="ui right open-issues" href="{{$.RepoLink}}/issues?labels={{.ID}}"><i class="octicon octicon-issue-opened"></i> {{$.i18n.Tr "repo.issues.label_open_issues" .NumOpenIssues}}</a>
+ </li>
{{end}}
</div>
</div>
</div>
{{if .IsRepositoryAdmin}}
-<div class="ui small basic delete modal">
- <div class="ui icon header">
- <i class="trash icon"></i>
- {{.i18n.Tr "repo.issues.label_deletion"}}
- </div>
- <div class="content">
- <p>{{.i18n.Tr "repo.issues.label_deletion_desc"}}</p>
- </div>
- <div class="actions">
- <div class="ui red basic inverted cancel button">
- <i class="remove icon"></i>
- {{.i18n.Tr "modal.no"}}
- </div>
- <div class="ui green basic inverted ok button">
- <i class="checkmark icon"></i>
- {{.i18n.Tr "modal.yes"}}
- </div>
- </div>
-</div>
+ <div class="ui small basic delete modal">
+ <div class="ui icon header">
+ <i class="trash icon"></i>
+ {{.i18n.Tr "repo.issues.label_deletion"}}
+ </div>
+ <div class="content">
+ <p>{{.i18n.Tr "repo.issues.label_deletion_desc"}}</p>
+ </div>
+ <div class="actions">
+ <div class="ui red basic inverted cancel button">
+ <i class="remove icon"></i>
+ {{.i18n.Tr "modal.no"}}
+ </div>
+ <div class="ui green basic inverted ok button">
+ <i class="checkmark icon"></i>
+ {{.i18n.Tr "modal.yes"}}
+ </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="ui grid">
- <div class="five wide column">
- <div class="ui small input">
- <input class="new-label-input" name="title" placeholder="{{.i18n.Tr "repo.issues.new_label_placeholder"}}" autofocus required>
+ <div 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="ui grid">
+ <div class="five wide column">
+ <div class="ui small input">
+ <input class="new-label-input" name="title" placeholder="{{.i18n.Tr "repo.issues.new_label_placeholder"}}" autofocus required>
+ </div>
+ </div>
+ <div class="color picker column">
+ <input class="color-picker" name="color" value="#70c24a" required>
+ </div>
+ <div class="column precolors">
+ {{template "repo/issue/label_precolors"}}
</div>
</div>
- <div class="color picker column">
- <input class="color-picker" name="color" value="#70c24a" required>
- </div>
- <div class="column precolors">
- {{template "repo/issue/label_precolors"}}
- </div>
+ </form>
+ </div>
+ <div class="actions">
+ <div class="ui negative button">
+ {{.i18n.Tr "modal.no"}}
</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>
+ <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
+{{template "base/footer" .}}
diff --git a/templates/repo/issue/list.tmpl b/templates/repo/issue/list.tmpl
index 5b1ad1d026..66bd2ae298 100644
--- a/templates/repo/issue/list.tmpl
+++ b/templates/repo/issue/list.tmpl
@@ -6,22 +6,22 @@
{{template "repo/issue/navbar" .}}
<div class="ui right">
{{if .PageIsIssueList}}
- <a class="ui green button" href="{{.RepoLink}}/issues/new">{{.i18n.Tr "repo.issues.new"}}</a>
+ <a class="ui green button" href="{{.RepoLink}}/issues/new">{{.i18n.Tr "repo.issues.new"}}</a>
{{else}}
- <a class="ui green button {{if not .HasForkedRepo}}disabled{{end}}" href="{{.RepoLink}}/compare/{{.BranchName}}...{{.SignedUserName}}:{{.BranchName}}">{{.i18n.Tr "repo.pulls.new"}}</a>
+ <a class="ui green button {{if not .HasForkedRepo}}disabled{{end}}" href="{{.RepoLink}}/compare/{{.BranchName}}...{{.SignedUserName}}:{{.BranchName}}">{{.i18n.Tr "repo.pulls.new"}}</a>
{{end}}
</div>
</div>
<div class="ui divider"></div>
<div class="ui tiny basic status buttons">
- <a class="ui {{if not .IsShowClosed}}green active{{end}} basic button" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state=open&labels={{.SelectLabels}}&milestone={{.MilestoneID}}&assignee={{.AssigneeID}}">
- <i class="octicon octicon-issue-opened"></i>
- {{.i18n.Tr "repo.issues.open_tab" .IssueStats.OpenCount}}
- </a>
- <a class="ui {{if .IsShowClosed}}red active{{end}} basic button" href="{{$.Link}}?type={{.ViewType}}&sort={{$.SortType}}&state=closed&labels={{.SelectLabels}}&milestone={{.MilestoneID}}&assignee={{.AssigneeID}}">
- <i class="octicon octicon-issue-closed"></i>
- {{.i18n.Tr "repo.issues.close_tab" .IssueStats.ClosedCount}}
- </a>
+ <a class="ui {{if not .IsShowClosed}}green active{{end}} basic button" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state=open&labels={{.SelectLabels}}&milestone={{.MilestoneID}}&assignee={{.AssigneeID}}">
+ <i class="octicon octicon-issue-opened"></i>
+ {{.i18n.Tr "repo.issues.open_tab" .IssueStats.OpenCount}}
+ </a>
+ <a class="ui {{if .IsShowClosed}}red active{{end}} basic button" href="{{$.Link}}?type={{.ViewType}}&sort={{$.SortType}}&state=closed&labels={{.SelectLabels}}&milestone={{.MilestoneID}}&assignee={{.AssigneeID}}">
+ <i class="octicon octicon-issue-closed"></i>
+ {{.i18n.Tr "repo.issues.close_tab" .IssueStats.ClosedCount}}
+ </a>
</div>
<div class="ui right floated secondary filter menu">
<!-- Label -->
@@ -30,11 +30,11 @@
{{.i18n.Tr "repo.issues.filter_label"}}
<i class="dropdown icon"></i>
</span>
- <div class="menu">
- <a class="item" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_label_no_select"}}</a>
- {{range .Labels}}
- <a class="item" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.ID}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}"><span class="octicon {{if eq $.SelectLabels .ID}}octicon-check{{end}}"></span><span class="label color" style="background-color: {{.Color}}"></span> {{.Name}}</a>
- {{end}}
+ <div class="menu">
+ <a class="item" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_label_no_select"}}</a>
+ {{range .Labels}}
+ <a class="item" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.ID}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}"><span class="octicon {{if eq $.SelectLabels .ID}}octicon-check{{end}}"></span><span class="label color" style="background-color: {{.Color}}"></span> {{.Name}}</a>
+ {{end}}
</div>
</div>
@@ -44,11 +44,11 @@
{{.i18n.Tr "repo.issues.filter_milestone"}}
<i class="dropdown icon"></i>
</span>
- <div class="menu">
- <a class="item" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_milestone_no_select"}}</a>
- {{range .Milestones}}
- <a class="{{if eq $.MilestoneID .ID}}active selected{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{.ID}}&assignee={{$.AssigneeID}}">{{.Name}}</a>
- {{end}}
+ <div class="menu">
+ <a class="item" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_milestone_no_select"}}</a>
+ {{range .Milestones}}
+ <a class="{{if eq $.MilestoneID .ID}}active selected{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{.ID}}&assignee={{$.AssigneeID}}">{{.Name}}</a>
+ {{end}}
</div>
</div>
@@ -58,11 +58,11 @@
{{.i18n.Tr "repo.issues.filter_assignee"}}
<i class="dropdown icon"></i>
</span>
- <div class="menu">
- <a class="item" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}">{{.i18n.Tr "repo.issues.filter_assginee_no_select"}}</a>
- {{range .Assignees}}
- <a class="{{if eq $.AssigneeID .Id}}active selected{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{.Id}}"><img src="{{.AvatarLink}}"> {{.Name}}</a>
- {{end}}
+ <div class="menu">
+ <a class="item" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}">{{.i18n.Tr "repo.issues.filter_assginee_no_select"}}</a>
+ {{range .Assignees}}
+ <a class="{{if eq $.AssigneeID .Id}}active selected{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{.Id}}"><img src="{{.AvatarLink}}"> {{.Name}}</a>
+ {{end}}
</div>
</div>
@@ -72,11 +72,11 @@
{{.i18n.Tr "repo.issues.filter_type"}}
<i class="dropdown icon"></i>
</span>
- <div class="menu">
- <a class="{{if eq .ViewType "all"}}active{{end}} item" href="{{$.Link}}?type=all&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_type.all_issues"}}</a>
- <a class="{{if eq .ViewType "assigned"}}active{{end}} item" href="{{$.Link}}?type=assigned&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}">{{.i18n.Tr "repo.issues.filter_type.assigned_to_you"}}</a>
- <a class="{{if eq .ViewType "created_by"}}active{{end}} item" href="{{$.Link}}?type=created_by&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_type.created_by_you"}}</a>
- <a class="{{if eq .ViewType "mentioned"}}active{{end}} item" href="{{$.Link}}?type=mentioned&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_type.mentioning_you"}}</a>
+ <div class="menu">
+ <a class="{{if eq .ViewType "all"}}active{{end}} item" href="{{$.Link}}?type=all&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_type.all_issues"}}</a>
+ <a class="{{if eq .ViewType "assigned"}}active{{end}} item" href="{{$.Link}}?type=assigned&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}">{{.i18n.Tr "repo.issues.filter_type.assigned_to_you"}}</a>
+ <a class="{{if eq .ViewType "created_by"}}active{{end}} item" href="{{$.Link}}?type=created_by&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_type.created_by_you"}}</a>
+ <a class="{{if eq .ViewType "mentioned"}}active{{end}} item" href="{{$.Link}}?type=mentioned&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_type.mentioning_you"}}</a>
</div>
</div>
@@ -86,68 +86,68 @@
{{.i18n.Tr "repo.issues.filter_sort"}}
<i class="dropdown icon"></i>
</span>
- <div class="menu">
- <a class="{{if or (eq .SortType "latest") (not .SortType)}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&sort=latest&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_sort.latest"}}</a>
- <a class="{{if eq .SortType "oldest"}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&sort=oldest&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_sort.oldest"}}</a>
- <a class="{{if eq .SortType "recentupdate"}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&sort=recentupdate&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_sort.recentupdate"}}</a>
- <a class="{{if eq .SortType "leastupdate"}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&sort=leastupdate&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_sort.leastupdate"}}</a>
- <a class="{{if eq .SortType "mostcomment"}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&sort=mostcomment&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_sort.mostcomment"}}</a>
- <a class="{{if eq .SortType "leastcomment"}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&sort=leastcomment&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_sort.leastcomment"}}</a>
+ <div class="menu">
+ <a class="{{if or (eq .SortType "latest") (not .SortType)}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&sort=latest&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_sort.latest"}}</a>
+ <a class="{{if eq .SortType "oldest"}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&sort=oldest&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_sort.oldest"}}</a>
+ <a class="{{if eq .SortType "recentupdate"}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&sort=recentupdate&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_sort.recentupdate"}}</a>
+ <a class="{{if eq .SortType "leastupdate"}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&sort=leastupdate&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_sort.leastupdate"}}</a>
+ <a class="{{if eq .SortType "mostcomment"}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&sort=mostcomment&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_sort.mostcomment"}}</a>
+ <a class="{{if eq .SortType "leastcomment"}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&sort=leastcomment&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_sort.leastcomment"}}</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="{{$.Link}}/{{.Index}}">{{.Name}}</a>
-
- {{range .Labels}}
- <a class="ui label" href="{{$.Link}}?type={{$.ViewType}}&state={{$.State}}&labels={{.ID}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}" style="background-color: {{.Color}}">{{.Name}}</a>
- {{end}}
+ {{ $timeStr:= TimeSince .Created $.Lang }}
+ <li class="item">
+ <div class="ui {{if .IsRead}}black{{else}}green{{end}} label">#{{.Index}}</div>
+ <a class="title" href="{{$.Link}}/{{.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.HomeLink .Poster.Name | Safe}}
- {{if .Milestone}}
- <a class="milestone" href="{{$.Link}}?type={{$.ViewType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{.Milestone.ID}}&assignee={{$.AssigneeID}}">
- <span class="octicon octicon-milestone"></span> {{.Milestone.Name}}
- </a>
- {{end}}
- {{if .Assignee}}
- <a class="ui right assignee poping up" href="{{.Assignee.HomeLink}}" data-content="{{.Assignee.Name}}" data-variation="inverted" data-position="left center">
- <img class="ui avatar image" src="{{.Assignee.AvatarLink}}">
- </a>
- {{end}}
- </p>
- </li>
- {{end}}
-
- {{with .Page}}
- {{if gt .TotalPages 1}}
- <div class="center page buttons">
- <div class="ui borderless pagination menu">
- <a class="{{if not .HasPrevious}}disabled{{end}} item" {{if .HasPrevious}}href="{{$.Link}}?type={{$.ViewType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}&page={{.Previous}}"{{end}}>
- <i class="left arrow icon"></i> {{$.i18n.Tr "repo.issues.previous"}}
- </a>
- {{range .Pages}}
- {{if eq .Num -1}}
- <a class="disabled item">...</a>
- {{else}}
- <a class="{{if .IsCurrent}}active{{end}} item" {{if not .IsCurrent}}href="{{$.Link}}?type={{$.ViewType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}&page={{.Num}}"{{end}}>{{.Num}}</a>
+ {{range .Labels}}
+ <a class="ui label" href="{{$.Link}}?type={{$.ViewType}}&state={{$.State}}&labels={{.ID}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}" style="background-color: {{.Color}}">{{.Name}}</a>
{{end}}
+
+ {{if .NumComments}}
+ <span class="comment ui right"><i class="octicon octicon-comment"></i> {{.NumComments}}</span>
{{end}}
- <a class="{{if not .HasNext}}disabled{{end}} item" {{if .HasNext}}href="{{$.Link}}?type={{$.ViewType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}&page={{.Next}}"{{end}}>
- {{$.i18n.Tr "repo.issues.next"}}&nbsp;<i class="icon right arrow"></i>
- </a>
- </div>
- </div>
+
+ <p class="desc">
+ {{$.i18n.Tr "repo.issues.opened_by" $timeStr .Poster.HomeLink .Poster.Name | Safe}}
+ {{if .Milestone}}
+ <a class="milestone" href="{{$.Link}}?type={{$.ViewType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{.Milestone.ID}}&assignee={{$.AssigneeID}}">
+ <span class="octicon octicon-milestone"></span> {{.Milestone.Name}}
+ </a>
+ {{end}}
+ {{if .Assignee}}
+ <a class="ui right assignee poping up" href="{{.Assignee.HomeLink}}" data-content="{{.Assignee.Name}}" data-variation="inverted" data-position="left center">
+ <img class="ui avatar image" src="{{.Assignee.AvatarLink}}">
+ </a>
+ {{end}}
+ </p>
+ </li>
{{end}}
+
+ {{with .Page}}
+ {{if gt .TotalPages 1}}
+ <div class="center page buttons">
+ <div class="ui borderless pagination menu">
+ <a class="{{if not .HasPrevious}}disabled{{end}} item" {{if .HasPrevious}}href="{{$.Link}}?type={{$.ViewType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}&page={{.Previous}}"{{end}}>
+ <i class="left arrow icon"></i> {{$.i18n.Tr "repo.issues.previous"}}
+ </a>
+ {{range .Pages}}
+ {{if eq .Num -1}}
+ <a class="disabled item">...</a>
+ {{else}}
+ <a class="{{if .IsCurrent}}active{{end}} item" {{if not .IsCurrent}}href="{{$.Link}}?type={{$.ViewType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}&page={{.Num}}"{{end}}>{{.Num}}</a>
+ {{end}}
+ {{end}}
+ <a class="{{if not .HasNext}}disabled{{end}} item" {{if .HasNext}}href="{{$.Link}}?type={{$.ViewType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}&page={{.Next}}"{{end}}>
+ {{$.i18n.Tr "repo.issues.next"}}&nbsp;<i class="icon right arrow"></i>
+ </a>
+ </div>
+ </div>
+ {{end}}
{{end}}
</div>
</div>
diff --git a/templates/repo/issue/milestone_new.tmpl b/templates/repo/issue/milestone_new.tmpl
index 383e54dd8f..88dc806b4e 100644
--- a/templates/repo/issue/milestone_new.tmpl
+++ b/templates/repo/issue/milestone_new.tmpl
@@ -5,64 +5,64 @@
<div class="navbar">
{{template "repo/issue/navbar" .}}
{{if and .IsRepositoryAdmin .PageIsEditMilestone}}
- <div class="ui right floated secondary menu">
- <a class="ui green button" href="{{$.RepoLink}}/milestones/new">{{.i18n.Tr "repo.milestones.new"}}</a>
- </div>
+ <div class="ui right floated secondary menu">
+ <a class="ui green button" href="{{$.RepoLink}}/milestones/new">{{.i18n.Tr "repo.milestones.new"}}</a>
+ </div>
{{end}}
</div>
<div class="ui divider"></div>
- <h2 class="ui dividing header">
- {{if .PageIsEditMilestone}}
- {{.i18n.Tr "repo.milestones.edit"}}
- <div class="sub header">{{.i18n.Tr "repo.milestones.edit_subheader"}}</div>
- {{else}}
- {{.i18n.Tr "repo.milestones.new"}}
- <div class="sub header">{{.i18n.Tr "repo.milestones.new_subheader"}}</div>
- {{end}}
- </h2>
- {{template "base/alert" .}}
- <form class="ui form grid" action="{{.Link}}" method="post">
- {{.CsrfTokenHtml}}
- <div class="eleven wide column">
- <div class="field {{if .Err_Title}}error{{end}}">
- <label>{{.i18n.Tr "repo.milestones.title"}}</label>
- <input name="title" placeholder="{{.i18n.Tr "repo.milestones.title"}}" value="{{.title}}" autofocus required>
- </div>
- <div class="field">
- <label>{{.i18n.Tr "repo.milestones.desc"}}</label>
- <textarea name="content">{{.content}}</textarea>
- </div>
+ <h2 class="ui dividing header">
+ {{if .PageIsEditMilestone}}
+ {{.i18n.Tr "repo.milestones.edit"}}
+ <div class="sub header">{{.i18n.Tr "repo.milestones.edit_subheader"}}</div>
+ {{else}}
+ {{.i18n.Tr "repo.milestones.new"}}
+ <div class="sub header">{{.i18n.Tr "repo.milestones.new_subheader"}}</div>
+ {{end}}
+ </h2>
+ {{template "base/alert" .}}
+ <form class="ui form grid" action="{{.Link}}" method="post">
+ {{.CsrfTokenHtml}}
+ <div class="eleven wide column">
+ <div class="field {{if .Err_Title}}error{{end}}">
+ <label>{{.i18n.Tr "repo.milestones.title"}}</label>
+ <input name="title" placeholder="{{.i18n.Tr "repo.milestones.title"}}" value="{{.title}}" autofocus required>
+ </div>
+ <div class="field">
+ <label>{{.i18n.Tr "repo.milestones.desc"}}</label>
+ <textarea name="content">{{.content}}</textarea>
</div>
- <div class="four wide column">
- <div class="field {{if .Err_Deadline}}error{{end}}">
- <label>
- {{.i18n.Tr "repo.milestones.due_date"}}
- <a id="clear-date" href="#">{{.i18n.Tr "repo.milestones.clear"}}</a>
- </label>
- <input id="deadline" name="deadline" value="{{.deadline}}">
- </div>
- <div class="field">
- <input class="milestone datepicker" data-lang="{{.DateLang}}" data-start-date="{{.deadline}}">
- </div>
+ </div>
+ <div class="four wide column">
+ <div class="field {{if .Err_Deadline}}error{{end}}">
+ <label>
+ {{.i18n.Tr "repo.milestones.due_date"}}
+ <a id="clear-date" href="#">{{.i18n.Tr "repo.milestones.clear"}}</a>
+ </label>
+ <input id="deadline" name="deadline" value="{{.deadline}}">
+ </div>
+ <div class="field">
+ <input class="milestone datepicker" data-lang="{{.DateLang}}" data-start-date="{{.deadline}}">
</div>
- <div class="ui container">
- <div class="ui divider"></div>
- <div class="ui right">
- {{if .PageIsEditMilestone}}
+ </div>
+ <div class="ui container">
+ <div class="ui divider"></div>
+ <div class="ui right">
+ {{if .PageIsEditMilestone}}
<a class="ui blue basic button" href="{{.RepoLink}}/milestones">
{{.i18n.Tr "repo.milestones.cancel"}}
</a>
<button class="ui green button">
{{.i18n.Tr "repo.milestones.modify"}}
</button>
- {{else}}
+ {{else}}
<button class="ui green button">
{{.i18n.Tr "repo.milestones.create"}}
</button>
- {{end}}
- </div>
+ {{end}}
</div>
- </form>
+ </div>
+ </form>
</div>
</div>
-{{template "base/footer" .}} \ No newline at end of file
+{{template "base/footer" .}}
diff --git a/templates/repo/issue/milestones.tmpl b/templates/repo/issue/milestones.tmpl
index 248b81e242..fe247d80c0 100644
--- a/templates/repo/issue/milestones.tmpl
+++ b/templates/repo/issue/milestones.tmpl
@@ -5,113 +5,113 @@
<div class="navbar">
{{template "repo/issue/navbar" .}}
{{if .IsRepositoryAdmin}}
- <div class="ui right">
- <a class="ui green button" href="{{$.Link}}/new">{{.i18n.Tr "repo.milestones.new"}}</a>
- </div>
+ <div class="ui right">
+ <a class="ui green button" href="{{$.Link}}/new">{{.i18n.Tr "repo.milestones.new"}}</a>
+ </div>
{{end}}
</div>
<div class="ui divider"></div>
{{template "base/alert" .}}
<div class="ui tiny basic buttons">
- <a class="ui {{if not .IsShowClosed}}green active{{end}} basic button" href="{{.RepoLink}}/milestones?state=open">
- <i class="octicon octicon-milestone"></i>
- {{.i18n.Tr "repo.milestones.open_tab" .OpenCount}}
- </a>
- <a class="ui {{if .IsShowClosed}}red active{{end}} basic button" href="{{.RepoLink}}/milestones?state=closed">
- <i class="octicon octicon-milestone"></i>
- {{.i18n.Tr "repo.milestones.close_tab" .ClosedCount}}
- </a>
+ <a class="ui {{if not .IsShowClosed}}green active{{end}} basic button" href="{{.RepoLink}}/milestones?state=open">
+ <i class="octicon octicon-milestone"></i>
+ {{.i18n.Tr "repo.milestones.open_tab" .OpenCount}}
+ </a>
+ <a class="ui {{if .IsShowClosed}}red active{{end}} basic button" href="{{.RepoLink}}/milestones?state=closed">
+ <i class="octicon octicon-milestone"></i>
+ {{.i18n.Tr "repo.milestones.close_tab" .ClosedCount}}
+ </a>
</div>
-
+
<div class="milestone list">
{{range .Milestones}}
- <li class="item">
- <i class="octicon octicon-milestone"></i> <a href="{{$.RepoLink}}/issues?state={{$.State}}&milestone={{.ID}}">{{.Name}}</a>
- <div class="ui right green progress" data-percent="{{.Completeness}}">
- <div class="bar" {{if not .Completeness}}style="background-color: transparent"{{end}}>
- <div class="progress"></div>
- </div>
- </div>
- <div class="meta">
- {{ $closedDate:= TimeSince .ClosedDate $.Lang }}
- {{if .IsClosed}}
- <span class="octicon octicon-clock"></span> {{$.i18n.Tr "repo.milestones.closed" $closedDate|Str2html}}
- {{else}}
- <span class="octicon octicon-calendar"></span>
- {{if .DeadlineString}}
- <span {{if .IsOverDue}}class="overdue"{{end}}>{{.DeadlineString}}</span>
+ <li class="item">
+ <i class="octicon octicon-milestone"></i> <a href="{{$.RepoLink}}/issues?state={{$.State}}&milestone={{.ID}}">{{.Name}}</a>
+ <div class="ui right green progress" data-percent="{{.Completeness}}">
+ <div class="bar" {{if not .Completeness}}style="background-color: transparent"{{end}}>
+ <div class="progress"></div>
+ </div>
+ </div>
+ <div class="meta">
+ {{ $closedDate:= TimeSince .ClosedDate $.Lang }}
+ {{if .IsClosed}}
+ <span class="octicon octicon-clock"></span> {{$.i18n.Tr "repo.milestones.closed" $closedDate|Str2html}}
{{else}}
- {{$.i18n.Tr "repo.milestones.no_due_date"}}
+ <span class="octicon octicon-calendar"></span>
+ {{if .DeadlineString}}
+ <span {{if .IsOverDue}}class="overdue"{{end}}>{{.DeadlineString}}</span>
+ {{else}}
+ {{$.i18n.Tr "repo.milestones.no_due_date"}}
+ {{end}}
+ {{end}}
+ <span class="issue-stats">
+ <i class="octicon octicon-issue-opened"></i> {{$.i18n.Tr "repo.issues.open_tab" .NumOpenIssues}}
+ <i class="octicon octicon-issue-closed"></i> {{$.i18n.Tr "repo.issues.close_tab" .NumClosedIssues}}
+ </span>
+ </div>
+ {{if $.IsRepositoryAdmin}}
+ <div class="ui right operate">
+ <a href="{{$.Link}}/{{.ID}}/edit" data-id={{.ID}} data-title={{.Name}}><i class="octicon octicon-pencil"></i> {{$.i18n.Tr "repo.issues.label_edit"}}</a>
+ {{if .IsClosed}}
+ <a href="{{$.Link}}/{{.ID}}/open" data-id={{.ID}} data-title={{.Name}}><i class="octicon octicon-check"></i> {{$.i18n.Tr "repo.milestones.open"}}</a>
+ {{else}}
+ <a href="{{$.Link}}/{{.ID}}/close" data-id={{.ID}} data-title={{.Name}}><i class="octicon octicon-x"></i> {{$.i18n.Tr "repo.milestones.close"}}</a>
+ {{end}}
+ <a class="delete-button" href="#" data-url="{{$.RepoLink}}/milestones/delete" data-id="{{.ID}}"><i class="octicon octicon-trashcan"></i> {{$.i18n.Tr "repo.issues.label_delete"}}</a>
+ </div>
+ {{if .Content}}
+ <div class="content">
+ {{.RenderedContent|Str2html}}
+ </div>
{{end}}
{{end}}
- <span class="issue-stats">
- <i class="octicon octicon-issue-opened"></i> {{$.i18n.Tr "repo.issues.open_tab" .NumOpenIssues}}
- <i class="octicon octicon-issue-closed"></i> {{$.i18n.Tr "repo.issues.close_tab" .NumClosedIssues}}
- </span>
- </div>
- {{if $.IsRepositoryAdmin}}
- <div class="ui right operate">
- <a href="{{$.Link}}/{{.ID}}/edit" data-id={{.ID}} data-title={{.Name}}><i class="octicon octicon-pencil"></i> {{$.i18n.Tr "repo.issues.label_edit"}}</a>
- {{if .IsClosed}}
- <a href="{{$.Link}}/{{.ID}}/open" data-id={{.ID}} data-title={{.Name}}><i class="octicon octicon-check"></i> {{$.i18n.Tr "repo.milestones.open"}}</a>
- {{else}}
- <a href="{{$.Link}}/{{.ID}}/close" data-id={{.ID}} data-title={{.Name}}><i class="octicon octicon-x"></i> {{$.i18n.Tr "repo.milestones.close"}}</a>
- {{end}}
- <a class="delete-button" href="#" data-url="{{$.RepoLink}}/milestones/delete" data-id="{{.ID}}"><i class="octicon octicon-trashcan"></i> {{$.i18n.Tr "repo.issues.label_delete"}}</a>
- </div>
- {{if .Content}}
- <div class="content">
- {{.RenderedContent|Str2html}}
- </div>
- {{end}}
- {{end}}
- </li>
+ </li>
{{end}}
-
+
{{with .Page}}
- {{if gt .TotalPages 1}}
- <div class="center page buttons">
- <div class="ui borderless pagination menu">
- <a class="{{if not .HasPrevious}}disabled{{end}} item" {{if .HasPrevious}}href="{{$.Link}}?state={{$.State}}&page={{.Previous}}"{{end}}>
- <i class="left arrow icon"></i> {{$.i18n.Tr "repo.issues.previous"}}
- </a>
- {{range .Pages}}
- {{if eq .Num -1}}
- <a class="disabled item">...</a>
- {{else}}
- <a class="{{if .IsCurrent}}active{{end}} item" {{if not .IsCurrent}}href="{{$.Link}}?state={{$.State}}&page={{.Num}}"{{end}}>{{.Num}}</a>
- {{end}}
- {{end}}
- <a class="{{if not .HasNext}}disabled{{end}} item" {{if .HasNext}}href="{{$.Link}}?state={{$.State}}&page={{.Next}}"{{end}}>
- {{$.i18n.Tr "repo.issues.next"}} <i class="icon right arrow"></i>
- </a>
- </div>
- </div>
- {{end}}
+ {{if gt .TotalPages 1}}
+ <div class="center page buttons">
+ <div class="ui borderless pagination menu">
+ <a class="{{if not .HasPrevious}}disabled{{end}} item" {{if .HasPrevious}}href="{{$.Link}}?state={{$.State}}&page={{.Previous}}"{{end}}>
+ <i class="left arrow icon"></i> {{$.i18n.Tr "repo.issues.previous"}}
+ </a>
+ {{range .Pages}}
+ {{if eq .Num -1}}
+ <a class="disabled item">...</a>
+ {{else}}
+ <a class="{{if .IsCurrent}}active{{end}} item" {{if not .IsCurrent}}href="{{$.Link}}?state={{$.State}}&page={{.Num}}"{{end}}>{{.Num}}</a>
+ {{end}}
+ {{end}}
+ <a class="{{if not .HasNext}}disabled{{end}} item" {{if .HasNext}}href="{{$.Link}}?state={{$.State}}&page={{.Next}}"{{end}}>
+ {{$.i18n.Tr "repo.issues.next"}} <i class="icon right arrow"></i>
+ </a>
+ </div>
+ </div>
+ {{end}}
{{end}}
</div>
</div>
</div>
{{if .IsRepositoryAdmin}}
-<div class="ui small basic delete modal">
- <div class="ui icon header">
- <i class="trash icon"></i>
- {{.i18n.Tr "repo.milestones.deletion"}}
- </div>
- <div class="content">
- <p>{{.i18n.Tr "repo.milestones.deletion_desc"}}</p>
- </div>
- <div class="actions">
- <div class="ui red basic inverted cancel button">
- <i class="remove icon"></i>
- {{.i18n.Tr "modal.no"}}
- </div>
- <div class="ui green basic inverted ok button">
- <i class="checkmark icon"></i>
- {{.i18n.Tr "modal.yes"}}
- </div>
- </div>
-</div>
+ <div class="ui small basic delete modal">
+ <div class="ui icon header">
+ <i class="trash icon"></i>
+ {{.i18n.Tr "repo.milestones.deletion"}}
+ </div>
+ <div class="content">
+ <p>{{.i18n.Tr "repo.milestones.deletion_desc"}}</p>
+ </div>
+ <div class="actions">
+ <div class="ui red basic inverted cancel button">
+ <i class="remove icon"></i>
+ {{.i18n.Tr "modal.no"}}
+ </div>
+ <div class="ui green basic inverted ok button">
+ <i class="checkmark icon"></i>
+ {{.i18n.Tr "modal.yes"}}
+ </div>
+ </div>
+ </div>
{{end}}
-{{template "base/footer" .}} \ No newline at end of file
+{{template "base/footer" .}}
diff --git a/templates/repo/issue/navbar.tmpl b/templates/repo/issue/navbar.tmpl
index 3f76947c16..a3e9d2660d 100644
--- a/templates/repo/issue/navbar.tmpl
+++ b/templates/repo/issue/navbar.tmpl
@@ -1,4 +1,4 @@
<div class="ui compact small menu">
- <a class="{{if .PageIsLabels}}active{{end}} item" href="{{.RepoLink}}/labels">{{.i18n.Tr "repo.labels"}}</a>
- <a class="{{if .PageIsMilestones}}active{{end}} item" href="{{.RepoLink}}/milestones">{{.i18n.Tr "repo.milestones"}}</a>
-</div> \ No newline at end of file
+ <a class="{{if .PageIsLabels}}active{{end}} item" href="{{.RepoLink}}/labels">{{.i18n.Tr "repo.labels"}}</a>
+ <a class="{{if .PageIsMilestones}}active{{end}} item" href="{{.RepoLink}}/milestones">{{.i18n.Tr "repo.milestones"}}</a>
+</div>
diff --git a/templates/repo/issue/new.tmpl b/templates/repo/issue/new.tmpl
index bb45c3b743..3c6bc05b10 100644
--- a/templates/repo/issue/new.tmpl
+++ b/templates/repo/issue/new.tmpl
@@ -9,4 +9,4 @@
{{template "repo/issue/new_form" .}}
</div>
</div>
-{{template "base/footer" .}} \ No newline at end of file
+{{template "base/footer" .}}
diff --git a/templates/repo/issue/new_form.tmpl b/templates/repo/issue/new_form.tmpl
index 8576d7db8d..c023643eb9 100644
--- a/templates/repo/issue/new_form.tmpl
+++ b/templates/repo/issue/new_form.tmpl
@@ -1,32 +1,32 @@
<form class="ui comment form grid" action="{{.Link}}" method="post">
- {{.CsrfTokenHtml}}
- {{if .Flash}}
- <div class="sixteen wide column">
- {{template "base/alert" .}}
- </div>
- {{end}}
- <div class="twelve wide column">
+ {{.CsrfTokenHtml}}
+ {{if .Flash}}
+ <div class="sixteen wide column">
+ {{template "base/alert" .}}
+ </div>
+ {{end}}
+ <div class="twelve wide column">
<div class="ui comments">
- <div class="comment">
- <a class="avatar" href="{{.SignedUser.HomeLink}}">
- <img src="{{.SignedUser.AvatarLink}}">
- </a>
- <div class="ui segment content">
- <div class="field">
- <input name="title" placeholder="{{.i18n.Tr "repo.milestones.title"}}" value="{{.title}}" tabindex="3" autofocus required>
- </div>
+ <div class="comment">
+ <a class="avatar" href="{{.SignedUser.HomeLink}}">
+ <img src="{{.SignedUser.AvatarLink}}">
+ </a>
+ <div class="ui segment content">
+ <div class="field">
+ <input name="title" placeholder="{{.i18n.Tr "repo.milestones.title"}}" value="{{.title}}" tabindex="3" autofocus required>
+ </div>
{{template "repo/issue/comment_tab" .}}
- <div class="text right">
+ <div class="text right">
<button class="ui green button">
{{if .PageIsComparePull}}
- {{.i18n.Tr "repo.pulls.create"}}
+ {{.i18n.Tr "repo.pulls.create"}}
{{else}}
- {{.i18n.Tr "repo.issues.create"}}
+ {{.i18n.Tr "repo.issues.create"}}
{{end}}
</button>
- </div>
- </div>
- </div>
+ </div>
+ </div>
+ </div>
</div>
</div>
@@ -38,18 +38,18 @@
<strong>{{.i18n.Tr "repo.issues.new.labels"}}</strong>
<span class="octicon octicon-gear"></span>
</span>
- <div class="filter menu" data-id="#label_ids">
- <div class="no-select item">{{.i18n.Tr "repo.issues.new.clear_labels"}}</div>
- {{range .Labels}}
- <a class="{{if .IsChecked}}checked{{end}} item" href="#" data-id="{{.ID}}" data-id-selector="#label_{{.ID}}"><span class="octicon {{if .IsChecked}}octicon-check{{end}}"></span><span class="label color" style="background-color: {{.Color}}"></span> {{.Name}}</a>
- {{end}}
+ <div class="filter menu" data-id="#label_ids">
+ <div class="no-select item">{{.i18n.Tr "repo.issues.new.clear_labels"}}</div>
+ {{range .Labels}}
+ <a class="{{if .IsChecked}}checked{{end}} item" href="#" data-id="{{.ID}}" data-id-selector="#label_{{.ID}}"><span class="octicon {{if .IsChecked}}octicon-check{{end}}"></span><span class="label color" style="background-color: {{.Color}}"></span> {{.Name}}</a>
+ {{end}}
</div>
</div>
<div class="ui labels list">
<span class="no-select item {{if .HasSelectedLabel}}hide{{end}}">{{.i18n.Tr "repo.issues.new.no_label"}}</span>
- {{range .Labels}}
- <a class="{{if not .IsChecked}}hide{{end}} item" id="label_{{.ID}}" href="{{$.RepoLink}}/issues?labels={{.ID}}"><span class="label color" style="background-color: {{.Color}}"></span> <span class="text">{{.Name}}</span></a>
- {{end}}
+ {{range .Labels}}
+ <a class="{{if not .IsChecked}}hide{{end}} item" id="label_{{.ID}}" href="{{$.RepoLink}}/issues?labels={{.ID}}"><span class="label color" style="background-color: {{.Color}}"></span> <span class="text">{{.Name}}</span></a>
+ {{end}}
</div>
<div class="ui divider"></div>
@@ -60,35 +60,35 @@
<strong>{{.i18n.Tr "repo.issues.new.milestone"}}</strong>
<span class="octicon octicon-gear"></span>
</span>
- <div class="menu">
- <div class="no-select item">{{.i18n.Tr "repo.issues.new.clear_milestone"}}</div>
- {{if .OpenMilestones}}
- <div class="divider"></div>
- <div class="header">
- <i class="octicon octicon-milestone"></i>
- {{.i18n.Tr "repo.issues.new.open_milestone"}}
- </div>
- {{range .OpenMilestones}}
- <div class="item" data-id="{{.ID}}" data-href="{{$.RepoLink}}/issues?milestone={{.ID}}"> {{.Name}}</div>
- {{end}}
- {{end}}
- {{if .ClosedMilestones}}
- <div class="divider"></div>
- <div class="header">
- <i class="octicon octicon-milestone"></i>
- {{.i18n.Tr "repo.issues.new.closed_milestone"}}
- </div>
- {{range .ClosedMilestones}}
- <a class="item" data-id="{{.ID}}" data-href="{{$.RepoLink}}/issues?milestone={{.ID}}"> {{.Name}}</a>
- {{end}}
- {{end}}
+ <div class="menu">
+ <div class="no-select item">{{.i18n.Tr "repo.issues.new.clear_milestone"}}</div>
+ {{if .OpenMilestones}}
+ <div class="divider"></div>
+ <div class="header">
+ <i class="octicon octicon-milestone"></i>
+ {{.i18n.Tr "repo.issues.new.open_milestone"}}
+ </div>
+ {{range .OpenMilestones}}
+ <div class="item" data-id="{{.ID}}" data-href="{{$.RepoLink}}/issues?milestone={{.ID}}"> {{.Name}}</div>
+ {{end}}
+ {{end}}
+ {{if .ClosedMilestones}}
+ <div class="divider"></div>
+ <div class="header">
+ <i class="octicon octicon-milestone"></i>
+ {{.i18n.Tr "repo.issues.new.closed_milestone"}}
+ </div>
+ {{range .ClosedMilestones}}
+ <a class="item" data-id="{{.ID}}" data-href="{{$.RepoLink}}/issues?milestone={{.ID}}"> {{.Name}}</a>
+ {{end}}
+ {{end}}
</div>
</div>
<div class="ui select-milestone list">
<span class="no-select item {{if .Milestone}}hide{{end}}">{{.i18n.Tr "repo.issues.new.no_milestone"}}</span>
<div class="selected">
{{if .Milestone}}
- <a class="item" href="{{.RepoLink}}/issues?milestone={{.Milestone.ID}}"> {{.Milestone.Name}}</a>
+ <a class="item" href="{{.RepoLink}}/issues?milestone={{.Milestone.ID}}"> {{.Milestone.Name}}</a>
{{end}}
</div>
</div>
@@ -101,21 +101,21 @@
<strong>{{.i18n.Tr "repo.issues.new.assignee"}}</strong>
<span class="octicon octicon-gear"></span>
</span>
- <div class="menu">
- <div class="no-select item">{{.i18n.Tr "repo.issues.new.clear_assignee"}}</div>
- {{range .Assignees}}
- <div class="item" data-id="{{.Id}}" data-href="{{$.RepoLink}}/issues?assignee={{.Id}}" data-avatar="{{.AvatarLink}}"><img src="{{.AvatarLink}}"> {{.Name}}</div>
- {{end}}
+ <div class="menu">
+ <div class="no-select item">{{.i18n.Tr "repo.issues.new.clear_assignee"}}</div>
+ {{range .Assignees}}
+ <div class="item" data-id="{{.Id}}" data-href="{{$.RepoLink}}/issues?assignee={{.Id}}" data-avatar="{{.AvatarLink}}"><img src="{{.AvatarLink}}"> {{.Name}}</div>
+ {{end}}
</div>
</div>
<div class="ui select-assignee list">
<span class="no-select item {{if .Assignee}}hide{{end}}">{{.i18n.Tr "repo.issues.new.no_assignee"}}</span>
<div class="selected">
{{if .Assignee}}
- <a class="item" href="{{.RepoLink}}/issues?assignee={{.Assignee.Id}}"><img class="ui avatar image" src="{{.Assignee.AvatarLink}}"> {{.Assignee.Name}}</a>
+ <a class="item" href="{{.RepoLink}}/issues?assignee={{.Assignee.Id}}"><img class="ui avatar image" src="{{.Assignee.AvatarLink}}"> {{.Assignee.Name}}</a>
{{end}}
</div>
</div>
</div>
</div>
-</form> \ No newline at end of file
+</form>
diff --git a/templates/repo/issue/view.tmpl b/templates/repo/issue/view.tmpl
index 506e4e3f04..1f25f1535b 100644
--- a/templates/repo/issue/view.tmpl
+++ b/templates/repo/issue/view.tmpl
@@ -6,22 +6,22 @@
{{template "repo/issue/navbar" .}}
<div class="ui right">
{{if .PageIsIssueList}}
- <a class="ui green button" href="{{.RepoLink}}/issues/new">{{.i18n.Tr "repo.issues.new"}}</a>
+ <a class="ui green button" href="{{.RepoLink}}/issues/new">{{.i18n.Tr "repo.issues.new"}}</a>
{{else}}
- <a class="ui green button {{if not .HasForkedRepo}}disabled{{end}}" href="{{.RepoLink}}/compare/{{.BranchName}}...{{.SignedUserName}}:{{.BranchName}}">{{.i18n.Tr "repo.pulls.new"}}</a>
+ <a class="ui green button {{if not .HasForkedRepo}}disabled{{end}}" href="{{.RepoLink}}/compare/{{.BranchName}}...{{.SignedUserName}}:{{.BranchName}}">{{.i18n.Tr "repo.pulls.new"}}</a>
{{end}}
</div>
</div>
<div class="ui divider"></div>
{{if .Issue.IsPull}}
- {{template "repo/issue/view_title" .}}
- {{template "repo/pulls/tab_menu" .}}
- <div class="ui bottom attached tab pull segment active" data-tab="request-{{.ID}}">
- {{template "repo/issue/view_content" .}}
- </div>
+ {{template "repo/issue/view_title" .}}
+ {{template "repo/pulls/tab_menu" .}}
+ <div class="ui bottom attached tab pull segment active" data-tab="request-{{.ID}}">
+ {{template "repo/issue/view_content" .}}
+ </div>
{{else}}
- {{template "repo/issue/view_content" .}}
+ {{template "repo/issue/view_content" .}}
{{end}}
</div>
</div>
-{{template "base/footer" .}} \ No newline at end of file
+{{template "base/footer" .}}
diff --git a/templates/repo/issue/view_content.tmpl b/templates/repo/issue/view_content.tmpl
index 0f4a6d07ed..c641d7a8ff 100644
--- a/templates/repo/issue/view_content.tmpl
+++ b/templates/repo/issue/view_content.tmpl
@@ -1,234 +1,232 @@
<div class="ui grid">
{{if .Flash}}
- <div class="sixteen wide column">
- {{template "base/alert" .}}
- </div>
- {{end}}
- {{if not .Issue.IsPull}}
- {{template "repo/issue/view_title" .}}
- {{end}}
-
- {{ $createdStr:= TimeSince .Issue.Created $.Lang }}
+ <div class="sixteen wide column">
+ {{template "base/alert" .}}
+ </div>
+ {{end}}
+ {{if not .Issue.IsPull}}
+ {{template "repo/issue/view_title" .}}
+ {{end}}
+
+ {{ $createdStr:= TimeSince .Issue.Created $.Lang }}
<div class="twelve wide column comment-list">
- <ui class="ui comments">
- <div class="comment">
- <a class="avatar" {{if gt .Issue.Poster.Id 0}}href="{{.Issue.Poster.HomeLink}}"{{end}}>
- <img src="{{.Issue.Poster.AvatarLink}}">
- </a>
- <div class="content">
+ <ui class="ui comments">
+ <div class="comment">
+ <a class="avatar" {{if gt .Issue.Poster.Id 0}}href="{{.Issue.Poster.HomeLink}}"{{end}}>
+ <img src="{{.Issue.Poster.AvatarLink}}">
+ </a>
+ <div class="content">
<div class="ui top attached header">
<span class="text grey"><a {{if gt .Issue.Poster.Id 0}}href="{{.Issue.Poster.HomeLink}}"{{end}}>{{.Issue.Poster.Name}}</a> {{.i18n.Tr "repo.issues.commented_at" .Issue.HashTag $createdStr | Safe}}</span>
- <div class="ui right actions">
- {{if .IsIssueOwner}}
- <a class="edit-content item" href="#"><i class="octicon octicon-pencil"></i></a>
- {{end}}
- </div>
+ <div class="ui right actions">
+ {{if .IsIssueOwner}}
+ <a class="edit-content item" href="#"><i class="octicon octicon-pencil"></i></a>
+ {{end}}
+ </div>
</div>
- <div class="ui attached segment">
- <div class="render-content markdown emojify">
- {{if .Issue.RenderedContent}}
- {{.Issue.RenderedContent|Str2html}}
- {{else}}
- <span class="no-content">{{.i18n.Tr "repo.issues.no_content"}}</span>
- {{end}}
- </div>
- <div class="raw-content hide">{{.Issue.Content}}</div>
- <div class="edit-content-zone hide" data-write="issue-{{.Issue.ID}}-write" data-preview="issue-{{.Issue.ID}}-preview" data-update-url="{{$.RepoLink}}/issues/{{.Issue.Index}}/content" data-context="{{.RepoLink}}"></div>
- </div>
- {{if .Issue.Attachments}}
- <div class="ui bottom attached segment">
- <div class="ui small images">
- {{range .Issue.Attachments}}
- <a target="_blank" href="{{AppSubUrl}}/attachments/{{.UUID}}"><img class="ui image" src="{{AppSubUrl}}/attachments/{{.UUID}}"></a>
- {{end}}
+ <div class="ui attached segment">
+ <div class="render-content markdown emojify">
+ {{if .Issue.RenderedContent}}
+ {{.Issue.RenderedContent|Str2html}}
+ {{else}}
+ <span class="no-content">{{.i18n.Tr "repo.issues.no_content"}}</span>
+ {{end}}
</div>
+ <div class="raw-content hide">{{.Issue.Content}}</div>
+ <div class="edit-content-zone hide" data-write="issue-{{.Issue.ID}}-write" data-preview="issue-{{.Issue.ID}}-preview" data-update-url="{{$.RepoLink}}/issues/{{.Issue.Index}}/content" data-context="{{.RepoLink}}"></div>
</div>
- {{end}}
- </div>
- </div>
+ {{if .Issue.Attachments}}
+ <div class="ui bottom attached segment">
+ <div class="ui small images">
+ {{range .Issue.Attachments}}
+ <a target="_blank" href="{{AppSubUrl}}/attachments/{{.UUID}}"><img class="ui image" src="{{AppSubUrl}}/attachments/{{.UUID}}"></a>
+ {{end}}
+ </div>
+ </div>
+ {{end}}
+ </div>
+ </div>
- {{range .Issue.Comments}}
- {{ $createdStr:= TimeSince .Created $.Lang }}
+ {{range .Issue.Comments}}
+ {{ $createdStr:= TimeSince .Created $.Lang }}
- <!-- 0 = COMMENT, 1 = REOPEN, 2 = CLOSE, 3 = ISSUE_REF, 4 = COMMIT_REF, 5 = COMMENT_REF, 6 = PULL_REF -->
- {{if eq .Type 0}}
- <div class="comment">
- <a class="avatar" {{if gt .Poster.Id 0}}href="{{.Poster.HomeLink}}"{{end}}>
- <img src="{{.Poster.AvatarLink}}">
- </a>
- <div class="content">
- <div class="ui top attached header">
- <span class="text grey"><a {{if gt .Poster.Id 0}}href="{{.Poster.HomeLink}}"{{end}}>{{.Poster.Name}}</a> {{$.i18n.Tr "repo.issues.commented_at" .HashTag $createdStr | Safe}}</span>
- <div class="ui right actions">
- {{if gt .ShowTag 0}}
- <div class="item tag">
- {{if eq .ShowTag 1}}
- {{$.i18n.Tr "repo.issues.poster"}}
- {{else if eq .ShowTag 2}}
- {{$.i18n.Tr "repo.issues.admin"}}
- {{else if eq .ShowTag 3}}
- {{$.i18n.Tr "repo.issues.owner"}}
- {{end}}
- </div>
- {{end}}
- {{if or $.IsRepositoryAdmin (eq .Poster.Id $.SignedUserID)}}
- <a class="edit-content item" href="#"><i class="octicon octicon-pencil"></i></a>
- {{end}}
- </div>
+ <!-- 0 = COMMENT, 1 = REOPEN, 2 = CLOSE, 3 = ISSUE_REF, 4 = COMMIT_REF, 5 = COMMENT_REF, 6 = PULL_REF -->
+ {{if eq .Type 0}}
+ <div class="comment">
+ <a class="avatar" {{if gt .Poster.Id 0}}href="{{.Poster.HomeLink}}"{{end}}>
+ <img src="{{.Poster.AvatarLink}}">
+ </a>
+ <div class="content">
+ <div class="ui top attached header">
+ <span class="text grey"><a {{if gt .Poster.Id 0}}href="{{.Poster.HomeLink}}"{{end}}>{{.Poster.Name}}</a> {{$.i18n.Tr "repo.issues.commented_at" .HashTag $createdStr | Safe}}</span>
+ <div class="ui right actions">
+ {{if gt .ShowTag 0}}
+ <div class="item tag">
+ {{if eq .ShowTag 1}}
+ {{$.i18n.Tr "repo.issues.poster"}}
+ {{else if eq .ShowTag 2}}
+ {{$.i18n.Tr "repo.issues.admin"}}
+ {{else if eq .ShowTag 3}}
+ {{$.i18n.Tr "repo.issues.owner"}}
+ {{end}}
+ </div>
+ {{end}}
+ {{if or $.IsRepositoryAdmin (eq .Poster.Id $.SignedUserID)}}
+ <a class="edit-content item" href="#"><i class="octicon octicon-pencil"></i></a>
+ {{end}}
+ </div>
+ </div>
+ <div class="ui attached segment">
+ <div class="render-content markdown emojify">
+ {{if .RenderedContent}}
+ {{.RenderedContent|Str2html}}
+ {{else}}
+ <span class="no-content">{{$.i18n.Tr "repo.issues.no_content"}}</span>
+ {{end}}
+ </div>
+ <div class="raw-content hide">{{.Content}}</div>
+ <div class="edit-content-zone hide" data-write="issuecomment-{{.ID}}-write" data-preview="issuecomment-{{.ID}}-preview" data-update-url="{{$.RepoLink}}/comments/{{.ID}}" data-context="{{$.RepoLink}}"></div>
+ </div>
+ {{if .Attachments}}
+ <div class="ui bottom attached segment">
+ <div class="ui small images">
+ {{range .Attachments}}
+ <a target="_blank" href="{{AppSubUrl}}/attachments/{{.UUID}}"><img class="ui image" src="{{AppSubUrl}}/attachments/{{.UUID}}"></a>
+ {{end}}
+ </div>
+ </div>
+ {{end}}
+ </div>
+ </div>
+ {{else if eq .Type 1}}
+ <div class="event">
+ <span class="octicon octicon-primitive-dot"></span>
+ <a class="ui avatar image" href="{{.Poster.HomeLink}}">
+ <img src="{{.Poster.AvatarLink}}">
+ </a>
+ <span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.Name}}</a> {{$.i18n.Tr "repo.issues.reopened_at" .EventTag $createdStr | Safe}}</span>
+ </div>
+ {{else if eq .Type 2}}
+ <div class="event">
+ <span class="octicon octicon-circle-slash"></span>
+ <a class="ui avatar image" href="{{.Poster.HomeLink}}">
+ <img src="{{.Poster.AvatarLink}}">
+ </a>
+ <span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.Name}}</a> {{$.i18n.Tr "repo.issues.closed_at" .EventTag $createdStr | Safe}}</span>
</div>
- <div class="ui attached segment">
- <div class="render-content markdown emojify">
- {{if .RenderedContent}}
- {{.RenderedContent|Str2html}}
- {{else}}
- <span class="no-content">{{$.i18n.Tr "repo.issues.no_content"}}</span>
- {{end}}
- </div>
- <div class="raw-content hide">{{.Content}}</div>
- <div class="edit-content-zone hide" data-write="issuecomment-{{.ID}}-write" data-preview="issuecomment-{{.ID}}-preview" data-update-url="{{$.RepoLink}}/comments/{{.ID}}" data-context="{{$.RepoLink}}"></div>
- </div>
- {{if .Attachments}}
- <div class="ui bottom attached segment">
- <div class="ui small images">
- {{range .Attachments}}
- <a target="_blank" href="{{AppSubUrl}}/attachments/{{.UUID}}"><img class="ui image" src="{{AppSubUrl}}/attachments/{{.UUID}}"></a>
- {{end}}
+ {{else if eq .Type 4}}
+ <div class="event">
+ <span class="octicon octicon-bookmark"></span>
+ <a class="ui avatar image" href="{{.Poster.HomeLink}}">
+ <img src="{{.Poster.AvatarLink}}">
+ </a>
+ <span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.Name}}</a> {{$.i18n.Tr "repo.issues.commit_ref_at" .EventTag $createdStr | Safe}}</span>
+
+ <div class="detail">
+ <span class="octicon octicon-git-commit"></span>
+ <span class="text grey">{{.Content | Str2html}}</span>
</div>
</div>
- {{end}}
- </div>
- </div>
- {{else if eq .Type 1}}
- <div class="event">
- <span class="octicon octicon-primitive-dot"></span>
- <a class="ui avatar image" href="{{.Poster.HomeLink}}">
- <img src="{{.Poster.AvatarLink}}">
- </a>
- <span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.Name}}</a> {{$.i18n.Tr "repo.issues.reopened_at" .EventTag $createdStr | Safe}}</span>
- </div>
- {{else if eq .Type 2}}
- <div class="event">
- <span class="octicon octicon-circle-slash"></span>
- <a class="ui avatar image" href="{{.Poster.HomeLink}}">
- <img src="{{.Poster.AvatarLink}}">
- </a>
- <span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.Name}}</a> {{$.i18n.Tr "repo.issues.closed_at" .EventTag $createdStr | Safe}}</span>
- </div>
- {{else if eq .Type 4}}
- <div class="event">
- <span class="octicon octicon-bookmark"></span>
- <a class="ui avatar image" href="{{.Poster.HomeLink}}">
- <img src="{{.Poster.AvatarLink}}">
- </a>
- <span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.Name}}</a> {{$.i18n.Tr "repo.issues.commit_ref_at" .EventTag $createdStr | Safe}}</span>
+ {{end}}
- <div class="detail">
- <span class="octicon octicon-git-commit"></span>
- <span class="text grey">{{.Content | Str2html}}</span>
- </div>
- </div>
{{end}}
- {{end}}
-
- {{if .Issue.IsPull}}
- <div class="comment merge box">
- <a class="avatar text
- {{if .Issue.HasMerged}}purple
- {{else if .Issue.IsClosed}}grey
- {{else if .IsPullReuqestBroken}}red
- {{else if .Issue.IsChecking}}yellow
- {{else if .Issue.CanAutoMerge}}green
- {{else}}red{{end}}">
- <span class="mega-octicon octicon-git-merge"></span>
- </a>
- <div class="content">
- <div class="ui merge segment">
- {{if .Issue.HasMerged}}
- <div class="item text purple">
- {{$.i18n.Tr "repo.pulls.has_merged"}}
- </div>
- {{else if .Issue.IsClosed}}
- <div class="item text grey">
- {{$.i18n.Tr "repo.pulls.reopen_to_merge"}}
- </div>
- {{else if .IsPullReuqestBroken}}
- <div class="item text red">
- <span class="octicon octicon-x"></span>
- {{$.i18n.Tr "repo.pulls.data_broken"}}
- </div>
- {{else if .Issue.IsChecking}}
- <div class="item text yellow">
- <span class="octicon octicon-sync"></span>
- {{$.i18n.Tr "repo.pulls.is_checking"}}
- </div>
- {{else if .Issue.CanAutoMerge}}
- <div class="item text green">
- <span class="octicon octicon-check"></span>
- {{$.i18n.Tr "repo.pulls.can_auto_merge_desc"}}
- </div>
- {{if .IsRepositoryAdmin}}
- <div class="ui divider"></div>
- <div>
- <form class="ui form" action="{{.Link}}/merge" method="post">
- {{.CsrfTokenHtml}}
- <button class="ui green button">
- <span class="octicon octicon-git-merge"></span> {{$.i18n.Tr "repo.pulls.merge_pull_request"}}
- </button>
- </form>
- </div>
- {{end}}
- {{else}}
- <div class="item text red">
- <span class="octicon octicon-x"></span>
- {{$.i18n.Tr "repo.pulls.cannot_auto_merge_desc"}}
- </div>
- <div class="item text grey">
- <span class="octicon octicon-info"></span>
- {{$.i18n.Tr "repo.pulls.cannot_auto_merge_helper"}}
- </div>
- {{end}}
- </div>
- </div>
- </div>
- {{end}}
-
- {{if .IsSigned}}
- <div class="comment form">
- <a class="avatar" href="{{.SignedUser.HomeLink}}">
- <img src="{{.SignedUser.AvatarLink}}">
- </a>
- <div class="content">
- <form class="ui segment form" id="comment-form" action="{{$.RepoLink}}/issues/{{.Issue.Index}}/comments" method="post">
- {{template "repo/issue/comment_tab" .}}
- {{.CsrfTokenHtml}}
- <input id="status" name="status" type="hidden">
- <div class="text right">
- {{if and .IsIssueOwner (not .DisableStatusChange)}}
- {{if .Issue.IsClosed}}
- <div id="status-button" class="ui green basic button" tabindex="6" data-status="{{.i18n.Tr "repo.issues.reopen_issue"}}" data-status-and-comment="{{.i18n.Tr "repo.issues.reopen_comment_issue"}}" data-status-val="reopen">
- {{.i18n.Tr "repo.issues.reopen_issue"}}
+ {{if .Issue.IsPull}}
+ <div class="comment merge box">
+ <a class="avatar text
+ {{if .Issue.HasMerged}}purple
+ {{else if .Issue.IsClosed}}grey
+ {{else if .IsPullReuqestBroken}}red
+ {{else if .Issue.IsChecking}}yellow
+ {{else if .Issue.CanAutoMerge}}green
+ {{else}}red{{end}}"><span class="mega-octicon octicon-git-merge"></span></a>
+ <div class="content">
+ <div class="ui merge segment">
+ {{if .Issue.HasMerged}}
+ <div class="item text purple">
+ {{$.i18n.Tr "repo.pulls.has_merged"}}
+ </div>
+ {{else if .Issue.IsClosed}}
+ <div class="item text grey">
+ {{$.i18n.Tr "repo.pulls.reopen_to_merge"}}
</div>
- {{else}}
- <div id="status-button" class="ui red basic button" tabindex="6" data-status="{{.i18n.Tr "repo.issues.close_issue"}}" data-status-and-comment="{{.i18n.Tr "repo.issues.close_comment_issue"}}" data-status-val="close">
- {{.i18n.Tr "repo.issues.close_issue"}}
+ {{else if .IsPullReuqestBroken}}
+ <div class="item text red">
+ <span class="octicon octicon-x"></span>
+ {{$.i18n.Tr "repo.pulls.data_broken"}}
</div>
+ {{else if .Issue.IsChecking}}
+ <div class="item text yellow">
+ <span class="octicon octicon-sync"></span>
+ {{$.i18n.Tr "repo.pulls.is_checking"}}
+ </div>
+ {{else if .Issue.CanAutoMerge}}
+ <div class="item text green">
+ <span class="octicon octicon-check"></span>
+ {{$.i18n.Tr "repo.pulls.can_auto_merge_desc"}}
+ </div>
+ {{if .IsRepositoryAdmin}}
+ <div class="ui divider"></div>
+ <div>
+ <form class="ui form" action="{{.Link}}/merge" method="post">
+ {{.CsrfTokenHtml}}
+ <button class="ui green button">
+ <span class="octicon octicon-git-merge"></span> {{$.i18n.Tr "repo.pulls.merge_pull_request"}}
+ </button>
+ </form>
+ </div>
{{end}}
+ {{else}}
+ <div class="item text red">
+ <span class="octicon octicon-x"></span>
+ {{$.i18n.Tr "repo.pulls.cannot_auto_merge_desc"}}
+ </div>
+ <div class="item text grey">
+ <span class="octicon octicon-info"></span>
+ {{$.i18n.Tr "repo.pulls.cannot_auto_merge_helper"}}
+ </div>
{{end}}
- <button class="ui green button" tabindex="5">
- {{.i18n.Tr "repo.issues.create_comment"}}
- </button>
- </div>
- </form>
- </div>
- </div>
- {{else}}
- <div class="ui warning message">
- <a href="{{AppSubUrl}}/user/sign_up" class="ui green button">{{.i18n.Tr "repo.issues.sign_up_for_free"}}</a>
- {{.i18n.Tr "repo.issues.sign_in_require_desc" .SignInLink | Safe}}
- </div>
- {{end}}
- </ui>
+ </div>
+ </div>
+ </div>
+ {{end}}
+
+ {{if .IsSigned}}
+ <div class="comment form">
+ <a class="avatar" href="{{.SignedUser.HomeLink}}">
+ <img src="{{.SignedUser.AvatarLink}}">
+ </a>
+ <div class="content">
+ <form class="ui segment form" id="comment-form" action="{{$.RepoLink}}/issues/{{.Issue.Index}}/comments" method="post">
+ {{template "repo/issue/comment_tab" .}}
+ {{.CsrfTokenHtml}}
+ <input id="status" name="status" type="hidden">
+ <div class="text right">
+ {{if and .IsIssueOwner (not .DisableStatusChange)}}
+ {{if .Issue.IsClosed}}
+ <div id="status-button" class="ui green basic button" tabindex="6" data-status="{{.i18n.Tr "repo.issues.reopen_issue"}}" data-status-and-comment="{{.i18n.Tr "repo.issues.reopen_comment_issue"}}" data-status-val="reopen">
+ {{.i18n.Tr "repo.issues.reopen_issue"}}
+ </div>
+ {{else}}
+ <div id="status-button" class="ui red basic button" tabindex="6" data-status="{{.i18n.Tr "repo.issues.close_issue"}}" data-status-and-comment="{{.i18n.Tr "repo.issues.close_comment_issue"}}" data-status-val="close">
+ {{.i18n.Tr "repo.issues.close_issue"}}
+ </div>
+ {{end}}
+ {{end}}
+ <button class="ui green button" tabindex="5">
+ {{.i18n.Tr "repo.issues.create_comment"}}
+ </button>
+ </div>
+ </form>
+ </div>
+ </div>
+ {{else}}
+ <div class="ui warning message">
+ <a href="{{AppSubUrl}}/user/sign_up" class="ui green button">{{.i18n.Tr "repo.issues.sign_up_for_free"}}</a>
+ {{.i18n.Tr "repo.issues.sign_in_require_desc" .SignInLink | Safe}}
+ </div>
+ {{end}}
+ </ui>
</div>
<div class="four wide column">
@@ -238,18 +236,18 @@
<strong>{{.i18n.Tr "repo.issues.new.labels"}}</strong>
<span class="octicon octicon-gear"></span>
</span>
- <div class="filter menu" data-action="update" data-update-url="{{$.RepoLink}}/issues/{{$.Issue.Index}}/label">
- <div class="no-select item">{{.i18n.Tr "repo.issues.new.clear_labels"}}</div>
- {{range .Labels}}
- <a class="{{if .IsChecked}}checked{{end}} item" href="#" data-id="{{.ID}}" data-id-selector="#label_{{.ID}}"><span class="octicon {{if .IsChecked}}octicon-check{{end}}"></span><span class="label color" style="background-color: {{.Color}}"></span> {{.Name}}</a>
- {{end}}
+ <div class="filter menu" data-action="update" data-update-url="{{$.RepoLink}}/issues/{{$.Issue.Index}}/label">
+ <div class="no-select item">{{.i18n.Tr "repo.issues.new.clear_labels"}}</div>
+ {{range .Labels}}
+ <a class="{{if .IsChecked}}checked{{end}} item" href="#" data-id="{{.ID}}" data-id-selector="#label_{{.ID}}"><span class="octicon {{if .IsChecked}}octicon-check{{end}}"></span><span class="label color" style="background-color: {{.Color}}"></span> {{.Name}}</a>
+ {{end}}
</div>
</div>
<div class="ui labels list">
<span class="no-select item {{if .HasSelectedLabel}}hide{{end}}">{{.i18n.Tr "repo.issues.new.no_label"}}</span>
- {{range .Labels}}
- <a class="{{if not .IsChecked}}hide{{end}} item" id="label_{{.ID}}" href="{{$.RepoLink}}/issues?labels={{.ID}}"><span class="label color" style="background-color: {{.Color}}"></span> <span class="text">{{.Name}}</span></a>
- {{end}}
+ {{range .Labels}}
+ <a class="{{if not .IsChecked}}hide{{end}} item" id="label_{{.ID}}" href="{{$.RepoLink}}/issues?labels={{.ID}}"><span class="label color" style="background-color: {{.Color}}"></span> <span class="text">{{.Name}}</span></a>
+ {{end}}
</div>
<div class="ui divider"></div>
@@ -259,35 +257,35 @@
<strong>{{.i18n.Tr "repo.issues.new.milestone"}}</strong>
<span class="octicon octicon-gear"></span>
</span>
- <div class="menu" data-action="update" data-update-url="{{$.RepoLink}}/issues/{{$.Issue.Index}}/milestone">
- <div class="no-select item">{{.i18n.Tr "repo.issues.new.clear_milestone"}}</div>
- {{if .OpenMilestones}}
- <div class="divider"></div>
- <div class="header">
- <i class="octicon octicon-milestone"></i>
- {{.i18n.Tr "repo.issues.new.open_milestone"}}
- </div>
- {{range .OpenMilestones}}
- <div class="item" data-id="{{.ID}}" data-href="{{$.RepoLink}}/issues?milestone={{.ID}}"> {{.Name}}</div>
- {{end}}
- {{end}}
- {{if .ClosedMilestones}}
- <div class="divider"></div>
- <div class="header">
- <i class="octicon octicon-milestone"></i>
- {{.i18n.Tr "repo.issues.new.closed_milestone"}}
- </div>
- {{range .ClosedMilestones}}
- <a class="item" data-id="{{.ID}}" data-href="{{$.RepoLink}}/issues?milestone={{.ID}}"> {{.Name}}</a>
- {{end}}
- {{end}}
+ <div class="menu" data-action="update" data-update-url="{{$.RepoLink}}/issues/{{$.Issue.Index}}/milestone">
+ <div class="no-select item">{{.i18n.Tr "repo.issues.new.clear_milestone"}}</div>
+ {{if .OpenMilestones}}
+ <div class="divider"></div>
+ <div class="header">
+ <i class="octicon octicon-milestone"></i>
+ {{.i18n.Tr "repo.issues.new.open_milestone"}}
+ </div>
+ {{range .OpenMilestones}}
+ <div class="item" data-id="{{.ID}}" data-href="{{$.RepoLink}}/issues?milestone={{.ID}}"> {{.Name}}</div>
+ {{end}}
+ {{end}}
+ {{if .ClosedMilestones}}
+ <div class="divider"></div>
+ <div class="header">
+ <i class="octicon octicon-milestone"></i>
+ {{.i18n.Tr "repo.issues.new.closed_milestone"}}
+ </div>
+ {{range .ClosedMilestones}}
+ <a class="item" data-id="{{.ID}}" data-href="{{$.RepoLink}}/issues?milestone={{.ID}}"> {{.Name}}</a>
+ {{end}}
+ {{end}}
</div>
</div>
<div class="ui select-milestone list">
<span class="no-select item {{if .Issue.Milestone}}hide{{end}}">{{.i18n.Tr "repo.issues.new.no_milestone"}}</span>
<div class="selected">
{{if .Issue.Milestone}}
- <a class="item" href="{{.RepoLink}}/issues?milestone={{.Issue.Milestone.ID}}"> {{.Issue.Milestone.Name}}</a>
+ <a class="item" href="{{.RepoLink}}/issues?milestone={{.Issue.Milestone.ID}}"> {{.Issue.Milestone.Name}}</a>
{{end}}
</div>
</div>
@@ -300,18 +298,18 @@
<strong>{{.i18n.Tr "repo.issues.new.assignee"}}</strong>
<span class="octicon octicon-gear"></span>
</span>
- <div class="menu" data-action="update" data-update-url="{{$.RepoLink}}/issues/{{$.Issue.Index}}/assignee">
- <div class="no-select item">{{.i18n.Tr "repo.issues.new.clear_assignee"}}</div>
- {{range .Assignees}}
- <div class="item" data-id="{{.Id}}" data-href="{{$.RepoLink}}/issues?assignee={{.Id}}" data-avatar="{{.AvatarLink}}"><img src="{{.AvatarLink}}"> {{.Name}}</div>
- {{end}}
+ <div class="menu" data-action="update" data-update-url="{{$.RepoLink}}/issues/{{$.Issue.Index}}/assignee">
+ <div class="no-select item">{{.i18n.Tr "repo.issues.new.clear_assignee"}}</div>
+ {{range .Assignees}}
+ <div class="item" data-id="{{.Id}}" data-href="{{$.RepoLink}}/issues?assignee={{.Id}}" data-avatar="{{.AvatarLink}}"><img src="{{.AvatarLink}}"> {{.Name}}</div>
+ {{end}}
</div>
</div>
<div class="ui select-assignee list">
<span class="no-select item {{if .Issue.Assignee}}hide{{end}}">{{.i18n.Tr "repo.issues.new.no_assignee"}}</span>
<div class="selected">
{{if .Issue.Assignee}}
- <a class="item" href="{{$.RepoLink}}/issues?assignee={{.Issue.Assignee.Id}}"><img class="ui avatar image" src="{{.Issue.Assignee.AvatarLink}}"> {{.Issue.Assignee.Name}}</a>
+ <a class="item" href="{{$.RepoLink}}/issues?assignee={{.Issue.Assignee.Id}}"><img class="ui avatar image" src="{{.Issue.Assignee.AvatarLink}}"> {{.Issue.Assignee.Name}}</a>
{{end}}
</div>
</div>
@@ -322,22 +320,22 @@
<div class="hide" id="edit-content-form">
<div class="ui comment form">
<div class="ui top attached tabular menu">
- <a class="active write item">{{$.i18n.Tr "repo.release.write"}}</a>
- <a class="preview item" data-url="{{AppSubUrl}}/api/v1/markdown" data-context="{{$.RepoLink}}">{{$.i18n.Tr "repo.release.preview"}}</a>
+ <a class="active write item">{{$.i18n.Tr "repo.release.write"}}</a>
+ <a class="preview item" data-url="{{AppSubUrl}}/api/v1/markdown" data-context="{{$.RepoLink}}">{{$.i18n.Tr "repo.release.preview"}}</a>
</div>
<div class="ui bottom attached active write tab segment">
- <textarea tabindex="1" id="content" name="content"></textarea>
+ <textarea tabindex="1" id="content" name="content"></textarea>
</div>
<div class="ui bottom attached tab preview segment markdown emojify">
- {{$.i18n.Tr "repo.release.loading"}}
+ {{$.i18n.Tr "repo.release.loading"}}
</div>
- <div class="text right edit buttons">
+ <div class="text right edit buttons">
<div class="ui basic blue cancel button" tabindex="3">{{.i18n.Tr "repo.issues.cancel"}}</div>
<div class="ui green save button" tabindex="2">{{.i18n.Tr "repo.issues.save"}}</div>
- </div>
+ </div>
</div>
</div>
<div class="hide" id="no-content">
<span class="no-content">{{.i18n.Tr "repo.issues.no_content"}}</span>
-</div> \ No newline at end of file
+</div>
diff --git a/templates/repo/issue/view_title.tmpl b/templates/repo/issue/view_title.tmpl
index ef6e4f8c1c..f8d93a0bc0 100644
--- a/templates/repo/issue/view_title.tmpl
+++ b/templates/repo/issue/view_title.tmpl
@@ -3,47 +3,47 @@
<h1 class="twelve wide column">
<span class="index">#{{.Issue.Index}}</span> <span id="issue-title">{{.Issue.Name}}</span>
<div id="edit-title-input" class="ui input" style="display: none">
- <input value="{{.Issue.Name}}">
+ <input value="{{.Issue.Name}}">
</div>
</h1>
{{if .IsIssueOwner}}
- <div class="four wide column">
- <div class="edit-zone text right">
- <div id="edit-title" class="ui basic green not-in-edit button">{{.i18n.Tr "repo.issues.edit"}}</div>
- <div id="cancel-edit-title" class="ui basic blue in-edit button" style="display: none">{{.i18n.Tr "repo.issues.cancel"}}</div>
- <div id="save-edit-title" class="ui green in-edit button" style="display: none" data-update-url="{{$.RepoLink}}/issues/{{.Issue.Index}}/title">{{.i18n.Tr "repo.issues.save"}}</div>
+ <div class="four wide column">
+ <div class="edit-zone text right">
+ <div id="edit-title" class="ui basic green not-in-edit button">{{.i18n.Tr "repo.issues.edit"}}</div>
+ <div id="cancel-edit-title" class="ui basic blue in-edit button" style="display: none">{{.i18n.Tr "repo.issues.cancel"}}</div>
+ <div id="save-edit-title" class="ui green in-edit button" style="display: none" data-update-url="{{$.RepoLink}}/issues/{{.Issue.Index}}/title">{{.i18n.Tr "repo.issues.save"}}</div>
+ </div>
</div>
- </div>
{{end}}
</div>
{{if .HasMerged}}
- <div class="ui purple large label"><i class="octicon octicon-git-pull-request"></i> {{.i18n.Tr "repo.pulls.merged"}}</div>
+ <div class="ui purple large label"><i class="octicon octicon-git-pull-request"></i> {{.i18n.Tr "repo.pulls.merged"}}</div>
{{else if .Issue.IsClosed}}
- <div class="ui red large label"><i class="octicon octicon-issue-closed"></i> {{.i18n.Tr "repo.issues.closed_title"}}</div>
+ <div class="ui red large label"><i class="octicon octicon-issue-closed"></i> {{.i18n.Tr "repo.issues.closed_title"}}</div>
{{else}}
- <div class="ui green large label"><i class="octicon octicon-issue-opened"></i> {{.i18n.Tr "repo.issues.open_title"}}</div>
+ <div class="ui green large label"><i class="octicon octicon-issue-opened"></i> {{.i18n.Tr "repo.issues.open_title"}}</div>
{{end}}
{{if .Issue.IsPull}}
{{if .Issue.HasMerged}}
- {{ $mergedStr:= TimeSince .Issue.Merged $.Lang }}
- <a {{if gt .Issue.Merger.Id 0}}href="{{.Issue.Merger.HomeLink}}"{{end}}>{{.Issue.Merger.Name}}</a>
- <span class="pull-desc">{{$.i18n.Tr "repo.pulls.merged_title_desc" .NumCommits .HeadTarget .BaseTarget $mergedStr | Safe}}</span>
+ {{ $mergedStr:= TimeSince .Issue.Merged $.Lang }}
+ <a {{if gt .Issue.Merger.Id 0}}href="{{.Issue.Merger.HomeLink}}"{{end}}>{{.Issue.Merger.Name}}</a>
+ <span class="pull-desc">{{$.i18n.Tr "repo.pulls.merged_title_desc" .NumCommits .HeadTarget .BaseTarget $mergedStr | Safe}}</span>
{{else}}
- <a {{if gt .Issue.Poster.Id 0}}href="{{.Issue.Poster.HomeLink}}"{{end}}>{{.Issue.Poster.Name}}</a>
- <span class="pull-desc">{{$.i18n.Tr "repo.pulls.title_desc" .NumCommits .HeadTarget .BaseTarget | Str2html}}</span>
+ <a {{if gt .Issue.Poster.Id 0}}href="{{.Issue.Poster.HomeLink}}"{{end}}>{{.Issue.Poster.Name}}</a>
+ <span class="pull-desc">{{$.i18n.Tr "repo.pulls.title_desc" .NumCommits .HeadTarget .BaseTarget | Str2html}}</span>
{{end}}
{{else}}
- {{ $createdStr:= TimeSince .Issue.Created $.Lang }}
- <span class="time-desc">
- {{if gt .Issue.Poster.Id 0}}
- {{$.i18n.Tr "repo.issues.opened_by" $createdStr .Issue.Poster.HomeLink .Issue.Poster.Name | Safe}}
- {{else}}
- {{$.i18n.Tr "repo.issues.opened_by_fake" $createdStr .Issue.Poster.Name | Safe}}
- {{end}}
- ·
- {{$.i18n.Tr "repo.issues.num_comments" .Issue.NumComments}}
- </span>
+ {{ $createdStr:= TimeSince .Issue.Created $.Lang }}
+ <span class="time-desc">
+ {{if gt .Issue.Poster.Id 0}}
+ {{$.i18n.Tr "repo.issues.opened_by" $createdStr .Issue.Poster.HomeLink .Issue.Poster.Name | Safe}}
+ {{else}}
+ {{$.i18n.Tr "repo.issues.opened_by_fake" $createdStr .Issue.Poster.Name | Safe}}
+ {{end}}
+ ·
+ {{$.i18n.Tr "repo.issues.num_comments" .Issue.NumComments}}
+ </span>
{{end}}
<div class="ui divider"></div>
-</div> \ No newline at end of file
+</div>
diff --git a/templates/repo/migrate.tmpl b/templates/repo/migrate.tmpl
index 222b275006..7973d585f4 100644
--- a/templates/repo/migrate.tmpl
+++ b/templates/repo/migrate.tmpl
@@ -3,99 +3,99 @@
<div class="ui middle very relaxed page grid">
<div class="column">
<form class="ui form" action="{{.Link}}" method="post">
- {{.CsrfTokenHtml}}
+ {{.CsrfTokenHtml}}
<h3 class="ui top attached header">
- {{.i18n.Tr "new_migrate"}}
+ {{.i18n.Tr "new_migrate"}}
</h3>
<div class="ui attached segment">
{{template "base/alert" .}}
<div class="inline required field {{if .Err_CloneAddr}}error{{end}}">
<label for="clone_addr">{{.i18n.Tr "repo.migrate.clone_address"}}</label>
<input id="clone_addr" name="clone_addr" value="{{.clone_addr}}" autofocus required>
- <span class="help">{{.i18n.Tr "repo.migrate.clone_address_desc"}}</span>
+ <span class="help">{{.i18n.Tr "repo.migrate.clone_address_desc"}}</span>
+ </div>
+ <div class="ui accordion optional field">
+ <div class="title {{if .Err_Auth}}text red active{{end}}">
+ <i class="icon dropdown"></i>
+ {{.i18n.Tr "repo.need_auth"}}
+ </div>
+ <div class="content {{if .Err_Auth}}active{{end}}">
+ <div class="inline field {{if .Err_Auth}}error{{end}}">
+ <label for="auth_username">{{.i18n.Tr "username"}}</label>
+ <input id="auth_username" name="auth_username" value="{{.auth_username}}" {{if not .auth_username}}data-need-clear="true"{{end}}>
+ </div>
+ <input class="fake" type="password">
+ <div class="inline field {{if .Err_Auth}}error{{end}}">
+ <label for="auth_password">{{.i18n.Tr "password"}}</label>
+ <input id="auth_password" name="auth_password" type="password" value="{{.auth_password}}">
+ </div>
+ </div>
</div>
- <div class="ui accordion optional field">
- <div class="title {{if .Err_Auth}}text red active{{end}}">
- <i class="icon dropdown"></i>
- {{.i18n.Tr "repo.need_auth"}}
- </div>
- <div class="content {{if .Err_Auth}}active{{end}}">
- <div class="inline field {{if .Err_Auth}}error{{end}}">
- <label for="auth_username">{{.i18n.Tr "username"}}</label>
- <input id="auth_username" name="auth_username" value="{{.auth_username}}" {{if not .auth_username}}data-need-clear="true"{{end}}>
- </div>
- <input class="fake" type="password">
- <div class="inline field {{if .Err_Auth}}error{{end}}">
- <label for="auth_password">{{.i18n.Tr "password"}}</label>
- <input id="auth_password" name="auth_password" type="password" value="{{.auth_password}}">
- </div>
- </div>
- </div>
<div class="ui divider"></div>
- <div class="inline required field {{if .Err_Owner}}error{{end}}">
- <label>{{.i18n.Tr "repo.owner"}}</label>
- <div class="ui selection owner dropdown">
- <input type="hidden" id="uid" name="uid" value="{{.ContextUser.Id}}" required>
- <span class="text">
- <img class="ui mini image" src="{{.ContextUser.AvatarLink}}">
- {{.ContextUser.ShortName 20}}
- </span>
- <i class="dropdown icon"></i>
- <div class="menu">
- <div class="item" data-value="{{.SignedUser.Id}}">
- <img class="ui mini image" src="{{.SignedUser.AvatarLink}}">
- {{.SignedUser.ShortName 20}}
- </div>
- {{range .Orgs}}
- <div class="item" data-value="{{.Id}}">
- <img class="ui mini image" src="{{.AvatarLink}}">
- {{.ShortName 20}}
- </div>
- {{end}}
- </div>
- </div>
- </div>
+ <div class="inline required field {{if .Err_Owner}}error{{end}}">
+ <label>{{.i18n.Tr "repo.owner"}}</label>
+ <div class="ui selection owner dropdown">
+ <input type="hidden" id="uid" name="uid" value="{{.ContextUser.Id}}" required>
+ <span class="text">
+ <img class="ui mini image" src="{{.ContextUser.AvatarLink}}">
+ {{.ContextUser.ShortName 20}}
+ </span>
+ <i class="dropdown icon"></i>
+ <div class="menu">
+ <div class="item" data-value="{{.SignedUser.Id}}">
+ <img class="ui mini image" src="{{.SignedUser.AvatarLink}}">
+ {{.SignedUser.ShortName 20}}
+ </div>
+ {{range .Orgs}}
+ <div class="item" data-value="{{.Id}}">
+ <img class="ui mini image" src="{{.AvatarLink}}">
+ {{.ShortName 20}}
+ </div>
+ {{end}}
+ </div>
+ </div>
+ </div>
- <div class="inline required field {{if .Err_RepoName}}error{{end}}">
- <label for="repo_name">{{.i18n.Tr "repo.repo_name"}}</label>
- <input id="repo_name" name="repo_name" value="{{.repo_name}}" required>
- </div>
- <div class="inline field">
- <label>{{.i18n.Tr "repo.visibility"}}</label>
- <div class="ui checkbox">
- {{if .IsForcedPrivate}}
- <input name="private" type="checkbox" checked readonly>
- <label>{{.i18n.Tr "repo.visiblity_helper_forced" | Safe}}</label>
- {{else}}
- <input name="private" type="checkbox" {{if .private}}checked{{end}}>
- <label>{{.i18n.Tr "repo.visiblity_helper" | Safe}}</label>
- {{end}}
- </div>
- </div>
- <div class="inline field">
- <label>{{.i18n.Tr "repo.migrate_type"}}</label>
- <div class="ui checkbox">
- <input name="mirror" type="checkbox" {{if .mirror}}checked{{end}}>
- <label>{{.i18n.Tr "repo.migrate_type_helper" | Safe}}</label>
- </div>
- </div>
- <div class="inline field {{if .Err_Description}}error{{end}}">
- <label for="description">{{.i18n.Tr "repo.repo_desc"}}</label>
- <textarea id="description" name="description">{{.description}}</textarea>
- </div>
+ <div class="inline required field {{if .Err_RepoName}}error{{end}}">
+ <label for="repo_name">{{.i18n.Tr "repo.repo_name"}}</label>
+ <input id="repo_name" name="repo_name" value="{{.repo_name}}" required>
+ </div>
+ <div class="inline field">
+ <label>{{.i18n.Tr "repo.visibility"}}</label>
+ <div class="ui checkbox">
+ {{if .IsForcedPrivate}}
+ <input name="private" type="checkbox" checked readonly>
+ <label>{{.i18n.Tr "repo.visiblity_helper_forced" | Safe}}</label>
+ {{else}}
+ <input name="private" type="checkbox" {{if .private}}checked{{end}}>
+ <label>{{.i18n.Tr "repo.visiblity_helper" | Safe}}</label>
+ {{end}}
+ </div>
+ </div>
+ <div class="inline field">
+ <label>{{.i18n.Tr "repo.migrate_type"}}</label>
+ <div class="ui checkbox">
+ <input name="mirror" type="checkbox" {{if .mirror}}checked{{end}}>
+ <label>{{.i18n.Tr "repo.migrate_type_helper" | Safe}}</label>
+ </div>
+ </div>
+ <div class="inline field {{if .Err_Description}}error{{end}}">
+ <label for="description">{{.i18n.Tr "repo.repo_desc"}}</label>
+ <textarea id="description" name="description">{{.description}}</textarea>
+ </div>
- <div class="inline field">
- <label></label>
- <button class="ui green button">
- {{.i18n.Tr "repo.migrate_repo"}}
- </button>
- <a class="ui button" href="{{AppSubUrl}}/">{{.i18n.Tr "cancel"}}</a>
- </div>
- </div>
+ <div class="inline field">
+ <label></label>
+ <button class="ui green button">
+ {{.i18n.Tr "repo.migrate_repo"}}
+ </button>
+ <a class="ui button" href="{{AppSubUrl}}/">{{.i18n.Tr "cancel"}}</a>
+ </div>
+ </div>
</form>
</div>
</div>
</div>
-{{template "base/footer" .}} \ No newline at end of file
+{{template "base/footer" .}}
diff --git a/templates/repo/pulls/commits.tmpl b/templates/repo/pulls/commits.tmpl
index 851880383e..5095009a9e 100644
--- a/templates/repo/pulls/commits.tmpl
+++ b/templates/repo/pulls/commits.tmpl
@@ -11,9 +11,9 @@
<div class="ui divider"></div>
{{template "repo/issue/view_title" .}}
{{template "repo/pulls/tab_menu" .}}
- <div class="ui bottom attached tab pull segment active">
+ <div class="ui bottom attached tab pull segment active">
{{template "repo/commits_table" .}}
- </div>
+ </div>
</div>
</div>
-{{template "base/footer" .}} \ No newline at end of file
+{{template "base/footer" .}}
diff --git a/templates/repo/pulls/compare.tmpl b/templates/repo/pulls/compare.tmpl
index c3851d8053..f1236c2ba6 100644
--- a/templates/repo/pulls/compare.tmpl
+++ b/templates/repo/pulls/compare.tmpl
@@ -4,63 +4,63 @@
<div class="ui container">
<div class="sixteen wide column page grid">
<h2 class="ui header">
- {{.i18n.Tr "repo.pulls.compare_changes"}}
- <div class="sub header">{{.i18n.Tr "repo.pulls.compare_changes_desc"}}</div>
+ {{.i18n.Tr "repo.pulls.compare_changes"}}
+ <div class="sub header">{{.i18n.Tr "repo.pulls.compare_changes_desc"}}</div>
</h2>
<div class="ui segment choose branch">
<span class="octicon octicon-git-compare"></span>
<div class="ui floating filter dropdown" data-no-results="{{.i18n.Tr "repo.pulls.no_results"}}">
<div class="ui basic small button">
- <span class="text">{{.i18n.Tr "repo.pulls.compare_base"}}: {{$.BaseBranch}}</span>
- <i class="dropdown icon"></i>
+ <span class="text">{{.i18n.Tr "repo.pulls.compare_base"}}: {{$.BaseBranch}}</span>
+ <i class="dropdown icon"></i>
</div>
- <div class="menu">
- <div class="ui icon search input">
- <i class="filter icon"></i>
- <input name="search" placeholder="{{.i18n.Tr "repo.pulls.filter_branch"}}...">
- </div>
- <div class="scrolling menu">
- {{range .Branches}}
- <div class="item {{if eq $.BaseBranch .}}selected{{end}}" data-url="{{$.RepoLink}}/compare/{{.}}...{{$.SignedUser.Name}}:{{$.HeadBranch}}">{{.}}</div>
- {{end}}
- </div>
+ <div class="menu">
+ <div class="ui icon search input">
+ <i class="filter icon"></i>
+ <input name="search" placeholder="{{.i18n.Tr "repo.pulls.filter_branch"}}...">
+ </div>
+ <div class="scrolling menu">
+ {{range .Branches}}
+ <div class="item {{if eq $.BaseBranch .}}selected{{end}}" data-url="{{$.RepoLink}}/compare/{{.}}...{{$.SignedUser.Name}}:{{$.HeadBranch}}">{{.}}</div>
+ {{end}}
+ </div>
</div>
- </div>
- ...
+ </div>
+ ...
<div class="ui floating filter dropdown">
<div class="ui basic small button">
- <span class="text">{{.i18n.Tr "repo.pulls.compare_compare"}}: {{$.HeadBranch}}</span>
- <i class="dropdown icon"></i>
+ <span class="text">{{.i18n.Tr "repo.pulls.compare_compare"}}: {{$.HeadBranch}}</span>
+ <i class="dropdown icon"></i>
</div>
- <div class="menu">
- <div class="ui icon search input">
- <i class="filter icon"></i>
- <input name="search" placeholder="{{.i18n.Tr "repo.pulls.filter_branch"}}...">
- </div>
- <div class="scrolling menu">
- {{range .HeadBranches}}
- <div class="{{if eq $.HeadBranch .}}selected{{end}} item" data-url="{{$.RepoLink}}/compare/{{$.BaseBranch}}...{{$.SignedUser.Name}}:{{.}}">{{.}}</div>
- {{end}}
- </div>
+ <div class="menu">
+ <div class="ui icon search input">
+ <i class="filter icon"></i>
+ <input name="search" placeholder="{{.i18n.Tr "repo.pulls.filter_branch"}}...">
+ </div>
+ <div class="scrolling menu">
+ {{range .HeadBranches}}
+ <div class="{{if eq $.HeadBranch .}}selected{{end}} item" data-url="{{$.RepoLink}}/compare/{{$.BaseBranch}}...{{$.SignedUser.Name}}:{{.}}">{{.}}</div>
+ {{end}}
+ </div>
</div>
- </div>
+ </div>
</div>
{{if .IsNothingToCompare}}
- <div class="ui segment">
- {{.i18n.Tr "repo.pulls.nothing_to_compare"}}
- </div>
+ <div class="ui segment">
+ {{.i18n.Tr "repo.pulls.nothing_to_compare"}}
+ </div>
{{else if .HasPullRequest}}
- <div class="ui segment">
- {{.i18n.Tr "repo.pulls.has_pull_request" $.RepoLink $.RepoRelPath .PullRequest.Index | Safe}}
- </div>
+ <div class="ui segment">
+ {{.i18n.Tr "repo.pulls.has_pull_request" $.RepoLink $.RepoRelPath .PullRequest.Index | Safe}}
+ </div>
{{else}}
- {{template "repo/issue/new_form" .}}
- {{template "repo/commits_table" .}}
- {{template "repo/diff_box" .}}
- {{end}}
+ {{template "repo/issue/new_form" .}}
+ {{template "repo/commits_table" .}}
+ {{template "repo/diff_box" .}}
+ {{end}}
</div>
</div>
</div>
-{{template "base/footer" .}} \ No newline at end of file
+{{template "base/footer" .}}
diff --git a/templates/repo/pulls/files.tmpl b/templates/repo/pulls/files.tmpl
index 1226944b41..9070112e53 100644
--- a/templates/repo/pulls/files.tmpl
+++ b/templates/repo/pulls/files.tmpl
@@ -11,9 +11,9 @@
<div class="ui divider"></div>
{{template "repo/issue/view_title" .}}
{{template "repo/pulls/tab_menu" .}}
- <div class="ui bottom attached tab pull segment active">
+ <div class="ui bottom attached tab pull segment active">
{{template "repo/diff_box" .}}
- </div>
+ </div>
</div>
</div>
-{{template "base/footer" .}} \ No newline at end of file
+{{template "base/footer" .}}
diff --git a/templates/repo/pulls/fork.tmpl b/templates/repo/pulls/fork.tmpl
index b2f857dac6..e02ee180f6 100644
--- a/templates/repo/pulls/fork.tmpl
+++ b/templates/repo/pulls/fork.tmpl
@@ -3,69 +3,69 @@
<div class="ui middle very relaxed page grid">
<div class="column">
<form class="ui form" action="{{.Link}}" method="post">
- {{.CsrfTokenHtml}}
+ {{.CsrfTokenHtml}}
<h3 class="ui top attached header">
- {{.i18n.Tr "new_fork"}}
+ {{.i18n.Tr "new_fork"}}
</h3>
<div class="ui attached segment">
{{template "base/alert" .}}
- <div class="inline required field {{if .Err_Owner}}error{{end}}">
- <label>{{.i18n.Tr "repo.owner"}}</label>
- <div class="ui selection owner dropdown">
- <input type="hidden" id="uid" name="uid" value="{{.ContextUser.Id}}" required>
- <span class="text">
- <img class="ui mini image" src="{{.ContextUser.AvatarLink}}">
- {{.ContextUser.ShortName 20}}
- </span>
- <i class="dropdown icon"></i>
- <div class="menu">
- <div class="item" data-value="{{.SignedUser.Id}}">
- <img class="ui mini image" src="{{.SignedUser.AvatarLink}}">
- {{.SignedUser.ShortName 20}}
- </div>
- {{range .Orgs}}
- {{if .IsOwnedBy $.SignedUser.Id}}
- <div class="item" data-value="{{.Id}}">
- <img class="ui mini image" src="{{.AvatarLink}}">
- {{.ShortName 20}}
- </div>
- {{end}}
- {{end}}
- </div>
- </div>
- </div>
+ <div class="inline required field {{if .Err_Owner}}error{{end}}">
+ <label>{{.i18n.Tr "repo.owner"}}</label>
+ <div class="ui selection owner dropdown">
+ <input type="hidden" id="uid" name="uid" value="{{.ContextUser.Id}}" required>
+ <span class="text">
+ <img class="ui mini image" src="{{.ContextUser.AvatarLink}}">
+ {{.ContextUser.ShortName 20}}
+ </span>
+ <i class="dropdown icon"></i>
+ <div class="menu">
+ <div class="item" data-value="{{.SignedUser.Id}}">
+ <img class="ui mini image" src="{{.SignedUser.AvatarLink}}">
+ {{.SignedUser.ShortName 20}}
+ </div>
+ {{range .Orgs}}
+ {{if .IsOwnedBy $.SignedUser.Id}}
+ <div class="item" data-value="{{.Id}}">
+ <img class="ui mini image" src="{{.AvatarLink}}">
+ {{.ShortName 20}}
+ </div>
+ {{end}}
+ {{end}}
+ </div>
+ </div>
+ </div>
- <div class="inline field">
- <label>{{.i18n.Tr "repo.fork_from"}}</label>
+ <div class="inline field">
+ <label>{{.i18n.Tr "repo.fork_from"}}</label>
<a href="{{AppSubUrl}}/{{.ForkFrom}}">{{.ForkFrom}}</a>
- </div>
- <div class="inline required field {{if .Err_RepoName}}error{{end}}">
- <label for="repo_name">{{.i18n.Tr "repo.repo_name"}}</label>
- <input id="repo_name" name="repo_name" value="{{.repo_name}}" required>
- </div>
- <div class="inline field">
- <label>{{.i18n.Tr "repo.visibility"}}</label>
- <div class="ui read-only checkbox">
- <input type="checkbox" {{if .IsPrivate}}checked{{end}}>
- <label>{{.i18n.Tr "repo.visiblity_helper" | Safe}}</label>
- </div>
- <span class="help">{{.i18n.Tr "repo.fork_visiblity_helper"}}</span>
- </div>
- <div class="inline field {{if .Err_Description}}error{{end}}">
- <label for="description">{{.i18n.Tr "repo.repo_desc"}}</label>
- <textarea id="description" name="description">{{.description}}</textarea>
- </div>
+ </div>
+ <div class="inline required field {{if .Err_RepoName}}error{{end}}">
+ <label for="repo_name">{{.i18n.Tr "repo.repo_name"}}</label>
+ <input id="repo_name" name="repo_name" value="{{.repo_name}}" required>
+ </div>
+ <div class="inline field">
+ <label>{{.i18n.Tr "repo.visibility"}}</label>
+ <div class="ui read-only checkbox">
+ <input type="checkbox" {{if .IsPrivate}}checked{{end}}>
+ <label>{{.i18n.Tr "repo.visiblity_helper" | Safe}}</label>
+ </div>
+ <span class="help">{{.i18n.Tr "repo.fork_visiblity_helper"}}</span>
+ </div>
+ <div class="inline field {{if .Err_Description}}error{{end}}">
+ <label for="description">{{.i18n.Tr "repo.repo_desc"}}</label>
+ <textarea id="description" name="description">{{.description}}</textarea>
+ </div>
- <div class="inline field">
- <label></label>
- <button class="ui green button">
- {{.i18n.Tr "repo.fork_repo"}}
- </button>
- <a class="ui button" href="{{AppSubUrl}}/{{.ForkFrom}}">{{.i18n.Tr "cancel"}}</a>
- </div>
- </div>
+ <div class="inline field">
+ <label></label>
+ <button class="ui green button">
+ {{.i18n.Tr "repo.fork_repo"}}
+ </button>
+ <a class="ui button" href="{{AppSubUrl}}/{{.ForkFrom}}">{{.i18n.Tr "cancel"}}</a>
+ </div>
+ </div>
</form>
</div>
</div>
</div>
-{{template "base/footer" .}} \ No newline at end of file
+{{template "base/footer" .}}
diff --git a/templates/repo/pulls/tab_menu.tmpl b/templates/repo/pulls/tab_menu.tmpl
index 0023cd29e4..d6a9920bff 100644
--- a/templates/repo/pulls/tab_menu.tmpl
+++ b/templates/repo/pulls/tab_menu.tmpl
@@ -1,17 +1,17 @@
<div class="ui top attached pull tabular menu">
- <a class="item {{if .PageIsPullConversation}}active{{end}}" href="{{.RepoLink}}/pulls/{{.Issue.Index}}">
- <span class="octicon octicon-comment-discussion"></span>
- {{$.i18n.Tr "repo.pulls.tab_conversation"}}
- <span class="ui label">{{.Issue.NumComments}}</span>
- </a>
- <a class="item {{if .PageIsPullCommits}}active{{end}}" {{if .NumCommits}}href="{{.RepoLink}}/pulls/{{.Issue.Index}}/commits"{{end}}>
- <span class="octicon octicon-git-commit"></span>
- {{$.i18n.Tr "repo.pulls.tab_commits"}}
- <span class="ui label">{{if .NumCommits}}{{.NumCommits}}{{else}}N/A{{end}}</span>
- </a>
- <a class="item {{if .PageIsPullFiles}}active{{end}}" {{if .NumFiles}}href="{{.RepoLink}}/pulls/{{.Issue.Index}}/files"{{end}}>
- <span class="octicon octicon-diff"></span>
- {{$.i18n.Tr "repo.pulls.tab_files"}}
- <span class="ui label">{{if .NumFiles}}{{.NumFiles}}{{else}}N/A{{end}}</span>
- </a>
-</div> \ No newline at end of file
+ <a class="item {{if .PageIsPullConversation}}active{{end}}" href="{{.RepoLink}}/pulls/{{.Issue.Index}}">
+ <span class="octicon octicon-comment-discussion"></span>
+ {{$.i18n.Tr "repo.pulls.tab_conversation"}}
+ <span class="ui label">{{.Issue.NumComments}}</span>
+ </a>
+ <a class="item {{if .PageIsPullCommits}}active{{end}}" {{if .NumCommits}}href="{{.RepoLink}}/pulls/{{.Issue.Index}}/commits"{{end}}>
+ <span class="octicon octicon-git-commit"></span>
+ {{$.i18n.Tr "repo.pulls.tab_commits"}}
+ <span class="ui label">{{if .NumCommits}}{{.NumCommits}}{{else}}N/A{{end}}</span>
+ </a>
+ <a class="item {{if .PageIsPullFiles}}active{{end}}" {{if .NumFiles}}href="{{.RepoLink}}/pulls/{{.Issue.Index}}/files"{{end}}>
+ <span class="octicon octicon-diff"></span>
+ {{$.i18n.Tr "repo.pulls.tab_files"}}
+ <span class="ui label">{{if .NumFiles}}{{.NumFiles}}{{else}}N/A{{end}}</span>
+ </a>
+</div>
diff --git a/templates/repo/release/list.tmpl b/templates/repo/release/list.tmpl
index 5970bda3d2..295ca0b3bd 100644
--- a/templates/repo/release/list.tmpl
+++ b/templates/repo/release/list.tmpl
@@ -1,80 +1,80 @@
{{template "base/head" .}}
<div class="repository release">
- {{template "repo/header" .}}
- <div class="ui container">
- {{template "base/alert" .}}
- <h2 class="ui header">
- {{.i18n.Tr "repo.release.releases"}}
- {{if .IsRepositoryAdmin}}
- <div class="ui right">
- <a class="ui small green button" href="{{$.RepoLink}}/releases/new">
- {{.i18n.Tr "repo.release.new_release"}}
- </a>
- </div>
- {{end}}
- </h2>
- <ul id="release-list">
- {{range .Releases}}
- <li class="ui grid">
- <div class="ui four wide column meta">
- {{if .PublisherID}}
- {{if .IsDraft}}
- <span class="ui yellow label">{{$.i18n.Tr "repo.release.draft"}}</span>
- {{else if .IsPrerelease}}
- <span class="ui orange label">{{$.i18n.Tr "repo.release.prerelease"}}</span>
- {{else}}
- <span class="ui green label">{{$.i18n.Tr "repo.release.stable"}}</span>
- {{end}}
- <span class="tag text blue">
- <a href="{{$.RepoLink}}/src/{{.TagName}}" rel="nofollow"><i class="tag icon"></i> {{.TagName}}</a>
- </span>
- {{end}}
- <span class="commit">
- <a href="{{$.RepoLink}}/src/{{.Sha1}}" rel="nofollow"><i class="code icon"></i> {{ShortSha .Sha1}}</a>
- </span>
- </div>
- <div class="ui twelve wide column detail">
- {{if .PublisherID}}
- <h3>
- <a href="{{$.RepoLink}}/src/{{.TagName}}">{{.Title}}</a>
- {{if $.IsRepositoryAdmin}}<small>(<a href="{{$.RepoLink}}/releases/edit/{{.TagName}}" rel="nofollow">{{$.i18n.Tr "repo.release.edit"}}</a>)</small>{{end}}
- </h3>
- <p class="text grey">
- <span class="author">
- <img class="img-10" src="{{.Publisher.AvatarLink}}">
- <a href="{{AppSubUrl}}/{{.Publisher.Name}}">{{.Publisher.Name}}</a>
- </span>
- {{if .Created}}<span class="time">{{TimeSince .Created $.Lang}}</span>{{end}}
- <span class="ahead">{{$.i18n.Tr "repo.release.ahead" .NumCommitsBehind .Target | Str2html}}</span>
- </p>
- <div class="markdown desc">
- {{Str2html .Note}}
- </div>
- <div class="download">
- <h2>{{$.i18n.Tr "repo.release.downloads"}}</h2>
- <ul class="list">
- <li>
- <a href="{{$.RepoLink}}/archive/{{.TagName}}.zip" rel="nofollow"><i class="icon octicon octicon-file-zip"></i> {{$.i18n.Tr "repo.release.source_code"}} (ZIP)</a>
- </li>
- <li>
- <a href="{{$.RepoLink}}/archive/{{.TagName}}.tar.gz"><i class="icon octicon octicon-file-zip"></i> {{$.i18n.Tr "repo.release.source_code"}} (TAR.GZ)</a>
- </li>
- </ul>
- </div>
- {{else}}
- <h4>
- <a href="{{$.RepoLink}}/src/{{.TagName}}" rel="nofollow"><i class="tag icon"></i> {{.TagName}}</a>
- </h4>
- <div class="download">
- <a href="{{$.RepoLink}}/archive/{{.TagName}}.zip" rel="nofollow"><i class="octicon octicon-file-zip"></i> ZIP</a>
- <a href="{{$.RepoLink}}/archive/{{.TagName}}.tar.gz"><i class="octicon octicon-file-zip"></i> TAR.GZ</a>
- </div>
- {{end}}
- <span class="dot">&nbsp;</span>
- </div>
- </li>
- {{end}}
- </ul>
- </div>
+ {{template "repo/header" .}}
+ <div class="ui container">
+ {{template "base/alert" .}}
+ <h2 class="ui header">
+ {{.i18n.Tr "repo.release.releases"}}
+ {{if .IsRepositoryAdmin}}
+ <div class="ui right">
+ <a class="ui small green button" href="{{$.RepoLink}}/releases/new">
+ {{.i18n.Tr "repo.release.new_release"}}
+ </a>
+ </div>
+ {{end}}
+ </h2>
+ <ul id="release-list">
+ {{range .Releases}}
+ <li class="ui grid">
+ <div class="ui four wide column meta">
+ {{if .PublisherID}}
+ {{if .IsDraft}}
+ <span class="ui yellow label">{{$.i18n.Tr "repo.release.draft"}}</span>
+ {{else if .IsPrerelease}}
+ <span class="ui orange label">{{$.i18n.Tr "repo.release.prerelease"}}</span>
+ {{else}}
+ <span class="ui green label">{{$.i18n.Tr "repo.release.stable"}}</span>
+ {{end}}
+ <span class="tag text blue">
+ <a href="{{$.RepoLink}}/src/{{.TagName}}" rel="nofollow"><i class="tag icon"></i> {{.TagName}}</a>
+ </span>
+ {{end}}
+ <span class="commit">
+ <a href="{{$.RepoLink}}/src/{{.Sha1}}" rel="nofollow"><i class="code icon"></i> {{ShortSha .Sha1}}</a>
+ </span>
+ </div>
+ <div class="ui twelve wide column detail">
+ {{if .PublisherID}}
+ <h3>
+ <a href="{{$.RepoLink}}/src/{{.TagName}}">{{.Title}}</a>
+ {{if $.IsRepositoryAdmin}}<small>(<a href="{{$.RepoLink}}/releases/edit/{{.TagName}}" rel="nofollow">{{$.i18n.Tr "repo.release.edit"}}</a>)</small>{{end}}
+ </h3>
+ <p class="text grey">
+ <span class="author">
+ <img class="img-10" src="{{.Publisher.AvatarLink}}">
+ <a href="{{AppSubUrl}}/{{.Publisher.Name}}">{{.Publisher.Name}}</a>
+ </span>
+ {{if .Created}}<span class="time">{{TimeSince .Created $.Lang}}</span>{{end}}
+ <span class="ahead">{{$.i18n.Tr "repo.release.ahead" .NumCommitsBehind .Target | Str2html}}</span>
+ </p>
+ <div class="markdown desc">
+ {{Str2html .Note}}
+ </div>
+ <div class="download">
+ <h2>{{$.i18n.Tr "repo.release.downloads"}}</h2>
+ <ul class="list">
+ <li>
+ <a href="{{$.RepoLink}}/archive/{{.TagName}}.zip" rel="nofollow"><i class="icon octicon octicon-file-zip"></i> {{$.i18n.Tr "repo.release.source_code"}} (ZIP)</a>
+ </li>
+ <li>
+ <a href="{{$.RepoLink}}/archive/{{.TagName}}.tar.gz"><i class="icon octicon octicon-file-zip"></i> {{$.i18n.Tr "repo.release.source_code"}} (TAR.GZ)</a>
+ </li>
+ </ul>
+ </div>
+ {{else}}
+ <h4>
+ <a href="{{$.RepoLink}}/src/{{.TagName}}" rel="nofollow"><i class="tag icon"></i> {{.TagName}}</a>
+ </h4>
+ <div class="download">
+ <a href="{{$.RepoLink}}/archive/{{.TagName}}.zip" rel="nofollow"><i class="octicon octicon-file-zip"></i> ZIP</a>
+ <a href="{{$.RepoLink}}/archive/{{.TagName}}.tar.gz"><i class="octicon octicon-file-zip"></i> TAR.GZ</a>
+ </div>
+ {{end}}
+ <span class="dot">&nbsp;</span>
+ </div>
+ </li>
+ {{end}}
+ </ul>
+ </div>
</div>
-{{template "base/footer" .}} \ No newline at end of file
+{{template "base/footer" .}}
diff --git a/templates/repo/release/new.tmpl b/templates/repo/release/new.tmpl
index 7129cf6b56..e334ee749e 100644
--- a/templates/repo/release/new.tmpl
+++ b/templates/repo/release/new.tmpl
@@ -1,98 +1,98 @@
{{template "base/head" .}}
<div class="repository new release">
- {{template "repo/header" .}}
- <div class="ui container">
- <h2 class="ui dividing header">
- {{if .PageIsEditRelease}}
- {{.i18n.Tr "repo.release.edit_release"}}
- <div class="sub header">{{.i18n.Tr "repo.release.edit_subheader"}}</div>
- {{else}}
- {{.i18n.Tr "repo.release.new_release"}}
- <div class="sub header">{{.i18n.Tr "repo.release.new_subheader"}}</div>
- {{end}}
- </h2>
- {{template "base/alert" .}}
- <form class="ui form grid" action="{{.Link}}" method="post">
- {{.CsrfTokenHtml}}
- <div class="ui seven wide column target">
- <div class="inline field {{if .Err_TagName}}error{{end}}">
- {{if .PageIsEditRelease}}
- <b>{{.tag_name}}</b><span class="at">@</span><strong>{{.tag_target}}</strong>
- {{else}}
- <input name="tag_name" value="{{.tag_name}}" placeholder="{{.i18n.Tr "repo.release.tag_name"}}" autofocus required>
- <span class="at">@</span>
- <div class="ui selection dropdown">
- <input type="hidden" name="tag_target" value="{{.tag_target}}"/>
- <i class="octicon octicon-git-branch"></i>
- <div class="text">
- {{.i18n.Tr "repo.release.target"}} :
- <strong id="repo-branch-current">{{.Repository.DefaultBranch}}</strong>
- </div>
- <i class="dropdown icon"></i>
- <div class="menu">
- {{range .Branches}}
- <div class="item" data-value="{{.}}">{{.}}</div>
- {{end}}
- </div>
- </div>
- <span class="help">{{.i18n.Tr "repo.release.tag_helper"}}</span>
- {{end}}
- </div>
- </div>
- <div class="eleven wide column">
- <div class="field {{if .Err_Title}}error{{end}}">
- <label>{{.i18n.Tr "repo.release.title"}}</label>
- <input name="title" placeholder="{{.i18n.Tr "repo.release.title"}}" value="{{.title}}" autofocus required>
- </div>
- <div class="field">
- <label>{{.i18n.Tr "repo.release.content"}}</label>
- <textarea name="content">{{.content}}</textarea>
- </div>
- </div>
- <div class="ui container">
- <div class="ui divider"></div>
- <div class="ui text right">
- <div class="prerelease field">
- <div class="ui checkbox">
- <input type="checkbox" name="prerelease" {{if .prerelease}}checked{{end}}>
- <label><strong>{{.i18n.Tr "repo.release.prerelease_desc"}}</strong></label>
- </div>
- </div>
- <span class="help">{{.i18n.Tr "repo.release.prerelease_helper"}}</span>
- <div class="field">
- {{if .PageIsEditRelease}}
- <a class="ui blue basic button" href="{{.RepoLink}}/releases">
- {{.i18n.Tr "repo.release.cancel"}}
- </a>
- <button class="ui green button">
- {{.i18n.Tr "repo.release.edit_release"}}
- </button>
- <a class="ui red button delete-button" data-url="{{$.RepoLink}}/releases/delete" data-id="{{.ID}}">
- {{$.i18n.Tr "repo.release.delete_release"}}
- </a>
- {{else}}
- <button class="ui green button">
- {{.i18n.Tr "repo.release.publish"}}
- </button>
- <input class="ui grey button" type="submit" name="draft" value="{{.i18n.Tr "repo.release.save_draft"}}"/>
- {{end}}
- </div>
- </div>
- </div>
- </form>
- </div>
+ {{template "repo/header" .}}
+ <div class="ui container">
+ <h2 class="ui dividing header">
+ {{if .PageIsEditRelease}}
+ {{.i18n.Tr "repo.release.edit_release"}}
+ <div class="sub header">{{.i18n.Tr "repo.release.edit_subheader"}}</div>
+ {{else}}
+ {{.i18n.Tr "repo.release.new_release"}}
+ <div class="sub header">{{.i18n.Tr "repo.release.new_subheader"}}</div>
+ {{end}}
+ </h2>
+ {{template "base/alert" .}}
+ <form class="ui form grid" action="{{.Link}}" method="post">
+ {{.CsrfTokenHtml}}
+ <div class="ui seven wide column target">
+ <div class="inline field {{if .Err_TagName}}error{{end}}">
+ {{if .PageIsEditRelease}}
+ <b>{{.tag_name}}</b><span class="at">@</span><strong>{{.tag_target}}</strong>
+ {{else}}
+ <input name="tag_name" value="{{.tag_name}}" placeholder="{{.i18n.Tr "repo.release.tag_name"}}" autofocus required>
+ <span class="at">@</span>
+ <div class="ui selection dropdown">
+ <input type="hidden" name="tag_target" value="{{.tag_target}}"/>
+ <i class="octicon octicon-git-branch"></i>
+ <div class="text">
+ {{.i18n.Tr "repo.release.target"}} :
+ <strong id="repo-branch-current">{{.Repository.DefaultBranch}}</strong>
+ </div>
+ <i class="dropdown icon"></i>
+ <div class="menu">
+ {{range .Branches}}
+ <div class="item" data-value="{{.}}">{{.}}</div>
+ {{end}}
+ </div>
+ </div>
+ <span class="help">{{.i18n.Tr "repo.release.tag_helper"}}</span>
+ {{end}}
+ </div>
+ </div>
+ <div class="eleven wide column">
+ <div class="field {{if .Err_Title}}error{{end}}">
+ <label>{{.i18n.Tr "repo.release.title"}}</label>
+ <input name="title" placeholder="{{.i18n.Tr "repo.release.title"}}" value="{{.title}}" autofocus required>
+ </div>
+ <div class="field">
+ <label>{{.i18n.Tr "repo.release.content"}}</label>
+ <textarea name="content">{{.content}}</textarea>
+ </div>
+ </div>
+ <div class="ui container">
+ <div class="ui divider"></div>
+ <div class="ui text right">
+ <div class="prerelease field">
+ <div class="ui checkbox">
+ <input type="checkbox" name="prerelease" {{if .prerelease}}checked{{end}}>
+ <label><strong>{{.i18n.Tr "repo.release.prerelease_desc"}}</strong></label>
+ </div>
+ </div>
+ <span class="help">{{.i18n.Tr "repo.release.prerelease_helper"}}</span>
+ <div class="field">
+ {{if .PageIsEditRelease}}
+ <a class="ui blue basic button" href="{{.RepoLink}}/releases">
+ {{.i18n.Tr "repo.release.cancel"}}
+ </a>
+ <button class="ui green button">
+ {{.i18n.Tr "repo.release.edit_release"}}
+ </button>
+ <a class="ui red button delete-button" data-url="{{$.RepoLink}}/releases/delete" data-id="{{.ID}}">
+ {{$.i18n.Tr "repo.release.delete_release"}}
+ </a>
+ {{else}}
+ <button class="ui green button">
+ {{.i18n.Tr "repo.release.publish"}}
+ </button>
+ <input class="ui grey button" type="submit" name="draft" value="{{.i18n.Tr "repo.release.save_draft"}}"/>
+ {{end}}
+ </div>
+ </div>
+ </div>
+ </form>
+ </div>
</div>
{{if .PageIsEditRelease}}
-<div class="ui small basic delete modal">
- <div class="ui icon header">
- <i class="trash icon"></i>
- {{.i18n.Tr "repo.release.deletion"}}
- </div>
- <div class="content">
- <p>{{.i18n.Tr "repo.release.deletion_desc"}}</p>
- </div>
- {{template "base/delete_modal_actions" .}}
-</div>
+ <div class="ui small basic delete modal">
+ <div class="ui icon header">
+ <i class="trash icon"></i>
+ {{.i18n.Tr "repo.release.deletion"}}
+ </div>
+ <div class="content">
+ <p>{{.i18n.Tr "repo.release.deletion_desc"}}</p>
+ </div>
+ {{template "base/delete_modal_actions" .}}
+ </div>
{{end}}
-{{template "base/footer" .}} \ No newline at end of file
+{{template "base/footer" .}}
diff --git a/templates/repo/settings/collaboration.tmpl b/templates/repo/settings/collaboration.tmpl
index 651c453cd5..57b76fd8bf 100644
--- a/templates/repo/settings/collaboration.tmpl
+++ b/templates/repo/settings/collaboration.tmpl
@@ -7,37 +7,37 @@
<div class="twelve wide column content">
{{template "base/alert" .}}
<h4 class="ui top attached header">
- {{.i18n.Tr "repo.settings.collaboration"}}
+ {{.i18n.Tr "repo.settings.collaboration"}}
</h4>
<div class="ui attached segment collaborator list">
- {{range .Collaborators}}
- <div class="item">
- {{if not (eq .Id $.Owner.Id)}}
- <a href="{{$.RepoLink}}/settings/collaboration?remove={{.Name}}" class="ui right text red"><i class="fa fa-times"></i></a>
- {{end}}
- <a href="{{AppSubUrl}}/{{.Name}}">
- <img class="ui avatar image" src="{{.AvatarLink}}">
- {{.DisplayName}}
- </a>
- </div>
- {{end}}
- </div>
- <div class="ui bottom attached segment">
- <form class="ui form" id="repo-collab-form" action="{{.Link}}" method="post">
- {{.CsrfTokenHtml}}
- <div class="inline field ui left">
- <div id="search-user-box">
- <div class="ui input">
- <input class="prompt" name="collaborator" placeholder="{{.i18n.Tr "repo.settings.search_user_placeholder"}}" autocomplete="off" required>
- </div>
- <div class="ui segment results hide"></div>
- </div>
- </div>
- <button class="ui green button">{{.i18n.Tr "repo.settings.add_collaborator"}}</button>
- </form>
- </div>
- </div>
- </div>
+ {{range .Collaborators}}
+ <div class="item">
+ {{if not (eq .Id $.Owner.Id)}}
+ <a href="{{$.RepoLink}}/settings/collaboration?remove={{.Name}}" class="ui right text red"><i class="fa fa-times"></i></a>
+ {{end}}
+ <a href="{{AppSubUrl}}/{{.Name}}">
+ <img class="ui avatar image" src="{{.AvatarLink}}">
+ {{.DisplayName}}
+ </a>
+ </div>
+ {{end}}
+ </div>
+ <div class="ui bottom attached segment">
+ <form class="ui form" id="repo-collab-form" action="{{.Link}}" method="post">
+ {{.CsrfTokenHtml}}
+ <div class="inline field ui left">
+ <div id="search-user-box">
+ <div class="ui input">
+ <input class="prompt" name="collaborator" placeholder="{{.i18n.Tr "repo.settings.search_user_placeholder"}}" autocomplete="off" required>
+ </div>
+ <div class="ui segment results hide"></div>
+ </div>
+ </div>
+ <button class="ui green button">{{.i18n.Tr "repo.settings.add_collaborator"}}</button>
+ </form>
+ </div>
+ </div>
+ </div>
</div>
</div>
-{{template "base/footer" .}} \ No newline at end of file
+{{template "base/footer" .}}
diff --git a/templates/repo/settings/deploy_keys.tmpl b/templates/repo/settings/deploy_keys.tmpl
index 5406d0433d..1f6b26a6da 100644
--- a/templates/repo/settings/deploy_keys.tmpl
+++ b/templates/repo/settings/deploy_keys.tmpl
@@ -7,41 +7,41 @@
<div class="twelve wide column content">
{{template "base/alert" .}}
<h4 class="ui top attached header">
- {{.i18n.Tr "repo.settings.deploy_keys"}}
- <div class="ui right">
- <div class="ui blue tiny show-panel button" data-panel="#add-deploy-key-panel">{{.i18n.Tr "repo.settings.add_deploy_key"}}</div>
- </div>
+ {{.i18n.Tr "repo.settings.deploy_keys"}}
+ <div class="ui right">
+ <div class="ui blue tiny show-panel button" data-panel="#add-deploy-key-panel">{{.i18n.Tr "repo.settings.add_deploy_key"}}</div>
+ </div>
</h4>
<div class="ui attached segment">
{{if .Deploykeys}}
- <div class="ui key list">
- {{range .Deploykeys}}
- <div class="item ui grid">
- <div class="one wide column">
- <i class="ssh-key-state-indicator fa fa-circle{{if .HasRecentActivity}} active invert poping up{{else}}-o{{end}}" {{if .HasRecentActivity}}data-content="{{$.i18n.Tr "settings.key_state_desc"}}" data-variation="inverted"{{end}}></i>
- </div>
- <div class="one wide column">
- <i class="mega-octicon octicon-key left"></i>
- </div>
- <div class="eleven wide column">
- <strong>{{.Name}}</strong>
- <div class="print meta">
- {{.Fingerprint}}
+ <div class="ui key list">
+ {{range .Deploykeys}}
+ <div class="item ui grid">
+ <div class="one wide column">
+ <i class="ssh-key-state-indicator fa fa-circle{{if .HasRecentActivity}} active invert poping up{{else}}-o{{end}}" {{if .HasRecentActivity}}data-content="{{$.i18n.Tr "settings.key_state_desc"}}" data-variation="inverted"{{end}}></i>
+ </div>
+ <div class="one wide column">
+ <i class="mega-octicon octicon-key left"></i>
+ </div>
+ <div class="eleven wide column">
+ <strong>{{.Name}}</strong>
+ <div class="print meta">
+ {{.Fingerprint}}
+ </div>
+ <div class="activity meta">
+ <i>{{$.i18n.Tr "settings.add_on"}} <span>{{DateFmtShort .Created}}</span> — <i class="octicon octicon-info"></i> {{if .HasUsed}}{{$.i18n.Tr "settings.last_used"}} <span>{{DateFmtShort .Updated}}</span>{{else}}{{$.i18n.Tr "settings.no_activity"}}{{end}}</i>
+ </div>
+ </div>
+ <div class="two wide column">
+ <button class="ui red tiny button delete-button" data-url="{{$.Link}}/delete" data-id="{{.ID}}">
+ {{$.i18n.Tr "settings.delete_key"}}
+ </button>
+ </div>
</div>
- <div class="activity meta">
- <i>{{$.i18n.Tr "settings.add_on"}} <span>{{DateFmtShort .Created}}</span> — <i class="octicon octicon-info"></i> {{if .HasUsed}}{{$.i18n.Tr "settings.last_used"}} <span>{{DateFmtShort .Updated}}</span>{{else}}{{$.i18n.Tr "settings.no_activity"}}{{end}}</i>
- </div>
- </div>
- <div class="two wide column">
- <button class="ui red tiny button delete-button" data-url="{{$.Link}}/delete" data-id="{{.ID}}">
- {{$.i18n.Tr "settings.delete_key"}}
- </button>
- </div>
+ {{end}}
</div>
- {{end}}
- </div>
{{else}}
- {{.i18n.Tr "repo.settings.no_deploy_keys"}}
+ {{.i18n.Tr "repo.settings.no_deploy_keys"}}
{{end}}
</div>
<br>
@@ -75,22 +75,22 @@
</div>
<div class="ui small basic delete modal">
- <div class="ui icon header">
- <i class="trash icon"></i>
- {{.i18n.Tr "repo.settings.deploy_key_deletion"}}
- </div>
- <div class="content">
- <p>{{.i18n.Tr "repo.settings.deploy_key_deletion_desc"}}</p>
- </div>
- <div class="actions">
- <div class="ui red basic inverted cancel button">
- <i class="remove icon"></i>
- {{.i18n.Tr "modal.no"}}
- </div>
- <div class="ui green basic inverted ok button">
- <i class="checkmark icon"></i>
- {{.i18n.Tr "modal.yes"}}
- </div>
- </div>
+ <div class="ui icon header">
+ <i class="trash icon"></i>
+ {{.i18n.Tr "repo.settings.deploy_key_deletion"}}
+ </div>
+ <div class="content">
+ <p>{{.i18n.Tr "repo.settings.deploy_key_deletion_desc"}}</p>
+ </div>
+ <div class="actions">
+ <div class="ui red basic inverted cancel button">
+ <i class="remove icon"></i>
+ {{.i18n.Tr "modal.no"}}
+ </div>
+ <div class="ui green basic inverted ok button">
+ <i class="checkmark icon"></i>
+ {{.i18n.Tr "modal.yes"}}
+ </div>
+ </div>
</div>
-{{template "base/footer" .}} \ No newline at end of file
+{{template "base/footer" .}}
diff --git a/templates/repo/settings/githook_edit.tmpl b/templates/repo/settings/githook_edit.tmpl
index b9b75a3aa6..22c278fe4f 100644
--- a/templates/repo/settings/githook_edit.tmpl
+++ b/templates/repo/settings/githook_edit.tmpl
@@ -7,30 +7,30 @@
<div class="twelve wide column content">
{{template "base/alert" .}}
<h4 class="ui top attached header">
- {{.i18n.Tr "repo.settings.githooks"}}
+ {{.i18n.Tr "repo.settings.githooks"}}
</h4>
<div class="ui attached segment">
<p>{{.i18n.Tr "repo.settings.githook_edit_desc"}}</p>
- <form class="ui form" action="{{.Link}}" method="post">
- {{.CsrfTokenHtml}}
- {{with .Hook}}
- <div class="inline field">
- <label>{{$.i18n.Tr "repo.settings.githook_name"}}</label>
- <span>{{.Name}}</span>
- </div>
- <div class="field">
- <label for="content">{{$.i18n.Tr "repo.settings.githook_content"}}</label>
- <textarea id="content" name="content" rows="20" wrap="off">{{if .IsActive}}{{.Content}}{{else}}{{.Sample}}{{end}}</textarea>
- </div>
+ <form class="ui form" action="{{.Link}}" method="post">
+ {{.CsrfTokenHtml}}
+ {{with .Hook}}
+ <div class="inline field">
+ <label>{{$.i18n.Tr "repo.settings.githook_name"}}</label>
+ <span>{{.Name}}</span>
+ </div>
+ <div class="field">
+ <label for="content">{{$.i18n.Tr "repo.settings.githook_content"}}</label>
+ <textarea id="content" name="content" rows="20" wrap="off">{{if .IsActive}}{{.Content}}{{else}}{{.Sample}}{{end}}</textarea>
+ </div>
- <div class="inline field">
- <button class="ui green button">{{$.i18n.Tr "repo.settings.update_githook"}}</button>
- </div>
- {{end}}
- </form>
+ <div class="inline field">
+ <button class="ui green button">{{$.i18n.Tr "repo.settings.update_githook"}}</button>
+ </div>
+ {{end}}
+ </form>
</div>
- </div>
- </div>
+ </div>
+ </div>
</div>
</div>
-{{template "base/footer" .}} \ No newline at end of file
+{{template "base/footer" .}}
diff --git a/templates/repo/settings/githooks.tmpl b/templates/repo/settings/githooks.tmpl
index 8120b80e17..8d8923b475 100644
--- a/templates/repo/settings/githooks.tmpl
+++ b/templates/repo/settings/githooks.tmpl
@@ -7,24 +7,24 @@
<div class="twelve wide column content">
{{template "base/alert" .}}
<h4 class="ui top attached header">
- {{.i18n.Tr "repo.settings.githooks"}}
+ {{.i18n.Tr "repo.settings.githooks"}}
</h4>
<div class="ui attached table segment">
- <div class="ui hook list">
- <div class="item">
- {{.i18n.Tr "repo.settings.githooks_desc" | Str2html}}
- </div>
- {{range .Hooks}}
+ <div class="ui hook list">
<div class="item">
- <span class="text {{if .IsActive}}green{{else}}grey{{end}}"><i class="octicon octicon-primitive-dot"></i></span>
- <span>{{.Name}}</span>
- <a class="text blue ui right" href="{{$.RepoLink}}/settings/hooks/git/{{.Name}}"><i class="fa fa-pencil"></i></a>
+ {{.i18n.Tr "repo.settings.githooks_desc" | Str2html}}
</div>
- {{end}}
- </div>
- </div>
- </div>
- </div>
+ {{range .Hooks}}
+ <div class="item">
+ <span class="text {{if .IsActive}}green{{else}}grey{{end}}"><i class="octicon octicon-primitive-dot"></i></span>
+ <span>{{.Name}}</span>
+ <a class="text blue ui right" href="{{$.RepoLink}}/settings/hooks/git/{{.Name}}"><i class="fa fa-pencil"></i></a>
+ </div>
+ {{end}}
+ </div>
+ </div>
+ </div>
+ </div>
</div>
</div>
-{{template "base/footer" .}} \ No newline at end of file
+{{template "base/footer" .}}
diff --git a/templates/repo/settings/hook_delete_modal.tmpl b/templates/repo/settings/hook_delete_modal.tmpl
index bafd1ce93c..2a2a7c8da2 100644
--- a/templates/repo/settings/hook_delete_modal.tmpl
+++ b/templates/repo/settings/hook_delete_modal.tmpl
@@ -1,19 +1,19 @@
<div class="ui small basic delete modal">
- <div class="ui icon header">
- <i class="trash icon"></i>
- {{.i18n.Tr "repo.settings.webhook_deletion"}}
- </div>
- <div class="content">
- <p>{{.i18n.Tr "repo.settings.webhook_deletion_desc"}}</p>
- </div>
- <div class="actions">
- <div class="ui red basic inverted cancel button">
- <i class="remove icon"></i>
- {{.i18n.Tr "modal.no"}}
- </div>
- <div class="ui green basic inverted ok button">
- <i class="checkmark icon"></i>
- {{.i18n.Tr "modal.yes"}}
- </div>
- </div>
-</div> \ No newline at end of file
+ <div class="ui icon header">
+ <i class="trash icon"></i>
+ {{.i18n.Tr "repo.settings.webhook_deletion"}}
+ </div>
+ <div class="content">
+ <p>{{.i18n.Tr "repo.settings.webhook_deletion_desc"}}</p>
+ </div>
+ <div class="actions">
+ <div class="ui red basic inverted cancel button">
+ <i class="remove icon"></i>
+ {{.i18n.Tr "modal.no"}}
+ </div>
+ <div class="ui green basic inverted ok button">
+ <i class="checkmark icon"></i>
+ {{.i18n.Tr "modal.yes"}}
+ </div>
+ </div>
+</div>
diff --git a/templates/repo/settings/hook_gogs.tmpl b/templates/repo/settings/hook_gogs.tmpl
index b0b3311a55..633577d8a9 100644
--- a/templates/repo/settings/hook_gogs.tmpl
+++ b/templates/repo/settings/hook_gogs.tmpl
@@ -1,28 +1,28 @@
{{if eq .HookType "gogs"}}
-<p>{{.i18n.Tr "repo.settings.add_webhook_desc" "http://gogs.io/docs/features/webhook.html" | Str2html}}</p>
-<form class="ui form" action="{{.BaseLink}}/settings/hooks/gogs/{{if .PageIsSettingsHooksNew}}new{{else}}{{.Webhook.ID}}{{end}}" method="post">
- {{.CsrfTokenHtml}}
- <div class="required field {{if .Err_PayloadURL}}error{{end}}">
- <label for="payload_url">{{.i18n.Tr "repo.settings.payload_url"}}</label>
- <input id="payload_url" name="payload_url" type="url" value="{{.Webhook.URL}}" autofocus required>
- </div>
- <div class="field">
- <label>{{.i18n.Tr "repo.settings.content_type"}}</label>
- <div class="ui selection dropdown">
- <input type="hidden" id="content_type" name="content_type" value="{{if .Webhook.ContentType}}{{.Webhook.ContentType}}{{else}}application/json{{end}}">
- <div class="default text"></div>
- <i class="dropdown icon"></i>
- <div class="menu">
- <div class="item" data-value="1">application/json</div>
- <div class="item" data-value="2">application/x-www-form-urlencoded</div>
- </div>
- </div>
- </div>
- <input class="fake" type="password">
- <div class="field {{if .Err_Secret}}error{{end}}">
- <label for="secret">{{.i18n.Tr "repo.settings.secret"}}</label>
- <input id="secret" name="secret" type="password" value="{{.Webhook.Secret}}" autocomplete="off">
- </div>
- {{template "repo/settings/hook_settings" .}}
-</form>
+ <p>{{.i18n.Tr "repo.settings.add_webhook_desc" "http://gogs.io/docs/features/webhook.html" | Str2html}}</p>
+ <form class="ui form" action="{{.BaseLink}}/settings/hooks/gogs/{{if .PageIsSettingsHooksNew}}new{{else}}{{.Webhook.ID}}{{end}}" method="post">
+ {{.CsrfTokenHtml}}
+ <div class="required field {{if .Err_PayloadURL}}error{{end}}">
+ <label for="payload_url">{{.i18n.Tr "repo.settings.payload_url"}}</label>
+ <input id="payload_url" name="payload_url" type="url" value="{{.Webhook.URL}}" autofocus required>
+ </div>
+ <div class="field">
+ <label>{{.i18n.Tr "repo.settings.content_type"}}</label>
+ <div class="ui selection dropdown">
+ <input type="hidden" id="content_type" name="content_type" value="{{if .Webhook.ContentType}}{{.Webhook.ContentType}}{{else}}application/json{{end}}">
+ <div class="default text"></div>
+ <i class="dropdown icon"></i>
+ <div class="menu">
+ <div class="item" data-value="1">application/json</div>
+ <div class="item" data-value="2">application/x-www-form-urlencoded</div>
+ </div>
+ </div>
+ </div>
+ <input class="fake" type="password">
+ <div class="field {{if .Err_Secret}}error{{end}}">
+ <label for="secret">{{.i18n.Tr "repo.settings.secret"}}</label>
+ <input id="secret" name="secret" type="password" value="{{.Webhook.Secret}}" autocomplete="off">
+ </div>
+ {{template "repo/settings/hook_settings" .}}
+ </form>
{{end}}
diff --git a/templates/repo/settings/hook_history.tmpl b/templates/repo/settings/hook_history.tmpl
index 15957a6790..9ded6a7905 100644
--- a/templates/repo/settings/hook_history.tmpl
+++ b/templates/repo/settings/hook_history.tmpl
@@ -1,73 +1,73 @@
{{if .PageIsSettingsHooksEdit}}
-<h4 class="ui top attached header">
- {{.i18n.Tr "repo.settings.recent_deliveries"}}
- {{if .IsRepositoryAdmin}}
- <div class="ui right">
- <button class="ui teal tiny button poping up" id="test-delivery" data-content=
- "{{.i18n.Tr "repo.settings.webhook.test_delivery_desc"}}" data-variation="inverted tiny" data-link="{{.Link}}/test" data-redirect="{{.Link}}">{{.i18n.Tr "repo.settings.webhook.test_delivery"}}</button>
- </div>
- {{end}}
-</h4>
-<div class="ui attached table segment">
- <div class="ui hook history list">
- {{range .History}}
- <div class="item">
- <div class="meta">
- {{if .IsSucceed}}
- <span class="text green"><i class="octicon octicon-check"></i></span>
- {{else}}
- <span class="text red"><i class="octicon octicon-alert"></i></span>
- {{end}}
- <a class="ui blue sha label toggle button" data-target="#info-{{.ID}}">{{.UUID}}</a>
- <div class="ui right">
- <span class="text grey time">
- {{.DeliveredString}}
- </span>
- </div>
+ <h4 class="ui top attached header">
+ {{.i18n.Tr "repo.settings.recent_deliveries"}}
+ {{if .IsRepositoryAdmin}}
+ <div class="ui right">
+ <button class="ui teal tiny button poping up" id="test-delivery" data-content=
+ "{{.i18n.Tr "repo.settings.webhook.test_delivery_desc"}}" data-variation="inverted tiny" data-link="{{.Link}}/test" data-redirect="{{.Link}}">{{.i18n.Tr "repo.settings.webhook.test_delivery"}}</button>
</div>
- <div class="info hide" id="info-{{.ID}}">
- <div class="ui top attached tabular menu">
- <a class="item active" data-tab="request-{{.ID}}">{{$.i18n.Tr "repo.settings.webhook.request"}}</a>
- <a class="item" data-tab="response-{{.ID}}">
- {{$.i18n.Tr "repo.settings.webhook.response"}}
- {{if .ResponseInfo}}
- {{if .IsSucceed}}
- <span class="ui green label">{{.ResponseInfo.Status}}</span>
- {{else}}
- <span class="ui red label">{{.ResponseInfo.Status}}</span>
- {{end}}
- {{else}}
- <span class="ui label">N/A</span>
- {{end}}
- </a>
- </div>
- <div class="ui bottom attached tab segment active" data-tab="request-{{.ID}}">
- {{if .RequestInfo}}
- <h5>{{$.i18n.Tr "repo.settings.webhook.headers"}}</h5>
- <pre class="raw"><strong>Request URL:</strong> {{.URL}}
+ {{end}}
+ </h4>
+ <div class="ui attached table segment">
+ <div class="ui hook history list">
+ {{range .History}}
+ <div class="item">
+ <div class="meta">
+ {{if .IsSucceed}}
+ <span class="text green"><i class="octicon octicon-check"></i></span>
+ {{else}}
+ <span class="text red"><i class="octicon octicon-alert"></i></span>
+ {{end}}
+ <a class="ui blue sha label toggle button" data-target="#info-{{.ID}}">{{.UUID}}</a>
+ <div class="ui right">
+ <span class="text grey time">
+ {{.DeliveredString}}
+ </span>
+ </div>
+ </div>
+ <div class="info hide" id="info-{{.ID}}">
+ <div class="ui top attached tabular menu">
+ <a class="item active" data-tab="request-{{.ID}}">{{$.i18n.Tr "repo.settings.webhook.request"}}</a>
+ <a class="item" data-tab="response-{{.ID}}">
+ {{$.i18n.Tr "repo.settings.webhook.response"}}
+ {{if .ResponseInfo}}
+ {{if .IsSucceed}}
+ <span class="ui green label">{{.ResponseInfo.Status}}</span>
+ {{else}}
+ <span class="ui red label">{{.ResponseInfo.Status}}</span>
+ {{end}}
+ {{else}}
+ <span class="ui label">N/A</span>
+ {{end}}
+ </a>
+ </div>
+ <div class="ui bottom attached tab segment active" data-tab="request-{{.ID}}">
+ {{if .RequestInfo}}
+ <h5>{{$.i18n.Tr "repo.settings.webhook.headers"}}</h5>
+ <pre class="raw"><strong>Request URL:</strong> {{.URL}}
<strong>Request method:</strong> POST
{{ range $key, $val := .RequestInfo.Headers }}<strong>{{$key}}:</strong> {{$val}}
{{end}}</pre>
- <h5>{{$.i18n.Tr "repo.settings.webhook.payload"}}</h5>
- <pre class="raw"><code class="json">{{.PayloadContent}}</code></pre>
- {{else}}
- N/A
- {{end}}
- </div>
- <div class="ui bottom attached tab segment" data-tab="response-{{.ID}}">
- {{if .ResponseInfo}}
- <h5>{{$.i18n.Tr "repo.settings.webhook.headers"}}</h5>
- <pre class="raw">{{ range $key, $val := .ResponseInfo.Headers }}<strong>{{$key}}:</strong> {{$val}}
+ <h5>{{$.i18n.Tr "repo.settings.webhook.payload"}}</h5>
+ <pre class="raw"><code class="json">{{.PayloadContent}}</code></pre>
+ {{else}}
+ N/A
+ {{end}}
+ </div>
+ <div class="ui bottom attached tab segment" data-tab="response-{{.ID}}">
+ {{if .ResponseInfo}}
+ <h5>{{$.i18n.Tr "repo.settings.webhook.headers"}}</h5>
+ <pre class="raw">{{ range $key, $val := .ResponseInfo.Headers }}<strong>{{$key}}:</strong> {{$val}}
{{end}}</pre>
- <h5>{{$.i18n.Tr "repo.settings.webhook.body"}}</h5>
- <pre class="raw"><code>{{.ResponseInfo.Body}}</code></pre>
- {{else}}
- N/A
- {{end}}
+ <h5>{{$.i18n.Tr "repo.settings.webhook.body"}}</h5>
+ <pre class="raw"><code>{{.ResponseInfo.Body}}</code></pre>
+ {{else}}
+ N/A
+ {{end}}
+ </div>
+ </div>
</div>
- </div>
+ {{end}}
</div>
- {{end}}
</div>
-</div>
-{{end}} \ No newline at end of file
+{{end}}
diff --git a/templates/repo/settings/hook_list.tmpl b/templates/repo/settings/hook_list.tmpl
index b5c086bb84..471d9f9bf1 100644
--- a/templates/repo/settings/hook_list.tmpl
+++ b/templates/repo/settings/hook_list.tmpl
@@ -1,44 +1,44 @@
<div class="twelve wide column content">
{{template "base/alert" .}}
<h4 class="ui top attached header">
- {{.i18n.Tr "repo.settings.hooks"}}
- <div class="ui right">
- <div class="ui floating1 jump dropdown">
- <div class="ui blue tiny button">{{.i18n.Tr "repo.settings.add_webhook"}}</div>
- <div class="menu">
- <a class="item" href="{{.BaseLink}}/settings/hooks/gogs/new">
- <img class="img-10" src="{{AppSubUrl}}/img/favicon.png">Gogs
- </a>
- <a class="item" href="{{.BaseLink}}/settings/hooks/slack/new">
- <img class="img-10" src="{{AppSubUrl}}/img/slack.png">Slack
- </a>
- </div>
- </div>
- </div>
+ {{.i18n.Tr "repo.settings.hooks"}}
+ <div class="ui right">
+ <div class="ui floating1 jump dropdown">
+ <div class="ui blue tiny button">{{.i18n.Tr "repo.settings.add_webhook"}}</div>
+ <div class="menu">
+ <a class="item" href="{{.BaseLink}}/settings/hooks/gogs/new">
+ <img class="img-10" src="{{AppSubUrl}}/img/favicon.png">Gogs
+ </a>
+ <a class="item" href="{{.BaseLink}}/settings/hooks/slack/new">
+ <img class="img-10" src="{{AppSubUrl}}/img/slack.png">Slack
+ </a>
+ </div>
+ </div>
+ </div>
</h4>
<div class="ui attached table segment">
- <div class="ui hook list">
- <div class="item">
- {{.Description | Str2html}}
- </div>
- {{range .Webhooks}}
+ <div class="ui hook list">
<div class="item">
- {{if eq .LastStatus 1}}
- <span class="text green"><i class="octicon octicon-check"></i></span>
- {{else if eq .LastStatus 2}}
- <span class="text red"><i class="octicon octicon-alert"></i></span>
- {{else}}
- <span class="text grey"><i class="octicon octicon-primitive-dot"></i></span>
- {{end}}
- <a href="{{$.BaseLink}}/settings/hooks/{{.ID}}">{{.URL}}</a>
- <div class="ui right">
- <span class="text blue"><a href="{{$.BaseLink}}/settings/hooks/{{.ID}}"><i class="fa fa-pencil"></i></a></span>
- <span class="text red"><a class="delete-button" data-url="{{$.Link}}/delete" data-id="{{.ID}}"><i class="fa fa-times"></i></a></span>
- </div>
+ {{.Description | Str2html}}
</div>
- {{end}}
- </div>
- </div>
+ {{range .Webhooks}}
+ <div class="item">
+ {{if eq .LastStatus 1}}
+ <span class="text green"><i class="octicon octicon-check"></i></span>
+ {{else if eq .LastStatus 2}}
+ <span class="text red"><i class="octicon octicon-alert"></i></span>
+ {{else}}
+ <span class="text grey"><i class="octicon octicon-primitive-dot"></i></span>
+ {{end}}
+ <a href="{{$.BaseLink}}/settings/hooks/{{.ID}}">{{.URL}}</a>
+ <div class="ui right">
+ <span class="text blue"><a href="{{$.BaseLink}}/settings/hooks/{{.ID}}"><i class="fa fa-pencil"></i></a></span>
+ <span class="text red"><a class="delete-button" data-url="{{$.Link}}/delete" data-id="{{.ID}}"><i class="fa fa-times"></i></a></span>
+ </div>
+ </div>
+ {{end}}
+ </div>
+ </div>
</div>
-{{template "repo/settings/hook_delete_modal" .}} \ No newline at end of file
+{{template "repo/settings/hook_delete_modal" .}}
diff --git a/templates/repo/settings/hook_new.tmpl b/templates/repo/settings/hook_new.tmpl
index 7c9a5de1f0..96123525bb 100644
--- a/templates/repo/settings/hook_new.tmpl
+++ b/templates/repo/settings/hook_new.tmpl
@@ -7,22 +7,22 @@
<div class="twelve wide column content">
{{template "base/alert" .}}
<h4 class="ui top attached header">
- {{if .PageIsSettingsHooksNew}}{{.i18n.Tr "repo.settings.add_webhook"}}{{else}}{{.i18n.Tr "repo.settings.update_webhook"}}{{end}}
- <div class="ui right">
- {{if eq .HookType "gogs"}}
- <img class="img-13" src="{{AppSubUrl}}/img/favicon.png">
- {{else if eq .HookType "slack"}}
- <img class="img-13" src="{{AppSubUrl}}/img/slack.png">
- {{end}}
- </div>
+ {{if .PageIsSettingsHooksNew}}{{.i18n.Tr "repo.settings.add_webhook"}}{{else}}{{.i18n.Tr "repo.settings.update_webhook"}}{{end}}
+ <div class="ui right">
+ {{if eq .HookType "gogs"}}
+ <img class="img-13" src="{{AppSubUrl}}/img/favicon.png">
+ {{else if eq .HookType "slack"}}
+ <img class="img-13" src="{{AppSubUrl}}/img/slack.png">
+ {{end}}
+ </div>
</h4>
<div class="ui attached segment">
- {{template "repo/settings/hook_gogs" .}}
- {{template "repo/settings/hook_slack" .}}
- </div>
+ {{template "repo/settings/hook_gogs" .}}
+ {{template "repo/settings/hook_slack" .}}
+ </div>
{{template "repo/settings/hook_history" .}}
- </div>
+ </div>
</div>
</div>
</div>
diff --git a/templates/repo/settings/hook_settings.tmpl b/templates/repo/settings/hook_settings.tmpl
index 18a480e016..76d3ac2935 100644
--- a/templates/repo/settings/hook_settings.tmpl
+++ b/templates/repo/settings/hook_settings.tmpl
@@ -1,66 +1,66 @@
<div class="field">
- <h4>{{.i18n.Tr "repo.settings.event_desc"}}</h4>
+ <h4>{{.i18n.Tr "repo.settings.event_desc"}}</h4>
<div class="grouped event type fields">
- <div class="field">
- <div class="ui radio non-events checkbox">
- <input class="hidden" name="events" type="radio" value="push_only" {{if or .PageIsSettingsHooksNew .Webhook.PushOnly}}checked{{end}}>
- <label>{{.i18n.Tr "repo.settings.event_push_only" | Str2html}}</label>
- </div>
- </div>
- <div class="field">
- <div class="ui radio non-events checkbox">
- <input class="hidden" name="events" type="radio" value="send_everything" {{if .Webhook.SendEverything}}checked{{end}}>
- <label>{{.i18n.Tr "repo.settings.event_send_everything" | Str2html}}</label>
- </div>
- </div>
- <div class="field">
- <div class="ui radio events checkbox">
- <input class="hidden" name="events" type="radio" value="choose_events" {{if .Webhook.ChooseEvents}}checked{{end}}>
- <label>{{.i18n.Tr "repo.settings.event_choose" | Str2html}}</label>
- </div>
- </div>
+ <div class="field">
+ <div class="ui radio non-events checkbox">
+ <input class="hidden" name="events" type="radio" value="push_only" {{if or .PageIsSettingsHooksNew .Webhook.PushOnly}}checked{{end}}>
+ <label>{{.i18n.Tr "repo.settings.event_push_only" | Str2html}}</label>
+ </div>
+ </div>
+ <div class="field">
+ <div class="ui radio non-events checkbox">
+ <input class="hidden" name="events" type="radio" value="send_everything" {{if .Webhook.SendEverything}}checked{{end}}>
+ <label>{{.i18n.Tr "repo.settings.event_send_everything" | Str2html}}</label>
+ </div>
+ </div>
+ <div class="field">
+ <div class="ui radio events checkbox">
+ <input class="hidden" name="events" type="radio" value="choose_events" {{if .Webhook.ChooseEvents}}checked{{end}}>
+ <label>{{.i18n.Tr "repo.settings.event_choose" | Str2html}}</label>
+ </div>
+ </div>
</div>
- <div class="events fields ui grid" {{if not .Webhook.ChooseEvents}}style="display:none"{{end}}>
- <!-- Create -->
- <div class="seven wide column">
- <div class="field">
- <div class="ui checkbox">
- <input class="hidden" name="create" type="checkbox" tabindex="0" {{if .Webhook.Create}}checked{{end}}>
- <label>{{.i18n.Tr "repo.settings.event_create"}}</label>
- <span class="help">{{.i18n.Tr "repo.settings.event_create_desc"}}</span>
- </div>
- </div>
- </div>
- <!-- Push -->
- <div class="seven wide column">
- <div class="field">
- <div class="ui checkbox">
- <input class="hidden" name="push" type="checkbox" tabindex="0" {{if .Webhook.Push}}checked{{end}}>
- <label>{{.i18n.Tr "repo.settings.event_push"}}</label>
- <span class="help">{{.i18n.Tr "repo.settings.event_push_desc"}}</span>
- </div>
- </div>
- </div>
- </div>
+ <div class="events fields ui grid" {{if not .Webhook.ChooseEvents}}style="display:none"{{end}}>
+ <!-- Create -->
+ <div class="seven wide column">
+ <div class="field">
+ <div class="ui checkbox">
+ <input class="hidden" name="create" type="checkbox" tabindex="0" {{if .Webhook.Create}}checked{{end}}>
+ <label>{{.i18n.Tr "repo.settings.event_create"}}</label>
+ <span class="help">{{.i18n.Tr "repo.settings.event_create_desc"}}</span>
+ </div>
+ </div>
+ </div>
+ <!-- Push -->
+ <div class="seven wide column">
+ <div class="field">
+ <div class="ui checkbox">
+ <input class="hidden" name="push" type="checkbox" tabindex="0" {{if .Webhook.Push}}checked{{end}}>
+ <label>{{.i18n.Tr "repo.settings.event_push"}}</label>
+ <span class="help">{{.i18n.Tr "repo.settings.event_push_desc"}}</span>
+ </div>
+ </div>
+ </div>
+ </div>
</div>
<div class="ui divider"></div>
<div class="inline field">
- <div class="ui checkbox">
- <input class="hidden" name="active" type="checkbox" tabindex="0" {{if or .PageIsSettingsHooksNew .Webhook.IsActive}}checked{{end}}>
- <label>{{.i18n.Tr "repo.settings.active"}}</label>
- <span class="help">{{.i18n.Tr "repo.settings.active_helper"}}</span>
- </div>
+ <div class="ui checkbox">
+ <input class="hidden" name="active" type="checkbox" tabindex="0" {{if or .PageIsSettingsHooksNew .Webhook.IsActive}}checked{{end}}>
+ <label>{{.i18n.Tr "repo.settings.active"}}</label>
+ <span class="help">{{.i18n.Tr "repo.settings.active_helper"}}</span>
+ </div>
</div>
<div class="field">
{{if .PageIsSettingsHooksNew}}
- <button class="ui green button">{{.i18n.Tr "repo.settings.add_webhook"}}</button>
- {{else}}
- <button class="ui green button">{{.i18n.Tr "repo.settings.update_webhook"}}</button>
- <a class="ui red delete-button button" data-url="{{.BaseLink}}/settings/hooks/delete" data-id="{{.Webhook.ID}}">{{.i18n.Tr "repo.settings.delete_webhook"}}</a>
- {{end}}
+ <button class="ui green button">{{.i18n.Tr "repo.settings.add_webhook"}}</button>
+ {{else}}
+ <button class="ui green button">{{.i18n.Tr "repo.settings.update_webhook"}}</button>
+ <a class="ui red delete-button button" data-url="{{.BaseLink}}/settings/hooks/delete" data-id="{{.Webhook.ID}}">{{.i18n.Tr "repo.settings.delete_webhook"}}</a>
+ {{end}}
</div>
{{template "repo/settings/hook_delete_modal" .}}
diff --git a/templates/repo/settings/hook_slack.tmpl b/templates/repo/settings/hook_slack.tmpl
index b0ebce9280..9333ae0c37 100644
--- a/templates/repo/settings/hook_slack.tmpl
+++ b/templates/repo/settings/hook_slack.tmpl
@@ -1,28 +1,28 @@
{{if eq .HookType "slack"}}
-<p>{{.i18n.Tr "repo.settings.add_slack_hook_desc" "http://slack.com" | Str2html}}</p>
-<form class="ui form" action="{{.BaseLink}}/settings/hooks/slack/{{if .PageIsSettingsHooksNew}}new{{else}}{{.Webhook.ID}}{{end}}" method="post">
- {{.CsrfTokenHtml}}
- <div class="required field {{if .Err_PayloadURL}}error{{end}}">
- <label for="payload_url">{{.i18n.Tr "repo.settings.payload_url"}}</label>
- <input id="payload_url" name="payload_url" type="url" value="{{.Webhook.URL}}" autofocus required>
- </div>
- <div class="required field {{if .Err_Channel}}error{{end}}">
- <label for="channel">{{.i18n.Tr "repo.settings.slack_channel"}}</label>
- <input id="channel" name="channel" value="{{.SlackHook.Channel}}" placeholder="e.g. #general" required>
- </div>
+ <p>{{.i18n.Tr "repo.settings.add_slack_hook_desc" "http://slack.com" | Str2html}}</p>
+ <form class="ui form" action="{{.BaseLink}}/settings/hooks/slack/{{if .PageIsSettingsHooksNew}}new{{else}}{{.Webhook.ID}}{{end}}" method="post">
+ {{.CsrfTokenHtml}}
+ <div class="required field {{if .Err_PayloadURL}}error{{end}}">
+ <label for="payload_url">{{.i18n.Tr "repo.settings.payload_url"}}</label>
+ <input id="payload_url" name="payload_url" type="url" value="{{.Webhook.URL}}" autofocus required>
+ </div>
+ <div class="required field {{if .Err_Channel}}error{{end}}">
+ <label for="channel">{{.i18n.Tr "repo.settings.slack_channel"}}</label>
+ <input id="channel" name="channel" value="{{.SlackHook.Channel}}" placeholder="e.g. #general" required>
+ </div>
- <div class="field">
- <label for="username">{{.i18n.Tr "repo.settings.slack_username"}}</label>
- <input id="username" name="username" value="{{.SlackHook.Username}}" placeholder="e.g. Gogs">
- </div>
- <div class="field">
- <label for="icon_url">{{.i18n.Tr "repo.settings.slack_icon_url"}}</label>
- <input id="icon_url" name="icon_url" value="{{.SlackHook.IconURL}}" placeholder="e.g. https://example.com/img/favicon.png">
- </div>
- <div class="field">
- <label for="color">{{.i18n.Tr "repo.settings.slack_color"}}</label>
- <input id="color" name="color" value="{{.SlackHook.Color}}" placeholder="e.g. #dd4b39, good, warning, danger">
- </div>
- {{template "repo/settings/hook_settings" .}}
-</form>
+ <div class="field">
+ <label for="username">{{.i18n.Tr "repo.settings.slack_username"}}</label>
+ <input id="username" name="username" value="{{.SlackHook.Username}}" placeholder="e.g. Gogs">
+ </div>
+ <div class="field">
+ <label for="icon_url">{{.i18n.Tr "repo.settings.slack_icon_url"}}</label>
+ <input id="icon_url" name="icon_url" value="{{.SlackHook.IconURL}}" placeholder="e.g. https://example.com/img/favicon.png">
+ </div>
+ <div class="field">
+ <label for="color">{{.i18n.Tr "repo.settings.slack_color"}}</label>
+ <input id="color" name="color" value="{{.SlackHook.Color}}" placeholder="e.g. #dd4b39, good, warning, danger">
+ </div>
+ {{template "repo/settings/hook_settings" .}}
+ </form>
{{end}}
diff --git a/templates/repo/settings/hooks.tmpl b/templates/repo/settings/hooks.tmpl
index e3f6f4ddae..a405b44698 100644
--- a/templates/repo/settings/hooks.tmpl
+++ b/templates/repo/settings/hooks.tmpl
@@ -5,7 +5,7 @@
<div class="ui grid">
{{template "repo/settings/navbar" .}}
{{template "repo/settings/hook_list" .}}
- </div>
+ </div>
</div>
</div>
-{{template "base/footer" .}} \ No newline at end of file
+{{template "base/footer" .}}
diff --git a/templates/repo/settings/nav.tmpl b/templates/repo/settings/nav.tmpl
index 06bad9689d..97df429f2c 100644
--- a/templates/repo/settings/nav.tmpl
+++ b/templates/repo/settings/nav.tmpl
@@ -1,14 +1,14 @@
<div id="setting-menu" class="grid-1-5 panel panel-radius left">
- <p class="panel-header"><strong>{{.i18n.Tr "repo.settings"}}</strong></p>
- <div class="panel-body">
- <ul class="menu menu-vertical switching-list grid-1-5 left">
- <li {{if .PageIsSettingsOptions}}class="current"{{end}}><a href="{{.RepoLink}}/settings">{{.i18n.Tr "repo.settings.options"}}</a></li>
- <li {{if .PageIsSettingsCollaboration}}class="current"{{end}}><a href="{{.RepoLink}}/settings/collaboration">{{.i18n.Tr "repo.settings.collaboration"}}</a></li>
- <li {{if .PageIsSettingsHooks}}class="current"{{end}}><a href="{{.RepoLink}}/settings/hooks">{{.i18n.Tr "repo.settings.hooks"}}</a></li>
- {{if or .SignedUser.AllowGitHook .SignedUser.IsAdmin}}
- <li {{if .PageIsSettingsGitHooks}}class="current"{{end}}><a href="{{.RepoLink}}/settings/hooks/git">{{.i18n.Tr "repo.settings.githooks"}}</a></li>
- {{end}}
- <li {{if .PageIsSettingsKeys}}class="current"{{end}}><a href="{{.RepoLink}}/settings/keys">{{.i18n.Tr "repo.settings.deploy_keys"}}</a></li>
- </ul>
- </div>
-</div> \ No newline at end of file
+ <p class="panel-header"><strong>{{.i18n.Tr "repo.settings"}}</strong></p>
+ <div class="panel-body">
+ <ul class="menu menu-vertical switching-list grid-1-5 left">
+ <li {{if .PageIsSettingsOptions}}class="current"{{end}}><a href="{{.RepoLink}}/settings">{{.i18n.Tr "repo.settings.options"}}</a></li>
+ <li {{if .PageIsSettingsCollaboration}}class="current"{{end}}><a href="{{.RepoLink}}/settings/collaboration">{{.i18n.Tr "repo.settings.collaboration"}}</a></li>
+ <li {{if .PageIsSettingsHooks}}class="current"{{end}}><a href="{{.RepoLink}}/settings/hooks">{{.i18n.Tr "repo.settings.hooks"}}</a></li>
+ {{if or .SignedUser.AllowGitHook .SignedUser.IsAdmin}}
+ <li {{if .PageIsSettingsGitHooks}}class="current"{{end}}><a href="{{.RepoLink}}/settings/hooks/git">{{.i18n.Tr "repo.settings.githooks"}}</a></li>
+ {{end}}
+ <li {{if .PageIsSettingsKeys}}class="current"{{end}}><a href="{{.RepoLink}}/settings/keys">{{.i18n.Tr "repo.settings.deploy_keys"}}</a></li>
+ </ul>
+ </div>
+</div>
diff --git a/templates/repo/settings/navbar.tmpl b/templates/repo/settings/navbar.tmpl
index 512ee3002d..7ebf2886c9 100644
--- a/templates/repo/settings/navbar.tmpl
+++ b/templates/repo/settings/navbar.tmpl
@@ -1,22 +1,22 @@
<div class="four wide column">
<div class="ui vertical menu">
<div class="header item">{{.i18n.Tr "repo.settings"}}</div>
- <a class="{{if .PageIsSettingsOptions}}active{{end}} item" href="{{.RepoLink}}/settings">
- {{.i18n.Tr "repo.settings.options"}}
- </a>
- <a class="{{if .PageIsSettingsCollaboration}}active{{end}} item" href="{{.RepoLink}}/settings/collaboration">
- {{.i18n.Tr "repo.settings.collaboration"}}
- </a>
- <a class="{{if .PageIsSettingsHooks}}active{{end}} item" href="{{.RepoLink}}/settings/hooks">
- {{.i18n.Tr "repo.settings.hooks"}}
- </a>
- {{if .SignedUser.CanEditGitHook}}
- <a class="{{if .PageIsSettingsGitHooks}}active{{end}} item" href="{{.RepoLink}}/settings/hooks/git">
- {{.i18n.Tr "repo.settings.githooks"}}
- </a>
- {{end}}
- <a class="{{if .PageIsSettingsKeys}}active{{end}} item" href="{{.RepoLink}}/settings/keys">
- {{.i18n.Tr "repo.settings.deploy_keys"}}
- </a>
+ <a class="{{if .PageIsSettingsOptions}}active{{end}} item" href="{{.RepoLink}}/settings">
+ {{.i18n.Tr "repo.settings.options"}}
+ </a>
+ <a class="{{if .PageIsSettingsCollaboration}}active{{end}} item" href="{{.RepoLink}}/settings/collaboration">
+ {{.i18n.Tr "repo.settings.collaboration"}}
+ </a>
+ <a class="{{if .PageIsSettingsHooks}}active{{end}} item" href="{{.RepoLink}}/settings/hooks">
+ {{.i18n.Tr "repo.settings.hooks"}}
+ </a>
+ {{if .SignedUser.CanEditGitHook}}
+ <a class="{{if .PageIsSettingsGitHooks}}active{{end}} item" href="{{.RepoLink}}/settings/hooks/git">
+ {{.i18n.Tr "repo.settings.githooks"}}
+ </a>
+ {{end}}
+ <a class="{{if .PageIsSettingsKeys}}active{{end}} item" href="{{.RepoLink}}/settings/keys">
+ {{.i18n.Tr "repo.settings.deploy_keys"}}
+ </a>
</div>
</div>
diff --git a/templates/repo/settings/options.tmpl b/templates/repo/settings/options.tmpl
index f3734557d9..767f164a03 100644
--- a/templates/repo/settings/options.tmpl
+++ b/templates/repo/settings/options.tmpl
@@ -7,121 +7,121 @@
<div class="twelve wide column content">
{{template "base/alert" .}}
<h4 class="ui top attached header">
- {{.i18n.Tr "repo.settings.basic_settings"}}
+ {{.i18n.Tr "repo.settings.basic_settings"}}
</h4>
<div class="ui attached segment">
<form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}}
- <input type="hidden" name="action" value="update">
- <div class="required field {{if .Err_RepoName}}error{{end}}">
- <label for="repo_name">{{.i18n.Tr "repo.repo_name"}}<span class="text red hide" id="repo-name-change-prompt"> {{.i18n.Tr "repo.settings.change_reponame_prompt"}}</span></label>
- <input id="repo_name" name="repo_name" value="{{.Repository.Name}}" data-repo-name="{{.Repository.Name}}" autofocus required>
- </div>
- <div class="field {{if .Err_Description}}error{{end}}">
- <label for="description">{{$.i18n.Tr "repo.repo_desc"}}</label>
- <textarea id="description" name="description" rows="2">{{.Repository.Description}}</textarea>
- </div>
- <div class="field {{if .Err_Website}}error{{end}}">
- <label for="website">{{.i18n.Tr "repo.settings.site"}}</label>
- <input id="website" name="website" type="url" value="{{.Repository.Website}}">
- </div>
-
- {{if not .Repository.IsBare}}
- <div class="required inline field">
- <label>{{.i18n.Tr "repo.default_branch"}}</label>
- <div class="ui selection dropdown">
- <input type="hidden" id="branch" name="branch" value="{{.Repository.DefaultBranch}}">
- <div class="text">{{.Repository.DefaultBranch}}</div>
- <i class="dropdown icon"></i>
- <div class="menu">
- {{range .Branches}}
- <div class="item" data-value="{{.}}">{{.}}</div>
- {{end}}
- </div>
- </div>
- </div>
- {{end}}
- {{if not .Repository.IsFork}}
- <div class="inline field">
- <label>{{.i18n.Tr "repo.visibility"}}</label>
- <div class="ui checkbox">
- <input name="private" type="checkbox" {{if .Repository.IsPrivate}}checked{{end}}>
- <label>{{.i18n.Tr "repo.visiblity_helper" | Safe}} {{if .Repository.NumForks}}<span class="text red">{{.i18n.Tr "repo.visiblity_fork_helper"}}</span>{{end}}</label>
- </div>
- </div>
- {{end}}
- {{if .Repository.IsMirror}}
- <div class="inline field {{if .Err_Interval}}error{{end}}">
- <label for="interval">{{.i18n.Tr "repo.mirror_interval"}}</label>
- <input id="interval" name="interval" type="number" value="{{.MirrorInterval}}">
- </div>
- {{end}}
-
- <div class="ui divider"></div>
- <div class="field">
- <button class="ui green button">{{$.i18n.Tr "repo.settings.update_settings"}}</button>
- </div>
+ <input type="hidden" name="action" value="update">
+ <div class="required field {{if .Err_RepoName}}error{{end}}">
+ <label for="repo_name">{{.i18n.Tr "repo.repo_name"}}<span class="text red hide" id="repo-name-change-prompt"> {{.i18n.Tr "repo.settings.change_reponame_prompt"}}</span></label>
+ <input id="repo_name" name="repo_name" value="{{.Repository.Name}}" data-repo-name="{{.Repository.Name}}" autofocus required>
+ </div>
+ <div class="field {{if .Err_Description}}error{{end}}">
+ <label for="description">{{$.i18n.Tr "repo.repo_desc"}}</label>
+ <textarea id="description" name="description" rows="2">{{.Repository.Description}}</textarea>
+ </div>
+ <div class="field {{if .Err_Website}}error{{end}}">
+ <label for="website">{{.i18n.Tr "repo.settings.site"}}</label>
+ <input id="website" name="website" type="url" value="{{.Repository.Website}}">
+ </div>
+
+ {{if not .Repository.IsBare}}
+ <div class="required inline field">
+ <label>{{.i18n.Tr "repo.default_branch"}}</label>
+ <div class="ui selection dropdown">
+ <input type="hidden" id="branch" name="branch" value="{{.Repository.DefaultBranch}}">
+ <div class="text">{{.Repository.DefaultBranch}}</div>
+ <i class="dropdown icon"></i>
+ <div class="menu">
+ {{range .Branches}}
+ <div class="item" data-value="{{.}}">{{.}}</div>
+ {{end}}
+ </div>
+ </div>
+ </div>
+ {{end}}
+ {{if not .Repository.IsFork}}
+ <div class="inline field">
+ <label>{{.i18n.Tr "repo.visibility"}}</label>
+ <div class="ui checkbox">
+ <input name="private" type="checkbox" {{if .Repository.IsPrivate}}checked{{end}}>
+ <label>{{.i18n.Tr "repo.visiblity_helper" | Safe}} {{if .Repository.NumForks}}<span class="text red">{{.i18n.Tr "repo.visiblity_fork_helper"}}</span>{{end}}</label>
+ </div>
+ </div>
+ {{end}}
+ {{if .Repository.IsMirror}}
+ <div class="inline field {{if .Err_Interval}}error{{end}}">
+ <label for="interval">{{.i18n.Tr "repo.mirror_interval"}}</label>
+ <input id="interval" name="interval" type="number" value="{{.MirrorInterval}}">
+ </div>
+ {{end}}
+
+ <div class="ui divider"></div>
+ <div class="field">
+ <button class="ui green button">{{$.i18n.Tr "repo.settings.update_settings"}}</button>
+ </div>
+ </form>
+ </div>
+
+ <h4 class="ui top attached header">
+ {{.i18n.Tr "repo.settings.advanced_settings"}}
+ </h4>
+ <div class="ui attached segment">
+ <form class="ui form" action="{{.Link}}" method="post">
+ {{.CsrfTokenHtml}}
+ <input type="hidden" name="action" value="advanced">
+
+ <div class="inline field">
+ <label>{{.i18n.Tr "repo.wiki"}}</label>
+ <div class="ui checkbox">
+ <input name="enable_wiki" type="checkbox" {{if .Repository.EnableWiki}}checked{{end}}>
+ <label>{{.i18n.Tr "repo.settings.wiki_desc"}}</label>
+ </div>
+ </div>
+
+ <div class="ui divider"></div>
+
+ <div class="inline field">
+ <label>{{.i18n.Tr "repo.issues"}}</label>
+ <div class="ui checkbox">
+ <input name="enable_issues" type="checkbox" {{if .Repository.EnableIssues}}checked{{end}}>
+ <label>{{.i18n.Tr "repo.settings.issues_desc"}}</label>
+ </div>
+ </div>
+ <div class="inline field">
+ <div class="ui checkbox">
+ <input name="enable_external_tracker" type="checkbox" {{if .Repository.EnableExternalTracker}}checked{{end}}>
+ <label>{{.i18n.Tr "repo.settings.use_external_issue_tracker"}}</label>
+ </div>
+ </div>
+ <div class="field">
+ <label for="tracker_url_format">{{.i18n.Tr "repo.settings.tracker_url_format"}}</label>
+ <input id="tracker_url_format" name="tracker_url_format" value="{{.Repository.ExternalTrackerFormat}}" placeholder="e.g. https://github.com/{user}/{repo}/issues/{index}">
+ <p class="help">{{.i18n.Tr "repo.settings.tracker_url_format_desc" | Str2html}}</p>
+ </div>
+
+ <div class="ui divider"></div>
+
+ <div class="inline field">
+ <label>{{.i18n.Tr "repo.pulls"}}</label>
+ <div class="ui checkbox">
+ <input name="enable_pulls" type="checkbox" {{if .Repository.EnablePulls}}checked{{end}}>
+ <label>{{.i18n.Tr "repo.settings.pulls_desc"}}</label>
+ </div>
+ </div>
+
+ <div class="ui divider"></div>
+ <div class="field">
+ <button class="ui green button">{{$.i18n.Tr "repo.settings.update_settings"}}</button>
+ </div>
</form>
- </div>
-
- <h4 class="ui top attached header">
- {{.i18n.Tr "repo.settings.advanced_settings"}}
- </h4>
- <div class="ui attached segment">
- <form class="ui form" action="{{.Link}}" method="post">
- {{.CsrfTokenHtml}}
- <input type="hidden" name="action" value="advanced">
-
- <div class="inline field">
- <label>{{.i18n.Tr "repo.wiki"}}</label>
- <div class="ui checkbox">
- <input name="enable_wiki" type="checkbox" {{if .Repository.EnableWiki}}checked{{end}}>
- <label>{{.i18n.Tr "repo.settings.wiki_desc"}}</label>
- </div>
- </div>
-
- <div class="ui divider"></div>
-
- <div class="inline field">
- <label>{{.i18n.Tr "repo.issues"}}</label>
- <div class="ui checkbox">
- <input name="enable_issues" type="checkbox" {{if .Repository.EnableIssues}}checked{{end}}>
- <label>{{.i18n.Tr "repo.settings.issues_desc"}}</label>
- </div>
- </div>
- <div class="inline field">
- <div class="ui checkbox">
- <input name="enable_external_tracker" type="checkbox" {{if .Repository.EnableExternalTracker}}checked{{end}}>
- <label>{{.i18n.Tr "repo.settings.use_external_issue_tracker"}}</label>
- </div>
- </div>
- <div class="field">
- <label for="tracker_url_format">{{.i18n.Tr "repo.settings.tracker_url_format"}}</label>
- <input id="tracker_url_format" name="tracker_url_format" value="{{.Repository.ExternalTrackerFormat}}" placeholder="e.g. https://github.com/{user}/{repo}/issues/{index}">
- <p class="help">{{.i18n.Tr "repo.settings.tracker_url_format_desc" | Str2html}}</p>
- </div>
-
- <div class="ui divider"></div>
-
- <div class="inline field">
- <label>{{.i18n.Tr "repo.pulls"}}</label>
- <div class="ui checkbox">
- <input name="enable_pulls" type="checkbox" {{if .Repository.EnablePulls}}checked{{end}}>
- <label>{{.i18n.Tr "repo.settings.pulls_desc"}}</label>
- </div>
- </div>
-
- <div class="ui divider"></div>
- <div class="field">
- <button class="ui green button">{{$.i18n.Tr "repo.settings.update_settings"}}</button>
- </div>
- </form>
- </div>
-
- <h4 class="ui top attached warning header">
- {{.i18n.Tr "repo.settings.danger_zone"}}
- </h4>
- <div class="ui attached warning table danger segment">
+ </div>
+
+ <h4 class="ui top attached warning header">
+ {{.i18n.Tr "repo.settings.danger_zone"}}
+ </h4>
+ <div class="ui attached warning table danger segment">
<div class="item">
<div class="ui right">
<button class="ui basic red show-modal button" data-modal="#transfer-repo-modal">{{.i18n.Tr "repo.settings.transfer"}}</button>
@@ -131,7 +131,7 @@
<p>{{.i18n.Tr "repo.settings.transfer_desc"}}</p>
</div>
</div>
-
+
<div class="ui divider"></div>
<div class="item">
@@ -143,23 +143,23 @@
<p>{{.i18n.Tr "repo.settings.delete_desc"}}</p>
</div>
</div>
- </div>
- </div>
- </div>
- </div>
+ </div>
+ </div>
+ </div>
+ </div>
</div>
<div class="ui small modal" id="transfer-repo-modal">
- <div class="header">
- {{.i18n.Tr "repo.settings.transfer"}}
- </div>
- <div class="content">
+ <div class="header">
+ {{.i18n.Tr "repo.settings.transfer"}}
+ </div>
+ <div class="content">
<div class="ui warning message text left">
{{.i18n.Tr "repo.settings.transfer_notices_1" | Safe}} <br>
{{.i18n.Tr "repo.settings.transfer_notices_2" | Safe}}
</div>
- <form class="ui form" action="{{.Link}}" method="post">
- {{.CsrfTokenHtml}}
+ <form class="ui form" action="{{.Link}}" method="post">
+ {{.CsrfTokenHtml}}
<input type="hidden" name="action" value="transfer">
<div class="field">
<label>
@@ -167,28 +167,28 @@
<span class="text red">{{.Repository.Name}}</span>
</label>
</div>
- <div class="required field">
- <label for="repo_name">{{.i18n.Tr "repo.repo_name"}}</label>
- <input id="repo_name" name="repo_name" required>
- </div>
- <div class="required field">
- <label for="new_owner_name">{{.i18n.Tr "repo.settings.transfer_owner"}}</label>
- <input id="new_owner_name" name="new_owner_name" required>
- </div>
-
+ <div class="required field">
+ <label for="repo_name">{{.i18n.Tr "repo.repo_name"}}</label>
+ <input id="repo_name" name="repo_name" required>
+ </div>
+ <div class="required field">
+ <label for="new_owner_name">{{.i18n.Tr "repo.settings.transfer_owner"}}</label>
+ <input id="new_owner_name" name="new_owner_name" required>
+ </div>
+
<div class="text right actions">
<div class="ui cancel button">{{.i18n.Tr "settings.cancel"}}</div>
<button class="ui red button">{{.i18n.Tr "repo.settings.make_transfer"}}</button>
</div>
- </form>
- </div>
+ </form>
+ </div>
</div>
<div class="ui small modal" id="delete-repo-modal">
- <div class="header">
- {{.i18n.Tr "repo.settings.delete"}}
- </div>
- <div class="content">
+ <div class="header">
+ {{.i18n.Tr "repo.settings.delete"}}
+ </div>
+ <div class="content">
<div class="ui warning message text left">
{{.i18n.Tr "repo.settings.delete_notices_1" | Safe}} <br>
{{.i18n.Tr "repo.settings.delete_notices_2" | Safe}}
@@ -196,27 +196,27 @@
{{.i18n.Tr "repo.settings.delete_notices_fork_1" | Safe}} <br>
{{.i18n.Tr "repo.settings.delete_notices_fork_2" | Safe}} <br>
{{.i18n.Tr "repo.settings.delete_notices_fork_3" | Safe}}
- {{end}}
+ {{end}}
+ </div>
+ <form class="ui form" action="{{.Link}}" method="post">
+ {{.CsrfTokenHtml}}
+ <input type="hidden" name="action" value="delete">
+ <div class="field">
+ <label>
+ {{.i18n.Tr "repo.settings.transfer_form_title"}}
+ <span class="text red">{{.Repository.Name}}</span>
+ </label>
</div>
- <form class="ui form" action="{{.Link}}" method="post">
- {{.CsrfTokenHtml}}
- <input type="hidden" name="action" value="delete">
- <div class="field">
- <label>
- {{.i18n.Tr "repo.settings.transfer_form_title"}}
- <span class="text red">{{.Repository.Name}}</span>
- </label>
- </div>
- <div class="required field">
- <label for="repo_name">{{.i18n.Tr "repo.repo_name"}}</label>
- <input id="repo_name" name="repo_name" required>
- </div>
-
- <div class="text right actions">
- <div class="ui cancel button">{{.i18n.Tr "settings.cancel"}}</div>
- <button class="ui red button">{{.i18n.Tr "repo.settings.confirm_delete"}}</button>
- </div>
- </form>
- </div>
+ <div class="required field">
+ <label for="repo_name">{{.i18n.Tr "repo.repo_name"}}</label>
+ <input id="repo_name" name="repo_name" required>
+ </div>
+
+ <div class="text right actions">
+ <div class="ui cancel button">{{.i18n.Tr "settings.cancel"}}</div>
+ <button class="ui red button">{{.i18n.Tr "repo.settings.confirm_delete"}}</button>
+ </div>
+ </form>
+</div>
</div>
-{{template "base/footer" .}} \ No newline at end of file
+{{template "base/footer" .}}
diff --git a/templates/repo/view_file.tmpl b/templates/repo/view_file.tmpl
index 5751d2e3dd..cf6198195a 100644
--- a/templates/repo/view_file.tmpl
+++ b/templates/repo/view_file.tmpl
@@ -1,50 +1,50 @@
<div id="file-content">
- <h4 class="ui top attached header" id="{{if .ReadmeExist}}repo-readme{{else}}repo-read-file{{end}}">
- {{if .ReadmeExist}}
- <i class="book icon ui left"></i>
- {{if .ReadmeInList}}
- <strong>{{.FileName}}</strong>
- {{else}}
- <strong>{{.FileName}}</strong> <span class="text grey normal">{{FileSize .FileSize}}</span>
- {{end}}
- {{else}}
- <i class="file text outline icon ui left"></i>
- <strong>{{.FileName}}</strong> <span class="text grey normal">{{FileSize .FileSize}}</span>
- {{end}}
- {{if not .ReadmeInList}}
- <div class="ui right">
- <div class="ui small grey basic buttons">
- {{if not .IsCommit}}
- <a class="ui button" href="{{.RepoLink}}/src/{{.CommitID}}/{{EscapePound .TreeName}}">{{.i18n.Tr "repo.file_permalink"}}</a>
- {{end}}
- <a class="ui button" href="{{.RepoLink}}/commits/{{EscapePound .BranchName}}/{{EscapePound .TreeName}}">{{.i18n.Tr "repo.file_history"}}</a>
- <a class="ui button" href="{{EscapePound .FileLink}}">{{.i18n.Tr "repo.file_raw"}}</a>
- </div>
- </div>
- {{end}}
- </h4>
- <div class="ui attached table segment">
- <div class="file-view {{if .ReadmeExist}}markdown{{else if .IsFileText}}code-view{{end}}">
- {{if .ReadmeExist}}
- {{if .FileContent}}{{.FileContent | Str2html}}{{end}}
- {{else if not .IsFileText}}
- <div class="view-raw">
- {{if .IsImageFile}}
- <img src="{{EscapePound .FileLink}}">
- {{else}}
- <a href="{{EscapePound .FileLink}}" rel="nofollow" class="btn btn-gray btn-radius">{{.i18n.Tr "repo.file_view_raw"}}</a>
- {{end}}
- </div>
- {{else if .FileSize}}
- <table>
- <tbody>
- <tr>
- <td class="lines-num"></td>
- <td class="lines-code"><pre class="{{if .FileExt}}lang-{{.FileExt}}{{end}}"><code><ol class="linenums">{{.FileContent}}</ol></code></pre></td>
- </tr>
- </tbody>
- </table>
- {{end}}
- </div>
- </div>
-</div> \ No newline at end of file
+ <h4 class="ui top attached header" id="{{if .ReadmeExist}}repo-readme{{else}}repo-read-file{{end}}">
+ {{if .ReadmeExist}}
+ <i class="book icon ui left"></i>
+ {{if .ReadmeInList}}
+ <strong>{{.FileName}}</strong>
+ {{else}}
+ <strong>{{.FileName}}</strong> <span class="text grey normal">{{FileSize .FileSize}}</span>
+ {{end}}
+ {{else}}
+ <i class="file text outline icon ui left"></i>
+ <strong>{{.FileName}}</strong> <span class="text grey normal">{{FileSize .FileSize}}</span>
+ {{end}}
+ {{if not .ReadmeInList}}
+ <div class="ui right">
+ <div class="ui small grey basic buttons">
+ {{if not .IsCommit}}
+ <a class="ui button" href="{{.RepoLink}}/src/{{.CommitID}}/{{EscapePound .TreeName}}">{{.i18n.Tr "repo.file_permalink"}}</a>
+ {{end}}
+ <a class="ui button" href="{{.RepoLink}}/commits/{{EscapePound .BranchName}}/{{EscapePound .TreeName}}">{{.i18n.Tr "repo.file_history"}}</a>
+ <a class="ui button" href="{{EscapePound .FileLink}}">{{.i18n.Tr "repo.file_raw"}}</a>
+ </div>
+ </div>
+ {{end}}
+ </h4>
+ <div class="ui attached table segment">
+ <div class="file-view {{if .ReadmeExist}}markdown{{else if .IsFileText}}code-view{{end}}">
+ {{if .ReadmeExist}}
+ {{if .FileContent}}{{.FileContent | Str2html}}{{end}}
+ {{else if not .IsFileText}}
+ <div class="view-raw">
+ {{if .IsImageFile}}
+ <img src="{{EscapePound .FileLink}}">
+ {{else}}
+ <a href="{{EscapePound .FileLink}}" rel="nofollow" class="btn btn-gray btn-radius">{{.i18n.Tr "repo.file_view_raw"}}</a>
+ {{end}}
+ </div>
+ {{else if .FileSize}}
+ <table>
+ <tbody>
+ <tr>
+ <td class="lines-num"></td>
+ <td class="lines-code"><pre class="{{if .FileExt}}lang-{{.FileExt}}{{end}}"><code><ol class="linenums">{{.FileContent}}</ol></code></pre></td>
+ </tr>
+ </tbody>
+ </table>
+ {{end}}
+ </div>
+ </div>
+</div>
diff --git a/templates/repo/view_list.tmpl b/templates/repo/view_list.tmpl
index 887ce8e251..d94dc96e25 100644
--- a/templates/repo/view_list.tmpl
+++ b/templates/repo/view_list.tmpl
@@ -1,56 +1,56 @@
<table id="repo-files-table" class="ui fixed single line table">
- <thead>
- <tr>
- <th class="four wide">
- {{if .LastCommitUser}}
- <img class="ui avatar image img-12" src="{{.LastCommitUser.AvatarLink}}" />
- <a href="{{AppSubUrl}}/{{.LastCommitUser.Name}}"><strong>{{.LastCommit.Author.Name}}</strong></a>
- {{else}}
- <img class="ui avatar image img-12" src="{{AvatarLink .LastCommit.Author.Email}}" />
- <strong>{{.LastCommit.Author.Name}}</strong>
- {{end}}
- <a rel="nofollow" class="ui sha label" href="{{.RepoLink}}/commit/{{.LastCommit.ID}}" rel="nofollow">{{ShortSha .LastCommit.ID.String}}</a>
- <span class="grey">{{RenderCommitMessage false .LastCommit.Summary .RepoLink $.Repository.ComposeMetas}}</span>
- </th>
- <th class="nine wide">
- </th>
- <th class="three wide text grey right age">{{TimeSince .LastCommit.Author.When $.Lang}}</th>
- </tr>
- </thead>
- <tbody>
- {{if .HasParentPath}}
- <tr class="has-parent">
- <td colspan="3"><i class="icon octicon octicon-mail-reply"></i><a href="{{EscapePound .BranchLink}}{{.ParentPath}}">..</a></td>
- </tr>
- {{end}}
- {{range $item := .Files}}
- {{$entry := index $item 0}}
- {{$commit := index $item 1}}
- <tr>
- {{if $entry.IsSubModule}}
- <td>
- <span class="icon octicon octicon-file-submodule"></span>
- {{if $commit.RefUrl}}
- <a href="{{$commit.RefUrl}}">{{$entry.Name}}</a> @ <a href="{{$commit.RefUrl}}/commit/{{$commit.RefId}}">{{ShortSha $commit.RefId}}</a>
- {{else}}
- {{$entry.Name}} @ {{ShortSha $commit.RefId}}
- {{end}}
- </td>
- {{else}}
- <td class="name">
- <span class="icon octicon octicon-file-{{if or $entry.IsDir}}directory{{else}}text{{end}}"></span>
- <a href="{{EscapePound $.BranchLink}}/{{EscapePound $.TreePath}}{{EscapePound $entry.Name}}">{{$entry.Name}}</a>
- </td>
- {{end}}
- <td class="message collapsing">
- <a rel="nofollow" class="ui sha label" href="{{AppSubUrl}}/{{$.Username}}/{{$.Reponame}}/commit/{{$commit.ID}}">{{ShortSha $commit.ID.String}}</a>
- {{RenderCommitMessage false $commit.Summary $.RepoLink $.Repository.ComposeMetas}}
- </td>
- <td class="text grey right age">{{TimeSince $commit.Committer.When $.Lang}}</td>
- </tr>
- {{end}}
- </tbody>
+ <thead>
+ <tr>
+ <th class="four wide">
+ {{if .LastCommitUser}}
+ <img class="ui avatar image img-12" src="{{.LastCommitUser.AvatarLink}}" />
+ <a href="{{AppSubUrl}}/{{.LastCommitUser.Name}}"><strong>{{.LastCommit.Author.Name}}</strong></a>
+ {{else}}
+ <img class="ui avatar image img-12" src="{{AvatarLink .LastCommit.Author.Email}}" />
+ <strong>{{.LastCommit.Author.Name}}</strong>
+ {{end}}
+ <a rel="nofollow" class="ui sha label" href="{{.RepoLink}}/commit/{{.LastCommit.ID}}" rel="nofollow">{{ShortSha .LastCommit.ID.String}}</a>
+ <span class="grey">{{RenderCommitMessage false .LastCommit.Summary .RepoLink $.Repository.ComposeMetas}}</span>
+ </th>
+ <th class="nine wide">
+ </th>
+ <th class="three wide text grey right age">{{TimeSince .LastCommit.Author.When $.Lang}}</th>
+ </tr>
+ </thead>
+ <tbody>
+ {{if .HasParentPath}}
+ <tr class="has-parent">
+ <td colspan="3"><i class="icon octicon octicon-mail-reply"></i><a href="{{EscapePound .BranchLink}}{{.ParentPath}}">..</a></td>
+ </tr>
+ {{end}}
+ {{range $item := .Files}}
+ {{$entry := index $item 0}}
+ {{$commit := index $item 1}}
+ <tr>
+ {{if $entry.IsSubModule}}
+ <td>
+ <span class="icon octicon octicon-file-submodule"></span>
+ {{if $commit.RefUrl}}
+ <a href="{{$commit.RefUrl}}">{{$entry.Name}}</a> @ <a href="{{$commit.RefUrl}}/commit/{{$commit.RefId}}">{{ShortSha $commit.RefId}}</a>
+ {{else}}
+ {{$entry.Name}} @ {{ShortSha $commit.RefId}}
+ {{end}}
+ </td>
+ {{else}}
+ <td class="name">
+ <span class="icon octicon octicon-file-{{if or $entry.IsDir}}directory{{else}}text{{end}}"></span>
+ <a href="{{EscapePound $.BranchLink}}/{{EscapePound $.TreePath}}{{EscapePound $entry.Name}}">{{$entry.Name}}</a>
+ </td>
+ {{end}}
+ <td class="message collapsing">
+ <a rel="nofollow" class="ui sha label" href="{{AppSubUrl}}/{{$.Username}}/{{$.Reponame}}/commit/{{$commit.ID}}">{{ShortSha $commit.ID.String}}</a>
+ {{RenderCommitMessage false $commit.Summary $.RepoLink $.Repository.ComposeMetas}}
+ </td>
+ <td class="text grey right age">{{TimeSince $commit.Committer.When $.Lang}}</td>
+ </tr>
+ {{end}}
+ </tbody>
</table>
{{if .ReadmeExist}}
- {{template "repo/view_file" .}}
+ {{template "repo/view_file" .}}
{{end}}
diff --git a/templates/repo/watchers.tmpl b/templates/repo/watchers.tmpl
index 7802cea324..d87d9b7a3c 100644
--- a/templates/repo/watchers.tmpl
+++ b/templates/repo/watchers.tmpl
@@ -1,56 +1,56 @@
{{template "base/head" .}}
<div class="repository watchers">
- {{template "repo/header" .}}
- <div class="ui container">
- <h2 class="ui dividing header">
- {{if .PageIsWatchers}}
- {{.i18n.Tr "repo.watchers"}}
- {{else}}
- {{.i18n.Tr "repo.stargazers"}}
- {{end}}
- </h2>
- <ul class="list">
- {{range .Watchers}}
- <li class="item ui segment">
- <a href="{{.HomeLink}}">
- <img class="avatar" src="{{.AvatarLink}}"/>
- </a>
- <h3 class="name"><a href="{{.HomeLink}}">{{.DisplayName}}</a></h3>
+ {{template "repo/header" .}}
+ <div class="ui container">
+ <h2 class="ui dividing header">
+ {{if .PageIsWatchers}}
+ {{.i18n.Tr "repo.watchers"}}
+ {{else}}
+ {{.i18n.Tr "repo.stargazers"}}
+ {{end}}
+ </h2>
+ <ul class="list">
+ {{range .Watchers}}
+ <li class="item ui segment">
+ <a href="{{.HomeLink}}">
+ <img class="avatar" src="{{.AvatarLink}}"/>
+ </a>
+ <h3 class="name"><a href="{{.HomeLink}}">{{.DisplayName}}</a></h3>
- <div class="meta">
- {{if .Website}}
- <span class="icon octicon octicon-link"></span> <a href="{{.Website}}" target="_blank">{{.Website}}</a>
- {{else if .Location}}
- <span class="icon octicon octicon-location"></span> {{.Location}}
- {{else}}
- <span class="icon octicon octicon-clock"></span> {{$.i18n.Tr "user.join_on"}} {{DateFmtShort .Created}}
- {{end}}
- </div>
- </li>
- {{end}}
- </ul>
-
- {{with .Page}}
- {{if gt .TotalPages 1}}
- <div class="center page buttons">
- <div class="ui borderless pagination menu">
- <a class="{{if not .HasPrevious}}disabled{{end}} item" {{if .HasPrevious}}href="{{$.Link}}?page={{.Previous}}"{{end}}>
- <i class="left arrow icon"></i> {{$.i18n.Tr "repo.issues.previous"}}
- </a>
- {{range .Pages}}
- {{if eq .Num -1}}
- <a class="disabled item">...</a>
- {{else}}
- <a class="{{if .IsCurrent}}active{{end}} item" {{if not .IsCurrent}}href="{{$.Link}}?page={{.Num}}"{{end}}>{{.Num}}</a>
- {{end}}
- {{end}}
- <a class="{{if not .HasNext}}disabled{{end}} item" {{if .HasNext}}href="{{$.Link}}?page={{.Next}}"{{end}}>
- {{$.i18n.Tr "repo.issues.next"}}&nbsp;<i class="icon right arrow"></i>
- </a>
- </div>
- </div>
- {{end}}
- {{end}}
- </div>
+ <div class="meta">
+ {{if .Website}}
+ <span class="icon octicon octicon-link"></span> <a href="{{.Website}}" target="_blank">{{.Website}}</a>
+ {{else if .Location}}
+ <span class="icon octicon octicon-location"></span> {{.Location}}
+ {{else}}
+ <span class="icon octicon octicon-clock"></span> {{$.i18n.Tr "user.join_on"}} {{DateFmtShort .Created}}
+ {{end}}
+ </div>
+ </li>
+ {{end}}
+ </ul>
+
+ {{with .Page}}
+ {{if gt .TotalPages 1}}
+ <div class="center page buttons">
+ <div class="ui borderless pagination menu">
+ <a class="{{if not .HasPrevious}}disabled{{end}} item" {{if .HasPrevious}}href="{{$.Link}}?page={{.Previous}}"{{end}}>
+ <i class="left arrow icon"></i> {{$.i18n.Tr "repo.issues.previous"}}
+ </a>
+ {{range .Pages}}
+ {{if eq .Num -1}}
+ <a class="disabled item">...</a>
+ {{else}}
+ <a class="{{if .IsCurrent}}active{{end}} item" {{if not .IsCurrent}}href="{{$.Link}}?page={{.Num}}"{{end}}>{{.Num}}</a>
+ {{end}}
+ {{end}}
+ <a class="{{if not .HasNext}}disabled{{end}} item" {{if .HasNext}}href="{{$.Link}}?page={{.Next}}"{{end}}>
+ {{$.i18n.Tr "repo.issues.next"}}&nbsp;<i class="icon right arrow"></i>
+ </a>
+ </div>
+ </div>
+ {{end}}
+ {{end}}
+ </div>
</div>
-{{template "base/footer" .}} \ No newline at end of file
+{{template "base/footer" .}}
diff --git a/templates/repo/wiki/new.tmpl b/templates/repo/wiki/new.tmpl
index 09c33415ba..0e96f58bcc 100644
--- a/templates/repo/wiki/new.tmpl
+++ b/templates/repo/wiki/new.tmpl
@@ -1,34 +1,34 @@
{{template "base/head" .}}
<div class="repository wiki new">
- {{template "repo/header" .}}
- <div class="ui container">
- {{template "base/alert" .}}
- <div class="ui header">
- {{.i18n.Tr "repo.wiki.new_page"}}
- {{if .PageIsWikiEdit}}
- <div class="ui right">
- <a class="ui green small button" href="{{.RepoLink}}/wiki/_new">{{.i18n.Tr "repo.wiki.new_page_button"}}</a>
- </div>
- {{end}}
- </div>
- <form class="ui form" action="{{.Link}}" method="post">
- {{.CsrfTokenHtml}}
- <input type="hidden" name="old_title" value="{{.old_title}}">
- <div class="field {{if .Err_Title}}error{{end}}">
- <input name="title" value="{{.title}}" autofocus required>
- </div>
- <div class="field">
- <textarea id="edit-area" name="content" data-url="{{AppSubUrl}}/api/v1/markdown" data-context="{{.RepoLink}}">{{if .PageIsWikiEdit}}{{.content}}{{else}}{{.i18n.Tr "repo.wiki.welcome"}}{{end}}</textarea required>
- </div>
- <div class="field">
- <input name="message" placeholder="{{.i18n.Tr "repo.wiki.default_commit_message"}}">
- </div>
- <div class="text right">
- <button class="ui green button">
- {{.i18n.Tr "repo.wiki.save_page"}}
- </button>
- </div>
- </form>
+ {{template "repo/header" .}}
+ <div class="ui container">
+ {{template "base/alert" .}}
+ <div class="ui header">
+ {{.i18n.Tr "repo.wiki.new_page"}}
+ {{if .PageIsWikiEdit}}
+ <div class="ui right">
+ <a class="ui green small button" href="{{.RepoLink}}/wiki/_new">{{.i18n.Tr "repo.wiki.new_page_button"}}</a>
+ </div>
+ {{end}}
+ </div>
+ <form class="ui form" action="{{.Link}}" method="post">
+ {{.CsrfTokenHtml}}
+ <input type="hidden" name="old_title" value="{{.old_title}}">
+ <div class="field {{if .Err_Title}}error{{end}}">
+ <input name="title" value="{{.title}}" autofocus required>
+ </div>
+ <div class="field">
+ <textarea id="edit-area" name="content" data-url="{{AppSubUrl}}/api/v1/markdown" data-context="{{.RepoLink}}">{{if .PageIsWikiEdit}}{{.content}}{{else}}{{.i18n.Tr "repo.wiki.welcome"}}{{end}}</textarea required>
+ </div>
+ <div class="field">
+ <input name="message" placeholder="{{.i18n.Tr "repo.wiki.default_commit_message"}}">
+ </div>
+ <div class="text right">
+ <button class="ui green button">
+ {{.i18n.Tr "repo.wiki.save_page"}}
+ </button>
+ </div>
+ </form>
</div>
</div>
-{{template "base/footer" .}} \ No newline at end of file
+{{template "base/footer" .}}
diff --git a/templates/repo/wiki/pages.tmpl b/templates/repo/wiki/pages.tmpl
index 468357a63f..602a49cb74 100644
--- a/templates/repo/wiki/pages.tmpl
+++ b/templates/repo/wiki/pages.tmpl
@@ -1,27 +1,27 @@
{{template "base/head" .}}
<div class="repository wiki pages">
{{template "repo/header" .}}
- <div class="ui container">
- <div class="ui header">
- {{.i18n.Tr "repo.wiki.pages"}}
- <div class="ui right">
- <a class="ui green small button" href="{{.RepoLink}}/wiki/_new">{{.i18n.Tr "repo.wiki.new_page_button"}}</a>
- </div>
- </div>
- <table class="ui table">
- <tbody>
- {{range .Pages}}
- <tr>
- <td>
- <i class="icon octicon octicon-file-text"></i>
- <a href="{{$.RepoLink}}/wiki/{{.URL}}">{{.Name}}</a>
- </td>
- {{$timeSince := TimeSince .Updated $.Lang}}
- <td class="text right grey">{{$.i18n.Tr "repo.wiki.last_updated" $timeSince | Safe}}</td>
- </tr>
- {{end}}
- </tbody>
- </table>
+ <div class="ui container">
+ <div class="ui header">
+ {{.i18n.Tr "repo.wiki.pages"}}
+ <div class="ui right">
+ <a class="ui green small button" href="{{.RepoLink}}/wiki/_new">{{.i18n.Tr "repo.wiki.new_page_button"}}</a>
+ </div>
+ </div>
+ <table class="ui table">
+ <tbody>
+ {{range .Pages}}
+ <tr>
+ <td>
+ <i class="icon octicon octicon-file-text"></i>
+ <a href="{{$.RepoLink}}/wiki/{{.URL}}">{{.Name}}</a>
+ </td>
+ {{$timeSince := TimeSince .Updated $.Lang}}
+ <td class="text right grey">{{$.i18n.Tr "repo.wiki.last_updated" $timeSince | Safe}}</td>
+ </tr>
+ {{end}}
+ </tbody>
+ </table>
</div>
</div>
-{{template "base/footer" .}} \ No newline at end of file
+{{template "base/footer" .}}
diff --git a/templates/repo/wiki/start.tmpl b/templates/repo/wiki/start.tmpl
index 8174323dcd..26d7fefdcc 100644
--- a/templates/repo/wiki/start.tmpl
+++ b/templates/repo/wiki/start.tmpl
@@ -1,15 +1,15 @@
{{template "base/head" .}}
<div class="repository wiki start">
{{template "repo/header" .}}
- <div class="ui container">
- <div class="ui center segment">
- <span class="mega-octicon octicon-book"></span>
- <h2>{{.i18n.Tr "repo.wiki.welcome"}}</h2>
- <p>{{.i18n.Tr "repo.wiki.welcome_desc"}}</p>
- {{if .IsRepositoryPusher}}
- <a class="ui green button" href="{{.RepoLink}}/wiki/_new">{{.i18n.Tr "repo.wiki.create_first_page"}}</a>
- {{end}}
- </div>
+ <div class="ui container">
+ <div class="ui center segment">
+ <span class="mega-octicon octicon-book"></span>
+ <h2>{{.i18n.Tr "repo.wiki.welcome"}}</h2>
+ <p>{{.i18n.Tr "repo.wiki.welcome_desc"}}</p>
+ {{if .IsRepositoryPusher}}
+ <a class="ui green button" href="{{.RepoLink}}/wiki/_new">{{.i18n.Tr "repo.wiki.create_first_page"}}</a>
+ {{end}}
+ </div>
</div>
</div>
-{{template "base/footer" .}} \ No newline at end of file
+{{template "base/footer" .}}
diff --git a/templates/repo/wiki/view.tmpl b/templates/repo/wiki/view.tmpl
index c052bedb7d..cd7642bcc2 100644
--- a/templates/repo/wiki/view.tmpl
+++ b/templates/repo/wiki/view.tmpl
@@ -1,72 +1,72 @@
{{template "base/head" .}}
<div class="repository wiki view">
{{template "repo/header" .}}
- <div class="ui container">
- <div class="ui grid">
- <div class="ui ten wide column">
- <div class="choose page">
- <div class="ui floating filter dropdown" data-no-results="{{.i18n.Tr "repo.pulls.no_results"}}">
- <div class="ui basic small button">
- <span class="text">
- {{.i18n.Tr "repo.wiki.page"}}:
- <strong>{{.title}}</strong>
- </span>
- <i class="dropdown icon"></i>
- </div>
- <div class="menu">
- <div class="ui icon search input">
- <i class="filter icon"></i>
- <input name="search" placeholder="{{.i18n.Tr "repo.wiki.filter_page"}}...">
- </div>
- <div class="scrolling menu" {{if .IsTag}}style="display: none"{{end}}>
- {{range .Pages}}
- <div class="item {{if eq $.Title .Name}}selected{{end}}" data-url="{{$.RepoLink}}/wiki/{{.URL}}">{{.Name}}</div>
- {{end}}
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="ui six wide column">
- <div class="ui action small input" id="clone-panel">
- {{if not $.DisableSSH}}
- <button class="ui blue basic clone button" id="repo-clone-ssh" data-link="{{.WikiCloneLink.SSH}}">
- SSH
- </button>
- {{end}}
- <button class="ui {{if $.DisableSSH}}blue{{end}} basic clone button" id="repo-clone-https" data-link="{{.WikiCloneLink.HTTPS}}">
- {{if UseHTTPS}}HTTPS{{else}}HTTP{{end}}
- </button>
- <input id="repo-clone-url" value="{{if $.DisableSSH}}{{$.WikiCloneLink.HTTPS}}{{else}}{{$.WikiCloneLink.SSH}}{{end}}" readonly>
- <button class="ui basic icon button poping up clipboard" id="clipboard-btn" data-original="{{.i18n.Tr "repo.copy_link"}}" data-success="{{.i18n.Tr "repo.copy_link_success"}}" data-error="{{.i18n.Tr "repo.copy_link_error"}}" data-content="{{.i18n.Tr "repo.copy_link"}}" data-variation="inverted tiny" data-clipboard-target="#repo-clone-url">
- <i class="octicon octicon-clippy"></i>
- </button>
- <div class="ui basic jump dropdown icon button">
- <i class="download icon"></i>
- <div class="menu">
- <a class="item" href="{{$.RepoLink}}/archive/{{EscapePound $.BranchName}}.zip"><i class="icon octicon octicon-file-zip"></i> ZIP</a>
- <a class="item" href="{{$.RepoLink}}/archive/{{EscapePound $.BranchName}}.tar.gz"><i class="icon octicon octicon-file-zip"></i> TAR.GZ</a>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="ui dividing header">
- {{.title}}
- {{if .IsRepositoryPusher}}
- <div class="ui right">
- <a class="ui small button" href="{{.RepoLink}}/wiki/{{.PageURL}}/_edit">{{.i18n.Tr "repo.wiki.edit_page_button"}}</a>
- <a class="ui green small button" href="{{.RepoLink}}/wiki/_new">{{.i18n.Tr "repo.wiki.new_page_button"}}</a>
- </div>
- {{end}}
- <div class="ui sub header">
- {{$timeSince := TimeSince .Author.When $.Lang}}
- {{.i18n.Tr "repo.wiki.last_commit_info" .Author.Name $timeSince | Safe}}
- </div>
- </div>
+ <div class="ui container">
+ <div class="ui grid">
+ <div class="ui ten wide column">
+ <div class="choose page">
+ <div class="ui floating filter dropdown" data-no-results="{{.i18n.Tr "repo.pulls.no_results"}}">
+ <div class="ui basic small button">
+ <span class="text">
+ {{.i18n.Tr "repo.wiki.page"}}:
+ <strong>{{.title}}</strong>
+ </span>
+ <i class="dropdown icon"></i>
+ </div>
+ <div class="menu">
+ <div class="ui icon search input">
+ <i class="filter icon"></i>
+ <input name="search" placeholder="{{.i18n.Tr "repo.wiki.filter_page"}}...">
+ </div>
+ <div class="scrolling menu" {{if .IsTag}}style="display: none"{{end}}>
+ {{range .Pages}}
+ <div class="item {{if eq $.Title .Name}}selected{{end}}" data-url="{{$.RepoLink}}/wiki/{{.URL}}">{{.Name}}</div>
+ {{end}}
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="ui six wide column">
+ <div class="ui action small input" id="clone-panel">
+ {{if not $.DisableSSH}}
+ <button class="ui blue basic clone button" id="repo-clone-ssh" data-link="{{.WikiCloneLink.SSH}}">
+ SSH
+ </button>
+ {{end}}
+ <button class="ui {{if $.DisableSSH}}blue{{end}} basic clone button" id="repo-clone-https" data-link="{{.WikiCloneLink.HTTPS}}">
+ {{if UseHTTPS}}HTTPS{{else}}HTTP{{end}}
+ </button>
+ <input id="repo-clone-url" value="{{if $.DisableSSH}}{{$.WikiCloneLink.HTTPS}}{{else}}{{$.WikiCloneLink.SSH}}{{end}}" readonly>
+ <button class="ui basic icon button poping up clipboard" id="clipboard-btn" data-original="{{.i18n.Tr "repo.copy_link"}}" data-success="{{.i18n.Tr "repo.copy_link_success"}}" data-error="{{.i18n.Tr "repo.copy_link_error"}}" data-content="{{.i18n.Tr "repo.copy_link"}}" data-variation="inverted tiny" data-clipboard-target="#repo-clone-url">
+ <i class="octicon octicon-clippy"></i>
+ </button>
+ <div class="ui basic jump dropdown icon button">
+ <i class="download icon"></i>
+ <div class="menu">
+ <a class="item" href="{{$.RepoLink}}/archive/{{EscapePound $.BranchName}}.zip"><i class="icon octicon octicon-file-zip"></i> ZIP</a>
+ <a class="item" href="{{$.RepoLink}}/archive/{{EscapePound $.BranchName}}.tar.gz"><i class="icon octicon octicon-file-zip"></i> TAR.GZ</a>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="ui dividing header">
+ {{.title}}
+ {{if .IsRepositoryPusher}}
+ <div class="ui right">
+ <a class="ui small button" href="{{.RepoLink}}/wiki/{{.PageURL}}/_edit">{{.i18n.Tr "repo.wiki.edit_page_button"}}</a>
+ <a class="ui green small button" href="{{.RepoLink}}/wiki/_new">{{.i18n.Tr "repo.wiki.new_page_button"}}</a>
+ </div>
+ {{end}}
+ <div class="ui sub header">
+ {{$timeSince := TimeSince .Author.When $.Lang}}
+ {{.i18n.Tr "repo.wiki.last_commit_info" .Author.Name $timeSince | Safe}}
+ </div>
+ </div>
<div class="ui segment markdown">
{{.content | Str2html}}
</div>
</div>
</div>
-{{template "base/footer" .}} \ No newline at end of file
+{{template "base/footer" .}}