diff options
author | James Moger <james.moger@gitblit.com> | 2013-05-24 17:38:12 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2013-05-24 17:38:12 -0400 |
commit | 51c76e7366c2e8851f1639fbdbf2b8deb219c7fc (patch) | |
tree | d7b31518f32a96202e2894d20c927b32426502c5 /src | |
parent | 04ef9f9ec3fcec42bbfd00d5f497a51ff84a068e (diff) | |
download | gitblit-51c76e7366c2e8851f1639fbdbf2b8deb219c7fc.tar.gz gitblit-51c76e7366c2e8851f1639fbdbf2b8deb219c7fc.zip |
Added support for displaying refs/pull/n/head|merge
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/com/gitblit/wicket/panels/RefsPanel.java | 10 | ||||
-rw-r--r-- | src/main/resources/gitblit.css | 11 |
2 files changed, 18 insertions, 3 deletions
diff --git a/src/main/java/com/gitblit/wicket/panels/RefsPanel.java b/src/main/java/com/gitblit/wicket/panels/RefsPanel.java index 5776a13e..dc852e2e 100644 --- a/src/main/java/com/gitblit/wicket/panels/RefsPanel.java +++ b/src/main/java/com/gitblit/wicket/panels/RefsPanel.java @@ -43,6 +43,8 @@ public class RefsPanel extends Panel { private static final long serialVersionUID = 1L;
private static final String R_CHANGES = "refs/changes/";
+
+ private static final String R_PULL= "refs/pull/";
public RefsPanel(String id, final String repositoryName, RevCommit c,
Map<ObjectId, List<RefModel>> refs) {
@@ -114,6 +116,14 @@ public class RefsPanel extends Panel { // Gerrit change ref
name = name.substring(R_CHANGES.length());
cssClass = "otherRef";
+ } else if (name.startsWith(R_PULL)) {
+ // Pull Request ref
+ name = "pull #" + name.substring(R_PULL.length());
+ if (name.endsWith("/head")) {
+ // strip pull request head from name
+ name = name.substring(0, name.length() - "/head".length());
+ }
+ cssClass = "pullRef";
} else if (name.startsWith(Constants.R_REMOTES)) {
// remote branch
linkClass = LogPage.class;
diff --git a/src/main/resources/gitblit.css b/src/main/resources/gitblit.css index 0a1c3b0b..9ee0a737 100644 --- a/src/main/resources/gitblit.css +++ b/src/main/resources/gitblit.css @@ -1266,7 +1266,7 @@ span.metricsTitle { font-size: 2em;
}
-.tagRef, .headRef, .localBranch, .remoteBranch, .otherRef {
+.tagRef, .headRef, .localBranch, .remoteBranch, .otherRef, .pullRef {
padding: 0px 3px;
margin-right:2px;
font-family: sans-serif;
@@ -1276,13 +1276,13 @@ span.metricsTitle { color: black;
}
-.tagRef a, .headRef a, .localBranch a, .remoteBranch a, .otherRef a {
+.tagRef a, .headRef a, .localBranch a, .remoteBranch a, .otherRef a, .pullRef a {
font-size: 9px;
text-decoration: none;
color: black !important;
}
-.tagRef a:hover, .headRef a:hover, .localBranch a:hover, .remoteBranch a:hover, .otherRef a:hover {
+.tagRef a:hover, .headRef a:hover, .localBranch a:hover, .remoteBranch a:hover, .otherRef a:hover, .pullRef a:hover {
color: black !important;
text-decoration: underline;
}
@@ -1292,6 +1292,11 @@ span.metricsTitle { border-color: #80aaaa;
}
+.pullRef {
+ background-color: rgb(255, 221, 136);
+ border-color: rgb(136, 136, 136);
+}
+
.remoteBranch {
background-color: #cAc2f5;
border-color: #6c6cbf;
|