border:1px solid #CCCCCC;\r
}\r
\r
+img.gravatar {\r
+ background-color: #ffffff;\r
+ border: 1px solid #ddd;\r
+ border-radius: 5px;\r
+ padding: 2px;\r
+}\r
+\r
div.header, div.commitHeader, table.repositories th {\r
background-color:#e0e0e0;\r
background-repeat:repeat-x;\r
* @author James Moger\r
* \r
*/\r
-public class Metric implements Serializable {\r
+public class Metric implements Serializable, Comparable<Metric> {\r
\r
private static final long serialVersionUID = 1L;\r
\r
public Metric(String name) {\r
this.name = name;\r
}\r
+\r
+ @Override\r
+ public int compareTo(Metric o) {\r
+ if (count > o.count) {\r
+ return -1;\r
+ }\r
+ if (count < o.count) {\r
+ return 1;\r
+ }\r
+ return 0;\r
+ }\r
}
\ No newline at end of file
String url = MessageFormat.format("http://www.gravatar.com/avatar/{0}?s={1,number,0}&d=identicon", authorhash, width);\r
add(new AttributeModifier("src", true, new Model<String>(url)));\r
setVisible(GitBlit.getBoolean(Keys.web.allowGravatar, true));\r
+ WicketUtils.setCssClass(this, "gravatar");\r
}\r
\r
@Override\r