]> source.dussan.org Git - gitea.git/commitdiff
URL fix for #2287
authorUnknwon <u@gogs.io>
Fri, 15 Jan 2016 10:00:39 +0000 (18:00 +0800)
committerUnknwon <u@gogs.io>
Fri, 15 Jan 2016 10:00:39 +0000 (18:00 +0800)
models/action.go
public/css/gogs.css
public/less/_dashboard.less
templates/user/dashboard/feeds.tmpl

index 4e5f461a3643e01ed74370fa57cdf417a86fb17f..33d5246ee57e8134a1a525b993915f7e22595650 100644 (file)
@@ -123,6 +123,10 @@ func (a *Action) ShortRepoName() string {
 }
 
 func (a *Action) GetRepoPath() string {
+       return path.Join(a.RepoUserName, a.RepoName)
+}
+
+func (a *Action) ShortRepoPath() string {
        return path.Join(a.ShortRepoUserName(), a.ShortRepoName())
 }
 
index 452d4a19a58e69cb86b750331b0ec2232e2bbc42..e37d7bdc96fba6bc0913552eb59f6966457281de 100755 (executable)
@@ -3030,6 +3030,13 @@ footer .container .links > *:first-child {
 .feeds .news .commit-id {
   font-family: Consolas, monospace;
 }
+.feeds .news code {
+  padding: 1px;
+  font-size: 85%;
+  background-color: rgba(0, 0, 0, 0.04);
+  border-radius: 3px;
+  word-break: break-all;
+}
 .feeds .list .header {
   padding-top: 10px;
   padding-bottom: 5px;
index f194dc1282cb4f24438f3e097fe2e64b63c1c9be..b5dff32d547fd673dbcae982a1161210bbdea5e8 100644 (file)
                .commit-id {
                        font-family: Consolas, monospace;
                }
+               code {
+                       padding: 1px;
+                       font-size: 85%;
+                       background-color: rgba(0, 0, 0, 0.04);
+                       border-radius: 3px;
+                       word-break: break-all;
+               }
        }
 
        .list {
index ac68ea6922f59033c87829133553b376af7dee9b..17b40d95359dbf5e2671fa333032452f7aede0c6 100644 (file)
@@ -9,28 +9,28 @@
                                        <p>
                                                <a href="{{AppSubUrl}}/{{.GetActUserName}}">{{.ShortActUserName}}</a>
                                                {{if eq .GetOpType 1}}
-                                                       {{$.i18n.Tr "action.create_repo" .GetRepoLink .GetRepoPath | Str2html}}
+                                                       {{$.i18n.Tr "action.create_repo" .GetRepoLink .ShortRepoPath | Str2html}}
                                                {{else if eq .GetOpType 2}}
-                                                       {{$.i18n.Tr "action.rename_repo" .GetContent .GetRepoLink .GetRepoPath | Str2html}}
+                                                       {{$.i18n.Tr "action.rename_repo" .GetContent .GetRepoLink .ShortRepoPath | Str2html}}
                                                {{else if eq .GetOpType 5}}
                                                        {{ $branchLink := .GetBranch | EscapePound}}
-                                                       {{$.i18n.Tr "action.commit_repo" .GetRepoLink $branchLink .GetBranch .GetRepoPath | Str2html}}
+                                                       {{$.i18n.Tr "action.commit_repo" .GetRepoLink $branchLink .GetBranch .ShortRepoPath | Str2html}}
                                                {{else if eq .GetOpType 6}}
                                                        {{ $index := index .GetIssueInfos 0}}
-                                                       {{$.i18n.Tr "action.create_issue" .GetRepoLink $index .GetRepoPath | Str2html}}
+                                                       {{$.i18n.Tr "action.create_issue" .GetRepoLink $index .ShortRepoPath | Str2html}}
                                                {{else if eq .GetOpType 7}}
                                                        {{ $index := index .GetIssueInfos 0}}
-                                                       {{$.i18n.Tr "action.create_pull_request" .GetRepoLink $index .GetRepoPath | Str2html}}
+                                                       {{$.i18n.Tr "action.create_pull_request" .GetRepoLink $index .ShortRepoPath | Str2html}}
                                                {{else if eq .GetOpType 8}}
-                                                       {{$.i18n.Tr "action.transfer_repo" .GetContent .GetRepoLink .GetRepoPath | Str2html}}
+                                                       {{$.i18n.Tr "action.transfer_repo" .GetContent .GetRepoLink .ShortRepoPath | Str2html}}
                                                {{else if eq .GetOpType 9}}
-                                                       {{$.i18n.Tr "action.push_tag" .GetRepoLink .GetBranch .GetRepoPath | Str2html}}
+                                                       {{$.i18n.Tr "action.push_tag" .GetRepoLink .GetBranch .ShortRepoPath | Str2html}}
                                                {{else if eq .GetOpType 10}}
                                                        {{ $index := index .GetIssueInfos 0}}
-                                                       {{$.i18n.Tr "action.comment_issue" .GetRepoLink $index .GetRepoPath | Str2html}}
+                                                       {{$.i18n.Tr "action.comment_issue" .GetRepoLink $index .ShortRepoPath | Str2html}}
                                                {{else if eq .GetOpType 11}}
                                                        {{ $index := index .GetIssueInfos 0}}
-                                                       {{$.i18n.Tr "action.merge_pull_request" .GetRepoLink $index .GetRepoPath | Str2html}}
+                                                       {{$.i18n.Tr "action.merge_pull_request" .GetRepoLink $index .ShortRepoPath | Str2html}}
                                                {{end}}
                                        </p>
                                        {{if eq .GetOpType 5}}