Browse Source

Merge branch 'develop' of github.com:gogits/gogs into develop

tags/v1.2.0-rc1
Unknwon 9 years ago
parent
commit
e64b4ecb11
7 changed files with 14 additions and 12 deletions
  1. +1
    -1
      cmd/web.go
  2. +1
    -1
      models/repo.go
  3. +4
    -3
      public/css/gogs.css
  4. +1
    -1
      public/js/gogs.js
  5. +5
    -4
      public/less/_repository.less
  6. +1
    -1
      templates/repo/commits_table.tmpl
  7. +1
    -1
      templates/repo/view_list.tmpl

+ 1
- 1
cmd/web.go View File

@@ -539,10 +539,10 @@ func runWeb(ctx *cli.Context) {
m.Group("", func() { m.Group("", func() {
m.Get("/releases", repo.Releases) m.Get("/releases", repo.Releases)
m.Get("/^:type(issues|pulls)$", repo.RetrieveLabels, repo.Issues) m.Get("/^:type(issues|pulls)$", repo.RetrieveLabels, repo.Issues)
m.Get("/^:type(issues|pulls)$/:index", repo.ViewIssue)
m.Get("/labels/", repo.RetrieveLabels, repo.Labels) m.Get("/labels/", repo.RetrieveLabels, repo.Labels)
m.Get("/milestones", repo.Milestones) m.Get("/milestones", repo.Milestones)
}, middleware.RepoRef()) }, middleware.RepoRef())
m.Get("/^:type(issues|pulls)$/:index", repo.ViewIssue)


// m.Get("/branches", repo.Branches) // m.Get("/branches", repo.Branches)




+ 1
- 1
models/repo.go View File

@@ -350,7 +350,7 @@ func (repo *Repository) SavePatch(index int64, patch []byte) error {
return fmt.Errorf("PatchPath: %v", err) return fmt.Errorf("PatchPath: %v", err)
} }


os.MkdirAll(path.Dir(patchPath), os.ModePerm)
os.MkdirAll(filepath.Dir(patchPath), os.ModePerm)
if err = ioutil.WriteFile(patchPath, patch, 0644); err != nil { if err = ioutil.WriteFile(patchPath, patch, 0644); err != nil {
return fmt.Errorf("WriteFile: %v", err) return fmt.Errorf("WriteFile: %v", err)
} }


+ 4
- 3
public/css/gogs.css View File

@@ -1863,9 +1863,6 @@ footer .container .links > *:first-child {
position: relative; position: relative;
width: 325%; width: 325%;
} }
.repository.file.list #repo-files-table thead th .ui.sha.label {
font-weight: bold;
}
.repository.file.list #repo-files-table thead .ui.avatar { .repository.file.list #repo-files-table thead .ui.avatar {
margin-bottom: 5px; margin-bottom: 5px;
} }
@@ -2243,6 +2240,9 @@ footer .container .links > *:first-child {
font-size: 13px; font-size: 13px;
padding: 6px 40px 4px 35px; padding: 6px 40px 4px 35px;
} }
.repository #commits-table.ui.basic.striped.table tbody tr:nth-child(2n) {
background-color: rgba(0, 0, 0, 0.02) !important;
}
.repository .diff-detail-box { .repository .diff-detail-box {
margin: 15px 0; margin: 15px 0;
line-height: 30px; line-height: 30px;
@@ -2318,6 +2318,7 @@ footer .container .links > *:first-child {
} }
.repository .diff-file-box .code-diff pre { .repository .diff-file-box .code-diff pre {
margin: 0; margin: 0;
font-size: 13px;
} }
.repository .diff-file-box .code-diff .lines-num { .repository .diff-file-box .code-diff .lines-num {
border-right: 1px solid #d4d4d5; border-right: 1px solid #d4d4d5;


+ 1
- 1
public/js/gogs.js View File

@@ -938,7 +938,7 @@ $(window).load(function () {
} }


// Code view. // Code view.
if ($('.code-view').length > 0) {
if ($('.code-view .linenums').length > 0) {
var $block = $('.code-view .linenums'); var $block = $('.code-view .linenums');
var lines = $block.html().split("\n"); var lines = $block.html().split("\n");
$block.html(''); $block.html('');


+ 5
- 4
public/less/_repository.less View File

@@ -152,10 +152,6 @@
position: relative; position: relative;
width: 325%; width: 325%;
} }

.ui.sha.label {
font-weight: bold;
}
} }
.ui.avatar { .ui.avatar {
margin-bottom: 5px; margin-bottom: 5px;
@@ -602,6 +598,9 @@
padding: 6px 40px 4px 35px; padding: 6px 40px 4px 35px;
} }
} }
&.ui.basic.striped.table tbody tr:nth-child(2n) {
background-color: rgba(0, 0, 0, .02)!important;
}
} }


.diff-detail-box { .diff-detail-box {
@@ -677,12 +676,14 @@
} }
.code-diff { .code-diff {
font-size: 13px; font-size: 13px;
td { td {
padding: 0; padding: 0;
border-top: none; border-top: none;
} }
pre { pre {
margin: 0; margin: 0;
font-size: 13px;
} }
.lines-num { .lines-num {
border-right: 1px solid #d4d4d5; border-right: 1px solid #d4d4d5;


+ 1
- 1
templates/repo/commits_table.tmpl View File

@@ -36,7 +36,7 @@
{{end}} {{end}}
</td> </td>
<td class="message collapsing"> <td class="message collapsing">
<a rel="nofollow" class="ui green sha label" href="{{AppSubUrl}}/{{$.Username}}/{{$.Reponame}}/commit/{{.ID}}">{{ShortSha .ID.String}}</a>
<a rel="nofollow" class="ui sha label" href="{{AppSubUrl}}/{{$.Username}}/{{$.Reponame}}/commit/{{.ID}}">{{ShortSha .ID.String}}</a>
{{RenderCommitMessage .Summary $.RepoLink}} {{RenderCommitMessage .Summary $.RepoLink}}
</td> </td>
<td class="grey text right aligned">{{TimeSince .Author.When $.Lang}}</td> <td class="grey text right aligned">{{TimeSince .Author.When $.Lang}}</td>


+ 1
- 1
templates/repo/view_list.tmpl View File

@@ -43,7 +43,7 @@
</td> </td>
{{end}} {{end}}
<td class="message collapsing"> <td class="message collapsing">
<a rel="nofollow" class="ui green sha label" href="{{AppSubUrl}}/{{$.Username}}/{{$.Reponame}}/commit/{{$commit.ID}}">{{ShortSha $commit.ID.String}}</a>
<a rel="nofollow" class="ui sha label" href="{{AppSubUrl}}/{{$.Username}}/{{$.Reponame}}/commit/{{$commit.ID}}">{{ShortSha $commit.ID.String}}</a>
{{RenderCommitMessage $commit.Summary $.RepoLink}} {{RenderCommitMessage $commit.Summary $.RepoLink}}
</td> </td>
<td class="text grey right age">{{TimeSince $commit.Committer.When $.Lang}}</td> <td class="text grey right age">{{TimeSince $commit.Committer.When $.Lang}}</td>


Loading…
Cancel
Save