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