@@ -170,6 +170,13 @@ img.overview { | |||
border:1px solid #CCCCCC; | |||
} | |||
img.gravatar { | |||
background-color: #ffffff; | |||
border: 1px solid #ddd; | |||
border-radius: 5px; | |||
padding: 2px; | |||
} | |||
div.header, div.commitHeader, table.repositories th { | |||
background-color:#e0e0e0; | |||
background-repeat:repeat-x; |
@@ -24,7 +24,7 @@ import java.io.Serializable; | |||
* @author James Moger | |||
* | |||
*/ | |||
public class Metric implements Serializable { | |||
public class Metric implements Serializable, Comparable<Metric> { | |||
private static final long serialVersionUID = 1L; | |||
@@ -36,4 +36,15 @@ public class Metric implements Serializable { | |||
public Metric(String name) { | |||
this.name = name; | |||
} | |||
@Override | |||
public int compareTo(Metric o) { | |||
if (count > o.count) { | |||
return -1; | |||
} | |||
if (count < o.count) { | |||
return 1; | |||
} | |||
return 0; | |||
} | |||
} |
@@ -50,6 +50,7 @@ public class GravatarImage extends WebComponent { | |||
String url = MessageFormat.format("http://www.gravatar.com/avatar/{0}?s={1,number,0}&d=identicon", authorhash, width); | |||
add(new AttributeModifier("src", true, new Model<String>(url))); | |||
setVisible(GitBlit.getBoolean(Keys.web.allowGravatar, true)); | |||
WicketUtils.setCssClass(this, "gravatar"); | |||
} | |||
@Override |