mount(new MixedParamUrlCodingStrategy("/patch", PatchPage.class, new String[] { "r", "h", "f" }));\r
\r
// setup extended urls\r
- mount(new MixedParamUrlCodingStrategy("/ticgit", TicGitPage.class, new String[] { "p" }));\r
- mount(new MixedParamUrlCodingStrategy("/ticgittkt", TicGitTicketPage.class, new String[] { "p", "f" }));\r
+ mount(new MixedParamUrlCodingStrategy("/ticgit", TicGitPage.class, new String[] { "r" }));\r
+ mount(new MixedParamUrlCodingStrategy("/ticgittkt", TicGitTicketPage.class, new String[] { "r", "h", "f" }));\r
\r
repositories = new File(StoredSettings.getString("repositoriesFolder", "repos"));\r
exportAll = StoredSettings.getBoolean("exportAll", true);\r
<tr wicket:id="ticket">\r
<td style="padding:0; margin:0;"><div wicket:id="ticketState">[ticket state]</div></td>\r
<td class="date"><span wicket:id="ticketDate">[ticket date]</span></td>\r
- <td><div wicket:id="ticketHandler">[ticket handler]</div></td>\r
+ <td class="author"><div wicket:id="ticketHandler">[ticket handler]</div></td>\r
<td><div wicket:id="ticketTitle">[ticket title]</div></td>\r
</tr>\r
</tbody>\r
WicketUtils.setTicketCssClass(stateLabel, entry.state);\r
item.add(stateLabel);\r
item.add(WicketUtils.createDateLabel("ticketDate", entry.date, GitBlitWebSession.get().getTimezone()));\r
- item.add(new Label("ticketHandler", WicketUtils.trimString(entry.handler, 30)));\r
- item.add(new LinkPanel("ticketTitle", null, WicketUtils.trimString(entry.title, 80), TicGitTicketPage.class, newPathParameter(entry.name)));\r
+ item.add(new Label("ticketHandler", WicketUtils.trimString(entry.handler.toLowerCase(), 30)));\r
+ item.add(new LinkPanel("ticketTitle", "list subject", WicketUtils.trimString(entry.title, 80), TicGitTicketPage.class, newPathParameter(entry.name)));\r
\r
WicketUtils.setAlternatingBackground(item, counter);\r
counter++;\r
<div class="header"><wicket:message key="gb.ticketComments">comments</wicket:message></div>\r
\r
<!-- comments -->\r
- <table style="width:100%;" class="pretty">\r
+ <table style="width:100%;" class="comments">\r
<tbody>\r
- <tr wicket:id="comment">\r
- <td class="date"><span wicket:id="commentDate">[comment date]</span></td>\r
- <td class="author"><span wicket:id="commentAuthor">[comment author]</span></td>\r
- <td><div wicket:id="commentText">[comment text]</div></td>\r
+ <tr valign="top" wicket:id="comment">\r
+ <td><span class="date" wicket:id="commentDate">[comment date]</span><br/>\r
+ <span class="author" wicket:id="commentAuthor">[comment author]</span></td>\r
+ <td><span wicket:id="commentText">[comment text]</span></td>\r
</tr>\r
</tbody>\r
</table>\r
import org.eclipse.jgit.lib.Repository;\r
\r
import com.gitblit.utils.JGitUtils;\r
+import com.gitblit.utils.Utils;\r
import com.gitblit.wicket.GitBlitWebSession;\r
import com.gitblit.wicket.RepositoryPage;\r
import com.gitblit.wicket.WicketUtils;\r
\r
add(new Label("ticketTitle", t.title));\r
add(new Label("ticketId", t.id));\r
- add(new Label("ticketHandler", t.handler));\r
- add(WicketUtils.createTimestampLabel("ticketOpendate", t.date, getTimeZone()));\r
+ add(new Label("ticketHandler", t.handler.toLowerCase()));\r
+ add(WicketUtils.createTimestampLabel("ticketOpenDate", t.date, getTimeZone()));\r
Label stateLabel = new Label("ticketState", t.state);\r
WicketUtils.setTicketCssClass(stateLabel, t.state);\r
add(stateLabel);\r
public void populateItem(final Item<Comment> item) {\r
final Comment entry = item.getModelObject();\r
item.add(WicketUtils.createDateLabel("commentDate", entry.date, GitBlitWebSession.get().getTimezone()));\r
- item.add(new Label("commentAuthor", entry.author));\r
+ item.add(new Label("commentAuthor", entry.author.toLowerCase()));\r
item.add(new Label("commentText", prepareComment(entry.text)).setEscapeModelStrings(false));\r
WicketUtils.setAlternatingBackground(item, counter);\r
counter++;\r
}\r
\r
private String prepareComment(String comment) {\r
- String html = WicketUtils.breakLines(comment).trim();\r
+ String html = Utils.escapeForHtml(comment, false);\r
+ html = WicketUtils.breakLines(comment).trim(); \r
return html.replaceAll("\\bcommit\\s*([A-Za-z0-9]*)\\b", "<a href=\"/commit/" + repositoryName + "/$1\">commit $1</a>");\r
}\r
}\r
padding: 8px;\r
}\r
\r
-table.pretty, table.repositories {\r
+table.pretty, table.repositories, table.comments {\r
margin-bottom:5px;\r
border-spacing: 0px;\r
border-left: 1px solid #bbb;\r
padding: 2px 4px;\r
}\r
\r
+table.comments td {\r
+ padding: 4px;\r
+ line-height: 17px;\r
+}\r
+\r
table.repositories {\r
width:100%; \r
}\r