From: James Moger Date: Tue, 4 Mar 2014 03:48:43 +0000 (-0500) Subject: Lower opacity for merge commit short messages in the log panel X-Git-Tag: v1.4.0~64 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=5902495153c08d1da8baa369e0f51a83003350c5;p=gitblit.git Lower opacity for merge commit short messages in the log panel --- diff --git a/src/main/java/com/gitblit/wicket/panels/LogPanel.java b/src/main/java/com/gitblit/wicket/panels/LogPanel.java index dad25a05..16fc746e 100644 --- a/src/main/java/com/gitblit/wicket/panels/LogPanel.java +++ b/src/main/java/com/gitblit/wicket/panels/LogPanel.java @@ -110,6 +110,7 @@ public class LogPanel extends BasePanel { public void populateItem(final Item item) { final RevCommit entry = item.getModelObject(); final Date date = JGitUtils.getCommitDate(entry); + final boolean isMerge = entry.getParentCount() > 1; item.add(WicketUtils.createDateLabel("commitDate", date, getTimeZone(), getTimeUtils())); @@ -122,7 +123,7 @@ public class LogPanel extends BasePanel { item.add(authorLink); // merge icon - if (entry.getParentCount() > 1) { + if (isMerge) { item.add(WicketUtils.newImage("commitIcon", "commit_merge_16x16.png")); } else { item.add(WicketUtils.newBlankImage("commitIcon")); @@ -136,7 +137,7 @@ public class LogPanel extends BasePanel { } else { trimmedMessage = StringUtils.trimString(shortMessage, Constants.LEN_SHORTLOG); } - LinkPanel shortlog = new LinkPanel("commitShortMessage", "list subject", + LinkPanel shortlog = new LinkPanel("commitShortMessage", "list subject" + (isMerge ? " merge" : ""), trimmedMessage, CommitPage.class, WicketUtils.newObjectParameter( repositoryName, entry.getName())); if (!shortMessage.equals(trimmedMessage)) { diff --git a/src/main/resources/gitblit.css b/src/main/resources/gitblit.css index 9c763783..78947709 100644 --- a/src/main/resources/gitblit.css +++ b/src/main/resources/gitblit.css @@ -1712,6 +1712,14 @@ tr.dark:hover a { color: white; } +.merge { + opacity: 0.5; +} + +.merge:hover { + opacity: 1; +} + td.author { font-style: italic !important; white-space: nowrap; @@ -1768,7 +1776,7 @@ span.metricsTitle { font-size: 9px; font-weight: normal; border: 1px solid; - color: black; + color: black; } .tagRef a, .headRef a, .localBranch a, .remoteBranch a, .otherRef a, .pullRef a {