| | |
| | | import java.util.Collection;
|
| | | import java.util.Date;
|
| | | import java.util.HashMap;
|
| | | import java.util.List;
|
| | | import java.util.Map;
|
| | | import java.util.TimeZone;
|
| | |
|
| | |
| | | default:
|
| | | setCssClass(container, "badge");
|
| | | break;
|
| | | } |
| | | }
|
| | | }
|
| | |
|
| | | public static void setAlternatingBackground(Component c, int i) {
|
| | |
| | | return newImage(wicketId, "file_settings_16x16.png");
|
| | | }
|
| | |
|
| | | List<String> mdExtensions = GitBlit.getStrings(Keys.web.markdownExtensions);
|
| | | for (String ext : mdExtensions) {
|
| | | if (filename.endsWith('.' + ext.toLowerCase())) {
|
| | | return newImage(wicketId, "file_world_16x16.png");
|
| | | }
|
| | | MarkupProcessor processor = new MarkupProcessor(GitBlit.getSettings());
|
| | | String ext = StringUtils.getFileExtension(filename).toLowerCase();
|
| | | if (processor.getMarkupExtensions().contains(ext)) {
|
| | | return newImage(wicketId, "file_world_16x16.png");
|
| | | }
|
| | | return newImage(wicketId, "file_16x16.png");
|
| | | }
|
| | |
| | |
|
| | | public static Label newIcon(String wicketId, String css) {
|
| | | Label lbl = new Label(wicketId);
|
| | | setCssClass(lbl, css); |
| | | setCssClass(lbl, css);
|
| | | return lbl;
|
| | | }
|
| | | |
| | |
|
| | | public static Label newBlankIcon(String wicketId) {
|
| | | Label lbl = new Label(wicketId);
|
| | | setCssClass(lbl, "");
|
| | | lbl.setRenderBodyOnly(true);
|
| | | return lbl;
|
| | | }
|
| | | |
| | |
|
| | | public static ContextRelativeResource getResource(String file) {
|
| | | return new ContextRelativeResource(file);
|
| | | }
|
| | |
| | | return new HeaderContributor(new IHeaderContributor() {
|
| | | private static final long serialVersionUID = 1L;
|
| | |
|
| | | @Override
|
| | | public void renderHead(IHeaderResponse response) {
|
| | | String contentType = "application/rss+xml";
|
| | |
|
| | |
| | | public static Label createDateLabel(String wicketId, Date date, TimeZone timeZone, TimeUtils timeUtils) {
|
| | | return createDateLabel(wicketId, date, timeZone, timeUtils, true);
|
| | | }
|
| | | |
| | |
|
| | | public static Label createDateLabel(String wicketId, Date date, TimeZone timeZone, TimeUtils timeUtils, boolean setCss) {
|
| | | String format = GitBlit.getString(Keys.web.datestampShortFormat, "MM/dd/yy");
|
| | | DateFormat df = new SimpleDateFormat(format);
|
| | |
| | | IChartData data = new AbstractChartData(max) {
|
| | | private static final long serialVersionUID = 1L;
|
| | |
|
| | | @Override
|
| | | public double[][] getData() {
|
| | | return new double[][] { commits, tags };
|
| | | }
|
| | |
| | | IChartData data = new AbstractChartData(max) {
|
| | | private static final long serialVersionUID = 1L;
|
| | |
|
| | | @Override
|
| | | public double[][] getData() {
|
| | | return new double[][] { x, y };
|
| | | }
|