Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make link last commit massages in repository home page and commit tables #8006

Merged
merged 11 commits into from
Sep 10, 2019
Binary file added __debug_bin
Binary file not shown.
2 changes: 2 additions & 0 deletions public/css/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,7 @@ footer .ui.left,footer .ui.right{line-height:40px}
}
.repository.file.list #repo-files-table thead th{padding-top:8px;padding-bottom:5px;font-weight:400}
.repository.file.list #repo-files-table thead .ui.avatar{margin-bottom:5px}
.repository.file.list #repo-files-table thead .commit-summary a:hover{text-decoration:underline}
.repository.file.list #repo-files-table tbody .octicon{margin-left:3px;margin-right:5px;color:#777}
.repository.file.list #repo-files-table tbody .octicon.octicon-mail-reply{margin-right:10px}
.repository.file.list #repo-files-table tbody .octicon.octicon-file-directory,.repository.file.list #repo-files-table tbody .octicon.octicon-file-submodule,.repository.file.list #repo-files-table tbody .octicon.octicon-file-symlink-directory{color:#1e70bf}
Expand Down Expand Up @@ -829,6 +830,7 @@ footer .ui.left,footer .ui.right{line-height:40px}
.stats-table .table-cell.tiny{height:.5em}
tbody.commit-list{vertical-align:baseline}
.commit-list .message-wrapper{overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px);display:inline-block;vertical-align:middle}
.commit-list .commit-summary a:hover{text-decoration:underline}
.commit-list .commit-status-link{display:inline-block;vertical-align:middle}
.commit-body{white-space:pre-wrap}
.git-notes.top{text-align:left}
Expand Down
12 changes: 12 additions & 0 deletions public/less/_repository.less
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,12 @@
.ui.avatar {
margin-bottom: 5px;
}

.commit-summary a {
&:hover {
text-decoration: underline;
}
}
}

tbody {
Expand Down Expand Up @@ -2188,6 +2194,12 @@ tbody.commit-list {
vertical-align: middle;
}

.commit-list .commit-summary a {
&:hover {
text-decoration: underline;
}
}

.commit-list .commit-status-link {
display: inline-block;
vertical-align: middle;
Expand Down
3 changes: 2 additions & 1 deletion templates/repo/commits_table.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@
</td>
<td class="message">
<span class="message-wrapper">
<span class="commit-summary has-emoji{{if gt .ParentCount 1}} grey text{{end}}" title="{{.Summary}}">{{RenderCommitMessage .Message $.RepoLink $.Repository.ComposeMetas}}</span>
{{ $commitLink:= printf "%s/%s/%s/commit/%s" AppSubUrl $.Username $.Reponame .ID }}
<span class="commit-summary has-emoji{{if gt .ParentCount 1}} grey text{{end}}" title="{{.Summary}}">{{RenderCommitMessageLink .Message $.RepoLink $commitLink $.Repository.ComposeMetas}}</span>
jaqra marked this conversation as resolved.
Show resolved Hide resolved
</span>
{{if IsMultilineCommitMessage .Message}}
<button class="basic compact mini ui icon button commit-button"><i class="ellipsis horizontal icon"></i></button>
Expand Down
3 changes: 2 additions & 1 deletion templates/repo/view_list.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
{{end}}
</a>
{{template "repo/commit_status" .LatestCommitStatus}}
<span class="grey has-emoji commit-summary" title="{{.LatestCommit.Summary}}">{{RenderCommitMessage .LatestCommit.Message $.RepoLink $.Repository.ComposeMetas}}
{{ $commitLink:= printf "%s/%s/%s/commit/%s" AppSubUrl $.Username $.Reponame .ID }}
<span class="grey has-emoji commit-summary" title="{{.LatestCommit.Summary}}">{{RenderCommitMessageLink .LatestCommit.Message $.RepoLink $commitLink $.Repository.ComposeMetas}}
{{if IsMultilineCommitMessage .LatestCommit.Message}}
<button class="basic compact mini ui icon button commit-button"><i class="ellipsis horizontal icon"></i></button>
<pre class="commit-body" style="display: none;">{{RenderCommitBody .LatestCommit.Message $.RepoLink $.Repository.ComposeMetas}}</pre>
Expand Down