Localized all strings for translation. Removed old resources.
2 files added
52 files modified
26 files deleted
| | |
| | | #
|
| | | # Git:Blit UI Settings
|
| | | #
|
| | | siteName = Repositories
|
| | | siteName =
|
| | | allowAdministration = true
|
| | | repositoriesMessage = Welcome to Git:Blit!<br>A quick and easy way to host your own Git repositories.<br>Built with <a href="http://eclipse.org/jgit">JGit</a>, <a href="http://wicket.apache.org">Wicket</a>, <a href="http://code.google.com/p/google-code-prettify/">google-code-prettify</a>, <a href="http://eclipse.org/jetty">Jetty</a>, <a href="http://www.slf4j.org">SLF4J</a>, <a href="http://logging.apache.org/log4j">Log4j</a>, and <a href="http://jcommander.org">JCommander</a>.
|
| | |
|
| | |
| | |
|
| | | public final static String NAME = "Git:Blit";
|
| | |
|
| | | public final static String VERSION = "0.11.3";
|
| | | public final static String VERSION = "0.0.1";
|
| | |
|
| | | public static String getGitBlitVersion() {
|
| | | return NAME + " v" + VERSION;
|
| | | }
|
| | | |
| | | public static String getJGitVersion() {
|
| | | return "JGit 0.11.3";
|
| | | }
|
| | |
|
| | | public static String getRunningVersion() {
|
| | | return NAME + " v" + VERSION;
|
| | | return getGitBlitVersion();
|
| | | }
|
| | | }
|
| | |
| | | <?xml version="1.0" encoding="UTF-8"?>
|
| | | <html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd">
|
| | | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
| | | <html xmlns="http://www.w3.org/1999/xhtml" |
| | | xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.3-strict.dtd" |
| | | xml:lang="en" |
| | | lang="en"> |
| | |
|
| | | <!-- Head with Wicket-controlled resources in this package -->
|
| | | <wicket:head>
|
| | | <title wicket:id="title">[page title]</title>
|
| | |
| | | add(new Label("title", getServerName()));
|
| | | }
|
| | | // header
|
| | | add(new Label("siteName", StoredSettings.getString("siteName", Constants.NAME)));
|
| | | String siteName = StoredSettings.getString("siteName", Constants.NAME);
|
| | | if (siteName == null || siteName.trim().length() == 0) {
|
| | | siteName = Constants.NAME;
|
| | | }
|
| | | add(new Label("siteName", siteName));
|
| | | add(new LinkPanel("repositoryName", null, repositoryName, SummaryPage.class, new PageParameters("p=" + repositoryName)));
|
| | | add(new Label("pageName", pageName));
|
| | |
|
New file |
| | |
| | | gb.repository = repository
|
| | | gb.owner = owner
|
| | | gb.description = description
|
| | | gb.lastChange = last change
|
| | | gb.refs = refs
|
| | | gb.tag = tag
|
| | | gb.tags = tags
|
| | | gb.author = author
|
| | | gb.committer = committer
|
| | | gb.commit = commit
|
| | | gb.tree = tree
|
| | | gb.parent = parent
|
| | | gb.url = URL
|
| | | gb.history = history
|
| | | gb.raw = raw
|
| | | gb.object = object
|
| | | gb.ticketId = ticket id
|
| | | gb.ticketAssigned = assigned
|
| | | gb.ticketOpenDate = open date
|
| | | gb.ticketState = state
|
| | | gb.ticketComments = comments
|
| | | gb.view = view
|
| | | gb.local = local
|
| | | gb.remote = remote
|
| | | gb.branches = branches
|
| | | gb.patch = patch
|
| | | gb.diff = diff
|
| | | gb.shortlog = shortlog
|
| | | gb.more = more
|
| | | gb.allTags = all tags
|
| | | gb.allBranches = all branches
|
| | | gb.summary = summary
|
| | | gb.ticket = ticket
|
| | | gb.newRepository = new repository
|
| | | gb.newUser = new user
|
| | | gb.commitdiff = commitdiff
|
| | | gb.ticgit = ticgit |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?>
|
| | | <html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd">
|
| | | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
| | | <html xmlns="http://www.w3.org/1999/xhtml" |
| | | xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.3-strict.dtd" |
| | | xml:lang="en" |
| | | lang="en">
|
| | | <wicket:panel>
|
| | | <a href="#" wicket:id="link"><span wicket:id="label">link</span></a>
|
| | | <a href="#" wicket:id="link"><span wicket:id="label">[link]</span></a>
|
| | | </wicket:panel>
|
| | | </html> |
| | |
| | | package com.gitblit.wicket;
|
| | |
|
| | | import org.apache.wicket.AttributeModifier;
|
| | | import org.apache.wicket.PageParameters;
|
| | | import org.apache.wicket.behavior.SimpleAttributeModifier;
|
| | | import org.apache.wicket.markup.html.WebPage;
|
| | | import org.apache.wicket.markup.html.basic.Label;
|
| | | import org.apache.wicket.markup.html.link.BookmarkablePageLink;
|
| | | import org.apache.wicket.markup.html.link.Link;
|
| | | import org.apache.wicket.markup.html.panel.Panel;
|
| | | import org.apache.wicket.model.AbstractReadOnlyModel;
|
| | | import org.apache.wicket.model.IModel;
|
| | | import org.apache.wicket.model.Model;
|
| | |
|
| | |
| | |
|
| | | private static final long serialVersionUID = 1L;
|
| | |
|
| | | private IModel<String> labelModel = new Model<String>();
|
| | | private final IModel<String> labelModel;
|
| | |
|
| | | @SuppressWarnings({ "unchecked", "rawtypes" })
|
| | | public LinkPanel(String wicketId, final String linkCssClass, String label, Class<? extends WebPage> clazz, PageParameters parameters) {
|
| | | public LinkPanel(String wicketId, String linkCssClass, String label, Class<? extends WebPage> clazz, PageParameters parameters) {
|
| | | this(wicketId, linkCssClass, new Model<String>(label), clazz, parameters);
|
| | | }
|
| | |
|
| | | public LinkPanel(String wicketId, String linkCssClass, IModel<String> model, Class<? extends WebPage> clazz, PageParameters parameters) {
|
| | | super(wicketId);
|
| | | Link<?> link = null;
|
| | | this.labelModel = model;
|
| | | Link<Void> link = null;
|
| | | if (parameters == null) {
|
| | | link = new BookmarkablePageLink("link", clazz);
|
| | | link = new BookmarkablePageLink<Void>("link", clazz);
|
| | | } else {
|
| | | link = new BookmarkablePageLink("link", clazz, parameters);
|
| | | link = new BookmarkablePageLink<Void>("link", clazz, parameters);
|
| | | }
|
| | | if (linkCssClass != null) {
|
| | | link.add(new AttributeModifier("class", true, new AbstractReadOnlyModel<String>() {
|
| | | private static final long serialVersionUID = 1L;
|
| | |
|
| | | @Override
|
| | | public String getObject() {
|
| | | return linkCssClass;
|
| | | link.add(new SimpleAttributeModifier("class", linkCssClass));
|
| | | }
|
| | | }));
|
| | | }
|
| | | labelModel.setObject(label);
|
| | | link.add(new Label("label", labelModel));
|
| | | add(link);
|
| | | }
|
| | |
| | |
|
| | | Repository r = getRepository();
|
| | |
|
| | | add(new PageLinksPanel("pageLinks", r, repositoryName, getPageName()));
|
| | | // setup the page links and disable this page's link
|
| | | PageLinksPanel pageLinks = new PageLinksPanel("pageLinks", r, repositoryName, getPageName());
|
| | | add(pageLinks);
|
| | | pageLinks.disablePageLink(getPageName());
|
| | |
|
| | | setStatelessHint(true);
|
| | | }
|
| | |
|
| | |
| | |
|
| | | protected abstract String getPageName();
|
| | |
|
| | | protected void addFooter() {
|
| | | @Override
|
| | | protected void onBeforeRender() {
|
| | | // dispose of repository object
|
| | | if (r != null) {
|
| | | r.close();
|
| | | r = null;
|
| | | }
|
| | | // setup page header and footer
|
| | | setupPage(repositoryName, "/ " + getPageName());
|
| | | super.onBeforeRender();
|
| | | }
|
| | |
|
| | | protected PageParameters newRepositoryParameter() {
|
| | |
| | | package com.gitblit.wicket;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import org.apache.wicket.Component;
|
| | | import org.apache.wicket.behavior.SimpleAttributeModifier;
|
| | |
|
| | |
| | | public static String breakLines(String string) {
|
| | | return string.replace("\r", "<br/>").replace("\n", "<br/>");
|
| | | }
|
| | | |
| | | public static void setTicketCssClass(Component container, String state) {
|
| | | String css = null;
|
| | | if (state.equals("open")) {
|
| | | css = "bug_open";
|
| | | } else if (state.equals("hold")) {
|
| | | css = "bug_hold";
|
| | | } else if (state.equals("resolved")) {
|
| | | css = "bug_resolved";
|
| | | } else if (state.equals("invalid")) {
|
| | | css = "bug_invalid";
|
| | | }
|
| | | if (css != null) {
|
| | | setCssClass(container, css);
|
| | | }
|
| | | }
|
| | | |
| | | public static String flattenStrings(List<String> values) {
|
| | | StringBuilder sb = new StringBuilder();
|
| | | for (String value : values) {
|
| | | sb.append(value).append(" ");
|
| | | }
|
| | | return sb.toString().trim();
|
| | | }
|
| | | }
|
| | |
| | | <?xml version="1.0" encoding="UTF-8"?>
|
| | | <html xmlns="http://www.w3.org/1999/xhtml" >
|
| | | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
| | | <html xmlns="http://www.w3.org/1999/xhtml" |
| | | xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.3-strict.dtd" |
| | | xml:lang="en" |
| | | lang="en">
|
| | |
|
| | | <!-- contribute google-code-prettify resources to the page header -->
|
| | | <wicket:head>
|
| | |
| | | RevCommit commit = JGitUtils.getCommit(r, commitId);
|
| | |
|
| | | // blob page links
|
| | | add(new Label("historyLink", "history"));
|
| | | add(new Label("rawLink", "raw"));
|
| | | add(new Label("historyLink", getString("gb.history")));
|
| | | add(new Label("rawLink", getString("gb.raw")));
|
| | | add(new Label("headLink", "HEAD"));
|
| | |
|
| | | add(new LinkPanel("shortlog", "title", commit.getShortMessage(), CommitPage.class, newCommitParameter()));
|
| | |
| | | WicketUtils.setCssClass(blobLabel, "plainprint");
|
| | | add(blobLabel);
|
| | | }
|
| | |
|
| | | // footer
|
| | | addFooter();
|
| | | }
|
| | |
|
| | | @Override
|
| | | protected String getPageName() {
|
| | | return "view";
|
| | | return getString("gb.view");
|
| | | }
|
| | | }
|
| | |
| | | <?xml version="1.0" encoding="UTF-8"?>
|
| | | <html xmlns="http://www.w3.org/1999/xhtml" >
|
| | | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
| | | <html xmlns="http://www.w3.org/1999/xhtml" |
| | | xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.3-strict.dtd" |
| | | xml:lang="en" |
| | | lang="en"> |
| | |
|
| | | <body>
|
| | | <wicket:extend>
|
| | |
|
| | |
| | | item.add(new LinkPanel("branchName", "list name", entry.getDisplayName(), ShortLogPage.class, newCommitParameter(entry.getName())));
|
| | |
|
| | | boolean remote = entry.getName().startsWith(Constants.R_REMOTES);
|
| | | item.add(new Label("branchType", remote ? "remote":"local"));
|
| | | item.add(new Label("branchType", remote ? getString("gb.remote"):getString("gb.local")));
|
| | |
|
| | | item.add(new BranchLinksPanel("branchLinks", repositoryName, entry));
|
| | |
|
| | |
| | | }
|
| | | };
|
| | | add(branchView);
|
| | |
|
| | | // footer
|
| | | addFooter();
|
| | | }
|
| | |
|
| | | @Override
|
| | | protected String getPageName() {
|
| | | return "branches";
|
| | | return getString("gb.branches");
|
| | | }
|
| | | }
|
| | |
| | | <?xml version="1.0" encoding="UTF-8"?>
|
| | | <html xmlns="http://www.w3.org/1999/xhtml" >
|
| | | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
| | | <html xmlns="http://www.w3.org/1999/xhtml" |
| | | xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.3-strict.dtd" |
| | | xml:lang="en" |
| | | lang="en"> |
| | |
|
| | | <body>
|
| | | <wicket:extend>
|
| | |
|
| | |
| | |
|
| | | <!-- commit info -->
|
| | | <table class="plain">
|
| | | <tr><th>refs</th><td><div wicket:id="refsPanel">[references]</div></td></tr>
|
| | | <tr><th>author</th><td><span wicket:id="commitAuthor">[author</span></td></tr>
|
| | | <tr><th><wicket:message key="gb.refs">refs</wicket:message></th><td><div wicket:id="refsPanel">[references]</div></td></tr>
|
| | | <tr><th><wicket:message key="gb.author">author</wicket:message></th><td><span wicket:id="commitAuthor">[author</span></td></tr>
|
| | | <tr><th></th><td><span wicket:id="commitAuthorDate">[author date]</span></td></tr>
|
| | | <tr><th>committer</th><td><span wicket:id="commitCommitter">[committer]</span></td></tr>
|
| | | <tr><th><wicket:message key="gb.committer">committer</wicket:message></th><td><span wicket:id="commitCommitter">[committer]</span></td></tr>
|
| | | <tr><th></th><td><span wicket:id="commitCommitterDate">[commit date]</span></td></tr>
|
| | | <tr><th>commit</th><td class="sha1"><span wicket:id="commitId">[commit id]</span></td></tr>
|
| | | <tr><th>tree</th><td class="sha1"><span wicket:id="commitTree">[commit tree]</span></td></tr>
|
| | | <tr><th>parent</th><td class="sha1"><span wicket:id="commitParents">
|
| | | <tr><th><wicket:message key="gb.commit">commit</wicket:message></th><td class="sha1"><span wicket:id="commitId">[commit id]</span></td></tr>
|
| | | <tr><th><wicket:message key="gb.tree">tree</wicket:message></th><td class="sha1"><span wicket:id="commitTree">[commit tree]</span></td></tr>
|
| | | <tr><th><wicket:message key="gb.parent">parent</wicket:message></th><td class="sha1"><span wicket:id="commitParents">
|
| | | <div wicket:id="commitParent">[commit parents]</div></span></td></tr>
|
| | | </table>
|
| | |
|
| | |
| | | } else {
|
| | | add(new LinkPanel("parentLink", null, parents.get(0).substring(0, 8), CommitPage.class, newCommitParameter(parents.get(0))));
|
| | | }
|
| | | add(new Label("patchLink", "patch"));
|
| | | add(new Label("patchLink", getString("gb.patch")));
|
| | |
|
| | | add(new LinkPanel("shortlog", "title", c.getShortMessage(), ShortLogPage.class, newRepositoryParameter()));
|
| | |
|
| | |
| | | }
|
| | | };
|
| | | add(pathsView);
|
| | | |
| | | // footer
|
| | | addFooter();
|
| | | }
|
| | |
|
| | | @Override
|
| | | protected String getPageName() {
|
| | | return "commit";
|
| | | return getString("gb.commit");
|
| | | }
|
| | | }
|
| | |
| | | <?xml version="1.0" encoding="UTF-8"?>
|
| | | <html xmlns="http://www.w3.org/1999/xhtml" >
|
| | | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
| | | <html xmlns="http://www.w3.org/1999/xhtml" |
| | | xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.3-strict.dtd" |
| | | xml:lang="en" |
| | | lang="en"> |
| | |
|
| | | <body>
|
| | | <wicket:extend>
|
| | |
|
| | |
| | | }
|
| | |
|
| | | // diff page links
|
| | | add(new Label("historyLink", "history"));
|
| | | add(new Label("rawLink", "raw"));
|
| | | add(new Label("historyLink", getString("gb.history")));
|
| | | add(new Label("rawLink", getString("gb.raw")));
|
| | | add(new Label("headLink", "HEAD"));
|
| | |
|
| | | add(new LinkPanel("shortlog", "title", commit.getShortMessage(), CommitPage.class, newCommitParameter()));
|
| | |
| | | add(new PathBreadcrumbsPanel("breadcrumbs", repositoryName, blobPath, commitId));
|
| | |
|
| | | add(new Label("diffText", diff).setEscapeModelStrings(false));
|
| | |
|
| | | // footer
|
| | | addFooter();
|
| | | }
|
| | |
|
| | | @Override
|
| | | protected String getPageName() {
|
| | | return "diff";
|
| | | return getString("gb.diff");
|
| | | }
|
| | | }
|
| | |
| | | <?xml version="1.0" encoding="UTF-8"?>
|
| | | <html xmlns="http://www.w3.org/1999/xhtml" >
|
| | | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
| | | <html xmlns="http://www.w3.org/1999/xhtml" |
| | | xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.3-strict.dtd" |
| | | xml:lang="en" |
| | | lang="en"> |
| | |
|
| | | <body>
|
| | | <wicket:extend>
|
| | | <div wicket:id="adminPanel">[admin links]</div>
|
| | |
| | |
|
| | | <table class="repositories">
|
| | | <tr>
|
| | | <th wicket:id="orderByRepository">Repository</th>
|
| | | <th wicket:id="orderByDescription">Description</th>
|
| | | <th wicket:id="orderByOwner">Owner</th>
|
| | | <th wicket:id="orderByDate">Last Change</th>
|
| | | <th wicket:id="orderByRepository"><wicket:message key="gb.repository">Repository</wicket:message></th>
|
| | | <th wicket:id="orderByDescription"><wicket:message key="gb.description">Description</wicket:message></th>
|
| | | <th wicket:id="orderByOwner"><wicket:message key="gb.owner">Owner</wicket:message></th>
|
| | | <th wicket:id="orderByDate"><wicket:message key="gb.lastChange">Last Change</wicket:message></th>
|
| | | </tr>
|
| | | <tbody>
|
| | | <tr wicket:id="repository">
|
| | |
| | | <?xml version="1.0" encoding="UTF-8"?>
|
| | | <html xmlns="http://www.w3.org/1999/xhtml" >
|
| | | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
| | | <html xmlns="http://www.w3.org/1999/xhtml" |
| | | xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.3-strict.dtd" |
| | | xml:lang="en" |
| | | lang="en"> |
| | |
|
| | | <body>
|
| | | <wicket:extend>
|
| | |
|
| | |
| | | shortlogView.setItemsPerPage(GitBlitWebApp.PAGING_ITEM_COUNT);
|
| | | add(shortlogView);
|
| | | add(new PagingNavigator("navigator", shortlogView));
|
| | |
|
| | | // footer
|
| | | addFooter();
|
| | | }
|
| | |
|
| | | @Override
|
| | | protected String getPageName() {
|
| | | return "shortlog";
|
| | | return getString("gb.shortlog");
|
| | | }
|
| | | }
|
| | |
| | | <?xml version="1.0" encoding="UTF-8"?>
|
| | | <html xmlns="http://www.w3.org/1999/xhtml" >
|
| | | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
| | | <html xmlns="http://www.w3.org/1999/xhtml" |
| | | xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.3-strict.dtd" |
| | | xml:lang="en" |
| | | lang="en"> |
| | |
|
| | | <body>
|
| | | <wicket:extend>
|
| | |
|
| | |
| | | <!-- Repository info -->
|
| | | <div style="margin-right:410px;">
|
| | | <table class="plain">
|
| | | <tr><th>description</th><td><span wicket:id="repositoryDescription">[repository description]</span></td></tr>
|
| | | <tr><th>owner</th><td><span wicket:id="repositoryOwner">[repository owner]</span></td></tr>
|
| | | <tr><th>last change</th><td><span wicket:id="repositoryLastChange">[repository last change]</span></td></tr>
|
| | | <tr><th>URL</th><td><span wicket:id="repositoryCloneUrl">[repository clone url]</span></td></tr>
|
| | | <tr><th><wicket:message key="gb.description">description</wicket:message></th><td><span wicket:id="repositoryDescription">[repository description]</span></td></tr>
|
| | | <tr><th><wicket:message key="gb.owner">owner</wicket:message></th><td><span wicket:id="repositoryOwner">[repository owner]</span></td></tr>
|
| | | <tr><th><wicket:message key="gb.lastChange">last change</wicket:message></th><td><span wicket:id="repositoryLastChange">[repository last change]</span></td></tr>
|
| | | <tr><th><wicket:message key="gb.url">URL</wicket:message></th><td><span wicket:id="repositoryCloneUrl">[repository clone url]</span></td></tr>
|
| | | </table>
|
| | | </div>
|
| | | </div>
|
| | |
| | | add(new Label("repositoryCloneUrl", cloneurl));
|
| | |
|
| | | // shortlog
|
| | | add(new LinkPanel("shortlog", "title", "shortlog", ShortLogPage.class, newRepositoryParameter()));
|
| | | add(new LinkPanel("shortlog", "title", getString("gb.shortlog"), ShortLogPage.class, newRepositoryParameter()));
|
| | |
|
| | | List<RevCommit> commits = JGitUtils.getRevLog(r, numberCommits);
|
| | | ListDataProvider<RevCommit> dp = new ListDataProvider<RevCommit>(commits);
|
| | |
| | | if (commits.size() < numberCommits) {
|
| | | add(new Label("shortlogMore", "").setVisible(false));
|
| | | } else {
|
| | | add(new LinkPanel("shortlogMore", "link", "more...", ShortLogPage.class, newRepositoryParameter()));
|
| | | add(new LinkPanel("shortlogMore", "link", getString("gb.more") + "...", ShortLogPage.class, newRepositoryParameter()));
|
| | | }
|
| | |
|
| | | // tags
|
| | | List<RefModel> tags = JGitUtils.getTags(r, numberRefs);
|
| | | add(new LinkPanel("tags", "title", "tags", TagsPage.class, newRepositoryParameter()));
|
| | | add(new LinkPanel("tags", "title", getString("gb.tags"), TagsPage.class, newRepositoryParameter()));
|
| | |
|
| | | ListDataProvider<RefModel> tagsDp = new ListDataProvider<RefModel>(tags);
|
| | | DataView<RefModel> tagView = new DataView<RefModel>("tag", tagsDp) {
|
| | |
| | | if (tags.size() < numberRefs) {
|
| | | add(new Label("allTags", "").setVisible(false));
|
| | | } else {
|
| | | add(new LinkPanel("allTags", "link", "all tags...", TagsPage.class, newRepositoryParameter()));
|
| | | add(new LinkPanel("allTags", "link", getString("gb.allTags") + "...", TagsPage.class, newRepositoryParameter()));
|
| | | }
|
| | |
|
| | | // branches
|
| | |
| | | branches = new ArrayList<RefModel>(branches.subList(0, numberRefs));
|
| | | }
|
| | |
|
| | | add(new LinkPanel("branches", "title", "branches", BranchesPage.class, newRepositoryParameter()));
|
| | | add(new LinkPanel("branches", "title", getString("gb.branches"), BranchesPage.class, newRepositoryParameter()));
|
| | |
|
| | | ListDataProvider<RefModel> branchesDp = new ListDataProvider<RefModel>(branches);
|
| | | DataView<RefModel> branchesView = new DataView<RefModel>("branch", branchesDp) {
|
| | |
| | | if (branches.size() < numberRefs) {
|
| | | add(new Label("allBranches", "").setVisible(false));
|
| | | } else {
|
| | | add(new LinkPanel("allBranches", "link", "all branches...", BranchesPage.class, newRepositoryParameter()));
|
| | | add(new LinkPanel("allBranches", "link", getString("gb.allBranches") + "...", BranchesPage.class, newRepositoryParameter()));
|
| | | }
|
| | |
|
| | | // Display an activity line graph
|
| | | insertActivityGraph(r);
|
| | |
|
| | | // close the repository
|
| | | r.close();
|
| | |
|
| | | // footer
|
| | | addFooter();
|
| | | }
|
| | |
|
| | | @Override
|
| | | protected String getPageName() {
|
| | | return "summary";
|
| | | return getString("gb.summary");
|
| | | }
|
| | |
|
| | | private void insertActivityGraph(Repository r) {
|
| | |
| | | <?xml version="1.0" encoding="UTF-8"?>
|
| | | <html xmlns="http://www.w3.org/1999/xhtml" >
|
| | | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
| | | <html xmlns="http://www.w3.org/1999/xhtml" |
| | | xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.3-strict.dtd" |
| | | xml:lang="en" |
| | | lang="en"> |
| | |
|
| | | <body>
|
| | | <wicket:extend>
|
| | |
|
| | |
| | |
|
| | | <!-- commit info -->
|
| | | <table class="plain">
|
| | | <tr><th>object</th><td><span wicket:id="tagId">[tag id]</span></td></tr>
|
| | | <tr><th>author</th><td><span wicket:id="tagAuthor">[tag author]</span></td></tr>
|
| | | <tr><th><wicket:message key="gb.object">object</wicket:message></th><td><span wicket:id="tagId">[tag id]</span></td></tr>
|
| | | <tr><th><wicket:message key="gb.author">author</wicket:message></th><td><span wicket:id="tagAuthor">[tag author]</span></td></tr>
|
| | | <tr><th></th><td><span wicket:id="tagDate">[tag date]</span></td></tr>
|
| | | </table>
|
| | |
|
| | |
| | | add(new Label("tagDate", authorDate));
|
| | |
|
| | | addFullText("fullMessage", c.getFullMessage(), true);
|
| | |
|
| | | // footer
|
| | | addFooter();
|
| | | }
|
| | |
|
| | | @Override
|
| | | protected String getPageName() {
|
| | | return "tag";
|
| | | return getString("gb.tag");
|
| | | }
|
| | | }
|
| | |
| | | <?xml version="1.0" encoding="UTF-8"?>
|
| | | <html xmlns="http://www.w3.org/1999/xhtml" >
|
| | | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
| | | <html xmlns="http://www.w3.org/1999/xhtml" |
| | | xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.3-strict.dtd" |
| | | xml:lang="en" |
| | | lang="en"> |
| | |
|
| | | <body>
|
| | | <wicket:extend>
|
| | |
|
| | |
| | | }
|
| | | };
|
| | | add(tagView);
|
| | |
|
| | | // footer
|
| | | addFooter();
|
| | | }
|
| | |
|
| | | @Override
|
| | | protected String getPageName() {
|
| | | return "tags";
|
| | | return getString("gb.tags");
|
| | | }
|
| | | }
|
| | |
| | | <?xml version="1.0" encoding="UTF-8"?>
|
| | | <html xmlns="http://www.w3.org/1999/xhtml" >
|
| | | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
| | | <html xmlns="http://www.w3.org/1999/xhtml" |
| | | xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.3-strict.dtd" |
| | | xml:lang="en" |
| | | lang="en"> |
| | |
|
| | | <body>
|
| | | <wicket:extend>
|
| | |
|
| | |
| | | public void populateItem(final Item<TicGitTicket> item) {
|
| | | final TicGitTicket entry = item.getModelObject();
|
| | | Label stateLabel = new Label("ticketState", entry.state);
|
| | | String css = null;
|
| | | if (entry.state.equals("open")) {
|
| | | css = "bug_open";
|
| | | } else if (entry.state.equals("hold")) {
|
| | | css = "bug_hold";
|
| | | } else if (entry.state.equals("resolved")) {
|
| | | css = "bug_resolved";
|
| | | } else if (entry.state.equals("invalid")) {
|
| | | css = "bug_invalid";
|
| | | }
|
| | | if (css != null) {
|
| | | WicketUtils.setCssClass(stateLabel, css);
|
| | | }
|
| | | WicketUtils.setTicketCssClass(stateLabel, entry.state);
|
| | | item.add(stateLabel);
|
| | | item.add(createDateLabel("ticketDate", entry.date));
|
| | | item.add(new Label("ticketHandler", trimString(entry.handler, 30)));
|
| | |
| | | }
|
| | | };
|
| | | add(ticketsView);
|
| | |
|
| | | // footer
|
| | | addFooter();
|
| | | }
|
| | |
|
| | | @Override
|
| | | protected String getPageName() {
|
| | | return "ticgit";
|
| | | return getString("gb.ticgit");
|
| | | }
|
| | | }
|
| | |
| | | <?xml version="1.0" encoding="UTF-8"?>
|
| | | <html xmlns="http://www.w3.org/1999/xhtml" >
|
| | | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
| | | <html xmlns="http://www.w3.org/1999/xhtml" |
| | | xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.3-strict.dtd" |
| | | xml:lang="en" |
| | | lang="en"> |
| | |
|
| | | <body>
|
| | | <wicket:extend>
|
| | |
|
| | |
| | |
|
| | | <!-- ticket info -->
|
| | | <table class="plain">
|
| | | <tr><th>ticket id</th><td class="sha1"><span wicket:id="ticketId">[ticket id]</span></td></tr>
|
| | | <tr><th>assigned</th><td><span wicket:id=ticketHandler>[ticket title]</span></td></tr>
|
| | | <tr><th>open date</th><td><span wicket:id="ticketOpenDate">[ticket open date]</span></td></tr>
|
| | | <tr><th>state</th><td><span wicket:id="ticketState">[ticket state]</span></td></tr>
|
| | | <tr><th>tags</th><td><span wicket:id="ticketTags">[ticket tags]</span></td></tr>
|
| | | <tr><th><wicket:message key="gb.ticketId">ticket id</wicket:message></th><td class="sha1"><span wicket:id="ticketId">[ticket id]</span></td></tr>
|
| | | <tr><th><wicket:message key="gb.ticketAssigned">assigned</wicket:message></th><td><span wicket:id=ticketHandler>[ticket title]</span></td></tr>
|
| | | <tr><th><wicket:message key="gb.ticketOpenDate">open date</wicket:message></th><td><span wicket:id="ticketOpenDate">[ticket open date]</span></td></tr>
|
| | | <tr><th><wicket:message key="gb.ticketState">state</wicket:message></th><td><span wicket:id="ticketState">[ticket state]</span></td></tr>
|
| | | <tr><th><wicket:message key="gb.tags">tags</wicket:message></th><td><span wicket:id="ticketTags">[ticket tags]</span></td></tr>
|
| | | </table>
|
| | |
|
| | | <!-- comments header -->
|
| | | <div class="header">Comments</div>
|
| | | <div class="header"><wicket:message key="gb.ticketComments">comments</wicket:message></div>
|
| | |
|
| | | <!-- comments -->
|
| | | <table style="width:100%;" class="pretty">
|
| | |
| | | package com.gitblit.wicket.pages;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import org.apache.wicket.PageParameters;
|
| | | import org.apache.wicket.markup.html.basic.Label;
|
| | | import org.apache.wicket.markup.repeater.Item;
|
| | |
| | | String openDate = GitBlitWebSession.get().formatDateTimeLong(t.date);
|
| | | add(new Label("ticketOpenDate", openDate));
|
| | | Label stateLabel = new Label("ticketState", t.state);
|
| | | String css = null;
|
| | | if (t.state.equals("open")) {
|
| | | css = "bug_open";
|
| | | } else if (t.state.equals("hold")) {
|
| | | css = "bug_hold";
|
| | | } else if (t.state.equals("resolved")) {
|
| | | css = "bug_resolved";
|
| | | } else if (t.state.equals("invalid")) {
|
| | | css = "bug_invalid";
|
| | | }
|
| | | if (css != null) {
|
| | | WicketUtils.setCssClass(stateLabel, css);
|
| | | }
|
| | | WicketUtils.setTicketCssClass(stateLabel, t.state);
|
| | | add(stateLabel);
|
| | | add(new Label("ticketTags", flattenStrings(t.tags)));
|
| | | add(new Label("ticketTags", WicketUtils.flattenStrings(t.tags)));
|
| | |
|
| | | ListDataProvider<Comment> commentsDp = new ListDataProvider<Comment>(t.comments);
|
| | | DataView<Comment> commentsView = new DataView<Comment>("comment", commentsDp) {
|
| | |
| | | }
|
| | | };
|
| | | add(commentsView);
|
| | |
|
| | | // footer
|
| | | addFooter();
|
| | | }
|
| | |
|
| | | @Override
|
| | | protected String getPageName() {
|
| | | return "ticket";
|
| | | return getString("gb.ticket");
|
| | | }
|
| | |
|
| | | private String prepareComment(String comment) {
|
| | | String html = WicketUtils.breakLines(comment).trim();
|
| | | return html.replaceAll("\\bcommit\\s*([A-Za-z0-9]*)\\b", "<a href=\"/commit/" + repositoryName + "/$1\">commit $1</a>");
|
| | | }
|
| | |
|
| | | private String flattenStrings(List<String> values) {
|
| | | StringBuilder sb = new StringBuilder();
|
| | | for (String value : values) {
|
| | | sb.append(value).append(" ");
|
| | | }
|
| | | return sb.toString().trim();
|
| | | }
|
| | | }
|
| | |
| | | <?xml version="1.0" encoding="UTF-8"?>
|
| | | <html xmlns="http://www.w3.org/1999/xhtml" >
|
| | | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
| | | <html xmlns="http://www.w3.org/1999/xhtml" |
| | | xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.3-strict.dtd" |
| | | xml:lang="en" |
| | | lang="en"> |
| | |
|
| | | <body>
|
| | | <wicket:extend>
|
| | |
|
| | |
| | | List<PathModel> paths = JGitUtils.getFilesInPath(r, basePath, commit);
|
| | |
|
| | | // tree page links
|
| | | add(new Label("historyLink", "history"));
|
| | | add(new Label("historyLink", getString("gb.history")));
|
| | | add(new Label("headLink", "HEAD"));
|
| | |
|
| | | add(new LinkPanel("shortlog", "title", commit.getShortMessage(), CommitPage.class, newCommitParameter()));
|
| | |
| | | }
|
| | | };
|
| | | add(pathsView);
|
| | |
|
| | | // footer
|
| | | addFooter();
|
| | | }
|
| | |
|
| | | @Override
|
| | | protected String getPageName() {
|
| | | return "tree";
|
| | | return getString("gb.tree");
|
| | | }
|
| | | }
|
| | |
| | | <?xml version="1.0" encoding="UTF-8"?>
|
| | | <html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd">
|
| | | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
| | | <html xmlns="http://www.w3.org/1999/xhtml" |
| | | xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.3-strict.dtd" |
| | | xml:lang="en" |
| | | lang="en"> |
| | |
|
| | | <wicket:panel>
|
| | | <!-- page nav links -->
|
| | | <div class="page_nav">
|
| | | <span wicket:id="newRepository"></span> | <span wicket:id="newUser"></span>
|
| | | <a wicket:id="newRepository"><wicket:message key="gb.newRepository"></wicket:message></a> | <a wicket:id="newUser"><wicket:message key="gb.newUser"></wicket:message></a>
|
| | | </div>
|
| | | </wicket:panel>
|
| | | </html> |
| | |
| | | package com.gitblit.wicket.panels;
|
| | |
|
| | | import org.apache.wicket.markup.html.basic.Label;
|
| | | import org.apache.wicket.markup.html.panel.Panel;
|
| | | import org.apache.wicket.markup.html.link.BookmarkablePageLink;
|
| | |
|
| | | public class AdminLinksPanel extends Panel {
|
| | | import com.gitblit.wicket.pages.RepositoriesPage;
|
| | |
|
| | | public class AdminLinksPanel extends BasePanel {
|
| | |
|
| | | private static final long serialVersionUID = 1L;
|
| | |
|
| | | public AdminLinksPanel(String id) {
|
| | | super(id);
|
| | |
|
| | | add(new Label("newRepository", "new repository"));
|
| | | add(new Label("newUser", "new user"));
|
| | | add(new BookmarkablePageLink<Void>("newRepository", RepositoriesPage.class));
|
| | | add(new BookmarkablePageLink<Void>("newUser", RepositoriesPage.class));
|
| | | }
|
| | | } |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?>
|
| | | <html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd">
|
| | | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
| | | <html xmlns="http://www.w3.org/1999/xhtml" |
| | | xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.3-strict.dtd" |
| | | xml:lang="en" |
| | | lang="en"> |
| | |
|
| | | <wicket:panel>
|
| | | <div class="link">
|
| | | <span wicket:id="tag"></span> | <span wicket:id="commit"></span> | <span wicket:id="shortlog"></span>
|
| | | <a wicket:id="tag"><wicket:message key="gb.tag"></wicket:message></a> | <a wicket:id="commit"><wicket:message key="gb.commit"></wicket:message></a> | <a wicket:id="shortlog"><wicket:message key="gb.shortlog"></wicket:message></a>
|
| | | </div>
|
| | | </wicket:panel>
|
| | | </html> |
| | |
| | | package com.gitblit.wicket.panels;
|
| | |
|
| | | import org.apache.wicket.PageParameters;
|
| | | import org.apache.wicket.markup.html.panel.Panel;
|
| | | import org.apache.wicket.markup.html.link.BookmarkablePageLink;
|
| | |
|
| | | import com.gitblit.wicket.LinkPanel;
|
| | | import com.gitblit.wicket.models.RefModel;
|
| | | import com.gitblit.wicket.pages.CommitPage;
|
| | | import com.gitblit.wicket.pages.ShortLogPage;
|
| | | import com.gitblit.wicket.pages.TagPage;
|
| | |
|
| | |
|
| | | public class AnnotatedTagLinksPanel extends Panel {
|
| | | public class AnnotatedTagLinksPanel extends BasePanel {
|
| | |
|
| | | private static final long serialVersionUID = 1L;
|
| | |
|
| | | public AnnotatedTagLinksPanel(String id, String repositoryName, RefModel tag) {
|
| | | super(id);
|
| | | add(new LinkPanel("tag", null, "tag", TagPage.class, new PageParameters("p=" + repositoryName + ",h=" + tag.getObjectId().getName())));
|
| | | add(new LinkPanel("commit", null, "commit", CommitPage.class, new PageParameters("p=" + repositoryName + ",h=" + tag.getCommitId().getName())));
|
| | | add(new LinkPanel("shortlog", null, "shortlog", ShortLogPage.class, new PageParameters("p=" + repositoryName + ",h=" + tag.getName())));
|
| | | add(new BookmarkablePageLink<Void>("tag", TagPage.class, new PageParameters("p=" + repositoryName + ",h=" + tag.getObjectId().getName())));
|
| | | add(new BookmarkablePageLink<Void>("commit", CommitPage.class, new PageParameters("p=" + repositoryName + ",h=" + tag.getCommitId().getName())));
|
| | | add(new BookmarkablePageLink<Void>("shortlog", ShortLogPage.class, new PageParameters("p=" + repositoryName + ",h=" + tag.getName())));
|
| | | }
|
| | | } |
New file |
| | |
| | | package com.gitblit.wicket.panels;
|
| | |
|
| | | import org.apache.wicket.markup.html.panel.Panel;
|
| | | import org.apache.wicket.model.StringResourceModel;
|
| | |
|
| | | public abstract class BasePanel extends Panel {
|
| | |
|
| | | private static final long serialVersionUID = 1L;
|
| | |
|
| | | public BasePanel(String id) {
|
| | | super(id);
|
| | | }
|
| | | |
| | | public StringResourceModel stringModel(String key) {
|
| | | return new StringResourceModel(key, this, null);
|
| | | }
|
| | | }
|
| | |
| | | <?xml version="1.0" encoding="UTF-8"?>
|
| | | <html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd">
|
| | | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
| | | <html xmlns="http://www.w3.org/1999/xhtml" |
| | | xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.3-strict.dtd" |
| | | xml:lang="en" |
| | | lang="en"> |
| | |
|
| | | <wicket:panel>
|
| | | <div class="link">
|
| | | <span wicket:id="shortlog"></span> | <span wicket:id="tree"></span>
|
| | | <a wicket:id="shortlog"><wicket:message key="gb.shortlog"></wicket:message></a> | <a wicket:id="tree"><wicket:message key="gb.tree"></wicket:message></a>
|
| | | </div>
|
| | | </wicket:panel>
|
| | | </html> |
| | |
| | | package com.gitblit.wicket.panels;
|
| | |
|
| | | import org.apache.wicket.PageParameters;
|
| | | import org.apache.wicket.markup.html.panel.Panel;
|
| | | import org.apache.wicket.markup.html.link.BookmarkablePageLink;
|
| | |
|
| | | import com.gitblit.wicket.LinkPanel;
|
| | | import com.gitblit.wicket.models.RefModel;
|
| | | import com.gitblit.wicket.pages.ShortLogPage;
|
| | | import com.gitblit.wicket.pages.TreePage;
|
| | |
|
| | |
|
| | | public class BranchLinksPanel extends Panel {
|
| | | public class BranchLinksPanel extends BasePanel {
|
| | |
|
| | | private static final long serialVersionUID = 1L;
|
| | |
|
| | | public BranchLinksPanel(String id, String repositoryName, RefModel tag) {
|
| | | super(id);
|
| | | add(new LinkPanel("shortlog", null, "shortlog", ShortLogPage.class, new PageParameters("p=" + repositoryName + ",h=" + tag.getName())));
|
| | | add(new LinkPanel("tree", null, "tree", TreePage.class, new PageParameters("p=" + repositoryName + ",h=" + tag.getName())));
|
| | | add(new BookmarkablePageLink<Void>("shortlog", ShortLogPage.class, new PageParameters("p=" + repositoryName + ",h=" + tag.getName())));
|
| | | add(new BookmarkablePageLink<Void>("tree", TreePage.class, new PageParameters("p=" + repositoryName + ",h=" + tag.getName())));
|
| | | }
|
| | | } |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?>
|
| | | <html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd">
|
| | | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
| | | <html xmlns="http://www.w3.org/1999/xhtml" |
| | | xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.3-strict.dtd" |
| | | xml:lang="en" |
| | | lang="en"> |
| | |
|
| | | <wicket:panel>
|
| | | <!-- page nav links -->
|
| | | <div class="page_nav">
|
| | | <span wicket:id="summary"></span> | <span wicket:id="shortlog"></span> | <span wicket:id="branches"></span> | <span wicket:id="tags"></span> | <span wicket:id="tree"></span> <span wicket:id="extra"><span wicket:id="extraSeparator"></span><span wicket:id="extraLink"></span></span>
|
| | | <a wicket:id="summary"><wicket:message key="gb.summary"></wicket:message></a> | <a wicket:id="shortlog"><wicket:message key="gb.shortlog"></wicket:message></a> | <a wicket:id="branches"><wicket:message key="gb.branches"></wicket:message></a> | <a wicket:id="tags"><wicket:message key="gb.tags"></wicket:message></a> | <a wicket:id="tree"><wicket:message key="gb.tree"></wicket:message></a> <span wicket:id="extra"><span wicket:id="extraSeparator"></span><span wicket:id="extraLink"></span></span>
|
| | | </div>
|
| | | </wicket:panel>
|
| | | </html> |
| | |
| | | package com.gitblit.wicket.panels;
|
| | |
|
| | | import java.util.ArrayList;
|
| | | import java.util.HashMap;
|
| | | import java.util.List;
|
| | | import java.util.Map;
|
| | |
|
| | | import org.apache.wicket.Component;
|
| | | import org.apache.wicket.PageParameters;
|
| | | import org.apache.wicket.markup.html.basic.Label;
|
| | | import org.apache.wicket.markup.html.panel.Panel;
|
| | | import org.apache.wicket.markup.html.link.BookmarkablePageLink;
|
| | | import org.apache.wicket.markup.repeater.Item;
|
| | | import org.apache.wicket.markup.repeater.data.DataView;
|
| | | import org.apache.wicket.markup.repeater.data.ListDataProvider;
|
| | |
| | | import com.gitblit.wicket.pages.TicGitPage;
|
| | | import com.gitblit.wicket.pages.TreePage;
|
| | |
|
| | | public class PageLinksPanel extends Panel {
|
| | | public class PageLinksPanel extends BasePanel {
|
| | |
|
| | | private static final long serialVersionUID = 1L;
|
| | |
|
| | | private final Map<String, String> knownPages = new HashMap<String, String>() {
|
| | |
|
| | | private static final long serialVersionUID = 1L;
|
| | |
|
| | | {
|
| | | put("summary", "gb.summary");
|
| | | put("shortlog", "gb.shortlog");
|
| | | put("branches", "gb.branches");
|
| | | put("tags", "gb.tags");
|
| | | put("tree", "gb.tree");
|
| | | put("ticgit", "gb.ticgit");
|
| | | }
|
| | | };
|
| | |
|
| | | public PageLinksPanel(String id, Repository r, final String repositoryName, String pageName) {
|
| | | super(id);
|
| | |
|
| | | // summary
|
| | | if (pageName.equals("summary")) {
|
| | | add(new Label("summary", pageName));
|
| | | } else {
|
| | | add(new LinkPanel("summary", null, "summary", SummaryPage.class, new PageParameters("p=" + repositoryName)));
|
| | | }
|
| | |
|
| | | // shortlog
|
| | | if (pageName.equals("shortlog")) {
|
| | | add(new Label("shortlog", pageName));
|
| | | } else {
|
| | | add(new LinkPanel("shortlog", null, "shortlog", ShortLogPage.class, new PageParameters("p=" + repositoryName)));
|
| | | }
|
| | |
|
| | | // branches
|
| | | if (pageName.equals("branches")) {
|
| | | add(new Label("branches", pageName));
|
| | | } else {
|
| | | add(new LinkPanel("branches", null, "branches", BranchesPage.class, new PageParameters("p=" + repositoryName)));
|
| | | }
|
| | |
|
| | | // tags
|
| | | if (pageName.equals("tags")) {
|
| | | add(new Label("tags", pageName));
|
| | | } else {
|
| | | add(new LinkPanel("tags", null, "tags", TagsPage.class, new PageParameters("p=" + repositoryName)));
|
| | | }
|
| | |
|
| | | // tree
|
| | | if (pageName.equals("tree")) {
|
| | | add(new Label("tree", pageName));
|
| | | } else {
|
| | | add(new LinkPanel("tree", null, "tree", TreePage.class, new PageParameters("p=" + repositoryName + ",h=HEAD")));
|
| | | }
|
| | | add(new BookmarkablePageLink<Void>("summary", SummaryPage.class, new PageParameters("p=" + repositoryName)));
|
| | | add(new BookmarkablePageLink<Void>("shortlog", ShortLogPage.class, new PageParameters("p=" + repositoryName)));
|
| | | add(new BookmarkablePageLink<Void>("branches", BranchesPage.class, new PageParameters("p=" + repositoryName)));
|
| | | add(new BookmarkablePageLink<Void>("tags", TagsPage.class, new PageParameters("p=" + repositoryName)));
|
| | | add(new BookmarkablePageLink<Void>("tree", TreePage.class, new PageParameters("p=" + repositoryName + ",h=HEAD")));
|
| | |
|
| | | // Add dynamic repository extras
|
| | | List<String> extras = new ArrayList<String>();
|
| | |
| | | };
|
| | | add(extrasView);
|
| | | }
|
| | |
|
| | | public void disablePageLink(String pageName) {
|
| | | for (String wicketId : knownPages.keySet()) {
|
| | | String key = knownPages.get(wicketId);
|
| | | String linkName = getString(key);
|
| | | if (linkName.equals(pageName)) {
|
| | | Component c = get(wicketId);
|
| | | c.setEnabled(false);
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | | } |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?>
|
| | | <html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd">
|
| | | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
| | | <html xmlns="http://www.w3.org/1999/xhtml" |
| | | xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.3-strict.dtd" |
| | | xml:lang="en" |
| | | lang="en"> |
| | |
|
| | | <wicket:panel>
|
| | | <!-- page path links -->
|
| | | <div class="page_path">
|
| | |
| | | <?xml version="1.0" encoding="UTF-8"?>
|
| | | <html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd">
|
| | | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
| | | <html xmlns="http://www.w3.org/1999/xhtml" |
| | | xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.3-strict.dtd" |
| | | xml:lang="en" |
| | | lang="en"> |
| | |
|
| | | <wicket:panel>
|
| | | <div class="link">
|
| | | <span wicket:id="diff"></span> | <span wicket:id="blob"></span> | <span wicket:id="history"></span>
|
| | | <a wicket:id="diff"><wicket:message key="gb.diff"></wicket:message></a> | <a wicket:id="view"><wicket:message key="gb.view"></wicket:message></a> | <a wicket:id="history"><wicket:message key="gb.history"></wicket:message></a>
|
| | | </div>
|
| | | </wicket:panel>
|
| | | </html> |
| | |
| | | package com.gitblit.wicket.panels;
|
| | |
|
| | | import org.apache.wicket.PageParameters;
|
| | | import org.apache.wicket.markup.html.basic.Label;
|
| | | import org.apache.wicket.markup.html.panel.Panel;
|
| | | import org.apache.wicket.markup.html.link.BookmarkablePageLink;
|
| | |
|
| | | import com.gitblit.wicket.LinkPanel;
|
| | | import com.gitblit.wicket.models.PathModel;
|
| | | import com.gitblit.wicket.pages.BlobPage;
|
| | | import com.gitblit.wicket.pages.DiffPage;
|
| | |
|
| | |
|
| | | public class PathLinksPanel extends Panel {
|
| | | public class PathLinksPanel extends BasePanel {
|
| | |
|
| | | private static final long serialVersionUID = 1L;
|
| | |
|
| | | public PathLinksPanel(String id, String repositoryName, PathModel path) {
|
| | | super(id);
|
| | | add(new LinkPanel("diff", null, "diff", DiffPage.class, new PageParameters("p=" + repositoryName + ",h=" + path.commitId + ",f=" + path.path)));
|
| | | add(new LinkPanel("blob", null, "view", BlobPage.class, new PageParameters("p=" + repositoryName + ",h=" + path.commitId + ",f=" + path.path)));
|
| | | add(new Label("history", "history"));
|
| | | add(new BookmarkablePageLink<Void>("diff", DiffPage.class, new PageParameters("p=" + repositoryName + ",h=" + path.commitId + ",f=" + path.path)));
|
| | | add(new BookmarkablePageLink<Void>("view", BlobPage.class, new PageParameters("p=" + repositoryName + ",h=" + path.commitId + ",f=" + path.path)));
|
| | | add(new BookmarkablePageLink<Void>("history", BlobPage.class, new PageParameters()).setEnabled(false));
|
| | | }
|
| | | } |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?>
|
| | | <html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd">
|
| | | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
| | | <html xmlns="http://www.w3.org/1999/xhtml" |
| | | xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.3-strict.dtd" |
| | | xml:lang="en" |
| | | lang="en"> |
| | |
|
| | | <wicket:panel>
|
| | | <span class="refs" wicket:id="ref">
|
| | | <span wicket:id="refName">ref</span>
|
| | |
| | | <?xml version="1.0" encoding="UTF-8"?>
|
| | | <html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd">
|
| | | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
| | | <html xmlns="http://www.w3.org/1999/xhtml" |
| | | xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.3-strict.dtd" |
| | | xml:lang="en" |
| | | lang="en"> |
| | |
|
| | | <wicket:panel>
|
| | | <div class="link">
|
| | | <span wicket:id="commit"></span> | <span wicket:id="commitdiff"></span> | <span wicket:id="tree"></span>
|
| | | <a wicket:id="commit"><wicket:message key="gb.commit"></wicket:message></a> | <a wicket:id="commitdiff"><wicket:message key="gb.commitdiff"></wicket:message></a> | <a wicket:id="tree"><wicket:message key="gb.tree"></wicket:message></a>
|
| | | </div>
|
| | | </wicket:panel>
|
| | | </html> |
| | |
| | | package com.gitblit.wicket.panels;
|
| | |
|
| | | import org.apache.wicket.PageParameters;
|
| | | import org.apache.wicket.markup.html.panel.Panel;
|
| | | import org.apache.wicket.markup.html.link.BookmarkablePageLink;
|
| | |
|
| | | import com.gitblit.wicket.LinkPanel;
|
| | | import com.gitblit.wicket.pages.CommitPage;
|
| | | import com.gitblit.wicket.pages.DiffPage;
|
| | | import com.gitblit.wicket.pages.TreePage;
|
| | |
|
| | |
|
| | | public class ShortLogLinksPanel extends Panel {
|
| | | public class ShortLogLinksPanel extends BasePanel {
|
| | |
|
| | | private static final long serialVersionUID = 1L;
|
| | |
|
| | | public ShortLogLinksPanel(String id, String repositoryName, String commitId) {
|
| | | super(id);
|
| | |
|
| | | add(new LinkPanel("commit", null, "commit", CommitPage.class, new PageParameters("p=" + repositoryName + ",h=" + commitId)));
|
| | | add(new LinkPanel("commitdiff", null, "commitdiff", DiffPage.class, new PageParameters("p=" + repositoryName + ",h=" + commitId)));
|
| | | add(new LinkPanel("tree", null, "tree", TreePage.class, new PageParameters("p=" + repositoryName + ",h=" + commitId)));
|
| | | add(new BookmarkablePageLink<Void>("commit", CommitPage.class, new PageParameters("p=" + repositoryName + ",h=" + commitId)));
|
| | | add(new BookmarkablePageLink<Void>("commitdiff", DiffPage.class, new PageParameters("p=" + repositoryName + ",h=" + commitId)));
|
| | | add(new BookmarkablePageLink<Void>("tree", TreePage.class, new PageParameters("p=" + repositoryName + ",h=" + commitId)));
|
| | | }
|
| | | } |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?>
|
| | | <html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd">
|
| | | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
| | | <html xmlns="http://www.w3.org/1999/xhtml" |
| | | xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.3-strict.dtd" |
| | | xml:lang="en" |
| | | lang="en"> |
| | |
|
| | | <wicket:panel>
|
| | | <div class="link">
|
| | | <span wicket:id="commit"></span> | <span wicket:id="shortlog"></span>
|
| | | <a wicket:id="commit"><wicket:message key="gb.commit"></wicket:message></a> | <a wicket:id="shortlog"><wicket:message key="gb.shortlog"></wicket:message></a>
|
| | | </div>
|
| | | </wicket:panel>
|
| | | </html> |
| | |
| | | package com.gitblit.wicket.panels;
|
| | |
|
| | | import org.apache.wicket.PageParameters;
|
| | | import org.apache.wicket.markup.html.panel.Panel;
|
| | | import org.apache.wicket.markup.html.link.BookmarkablePageLink;
|
| | |
|
| | | import com.gitblit.wicket.LinkPanel;
|
| | | import com.gitblit.wicket.models.RefModel;
|
| | | import com.gitblit.wicket.pages.CommitPage;
|
| | | import com.gitblit.wicket.pages.ShortLogPage;
|
| | |
|
| | |
|
| | | public class TagLinksPanel extends Panel {
|
| | | public class TagLinksPanel extends BasePanel {
|
| | |
|
| | | private static final long serialVersionUID = 1L;
|
| | |
|
| | | public TagLinksPanel(String id, String repositoryName, RefModel tag) {
|
| | | super(id);
|
| | | add(new LinkPanel("commit", null, "commit", CommitPage.class, new PageParameters("p=" + repositoryName + ",h=" + tag.getCommitId().getName())));
|
| | | add(new LinkPanel("shortlog", null, "shortlog", ShortLogPage.class, new PageParameters("p=" + repositoryName + ",h=" + tag.getName())));
|
| | | add(new BookmarkablePageLink<Void>("commit", CommitPage.class, new PageParameters("p=" + repositoryName + ",h=" + tag.getCommitId().getName())));
|
| | | add(new BookmarkablePageLink<Void>("shortlog", ShortLogPage.class, new PageParameters("p=" + repositoryName + ",h=" + tag.getName())));
|
| | | }
|
| | | } |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?>
|
| | | <html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd">
|
| | | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
| | | <html xmlns="http://www.w3.org/1999/xhtml" |
| | | xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.3-strict.dtd" |
| | | xml:lang="en" |
| | | lang="en"> |
| | |
|
| | | <wicket:panel>
|
| | | <div class="link">
|
| | | <span wicket:id="link"></span> | <span wicket:id="raw"></span> | <span wicket:id="history"></span>
|
| | | <a wicket:id="view"><wicket:message key="gb.view"></wicket:message></a> | <a wicket:id="raw"><wicket:message key="gb.raw"></wicket:message></a> | <a wicket:id="history"><wicket:message key="gb.history"></wicket:message></a>
|
| | | </div>
|
| | | </wicket:panel>
|
| | | </html> |
| | |
| | | package com.gitblit.wicket.panels;
|
| | |
|
| | | import org.apache.wicket.PageParameters;
|
| | | import org.apache.wicket.markup.html.basic.Label;
|
| | | import org.apache.wicket.markup.html.panel.Panel;
|
| | | import org.apache.wicket.markup.html.link.BookmarkablePageLink;
|
| | |
|
| | | import com.gitblit.wicket.LinkPanel;
|
| | | import com.gitblit.wicket.models.PathModel;
|
| | | import com.gitblit.wicket.pages.BlobPage;
|
| | |
|
| | |
|
| | | public class TreeBlobLinksPanel extends Panel {
|
| | | public class TreeBlobLinksPanel extends BasePanel {
|
| | |
|
| | | private static final long serialVersionUID = 1L;
|
| | |
|
| | | public TreeBlobLinksPanel(String id, String repositoryName, PathModel path) {
|
| | | super(id);
|
| | | add(new LinkPanel("link", null, "view", BlobPage.class, new PageParameters("p=" + repositoryName + ",h=" + path.commitId + ",f=" + path.path)));
|
| | | add(new Label("raw", "raw"));
|
| | | add(new Label("history", "history"));
|
| | | add(new BookmarkablePageLink<Void>("view", BlobPage.class, new PageParameters("p=" + repositoryName + ",h=" + path.commitId + ",f=" + path.path)));
|
| | | add(new BookmarkablePageLink<Void>("raw", BlobPage.class, new PageParameters()).setEnabled(false));
|
| | | add(new BookmarkablePageLink<Void>("history", BlobPage.class, new PageParameters()).setEnabled(false));
|
| | | }
|
| | | } |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?>
|
| | | <html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd">
|
| | | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
| | | <html xmlns="http://www.w3.org/1999/xhtml" |
| | | xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.3-strict.dtd" |
| | | xml:lang="en" |
| | | lang="en"> |
| | |
|
| | | <wicket:panel>
|
| | | <div class="link">
|
| | | <span wicket:id="link"></span> | <span wicket:id="history"></span>
|
| | | <a wicket:id="tree"><wicket:message key="gb.tree"></wicket:message></a> | <a wicket:id="history"><wicket:message key="gb.history"></wicket:message></a>
|
| | | </div>
|
| | | </wicket:panel>
|
| | | </html> |
| | |
| | | package com.gitblit.wicket.panels;
|
| | |
|
| | | import org.apache.wicket.PageParameters;
|
| | | import org.apache.wicket.markup.html.basic.Label;
|
| | | import org.apache.wicket.markup.html.panel.Panel;
|
| | | import org.apache.wicket.markup.html.link.BookmarkablePageLink;
|
| | |
|
| | | import com.gitblit.wicket.LinkPanel;
|
| | | import com.gitblit.wicket.models.PathModel;
|
| | | import com.gitblit.wicket.pages.TreePage;
|
| | |
|
| | |
|
| | | public class TreeLinksPanel extends Panel {
|
| | | public class TreeLinksPanel extends BasePanel {
|
| | |
|
| | | private static final long serialVersionUID = 1L;
|
| | |
|
| | | public TreeLinksPanel(String id, String repositoryName, PathModel path) {
|
| | | super(id);
|
| | | add(new LinkPanel("link", null, "tree", TreePage.class, new PageParameters("p=" + repositoryName + ",h=" + path.commitId + ",f=" + path.path)));
|
| | | add(new Label("history", "history"));
|
| | | add(new BookmarkablePageLink<Void>("tree", TreePage.class, new PageParameters("p=" + repositoryName + ",h=" + path.commitId + ",f=" + path.path)));
|
| | | add(new BookmarkablePageLink<Void>("history", TreePage.class, new PageParameters()).setEnabled(false));
|
| | | }
|
| | | } |
| | |
| | |
|
| | | td.date {
|
| | | font-style: italic;
|
| | | width:90px;
|
| | | }
|
| | |
|
| | | td.sha1, td.sha1 span {
|