summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorSteven <soud@protonmail.com>2015-10-01 15:17:27 +0200
committerSteven <soud@protonmail.com>2015-10-01 15:51:46 +0200
commitc8aa9c6cb1ed79398b825c6110b5a6a7002d1a35 (patch)
tree3da97bdcac380cb5af2f43a063b8466b58f63313 /templates
parente0a099ec112e2746ec1f6dcd3276d19e14e50b06 (diff)
downloadgitea-c8aa9c6cb1ed79398b825c6110b5a6a7002d1a35.tar.gz
gitea-c8aa9c6cb1ed79398b825c6110b5a6a7002d1a35.zip
implemented #1721: see users who forked/starred/watched a repository
Diffstat (limited to 'templates')
-rw-r--r--templates/repo/forks.tmpl27
-rw-r--r--templates/repo/stars.tmpl61
-rw-r--r--templates/repo/watchers.tmpl61
3 files changed, 149 insertions, 0 deletions
diff --git a/templates/repo/forks.tmpl b/templates/repo/forks.tmpl
new file mode 100644
index 0000000000..d1fd0320c0
--- /dev/null
+++ b/templates/repo/forks.tmpl
@@ -0,0 +1,27 @@
+{{template "ng/base/head" .}}
+{{template "ng/base/header" .}}
+<div id="repo-wrapper">
+ {{template "repo/header_old" .}}
+ <div id="repo-content" class="clear container">
+ <div id="repo-main" class="left grid-5-6">
+ <div id="forks">
+ <h4>
+ <strong>{{.i18n.Tr "repos.forks"}}</strong>
+ </h4>
+
+ <ol>
+ {{range .Forks}}
+ <p>
+ <img class="avatar-small" src="{{.Owner.AvatarLink}}">
+ <a href="{{AppSubUrl}}/{{.Owner.Name}}">{{.Owner.Name}}</a>
+ /
+ <a href="{{AppSubUrl}}/{{.Owner.Name}}/{{.Name}}">{{.Name}}</a>
+ </p>
+ {{end}}
+ </div>
+ </div>
+
+ {{template "repo/sidebar" .}}
+ </div>
+</div>
+{{template "ng/base/footer" .}}
diff --git a/templates/repo/stars.tmpl b/templates/repo/stars.tmpl
new file mode 100644
index 0000000000..afdb55d332
--- /dev/null
+++ b/templates/repo/stars.tmpl
@@ -0,0 +1,61 @@
+{{template "ng/base/head" .}}
+{{template "ng/base/header" .}}
+<div id="repo-wrapper">
+ {{template "repo/header_old" .}}
+ <div id="repo-content" class="clear container">
+ <div id="repo-main" class="left grid-5-6">
+ <div id="stars">
+ <h4>
+ <strong>{{.i18n.Tr "repos.stars"}}</strong>
+ </h4>
+
+ <ol>
+ {{range .Stars}}
+ <li>
+ <a href="{{AppSubUrl}}/{{.Name}}">
+ <img class="avatar" src="{{.AvatarLink}}" title="{{.Name}}"/>
+
+ <h3>{{.Name}}</h3>
+ </a>
+
+ <p>
+ {{if .Website}}
+ <span class="octicon octicon-link"></span> <a href="{{.Website}}" target="_blank">{{.Website}}</a>
+ {{else if .Location}}
+ <span class="octicon octicon-location"></span> {{.Location}}
+ {{else}}
+ <span class="octicon octicon-clock"></span> {{$.i18n.Tr "user.join_on"}} {{DateFmtShort .Created}}
+ {{end}}
+ </p>
+ </li>
+ {{end}}
+ </ol>
+
+ {{with .Page}}
+ {{if gt .TotalPages 1}}
+ <div class="pagination">
+ {{if .HasPrevious}}
+ <a href="{{$.RepoLink}}/stars/{{.Previous}}">{{$.i18n.Tr "issues.previous"}}</a>
+ {{end}}
+
+ {{range .Pages}}
+ {{if eq .Num -1}}
+ <a class="disabled item">...</a>
+ {{else}}
+ <a class="{{if .IsCurrent}}active{{end}} item" {{if not .IsCurrent}}href="{{$.RepoLink}}/stars/{{.Num}}"{{end}}>{{.Num}}</a>
+ {{end}}
+ {{end}}
+
+ {{if .HasNext}}
+ <a href="{{$.RepoLink}}/stars/{{.Next}}">{{$.i18n.Tr "issues.next"}}</a>
+ {{end}}
+ </div>
+ {{end}}
+ {{end}}
+ </div>
+ </div>
+
+ {{template "repo/sidebar" .}}
+ </div>
+</div>
+{{template "ng/base/footer" .}}
diff --git a/templates/repo/watchers.tmpl b/templates/repo/watchers.tmpl
new file mode 100644
index 0000000000..3e5db820ca
--- /dev/null
+++ b/templates/repo/watchers.tmpl
@@ -0,0 +1,61 @@
+{{template "ng/base/head" .}}
+{{template "ng/base/header" .}}
+<div id="repo-wrapper">
+ {{template "repo/header_old" .}}
+ <div id="repo-content" class="clear container">
+ <div id="repo-main" class="left grid-5-6">
+ <div id="stars">
+ <h4>
+ <strong>{{.i18n.Tr "repos.watches"}}</strong>
+ </h4>
+
+ <ol>
+ {{range .Watchers}}
+ <li>
+ <a href="{{AppSubUrl}}/{{.Name}}">
+ <img class="avatar" src="{{.AvatarLink}}" title="{{.Name}}"/>
+
+ <h3>{{.Name}}</h3>
+ </a>
+
+ <p>
+ {{if .Website}}
+ <span class="octicon octicon-link"></span> <a href="{{.Website}}" target="_blank">{{.Website}}</a>
+ {{else if .Location}}
+ <span class="octicon octicon-location"></span> {{.Location}}
+ {{else}}
+ <span class="octicon octicon-clock"></span> {{$.i18n.Tr "user.join_on"}} {{DateFmtShort .Created}}
+ {{end}}
+ </p>
+ </li>
+ {{end}}
+ </ol>
+
+ {{with .Page}}
+ {{if gt .TotalPages 1}}
+ <div class="pagination">
+ {{if .HasPrevious}}
+ <a href="{{$.RepoLink}}/watchers/{{.Previous}}">{{$.i18n.Tr "issues.previous"}}</a>
+ {{end}}
+
+ {{range .Pages}}
+ {{if eq .Num -1}}
+ <a class="disabled item">...</a>
+ {{else}}
+ <a class="{{if .IsCurrent}}active{{end}} item" {{if not .IsCurrent}}href="{{$.RepoLink}}/watchers/{{.Num}}"{{end}}>{{.Num}}</a>
+ {{end}}
+ {{end}}
+
+ {{if .HasNext}}
+ <a href="{{$.RepoLink}}/watchers/{{.Next}}">{{$.i18n.Tr "issues.next"}}</a>
+ {{end}}
+ </div>
+ {{end}}
+ {{end}}
+ </div>
+ </div>
+
+ {{template "repo/sidebar" .}}
+ </div>
+</div>
+{{template "ng/base/footer" .}}