diff options
author | evolvedlight <steve@evolvedlight.co.uk> | 2014-10-13 20:30:31 +0100 |
---|---|---|
committer | evolvedlight <steve@evolvedlight.co.uk> | 2014-10-13 20:30:31 +0100 |
commit | 8d2a6fc484b540819e211d52b8d54e97269f0918 (patch) | |
tree | e5bfe7d3937bb2d18ba2fb50ea72514bd5bb4e13 /templates | |
parent | 29ac3980ffdb5faa525d77fddc109c9023ebe257 (diff) | |
parent | 89bd994c836ecc9b6ceb80849f470521e1b15917 (diff) | |
download | gitea-8d2a6fc484b540819e211d52b8d54e97269f0918.tar.gz gitea-8d2a6fc484b540819e211d52b8d54e97269f0918.zip |
Merge remote-tracking branch 'upstream/dev'
Conflicts:
models/repo.go
Diffstat (limited to 'templates')
-rw-r--r-- | templates/.VERSION | 2 | ||||
-rw-r--r-- | templates/admin/monitor.tmpl | 2 | ||||
-rw-r--r-- | templates/admin/nav.tmpl | 1 | ||||
-rw-r--r-- | templates/admin/notice.tmpl | 54 | ||||
-rw-r--r-- | templates/home.tmpl | 23 | ||||
-rw-r--r-- | templates/ng/base/alert.tmpl | 3 | ||||
-rw-r--r-- | templates/org/home.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/commits_table.tmpl | 4 | ||||
-rw-r--r-- | templates/repo/diff.tmpl | 76 | ||||
-rw-r--r-- | templates/repo/home.tmpl | 6 | ||||
-rw-r--r-- | templates/repo/issue/create.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/issue/view.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/settings/githook_edit.tmpl | 41 | ||||
-rw-r--r-- | templates/repo/settings/githooks.tmpl | 37 | ||||
-rw-r--r-- | templates/repo/settings/nav.tmpl | 1 | ||||
-rw-r--r-- | templates/repo/single.tmpl | 40 | ||||
-rw-r--r-- | templates/repo/single_bare.tmpl | 40 | ||||
-rw-r--r-- | templates/repo/single_file.tmpl | 51 | ||||
-rw-r--r-- | templates/repo/single_list.tmpl | 51 | ||||
-rw-r--r-- | templates/repo/view_file.tmpl | 16 | ||||
-rw-r--r-- | templates/repo/view_list.tmpl | 4 | ||||
-rw-r--r-- | templates/user/dashboard/feeds.tmpl | 3 |
22 files changed, 227 insertions, 234 deletions
diff --git a/templates/.VERSION b/templates/.VERSION index 24a40ce358..6955a87118 100644 --- a/templates/.VERSION +++ b/templates/.VERSION @@ -1 +1 @@ -0.5.4.1003 Beta
\ No newline at end of file +0.5.5.1013 Beta
\ No newline at end of file diff --git a/templates/admin/monitor.tmpl b/templates/admin/monitor.tmpl index b94f92b664..a7942e09c3 100644 --- a/templates/admin/monitor.tmpl +++ b/templates/admin/monitor.tmpl @@ -58,7 +58,7 @@ <td>{{.Pid}}</td> <td>{{.Description}}</td> <td>{{.Start}}</td> - <td>{{TimeSince .Start}}</td> + <td>{{TimeSince .Start $.Lang}}</td> </tr> {{end}} </tbody> diff --git a/templates/admin/nav.tmpl b/templates/admin/nav.tmpl index e294cd921c..49c4b72cf0 100644 --- a/templates/admin/nav.tmpl +++ b/templates/admin/nav.tmpl @@ -8,6 +8,7 @@ <li {{if .PageIsAdminRepositories}}class="current"{{end}}><a href="{{AppSubUrl}}/admin/repos">{{.i18n.Tr "admin.repositories"}}</a></li> <li {{if .PageIsAdminAuthentications}}class="current"{{end}}><a href="{{AppSubUrl}}/admin/auths">{{.i18n.Tr "admin.authentication"}}</a></li> <li {{if .PageIsAdminConfig}}class="current"{{end}}><a href="{{AppSubUrl}}/admin/config">{{.i18n.Tr "admin.config"}}</a></li> + <li {{if .PageIsAdminNotices}}class="current"{{end}}><a href="{{AppSubUrl}}/admin/notices">{{.i18n.Tr "admin.notices"}}</a></li> <li {{if .PageIsAdminMonitor}}class="current"{{end}}><a href="{{AppSubUrl}}/admin/monitor">{{.i18n.Tr "admin.monitor"}}</a></li> </ul> </div> diff --git a/templates/admin/notice.tmpl b/templates/admin/notice.tmpl new file mode 100644 index 0000000000..b3abbb6b78 --- /dev/null +++ b/templates/admin/notice.tmpl @@ -0,0 +1,54 @@ +{{template "ng/base/head" .}} +{{template "ng/base/header" .}} +<div id="admin-wrapper"> + <div id="setting-wrapper" class="main-wrapper"> + <div id="admin-setting" class="container clear"> + {{template "admin/nav" .}} + <div class="grid-4-5 left"> + <div class="setting-content"> + {{template "ng/base/alert" .}} + <div id="setting-content"> + <div class="panel panel-radius"> + <div class="panel-header"> + <strong>{{.i18n.Tr "admin.notices.system_notice_list"}}</strong> + </div> + <div class="panel-body admin-panel"> + <div class="admin-table"> + <table class="table table-striped"> + <thead> + <tr> + <th>Id</th> + <th>{{.i18n.Tr "admin.notices.type"}}</th> + <th>{{.i18n.Tr "admin.notices.desc"}}</th> + <th>{{.i18n.Tr "admin.users.created"}}</th> + <th>{{.i18n.Tr "admin.notices.op"}}</th> + </tr> + </thead> + <tbody> + {{range .Notices}} + <tr> + <td>{{.Id}}</td> + <td>{{$.i18n.Tr .TrStr}}</td> + <td class="grid-1-2"><span>{{.Description}}</span></td> + <td>{{.Created}}</td> + <td><a href="{{AppSubUrl}}/admin/notices/{{.Id}}/delete"><i class="fa fa-trash-o text-red"></i></a></td> + </tr> + {{end}} + </tbody> + </table> + {{if or .LastPageNum .NextPageNum}} + <ul class="pagination"> + {{if .LastPageNum}}<li><a class="btn btn-medium btn-gray btn-radius" href="{{AppSubUrl}}/admin/users?p={{.LastPageNum}}">« {{.i18n.Tr "admin.prev"}}</a></li>{{end}} + {{if .NextPageNum}}<li><a class="btn btn-medium btn-gray btn-radius" href="{{AppSubUrl}}/admin/users?p={{.NextPageNum}}">» {{.i18n.Tr "admin.next"}}</a></li>{{end}} + </ul> + {{end}} + </div> + </div> + </div> + </div> + </div> + </div> + </div> + </div> +</div> +{{template "ng/base/footer" .}}
\ No newline at end of file diff --git a/templates/home.tmpl b/templates/home.tmpl index da73025dc8..02f2a3badd 100644 --- a/templates/home.tmpl +++ b/templates/home.tmpl @@ -24,7 +24,28 @@ </div> <div id="feature-wrapper"> <div class="container clear"> - {{if eq .Lang "zh-CN"}} + {{if eq .Lang "de-DE"}} + <div class="grid-1-2 left"> + <i class="octicon octicon-flame"></i> + <b>Einfach zu installieren</b> + <p>Starte einfach <a target="_blank" href="http://gogs.io/docs/installation/install_from_binary.html">die Anwendung</a> für deine Plattform. Gogs gibt es auch für <a target="_blank" href="https://github.com/gogits/gogs/tree/master/dockerfiles">Docker</a>, <a target="_blank" href="https://github.com/geerlingguy/ansible-vagrant-examples/tree/master/gogs">Vagrant</a> oder als <a target="_blank" href="http://gogs.io/docs/installation/install_from_packages.html">Installationspaket</a>.</p> + </div> + <div class="grid-1-2 left"> + <i class="octicon octicon-device-desktop"></i> + <b>Plattformübergreifend</b> + <p>Gogs läuft überall. <a target="_blank" href="http://golang.org/">Go</a> kompiliert für: Windows, Mac OS X, Linux, ARM, etc. Wähle dasjenige System, was dir am meisten gefällt!</p> + </div> + <div class="grid-1-2 left"> + <i class="octicon octicon-rocket"></i> + <b>Leichtgewicht</b> + <p>Gogs hat minimale Systemanforderungen und kann selbst auf einem günstigen und stromsparenden Raspberry Pi betrieben werden.</p> + </div> + <div class="grid-1-2 left"> + <i class="octicon octicon-code"></i> + <b>Quelloffen</b> + <p>Der komplette Code befindet sich auf <a target="_blank" href="https://github.com/gogits/gogs/">GitHub</a>! Unterstütze uns bei der Verbesserung dieses Projekts. Trau dich!</p> + </div> + {{else if eq .Lang "zh-CN"}} <div class="grid-1-2 left"> <i class="octicon octicon-flame"></i> <b>易安装</b> diff --git a/templates/ng/base/alert.tmpl b/templates/ng/base/alert.tmpl index df14d3c3bf..329ae9108d 100644 --- a/templates/ng/base/alert.tmpl +++ b/templates/ng/base/alert.tmpl @@ -1,2 +1,3 @@ {{if .Flash.ErrorMsg}}<span class="alert alert-red alert-radius block text-bold"><i class="octicon octicon-alert"></i>{{.Flash.ErrorMsg}}</span>{{end}} -{{if .Flash.SuccessMsg}}<div class="alert alert-green alert-radius block"><i class="octicon octicon-check"></i>{{.Flash.SuccessMsg}}</div>{{end}}
\ No newline at end of file +{{if .Flash.SuccessMsg}}<div class="alert alert-green alert-radius block"><i class="octicon octicon-check"></i>{{.Flash.SuccessMsg}}</div>{{end}} +{{if .Flash.InfoMsg}}<div class="alert alert-blue alert-radius block"><i class="octicon octicon-info"></i>{{.Flash.InfoMsg}}</div>{{end}}
\ No newline at end of file diff --git a/templates/org/home.tmpl b/templates/org/home.tmpl index a2517a225f..bb160b57ba 100644 --- a/templates/org/home.tmpl +++ b/templates/org/home.tmpl @@ -27,7 +27,7 @@ </div> <div id="org-repo-list"> {{range .Repos}} - {{if or $isMember (not .IsPrivate)}} + {{if .HasAccess $.SignedUser.Name}} <div class="org-repo-item"> <ul class="org-repo-status right"> <li><i class="octicon octicon-star"></i> {{.NumStars}}</li> diff --git a/templates/repo/commits_table.tmpl b/templates/repo/commits_table.tmpl index 032299b102..5b9761b165 100644 --- a/templates/repo/commits_table.tmpl +++ b/templates/repo/commits_table.tmpl @@ -1,10 +1,12 @@ <div id="commits-list"> <div class="panel panel-radius"> <div class="panel-header"> + {{if not .IsDiffCompare}} <form class="search pull-right" action="{{.RepoLink}}/commits/{{.BranchName}}/search" method="get" id="commits-search-form"> <input class="ipt ipt-radius" type="search" name="q" placeholder="{{.i18n.Tr "repo.commits.search"}}" value="{{.Keyword}}" /> <button class="btn btn-black btn-small btn-radius">{{.i18n.Tr "repo.commits.find"}}</button> </form> + {{end}} <h4>{{.CommitCount}} {{.i18n.Tr "repo.commits.commits"}}</h4> </div> <table class="panel-body table commit-list table-striped"> @@ -31,7 +33,7 @@ </tbody> </table> </div> - {{if not .IsSearchPage}} + {{if and (not .IsSearchPage) (not .IsDiffCompare)}} <ul class="pagination"> {{if .LastPageNum}}<li><a class="btn btn-medium btn-gray btn-radius" href="{{.RepoLink}}/commits/{{.BranchName}}{{if .FileName}}/{{.FileName}}{{end}}?p={{.LastPageNum}}" rel="nofollow">« {{.i18n.Tr "repo.commits.newer"}}</a></li>{{end}} {{if .NextPageNum}}<li><a class="btn btn-medium btn-gray btn-radius" href="{{.RepoLink}}/commits/{{.BranchName}}{{if .FileName}}/{{.FileName}}{{end}}?p={{.NextPageNum}}" rel="nofollow">» {{.i18n.Tr "repo.commits.older"}}</a></li>{{end}} diff --git a/templates/repo/diff.tmpl b/templates/repo/diff.tmpl index fa97073c6e..530abb3924 100644 --- a/templates/repo/diff.tmpl +++ b/templates/repo/diff.tmpl @@ -1,49 +1,54 @@ -{{template "base/head" .}} -{{template "base/navbar" .}} -{{template "repo/nav" .}} -<div id="body" class="container" data-page="repo"> - <div id="source"> - {{if .IsDiffCompare }} - <div class="panel panel-info diff-box diff-head-box"> - <div class="panel-heading"> - <a class="pull-right btn btn-primary btn-sm" rel="nofollow" href="{{.SourcePath}}">Browse Source</a> - <h4><a href="{{$.RepoLink}}/commit/{{.BeforeCommitId}}" class="label label-success">{{ShortSha .BeforeCommitId}}</a> ... <a href="{{$.RepoLink}}/commit/{{.AfterCommitId}}" class="label label-success">{{ShortSha .AfterCommitId}}</a></h4> +{{template "ng/base/head" .}} +{{template "ng/base/header" .}} +<div id="repo-wrapper"> + {{template "repo/header" .}} + <div class="container clear" id="diff-page"> + {{if .IsDiffCompare }} + <div class="panel panel-info panel-radius compare-head-box"> + <div class="panel-header"> + <a class="pull-right btn btn-blue btn-header btn-medium btn-radius" rel="nofollow" href="{{.SourcePath}}">{{.i18n.Tr "repo.diff.browse_source"}}</a> + <h4><a href="{{$.RepoLink}}/commit/{{.BeforeCommitId}}" class="label label-green">{{ShortSha .BeforeCommitId}}</a> ... <a href="{{$.RepoLink}}/commit/{{.AfterCommitId}}" class="label label-green">{{ShortSha .AfterCommitId}}</a></h4> </div> <div class="panel-body compare"> - {{template "repo/commits_table" .}} + {{template "repo/commits_table" .}} </div> </div> - {{else}} - <div class="panel panel-info diff-box diff-head-box"> - <div class="panel-heading"> - <a class="pull-right btn btn-primary btn-sm" rel="nofollow" href="{{.SourcePath}}">Browse Source</a> + {{else}} + <div class="panel panel-info panel-radius diff-head-box"> + <div class="panel-header"> + <a class="pull-right btn btn-blue btn-header btn-medium btn-radius" rel="nofollow" href="{{.SourcePath}}">{{.i18n.Tr "repo.diff.browse_source"}}</a> <h4>{{.Commit.Message}}</h4> </div> <div class="panel-body"> <span class="pull-right"> - <ul class="list-unstyled"> - {{range .Parents}} - <li>parent <a href="{{$.RepoLink}}/commit/{{.}}"><span class="label label-default sha">{{ShortSha .}}</span></a></li> - {{end}} - <li>commit <span class="label label-default sha">{{ShortSha .CommitId}}</span></li> - </ul> + <ul class="list-unstyled"> + <li class="inline">{{.i18n.Tr "repo.diff.parent"}}</li> + {{range .Parents}} + <li class="inline"><a href="{{$.RepoLink}}/commit/{{.}}"><span class="label label-blue">{{ShortSha .}}</span></a></li> + {{end}} + <li class="inline">{{.i18n.Tr "repo.diff.commit"}} <span class="label label-blue">{{ShortSha .CommitId}}</span></li> + </ul> </span> <p class="author"> - <img class="avatar" src="{{AvatarLink .Commit.Author.Email}}" alt=""/> - <a class="name" href="{{AppSubUrl}}/user/email2user?email={{.Commit.Author.Email}}"><strong>{{.Commit.Author.Name}}</strong></a> - <span class="time">{{TimeSince .Commit.Author.When $.Lang}}</span> + <img class="avatar-30" src="{{AvatarLink .Commit.Author.Email}}" /> + {{if .Author}} + <a href="{{AppSubUrl}}/{{.Author}}"><strong>{{.Commit.Author.Name}}</strong></a> + {{else}} + <strong>{{.Commit.Author.Name}}</strong> + {{end}} + <span class="text-grey" id="authored-time">{{TimeSince .Commit.Author.When $.Lang}}</span> </p> - </div> + </div> </div> - {{end}} + {{end}} {{if .DiffNotAvailable}} - <h4>Diff Data Not Available.</h4> + <h4>{{.i18n.Tr "repo.diff.data_not_available"}}</h4> {{else}} <div class="diff-detail-box diff-box"> - <a class="pull-right btn btn-default" data-toggle="collapse" data-target="#diff-files">Show Diff Stats</a> + <a class="pull-right btn btn-gray btn-header btn-radius text-black" data-target="#diff-files">{{.i18n.Tr "repo.diff.show_diff_stats"}}</a> <p class="showing"> <i class="fa fa-retweet"></i> - <strong> {{.Diff.NumFiles}} changed files</strong> with <strong>{{.Diff.TotalAddition}} additions</strong> and <strong>{{.Diff.TotalDeletion}} deletions</strong>. + {{.i18n.Tr "repo.diff.stats_desc" .Diff.NumFiles .Diff.TotalAddition .Diff.TotalDeletion | Str2html}} </p> <ol class="detail-files collapse" id="diff-files"> {{range .Diff.Files}} @@ -57,7 +62,7 @@ </span> <span class="del" data-line="{{.Deletion}}">{{.Deletion}}</span> {{else}} - <span>BIN</span> + <span>{{$.i18n.Tr "repo.diff.bin"}}</span> {{end}} </div> <!-- todo finish all file status, now modify, add, delete and rename --> @@ -69,8 +74,8 @@ </div> {{range .Diff.Files}} - <div class="panel panel-default diff-file-box diff-box file-content" id="diff-{{.Index}}"> - <div class="panel-heading"> + <div class="panel panel-radius diff-file-box diff-box file-content" id="diff-{{.Index}}"> + <div class="panel-header"> <div class="diff-counter count pull-left"> {{if not .IsBin}} <span class="add" data-line="{{.Addition}}">+ {{.Addition}}</span> @@ -80,10 +85,10 @@ </span> <span class="del" data-line="{{.Deletion}}">- {{.Deletion}}</span> {{else}} - BIN + {{$.i18n.Tr "repo.diff.bin"}} {{end}} </div> - <a class="btn btn-default btn-sm pull-right" rel="nofollow" href="{{$.SourcePath}}/{{.Name}}">View File</a> + <a class="btn btn-gray btn-header btn-radius text-black pull-right" rel="nofollow" href="{{$.SourcePath}}/{{.Name}}">{{$.i18n.Tr "repo.diff.view_file"}}</a> <span class="file">{{.Name}}</span> </div> {{$isImage := (call $.IsImageFile .Name)}} @@ -117,8 +122,9 @@ {{end}} </div> </div> + <br> {{end}} {{end}} </div> </div> -{{template "base/footer" .}} +{{template "ng/base/footer" .}} diff --git a/templates/repo/home.tmpl b/templates/repo/home.tmpl index e7d4c45dc7..49bf1fd14a 100644 --- a/templates/repo/home.tmpl +++ b/templates/repo/home.tmpl @@ -54,16 +54,16 @@ {{end}} {{end}} </li> - <!-- <li id="repo-commits-jump" class="repo-jump right"> + <li id="repo-commits-jump" class="repo-jump right"> <a href="#"> <button class="btn btn-small btn-gray btn-right-radius"><i class="octicon octicon-git-commit"></i></button> </a> </li> <li id="repo-find-jump" class="repo-jump right"> <a href="#"> - <button class="btn btn-small btn-gray btn-left-radius"><i class="octicon octicon-list-unordered"></i></button> + <button class="btn btn-small btn btn-small btn-gray btn-left-radius"><i class="octicon octicon-list-unordered"></i></button> </a> - </li> --> + </li> </ul> {{if .IsFile}} {{template "repo/view_file" .}} diff --git a/templates/repo/issue/create.tmpl b/templates/repo/issue/create.tmpl index 9b5468397d..a2471a0638 100644 --- a/templates/repo/issue/create.tmpl +++ b/templates/repo/issue/create.tmpl @@ -71,7 +71,7 @@ {{range .ClosedMilestones}} <li class="milestone-item" data-id="{{.Id}}"> <p><strong>{{.Name}}</strong></p> - <p>Closed {{TimeSince .ClosedDate}}</p> + <p>Closed {{TimeSince .ClosedDate $.Lang}}</p> </li> {{end}} </ul> diff --git a/templates/repo/issue/view.tmpl b/templates/repo/issue/view.tmpl index 49aa982aef..68bc047b56 100644 --- a/templates/repo/issue/view.tmpl +++ b/templates/repo/issue/view.tmpl @@ -236,7 +236,7 @@ {{range .ClosedMilestones}} <li class="milestone-item" data-id="{{.Id}}"> <p><strong>{{.Name}}</strong></p> - <p>Closed {{TimeSince .ClosedDate}}</p> + <p>Closed {{TimeSince .ClosedDate $.Lang}}</p> </li> {{end}} </ul> diff --git a/templates/repo/settings/githook_edit.tmpl b/templates/repo/settings/githook_edit.tmpl new file mode 100644 index 0000000000..23fc26e36e --- /dev/null +++ b/templates/repo/settings/githook_edit.tmpl @@ -0,0 +1,41 @@ +{{template "ng/base/head" .}} +{{template "ng/base/header" .}} +<div id="repo-wrapper"> + {{template "repo/header" .}} + <div id="setting-wrapper" class="main-wrapper"> + <div id="repo-setting" class="container clear"> + {{template "repo/settings/nav" .}} + <div class="grid-4-5 left"> + <div class="setting-content"> + {{template "ng/base/alert" .}} + <div id="setting-content"> + <div id="repo-hooks-panel" class="panel panel-radius"> + <div class="panel-header"> + <strong>{{.i18n.Tr "repo.settings.githooks"}}</strong> + </div> + <form class="form form-align panel-body" id="repo-setting-form" action="{{.RepoLink}}/settings/hooks/git/{{.Hook.Name}}" method="post"> + {{.CsrfTokenHtml}} + <div class="text-center panel-desc">{{.i18n.Tr "repo.settings.githook_edit_desc"}}</div> + {{with .Hook}} + <div class="field"> + <label>{{$.i18n.Tr "repo.settings.githook_name"}}</label> + <label class="text-left">{{.Name}}</label> + </div> + <div class="field clear"> + <label class="left" for="content">{{$.i18n.Tr "repo.settings.githook_content"}}</label> + <textarea class="ipt-textarea ipt-large ipt-radius" id="content" name="content" cols="60" rows="20" wrap="off">{{if .IsActive}}{{.Content}}{{else}}{{.Sample}}{{end}}</textarea> + </div> + <div class="field"> + <span class="form-label"></span> + <button class="btn btn-green btn-large btn-radius" id="change-reponame-btn" href="#change-reponame-modal">{{$.i18n.Tr "repo.settings.update_githook"}}</button> + </div> + {{end}} + </form> + </div> + </div> + </div> + </div> + </div> + </div> +</div> +{{template "ng/base/footer" .}}
\ No newline at end of file diff --git a/templates/repo/settings/githooks.tmpl b/templates/repo/settings/githooks.tmpl new file mode 100644 index 0000000000..a059b0e77d --- /dev/null +++ b/templates/repo/settings/githooks.tmpl @@ -0,0 +1,37 @@ +{{template "ng/base/head" .}} +{{template "ng/base/header" .}} +<div id="repo-wrapper"> + {{template "repo/header" .}} + <div id="setting-wrapper" class="main-wrapper"> + <div id="repo-setting" class="container clear"> + {{template "repo/settings/nav" .}} + <div class="grid-4-5 left"> + <div class="setting-content"> + {{template "ng/base/alert" .}} + <div id="setting-content"> + <div id="repo-hooks-panel" class="panel panel-radius"> + <div class="panel-header"> + <strong>{{.i18n.Tr "repo.settings.githooks"}}</strong> + </div> + <ul class="panel-body setting-list"> + <li>{{.i18n.Tr "repo.settings.githooks_desc" | Str2html}}</li> + {{range .Hooks}} + <li> + {{if .IsActive}} + <span class="left text-success"><i class="octicon octicon-check"></i></span> + {{else}} + <span class="left text-grey"><i class="octicon octicon-primitive-dot"></i></span> + {{end}} + <span>{{.Name}}</span> + <a href="{{$.RepoLink}}/settings/hooks/git/{{.Name}}" class="text-blue right"><i class="fa fa-pencil"></i></a> + </li> + {{end}} + </ul> + </div> + </div> + </div> + </div> + </div> + </div> +</div> +{{template "ng/base/footer" .}}
\ No newline at end of file diff --git a/templates/repo/settings/nav.tmpl b/templates/repo/settings/nav.tmpl index ef0765feac..16128f0151 100644 --- a/templates/repo/settings/nav.tmpl +++ b/templates/repo/settings/nav.tmpl @@ -5,6 +5,7 @@ <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> + <li {{if .PageIsSettingsGitHooks}}class="current"{{end}}><a href="{{.RepoLink}}/settings/hooks/git">{{.i18n.Tr "repo.settings.githooks"}}</a></li> <!-- <li {{if .PageIsSettingsKeys}}class="current"{{end}}><a href="{{.RepoLink}}/settings/keys">{{.i18n.Tr "repo.settings.deploy_keys"}}</a></li> --> </ul> </div> diff --git a/templates/repo/single.tmpl b/templates/repo/single.tmpl deleted file mode 100644 index d640fb00b8..0000000000 --- a/templates/repo/single.tmpl +++ /dev/null @@ -1,40 +0,0 @@ -{{template "base/head" .}} -{{template "base/navbar" .}} -{{template "repo/nav" .}} -{{template "repo/toolbar" .}} -<div id="body" class="container"> - <div id="source"> - <div class="source-toolbar"> - {{ $n := len .Treenames}} - {{if not .IsFile}}<button class="btn btn-default pull-right hidden"><i class="fa fa-plus-square"></i>Add File</button>{{end}} - <div class="dropdown branch-switch"> - <a href="#" class="btn btn-success dropdown-toggle" data-toggle="dropdown"><i class="fa fa-chain"></i>{{if .IsBranch}}{{.BranchName}}{{else}}{{ShortSha .CommitId}}{{end}} - <b class="caret"></b></a> - <ul class="dropdown-menu"> - {{range .Branches}} - <li><a {{if eq . $.BranchName}}class="current" {{end}}href="{{AppSubUrl}}/{{$.Username}}/{{$.Reponame}}/src/{{.}}">{{.}}</a></li> - {{end}} - </ul> - </div> - {{ $l := Subtract $n 1}} - <ol class="breadcrumb"> - <li class="root dir"> - <a href="{{.BranchLink}}">{{.Repository.Name}}</a></li> - {{range $i, $v := .Treenames}} - <li class="dir"> - {{if eq $i $l}}{{$v}} - {{else}} - <a href="{{$.BranchLink}}/{{index $.Paths $i}}">{{$v}}</a> - {{end}} - </li> - {{end}} - </ol> - </div> - {{if .IsFile}} - {{template "repo/single_file" .}} - {{else}} - {{template "repo/single_list" .}} - {{end}} - </div> -</div> -{{template "base/footer" .}} diff --git a/templates/repo/single_bare.tmpl b/templates/repo/single_bare.tmpl deleted file mode 100644 index f2b195617c..0000000000 --- a/templates/repo/single_bare.tmpl +++ /dev/null @@ -1,40 +0,0 @@ -{{template "base/head" .}} -{{template "base/navbar" .}} -{{template "repo/nav" .}} -{{template "repo/toolbar" .}} -<div id="body" class="container"> - <div id="source"> - <div class="panel panel-default guide-box clone-group-btn"> - <div class="panel-heading guide-head"> - <h4>Quick Guide</h4> - </div> - <div class="panel-body guide-content text-center"> - <h3>Clone this repository</h3> - <div class="input-group col-md-8 col-md-offset-2 guide-buttons"> - <span class="input-group-btn"> - <button class="btn btn-default" data-link="{{.CloneLink.SSH}}" type="button">SSH</button> - <button class="btn btn-default" data-link="{{.CloneLink.HTTPS}}" type="button">HTTPS</button> - </span> - <input type="text" class="form-control clone-group-url" id="guide-clone-url" value="" readonly/> - <span class="input-group-btn" style="position: relative"> - <button class="btn btn-default" type="button" data-toggle="tooltip" title="copy to clipboard" data-placement="top" data-init="copy" data-copy-val="val" data-copy-from="#guide-clone-url"><i class="fa fa-copy"></i></button> - </span> - </div> - <p>We recommend every repository include a <strong>README</strong>, <strong>LICENSE</strong>, and <strong>.gitignore</strong>.</p> - <hr/> - <h3>Create a new repository on the command line</h3> - <pre class="text-left"><code>touch README.md -git init -git add README.md -git commit -m "first commit" -git remote add origin <span class="clone-url"></span> -git push -u origin master</code></pre> - <hr/> - <h3>Push an existing repository from the command line</h3> - <pre class="text-left"><code>git remote add origin <span class="clone-url"></span> -git push -u origin master</code></pre> - </div> - </div> - </div> -</div> -{{template "base/footer" .}} diff --git a/templates/repo/single_file.tmpl b/templates/repo/single_file.tmpl deleted file mode 100644 index 0ce04e13ba..0000000000 --- a/templates/repo/single_file.tmpl +++ /dev/null @@ -1,51 +0,0 @@ -<div class="panel panel-default file-content"> - <div class="panel-heading file-head"> - {{if .ReadmeExist}} - <i class="icon fa fa-book"></i> - {{if .ReadmeInSingle}} - {{.FileName}} - {{else}} - {{.FileName}} <span class="file-size">{{FileSize .FileSize}}</span> - {{end}} - {{else}} - <i class="icon fa fa-file-text-o"></i> - {{.FileName}} <span class="file-size">{{FileSize .FileSize}}</span> - {{end}} - {{if not .ReadmeInSingle}} - <div class="btn-group pull-right"> - <a class="btn btn-default hidden" href="#">Edit</a> - <a class="btn btn-default" href="{{.FileLink}}" rel="nofollow">Raw</a> - <a class="btn btn-default hidden" href="#">Blame</a> - <a class="btn btn-default" href="{{.RepoLink}}/commits/{{.BranchName}}/{{.TreeName}}">History</a> - <a class="btn btn-danger hidden" href="#">Delete</a> - </div> - {{end}} - </div> - - {{if not .FileIsText}} - <div class="panel-body file-body file-code code-view"> - {{if .IsImageFile}} - <img src="{{.FileLink}}"> - {{else}} - <a href="{{.FileLink}}" rel="nofollow" class="btn btn-default">View Raw</a> - {{end}} - </div> - {{else}} - {{if .ReadmeExist}} - <div class="panel-body file-body markdown"> - {{.FileContent|str2html}} - </div> - {{else}} - <div class="panel-body file-body file-code code-view"> - <table> - <tbody> - <tr> - <td class="lines-num"></td> - <td class="lines-code markdown"><pre class="prettyprint linenums{{if .FileExt}} lang-{{.FileExt}}{{end}}">{{.FileContent}}</pre></td> - </tr> - </tbody> - </table> - </div> - {{end}} - {{end}} -</div> diff --git a/templates/repo/single_list.tmpl b/templates/repo/single_list.tmpl deleted file mode 100644 index 03511a80ab..0000000000 --- a/templates/repo/single_list.tmpl +++ /dev/null @@ -1,51 +0,0 @@ -<div class="panel panel-default info-box"> - <div class="panel-heading info-head"> - <a href="{{AppSubUrl}}/{{.Username}}/{{.Reponame}}/commit/{{.LastCommit.Id}}" rel="nofollow">{{.LastCommit.Summary}}</a> - </div> - <div class="panel-body info-content"> - <a href="{{AppSubUrl}}/user/{{.LastCommit.Author.Name}}">{{.LastCommit.Author.Name}}</a> <span class="text-muted">{{TimeSince .LastCommit.Author.When}}</span> - </div> - <table class="panel-footer table file-list"> - <thead class="hidden"> - <tr> - <th class="icon"></th> - <th class="name">Filename</th> - <th class="text">Message</th> - <th class="date">Date modified</th> - </tr> - </thead> - <tbody> - {{if .HasParentPath}} - <tr class="has-parent"> - <td class="icon"><a href="{{.BranchLink}}{{.ParentPath}}"><i class="fa fa-reply"></i></a></td> - <td class="name"><a href="{{.BranchLink}}{{.ParentPath}}">..</a></td> - <td class="text"></td> - <td class="date"></td> - </tr> - {{end}} - {{range $item := .Files}} - {{$entry := index $item 0}} - {{$commit := index $item 1}} - <tr {{if $entry.IsDir}}class="is-dir"{{end}}> - <td class="icon"> - <i class="fa {{if $entry.IsDir}}fa-folder{{else}}fa-file-text-o{{end}}"></i> - </td> - <td class="name"> - <span class="wrap"> - <a href="{{$.BranchLink}}/{{$.TreePath}}{{$entry.Name}}">{{$entry.Name}}</a> - </span> - </td> - <td class="text"> - <span class="wrap"><a rel="nofollow" href="{{AppSubUrl}}/{{$.Username}}/{{$.Reponame}}/commit/{{$commit.Id}}">{{$commit.Summary}}</a></span> - </td> - <td class="date"> - <span class="wrap">{{TimeSince $commit.Committer.When}}</span> - </td> - </tr> - {{end}} - </tbody> - </table> -</div> -{{if .ReadmeExist}} - {{template "repo/single_file" .}} -{{end}} diff --git a/templates/repo/view_file.tmpl b/templates/repo/view_file.tmpl index 228d10cd99..4e2d4fc64c 100644 --- a/templates/repo/view_file.tmpl +++ b/templates/repo/view_file.tmpl @@ -2,15 +2,23 @@ <p class="panel-header"> {{if .ReadmeExist}} <i class="icon fa fa-book fa-lg"></i> - {{if .ReadmeInHome}} + {{if .ReadmeInList}} <strong class="file-name">{{.FileName}}</strong> {{else}} <strong>{{.FileName}}</strong><span class="file-size">{{FileSize .FileSize}}</span> {{end}} {{else}} - <i class="icon fa fa-file-text-o"></i> - <strong class="file-name">{{.FileName}}</strong><span class="file-size">{{FileSize .FileSize}}</span> + <i class="icon fa fa-file-text-o"></i> + <strong class="file-name">{{.FileName}}</strong><span class="file-size">{{FileSize .FileSize}}</span> {{end}} + {{if not .ReadmeInList}} + <a class="right" href="{{.RepoLink}}/commits/{{.BranchName}}/{{.TreeName}}"> + <button class="btn btn-medium btn-gray btn-right-radius btn-comb">{{.i18n.Tr "repo.file_history"}}</button> + </a> + <a class="right" href="{{.FileLink}}"> + <button class="btn btn-medium btn-gray btn-left-radius btn-comb">{{.i18n.Tr "repo.file_raw"}}</button> + </a> + {{end}} </p> <div class="{{if .ReadmeExist}}panel-content markdown{{end}} code-view" id="repo-code-view"> {{if .ReadmeExist}} @@ -20,7 +28,7 @@ {{if .IsImageFile}} <img src="{{.FileLink}}"> {{else}} - <a href="{{.FileLink}}" rel="nofollow" class="btn btn-gray btn-radius">View Raw</a> + <a href="{{.FileLink}}" rel="nofollow" class="btn btn-gray btn-radius">{{.i18n.Tr "repo.file_view_raw"}}</a> {{end}} </div> {{else if .FileSize}} diff --git a/templates/repo/view_list.tmpl b/templates/repo/view_list.tmpl index e6c43d9e40..032b9e0f1b 100644 --- a/templates/repo/view_list.tmpl +++ b/templates/repo/view_list.tmpl @@ -10,7 +10,7 @@ <strong>{{ShortSha .LastCommit.Id.String}}</strong></a> <span class="text-truncate">{{.LastCommit.Summary}}</span> </span> - <span class="age right">{{TimeSince .LastCommit.Author.When .i18n.Lang}}</span> + <span class="age right">{{TimeSince .LastCommit.Author.When $.Lang}}</span> </th> </tr> </thead> @@ -45,7 +45,7 @@ <td class="msg"> <a class="text-truncate" href="{{AppSubUrl}}/{{$.Username}}/{{$.Reponame}}/commit/{{$commit.Id}}" rel="nofollow">{{$commit.Summary}}</a> </td> - <td class="age">{{TimeSince $commit.Committer.When $.i18n.Lang}}</td> + <td class="age">{{TimeSince $commit.Committer.When $.Lang}}</td> </tr> {{end}} </tbody> diff --git a/templates/user/dashboard/feeds.tmpl b/templates/user/dashboard/feeds.tmpl index 4c05440b1e..57c97def2e 100644 --- a/templates/user/dashboard/feeds.tmpl +++ b/templates/user/dashboard/feeds.tmpl @@ -15,6 +15,8 @@ {{$.i18n.Tr "action.create_issue" AppSubUrl .GetRepoLink $index .GetRepoLink $index | Str2html}} {{else if eq .GetOpType 8}} {{$.i18n.Tr "action.transfer_repo" .GetContent AppSubUrl .GetRepoLink .GetRepoLink | Str2html}} + {{else if eq .GetOpType 9}} + {{$.i18n.Tr "action.push_tag" AppSubUrl .GetRepoLink .GetBranch .GetBranch AppSubUrl .GetRepoLink .GetRepoLink | Str2html}} {{else if eq .GetOpType 10}} {{ $index := index .GetIssueInfos 0}} {{$.i18n.Tr "action.comment_issue" AppSubUrl .GetRepoLink $index .GetRepoLink $index | Str2html}} @@ -28,6 +30,7 @@ {{range $push.Commits}} <li><img class="avatar-16" src="{{AvatarLink .AuthorEmail}}?s=16"> <a href="{{AppSubUrl}}/{{$repoLink}}/commit/{{.Sha1}}">{{ShortSha .Sha1}}</a> <span class="text-truncate grid-4-5">{{.Message}}</span></li> {{end}} + {{if $push.CompareUrl}}<li><a href="{{$push.CompareUrl}}">{{$.i18n.Tr "action.compare_2_commits"}} »</a></li>{{end}} </ul> </div> {{else if eq .GetOpType 6}} |