summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2016-01-11 20:41:43 +0800
committerUnknwon <u@gogs.io>2016-01-11 20:41:43 +0800
commitf43cc908411a62c9252eb42484e5096810272369 (patch)
tree32220fed52d2f9c416dd94d26ebaf267caebca23 /templates
parenta2ef9a2b648422610a7f2cc6211e1f7a9549575f (diff)
downloadgitea-f43cc908411a62c9252eb42484e5096810272369.tar.gz
gitea-f43cc908411a62c9252eb42484e5096810272369.zip
#2287 Truncate repository name if too long
Diffstat (limited to 'templates')
-rw-r--r--templates/.VERSION2
-rw-r--r--templates/explore/repo_list.tmpl2
-rw-r--r--templates/user/dashboard/dashboard.tmpl18
-rw-r--r--templates/user/dashboard/feeds.tmpl2
4 files changed, 13 insertions, 11 deletions
diff --git a/templates/.VERSION b/templates/.VERSION
index f1eb383c3e..4295f9db1e 100644
--- a/templates/.VERSION
+++ b/templates/.VERSION
@@ -1 +1 @@
-0.8.19.0111 \ No newline at end of file
+0.8.20.0111 \ No newline at end of file
diff --git a/templates/explore/repo_list.tmpl b/templates/explore/repo_list.tmpl
index a674bcc90a..f8dff62869 100644
--- a/templates/explore/repo_list.tmpl
+++ b/templates/explore/repo_list.tmpl
@@ -2,7 +2,7 @@
{{range .Repos}}
<div class="item">
<div class="ui header">
- <a href="{{AppSubUrl}}/{{if .Owner}}{{.Owner.Name}}{{else if $.Org}}{{$.Org.Name}}{{else}}{{$.Owner.Name}}{{end}}/{{.Name}}">{{if $.PageIsExplore}}{{.Owner.Name}} / {{end}}{{.Name}}</a>
+ <a class="name" href="{{AppSubUrl}}/{{if .Owner}}{{.Owner.Name}}{{else if $.Org}}{{$.Org.Name}}{{else}}{{$.Owner.Name}}{{end}}/{{.Name}}">{{if $.PageIsExplore}}{{.Owner.Name}} / {{end}}{{.Name}}</a>
{{if .IsPrivate}}
<span class="text gold"><i class="icon octicon octicon-lock"></i></span>
{{else if .IsFork}}
diff --git a/templates/user/dashboard/dashboard.tmpl b/templates/user/dashboard/dashboard.tmpl
index 86936efa68..109b0bbe7d 100644
--- a/templates/user/dashboard/dashboard.tmpl
+++ b/templates/user/dashboard/dashboard.tmpl
@@ -22,12 +22,12 @@
</div>
</h4>
<div class="ui attached table segment">
- <ul>
+ <ul class="repo-owner-name-list">
{{range .Repos}}
<li {{if .IsPrivate}}class="private"{{end}}>
<a href="{{AppSubUrl}}/{{$.ContextUser.Name}}/{{.Name}}">
<i class="icon octicon octicon-{{if .IsPrivate}}lock{{else if .IsFork}}repo-forked{{else if .IsMirror}}repo-clone{{else}}repo{{end}}"></i>
- <strong>{{.Name}}</strong>
+ <strong class="text truncate item-name">{{.Name}}</strong>
<span class="ui right text light grey">
<i class="octicon octicon-star"></i>{{.NumStars}}
</span>
@@ -42,12 +42,14 @@
{{.i18n.Tr "home.collaborative_repos"}} <span class="ui grey label">{{.CollaborateCount}}</span>
</h4>
<div class="ui attached table segment">
- <ul>
+ <ul id="collaborative-repo-list">
{{range .CollaborativeRepos}}
<li {{if .IsPrivate}}class="private"{{end}}>
<a href="{{AppSubUrl}}/{{.Owner.Name}}/{{.Name}}">
<i class="icon octicon octicon-{{if .IsPrivate}}lock{{else if .IsFork}}repo-forked{{else if .IsMirror}}repo-clone{{else}}repo{{end}}"></i>
- {{.Owner.Name}} / <strong>{{.Name}}</strong>
+ <span class="text truncate owner-and-repo">
+ <span class="text truncate owner-name">{{.Owner.Name}}</span> / <strong>{{.Name}}</strong>
+ </span>
<span class="ui right text light grey">
<i class="octicon octicon-star"></i>{{.NumStars}}
</span>
@@ -68,12 +70,12 @@
</div>
</h4>
<div class="ui attached table segment">
- <ul>
+ <ul class="repo-owner-name-list">
{{range .ContextUser.Orgs}}
<li>
<a href="{{AppSubUrl}}/{{.Name}}">
<i class="icon octicon octicon-organization"></i>
- <strong>{{.ShortName 20}}</strong>
+ <strong class="text truncate item-name">{{.Name}}</strong>
<span class="ui right text light grey">
<i class="octicon octicon-repo"></i>{{.NumRepos}}
</span>
@@ -93,12 +95,12 @@
</div>
</h4>
<div class="ui attached table segment">
- <ul>
+ <ul class="repo-owner-name-list">
{{range .Mirrors}}
<li {{if .IsPrivate}}class="private"{{end}}>
<a href="{{AppSubUrl}}/{{$.ContextUser.Name}}/{{.Name}}">
<i class="icon octicon octicon-repo-clone"></i>
- <strong>{{.Name}}</strong>
+ <strong class="text truncate item-name">{{.Name}}</strong>
<span class="ui right text light grey">
<i class="octicon octicon-sync"></i>{{.Interval}}H
</span>
diff --git a/templates/user/dashboard/feeds.tmpl b/templates/user/dashboard/feeds.tmpl
index 9228fab661..ac68ea6922 100644
--- a/templates/user/dashboard/feeds.tmpl
+++ b/templates/user/dashboard/feeds.tmpl
@@ -7,7 +7,7 @@
<div class="ui fifteen wide column">
<div class="{{if eq .GetOpType 5}}push news{{end}}">
<p>
- <a href="{{AppSubUrl}}/{{.GetActUserName}}">{{.GetActUserName}}</a>
+ <a href="{{AppSubUrl}}/{{.GetActUserName}}">{{.ShortActUserName}}</a>
{{if eq .GetOpType 1}}
{{$.i18n.Tr "action.create_repo" .GetRepoLink .GetRepoPath | Str2html}}
{{else if eq .GetOpType 2}}