diff options
Diffstat (limited to 'templates/repo')
-rw-r--r-- | templates/repo/bare.tmpl | 14 | ||||
-rw-r--r-- | templates/repo/commits_table.tmpl | 6 | ||||
-rw-r--r-- | templates/repo/create.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/diff/page.tmpl | 6 | ||||
-rw-r--r-- | templates/repo/header.tmpl | 4 | ||||
-rw-r--r-- | templates/repo/home.tmpl | 14 | ||||
-rw-r--r-- | templates/repo/release/list.tmpl | 1 | ||||
-rw-r--r-- | templates/repo/settings/options.tmpl | 5 | ||||
-rw-r--r-- | templates/repo/view_list.tmpl | 6 | ||||
-rw-r--r-- | templates/repo/wiki/view.tmpl | 14 |
10 files changed, 54 insertions, 18 deletions
diff --git a/templates/repo/bare.tmpl b/templates/repo/bare.tmpl index 63baea16ac..af45e672c5 100644 --- a/templates/repo/bare.tmpl +++ b/templates/repo/bare.tmpl @@ -16,15 +16,21 @@ <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"> - <button class="ui basic clone button" id="repo-clone-https" data-link="{{.CloneLink.HTTPS}}"> - {{if UseHTTPS}}HTTPS{{else}}HTTP{{end}} - </button> + {{if not $.DisableHTTP}} + <button class="ui basic clone button" id="repo-clone-https" data-link="{{.CloneLink.HTTPS}}"> + {{if UseHTTPS}}HTTPS{{else}}HTTP{{end}} + </button> + {{end}} {{if not $.DisableSSH}} <button class="ui basic clone button" id="repo-clone-ssh" data-link="{{.CloneLink.SSH}}"> SSH </button> {{end}} - <input id="repo-clone-url" value="{{$.CloneLink.HTTPS}}" readonly> + {{if not $.DisableHTTP}} + <input id="repo-clone-url" value="{{$.CloneLink.HTTPS}}" readonly> + {{else}} + <input id="repo-clone-url" value="{{$.CloneLink.SSH}}" readonly> + {{end}} <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> diff --git a/templates/repo/commits_table.tmpl b/templates/repo/commits_table.tmpl index 03e8591f68..4956acd07e 100644 --- a/templates/repo/commits_table.tmpl +++ b/templates/repo/commits_table.tmpl @@ -30,7 +30,11 @@ <tr> <td class="author"> {{if .User}} - <img class="ui avatar image" src="{{.User.RelAvatarLink}}" alt=""/> <a href="{{AppSubUrl}}/{{.User.Name}}">{{.Author.Name}}</a> + {{if .User.FullName}} + <img class="ui avatar image" src="{{.User.RelAvatarLink}}" alt=""/> <a href="{{AppSubUrl}}/{{.User.Name}}">{{.User.FullName}}</a> + {{else}} + <img class="ui avatar image" src="{{.User.RelAvatarLink}}" alt=""/> <a href="{{AppSubUrl}}/{{.User.Name}}">{{.Author.Name}}</a> + {{end}} {{else}} <img class="ui avatar image" src="{{AvatarLink .Author.Email}}" alt=""/> {{.Author.Name}} {{end}} diff --git a/templates/repo/create.tmpl b/templates/repo/create.tmpl index 337e096e5b..7e608b1d34 100644 --- a/templates/repo/create.tmpl +++ b/templates/repo/create.tmpl @@ -83,7 +83,7 @@ </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> + <label>{{.i18n.Tr "repo.readme"}}</label> <div class="ui selection dropdown"> <input type="hidden" name="readme" value="{{.readme}}"> <div class="default text">{{.i18n.Tr "repo.readme_helper"}}</div> diff --git a/templates/repo/diff/page.tmpl b/templates/repo/diff/page.tmpl index 0a35a80427..90ee680576 100644 --- a/templates/repo/diff/page.tmpl +++ b/templates/repo/diff/page.tmpl @@ -14,7 +14,11 @@ <div class="ui attached info segment"> {{if .Author}} <img class="ui avatar image" src="{{.Author.RelAvatarLink}}" /> - <a href="{{.Author.HomeLink}}"><strong>{{.Commit.Author.Name}}</strong></a> {{if .IsSigned}}<{{.Commit.Author.Email}}>{{end}} + {{if .Author.FullName}} + <a href="{{.Author.HomeLink}}"><strong>{{.Author.FullName}}</strong></a> {{if .IsSigned}}<{{.Commit.Author.Email}}>{{end}} + {{else}} + <a href="{{.Author.HomeLink}}"><strong>{{.Commit.Author.Name}}</strong></a> {{if .IsSigned}}<{{.Commit.Author.Email}}>{{end}} + {{end}} {{else}} <img class="ui avatar image" src="{{AvatarLink .Commit.Author.Email}}" /> <strong>{{.Commit.Author.Name}}</strong> diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl index 10bfb80e11..a0e7bd1542 100644 --- a/templates/repo/header.tmpl +++ b/templates/repo/header.tmpl @@ -52,9 +52,9 @@ <a class="{{if .PageIsViewCode}}active{{end}} item" href="{{.RepoLink}}"> <i class="octicon octicon-code"></i> {{.i18n.Tr "repo.code"}} </a> - {{if and .Repository.EnableIssues (not .Repository.EnableExternalTracker)}} + {{if .Repository.EnableIssues}} <a class="{{if .PageIsIssueList}}active{{end}} item" href="{{.RepoLink}}/issues"> - <i class="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> + <i class="octicon octicon-issue-opened"></i> {{.i18n.Tr "repo.issues"}} {{if not .Repository.EnableExternalTracker}}<span class="ui {{if not .Repository.NumOpenIssues}}gray{{else}}blue{{end}} small label">{{.Repository.NumOpenIssues}}{{end}}</span> </a> {{end}} {{if .Repository.AllowsPulls}} diff --git a/templates/repo/home.tmpl b/templates/repo/home.tmpl index c0c06a1438..52d93a213e 100644 --- a/templates/repo/home.tmpl +++ b/templates/repo/home.tmpl @@ -51,15 +51,21 @@ <!-- Only show colne panel in repository home page --> {{if eq $n 0}} <div class="ui action small input" id="clone-panel"> - <button class="ui basic clone button" id="repo-clone-https" data-link="{{.CloneLink.HTTPS}}"> - {{if UseHTTPS}}HTTPS{{else}}HTTP{{end}} - </button> + {{if not $.DisableHTTP}} + <button class="ui basic clone button" id="repo-clone-https" data-link="{{.CloneLink.HTTPS}}"> + {{if UseHTTPS}}HTTPS{{else}}HTTP{{end}} + </button> + {{end}} {{if not $.DisableSSH}} <button class="ui basic clone button" id="repo-clone-ssh" data-link="{{.CloneLink.SSH}}"> SSH </button> {{end}} - <input id="repo-clone-url" value="{{$.CloneLink.HTTPS}}" readonly> + {{if not $.DisableHTTP}} + <input id="repo-clone-url" value="{{$.CloneLink.HTTPS}}" readonly> + {{else}} + <input id="repo-clone-url" value="{{$.CloneLink.SSH}}" readonly> + {{end}} <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> diff --git a/templates/repo/release/list.tmpl b/templates/repo/release/list.tmpl index b9b1b7c2f4..477ab6b524 100644 --- a/templates/repo/release/list.tmpl +++ b/templates/repo/release/list.tmpl @@ -75,6 +75,7 @@ </li> {{end}} </ul> + {{template "base/paginage" .}} </div> </div> {{template "base/footer" .}} diff --git a/templates/repo/settings/options.tmpl b/templates/repo/settings/options.tmpl index 6b61cb7f8e..2588966c9d 100644 --- a/templates/repo/settings/options.tmpl +++ b/templates/repo/settings/options.tmpl @@ -162,6 +162,11 @@ </div> <div class="field {{if not .Repository.EnableExternalTracker}}disabled{{end}}" id="external_issue_box"> <div class="field"> + <label for="external_tracker_url">{{.i18n.Tr "repo.settings.external_tracker_url"}}</label> + <input id="external_tracker_url" name="external_tracker_url" type="url" value="{{.Repository.ExternalTrackerURL}}"> + <p class="help">{{.i18n.Tr "repo.settings.external_tracker_url_desc"}}</p> + </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" type="url" 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> diff --git a/templates/repo/view_list.tmpl b/templates/repo/view_list.tmpl index 0881ce9938..f1cbf58a4a 100644 --- a/templates/repo/view_list.tmpl +++ b/templates/repo/view_list.tmpl @@ -4,7 +4,11 @@ <th class="four wide"> {{if .LatestCommitUser}} <img class="ui avatar image img-12" src="{{.LatestCommitUser.RelAvatarLink}}" /> - <a href="{{AppSubUrl}}/{{.LatestCommitUser.Name}}"><strong>{{.LatestCommit.Author.Name}}</strong></a> + {{if .LatestCommitUser.FullName}} + <a href="{{AppSubUrl}}/{{.LatestCommitUser.Name}}"><strong>{{.LatestCommitUser.FullName}}</strong></a> + {{else}} + <a href="{{AppSubUrl}}/{{.LatestCommitUser.Name}}"><strong>{{.LatestCommit.Author.Name}}</strong></a> + {{end}} {{else}} <img class="ui avatar image img-12" src="{{AvatarLink .LatestCommit.Author.Email}}" /> <strong>{{.LatestCommit.Author.Name}}</strong> diff --git a/templates/repo/wiki/view.tmpl b/templates/repo/wiki/view.tmpl index ecf80c884f..b8b0d2702a 100644 --- a/templates/repo/wiki/view.tmpl +++ b/templates/repo/wiki/view.tmpl @@ -29,15 +29,21 @@ </div> <div class="ui six wide column"> <div class="ui action small input" id="clone-panel"> - <button class="ui basic clone button" id="repo-clone-https" data-link="{{.WikiCloneLink.HTTPS}}"> - {{if UseHTTPS}}HTTPS{{else}}HTTP{{end}} - </button> + {{if not $.DisableHTTP}} + <button class="ui basic clone button" id="repo-clone-https" data-link="{{.WikiCloneLink.HTTPS}}"> + {{if UseHTTPS}}HTTPS{{else}}HTTP{{end}} + </button> + {{end}} {{if not $.DisableSSH}} <button class="ui basic clone button" id="repo-clone-ssh" data-link="{{.WikiCloneLink.SSH}}"> SSH </button> {{end}} - <input id="repo-clone-url" value="{{$.WikiCloneLink.HTTPS}}" readonly> + {{if not $.DisableHTTP}} + <input id="repo-clone-url" value="{{$.WikiCloneLink.HTTPS}}" readonly> + {{else}} + <input id="repo-clone-url" value="{{$.WikiCloneLink.SSH}}" readonly> + {{end}} <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> |