diff options
author | Jacob Schatz <jschatz1@gmail.com> | 2017-07-29 07:54:31 -0400 |
---|---|---|
committer | Jacob Schatz <jschatz1@gmail.com> | 2017-07-29 07:54:31 -0400 |
commit | 077617d5e31e3f2253c171da675adf9def67ecf6 (patch) | |
tree | c4c473586ad99796cf6059e1939771054a38683c | |
parent | 85b358ed6aba1cc0c2d613b9bdad0d67b8874bf0 (diff) | |
download | gitlab-ce-077617d5e31e3f2253c171da675adf9def67ecf6.tar.gz |
Adds commit link to list of files in tree view.
-rw-r--r-- | app/assets/javascripts/repo/repo_file.vue | 4 | ||||
-rw-r--r-- | app/assets/javascripts/repo/repo_helper.js | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/app/assets/javascripts/repo/repo_file.vue b/app/assets/javascripts/repo/repo_file.vue index 2ea9368836e..571f3cd5bdb 100644 --- a/app/assets/javascripts/repo/repo_file.vue +++ b/app/assets/javascripts/repo/repo_file.vue @@ -48,7 +48,9 @@ export default RepoFile; </td> <td v-if="!isMini" class="hidden-sm hidden-xs"> - <div class="commit-message">{{file.lastCommitMessage}}</div> + <div class="commit-message"> + <a :href="file.lastCommitUrl">{{file.lastCommitMessage}}</a> + </div> </td> <td v-if="!isMini" class="hidden-xs"> diff --git a/app/assets/javascripts/repo/repo_helper.js b/app/assets/javascripts/repo/repo_helper.js index f053b2a6d7c..29880a5997c 100644 --- a/app/assets/javascripts/repo/repo_helper.js +++ b/app/assets/javascripts/repo/repo_helper.js @@ -216,12 +216,12 @@ const RepoHelper = { }, serializeRepoEntity(type, entity) { - const { url, name, icon } = entity; - + const { url, name, icon, last_commit } = entity; return { type, name, url, + lastCommitUrl: `${Store.projectUrl}/commit/${last_commit.id}`, icon: RepoHelper.toFA(icon), level: 0, loading: false, |