diff --git a/app/assets/stylesheets/less/_page.less b/app/assets/stylesheets/less/_page.less index ae10286c3..7aadb0c71 100644 --- a/app/assets/stylesheets/less/_page.less +++ b/app/assets/stylesheets/less/_page.less @@ -3084,6 +3084,9 @@ label.inline-list { } .commitMsg { + a { + color: @blue2; + } &.short { padding:5px; font-size:14px; @@ -4219,6 +4222,9 @@ label.issue-item-row { .avatar-wrap { margin-right:5px; } } .commitMsg-wrap { + a { + color: @blue2; + } .commitMsg.short { font-size:18px; white-space:normal; } .commitMsg.desc { margin:5px; font-family: @fixed-font-family;} } diff --git a/app/views/code/diff.scala.html b/app/views/code/diff.scala.html index 72e6c67b3..ec81acc3c 100644 --- a/app/views/code/diff.scala.html +++ b/app/views/code/diff.scala.html @@ -1,22 +1,8 @@ @** -* Yobi, Project Hosting SW +* Yona, 21st Century Project Hosting SW * -* Copyright 2012 NAVER Corp. -* http://yobi.io -* -* @author Yi EungJun -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. +* Copyright Yona & Yobi Authors & NAVER Corp. +* https://yona.io **@ @(project: Project, commit:playRepository.Commit, parentCommit:playRepository.Commit, threads:List[CommentThread], selectedBranch:String, diff: @@ -29,6 +15,12 @@ @import utils.JodaDateUtil @import utils.AccessControl._ @import scala.collection.JavaConversions._ +@import utils.AutoLinkRenderer + +@autoLinkedMsg(msg:String) = @{ + val autoLinkRenderer = new AutoLinkRenderer(msg, project) + autoLinkRenderer.render() +} @projectLayout(Messages("code.commits") + " @" + commit.getId, project, utils.MenuType.CODE) { @projectMenu(project, utils.MenuType.CODE, "main-menu-only") @@ -84,7 +76,7 @@
- @common.commitMsg(commit.getShortMessage, commit.getMessage, "", true) + @common.commitMsg(autoLinkedMsg(commit.getShortMessage), autoLinkedMsg(commit.getMessage), "", true)
@{"@"}@commit.getId diff --git a/app/views/code/history.scala.html b/app/views/code/history.scala.html index 3a2429f8b..b77f40038 100644 --- a/app/views/code/history.scala.html +++ b/app/views/code/history.scala.html @@ -1,22 +1,8 @@ @** -* Yobi, Project Hosting SW +* Yona, 21st Century Project Hosting SW * -* Copyright 2012 NAVER Corp. -* http://yobi.io -* -* @author Yi EungJun -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. +* Copyright Yona & Yobi Authors & NAVER Corp. +* https://yona.io **@ @(project: Project, history: List[playRepository.Commit], page: Integer, selectedBranch: String, path:String) @@ -28,6 +14,12 @@ @import java.net.URLEncoder @import org.joda.time.Duration @import controllers.CodeApp +@import utils.AutoLinkRenderer + +@autoLinkedMsg(msg:String) = @{ + val autoLinkRenderer = new AutoLinkRenderer(msg, project) + autoLinkRenderer.render() +} @getFilesURL = @{ if(selectedBranch){ @@ -160,7 +152,7 @@ @numOfComment } } - @common.commitMsg(commit.getShortMessage(), commit.getMessage(), showCommitURL.toString()) + @common.commitMsg(commit.getShortMessage(), autoLinkedMsg(commit.getMessage()), showCommitURL.toString()) @if(path != null){ diff --git a/app/views/common/commitMsg.scala.html b/app/views/common/commitMsg.scala.html index 460e6615c..7f83386aa 100644 --- a/app/views/common/commitMsg.scala.html +++ b/app/views/common/commitMsg.scala.html @@ -1,22 +1,8 @@ @** -* Yobi, Project Hosting SW +* Yona, 21st Century Project Hosting SW * -* Copyright 2013 NAVER Corp. -* http://yobi.io -* -* @author Jihan Kim -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. +* Copyright Yona & Yobi Authors & NAVER Corp. +* https://yona.io **@ @(shortMessage:String, commitMsg:String, linkURL:String = "", forceExpand:Boolean = false) @@ -24,13 +10,13 @@ @defining(StringUtils.defaultIfEmpty(shortMessage, Messages("code.commitMsg.empty"))) { msgText => @if(StringUtils.isEmpty(linkURL)){ - @msgText + @Html(msgText) } else { - @msgText + @Html(msgText) } } @if(commitMsg.split("\n").length > 1){ @if(!forceExpand){} -
@commitMsg.replace(commitMsg.split("\n")(0)+"\n", "")
+
@Html(commitMsg.replace(commitMsg.split("\n")(0)+"\n", ""))
}