Improvements to css and specialized link panels.
2 files deleted
5 files added
19 files modified
| | |
| | | # This is a real-time graph so generation may be expensive.
|
| | | generateActivityGraph = true
|
| | |
|
| | | # The number of commits to display on the summary page
|
| | | # Value must exceed 0 else default of 20 is used
|
| | | summaryCommitCount = 20
|
| | |
|
| | | # The number of tags/heads to display on the summary page
|
| | | # Value must exceed 0 else default of 5 is used
|
| | | summaryRefsCount = 5
|
| | |
|
| | | # Registered extensions for google-code-prettify
|
| | | prettyPrintExtensions = c cpp cs css htm html java js php pl prefs properties py rb sh sql xml vb
|
| | |
|
| | |
| | | border-width: 0px;
|
| | | }
|
| | |
|
| | | img.activityGraph {
|
| | | float: right;
|
| | | border-width: 0px;
|
| | | padding: 8px;
|
| | | }
|
| | |
|
| | | div.header {
|
| | | background-color: #D2C3AF;
|
| | | padding: 3px;
|
| | |
| | | div.link {
|
| | | padding: 2px 5px;
|
| | | font-family: sans-serif;
|
| | | font-size: 9px;
|
| | | font-size: 11px;
|
| | | }
|
| | |
|
| | | div.link span {
|
| | | font-family: inherit;
|
| | | font-size: inherit;
|
| | | }
|
| | |
|
| | | div.link a {
|
| | | font-size: 9px;
|
| | | font-family: inherit;
|
| | | font-size: inherit;
|
| | | }
|
| | |
|
| | | div.page_header {
|
| | |
| | | font-family: sans-serif;
|
| | | font-weight: bold;
|
| | | font-size: 150%;
|
| | | color: #ccc;
|
| | | color: #bbb;
|
| | | background-color: #ffffff;
|
| | | }
|
| | |
|
| | |
| | | }
|
| | |
|
| | | div.page_footer {
|
| | | height: 17px;
|
| | | color: black;
|
| | | background-color: #ffffff;
|
| | | padding: 5px;
|
| | |
| | | }
|
| | |
|
| | | div.page_nav {
|
| | | color: #ccc;
|
| | | color: #ddd;
|
| | | background-color: #000070;
|
| | | padding: 5px;
|
| | | }
|
| | |
| | | }
|
| | |
|
| | | table.repositories th {
|
| | | background-color:#D3BDA1;
|
| | | padding: 5px;
|
| | | background-color:#000070;
|
| | | padding: 4px;
|
| | | border-bottom: 1px solid #bbb;
|
| | | }
|
| | |
|
| | | table.repositories td {
|
| | | padding: 4px;
|
| | | }
|
| | |
|
| | | table.repositories th a {
|
| | | color:#ddd;
|
| | | text-decoration: none;
|
| | | font-weight: normal;
|
| | | }
|
| | |
|
| | | table.repositories th a:hover {
|
| | | text-decoration: underline;
|
| | | }
|
| | |
|
| | | table.repositories th.wicket_orderDown a, table.repositories th.wicket_orderUp a {
|
| | | color: yellow;
|
| | | }
|
| | |
|
| | | tr th a { padding-right: 15px; background-position: right; background-repeat:no-repeat; }
|
| | | tr th.wicket_orderDown a {font-weight: bold; background-image: url(arrow_down.png); }
|
| | | tr th.wicket_orderUp a { font-weight: bold; background-image: url(arrow_up.png); }
|
| | | tr th.wicket_orderNone a { font-weight: normal; background-image: url(arrow_off.png); }
|
| | | tr th.wicket_orderDown a {background-image: url(arrow_down.png); }
|
| | | tr th.wicket_orderUp a { background-image: url(arrow_up.png); }
|
| | | tr th.wicket_orderNone a { background-image: url(arrow_off.png); }
|
| | |
|
| | | tr.light {
|
| | | background-color: #ffffff;
|
| | |
| | | /* currently both use the same, but it can change */
|
| | | tr.light:hover,
|
| | | tr.dark:hover {
|
| | | background-color: #f6a234;
|
| | | /*background-color: #0099b7;*/
|
| | | background-color: #000070;
|
| | | color: white;
|
| | | }
|
| | |
|
| | | tr.light:hover a,
|
| | | tr.dark:hover a {
|
| | | color: white; |
| | | }
|
| | |
|
| | | td {
|
| | |
| | | padding-right:15px;
|
| | | }
|
| | |
|
| | | td.rightAlign {
|
| | | text-align: right;
|
| | | }
|
| | |
|
| | | span.refs span {
|
| | | padding: 0px 4px;
|
| | | font-family: sans-serif;
|
| | |
| | | border: 1px solid;
|
| | | background-color: #ffaaff;
|
| | | border-color: #ffccff #ff00ee #ff00ee #ffccff;
|
| | | color: black;
|
| | | }
|
| | |
|
| | | span.refs span a {
|
| | |
| | | Collections.sort(list);
|
| | | Collections.reverse(list);
|
| | | if (maxCount > 0 && list.size() > maxCount) {
|
| | | list = list.subList(0, maxCount);
|
| | | list = new ArrayList<RefModel>(list.subList(0, maxCount));
|
| | | }
|
| | | } catch (IOException e) {
|
| | | LOGGER.error("Failed to retrieve " + refs, e);
|
| | |
| | |
|
| | | // blob page links
|
| | | add(new Label("historyLink", "history"));
|
| | | add(new Label("rawLink", "download"));
|
| | | add(new Label("rawLink", "raw"));
|
| | | add(new Label("headLink", "HEAD"));
|
| | |
|
| | | add(new LinkPanel("shortlog", "title", commit.getShortMessage(), CommitPage.class, newCommitParameter()));
|
| | |
| | | <td class="date"><span wicket:id="commitDate"></span></td>
|
| | | <td class="author"><span wicket:id="commitAuthor"></span></td>
|
| | | <td><div wicket:id="commitShortMessage"></div></td>
|
| | | <td><div wicket:id="commitRefs"></div></td> |
| | | <td><span wicket:id="commitLinks"></span></td>
|
| | | <td class="rightAlign"><div wicket:id="commitRefs"></div></td> |
| | | <td class="rightAlign"><span wicket:id="commitLinks"></span></td>
|
| | | </tr>
|
| | | </tbody>
|
| | | </table>
|
| | |
| | | <div>
|
| | | <!-- Repository Activity Chart -->
|
| | | <div style="width:50%;float:right;">
|
| | | <img style="padding-top:8px;" wicket:id="commitsChart" />
|
| | | <img class="activityGraph" wicket:id="commitsChart" />
|
| | | </div>
|
| | |
|
| | | <!-- Repository info -->
|
| | |
| | | <td class="date"><span wicket:id="commitDate"></span></td>
|
| | | <td class="author"><span wicket:id="commitAuthor"></span></td>
|
| | | <td><div wicket:id="commitShortMessage"></div></td>
|
| | | <td><div wicket:id="commitRefs"></div></td>
|
| | | <td><span wicket:id="commitLinks"></span></td>
|
| | | <td class="rightAlign"><div wicket:id="commitRefs"></div></td>
|
| | | <td class="rightAlign"><span wicket:id="commitLinks"></span></td>
|
| | | </tr>
|
| | | </tbody>
|
| | | </table>
|
| | | <div class="pager" wicket:id="shortlogMore"></div>
|
| | |
|
| | | <!-- Open additional graphs body -->
|
| | | <div style="width:25%;float:right;">
|
| | | </div>
|
| | | |
| | | <!-- Open Tags and Heads body -->
|
| | | <div style="width:65%">
|
| | | |
| | | <!-- tags -->
|
| | | <div class="header" wicket:id="tags"></div> |
| | | <!-- Open Heads Body -->
|
| | | <div style="width:34%;float:right;">
|
| | | <!-- heads -->
|
| | | <div class="header" wicket:id="heads"></div> |
| | | <table style="width:100%" class="pretty">
|
| | | <tbody>
|
| | | <tr wicket:id="tag">
|
| | | <td class="date"><span wicket:id="tagDate"></span></td>
|
| | | <td><b><div wicket:id="tagName"></div></b></td>
|
| | | <td><div wicket:id="tagDescription"></div></td>
|
| | | <td><span wicket:id="tagLinks"></span></td>
|
| | | </tr>
|
| | | </tbody>
|
| | | <tr wicket:id="head">
|
| | | <td class="date"><span wicket:id="headDate"></span></td>
|
| | | <td><div wicket:id="headName"></div></td>
|
| | | <td class="rightAlign"><span wicket:id="headLinks"></span></td>
|
| | | </tr>
|
| | | </tbody>
|
| | | </table>
|
| | | <div class="pager" wicket:id="tagsMore"></div>
|
| | |
|
| | |
|
| | | <!-- heads -->
|
| | | <div class="header" wicket:id="heads"></div> |
| | | <table style="width:100%" class="pretty">
|
| | | <tbody>
|
| | | <tr wicket:id="head">
|
| | | <td class="date"><span wicket:id="headDate"></span></td>
|
| | | <td><div wicket:id="headName"></div></td>
|
| | | <td><span wicket:id="headLinks"></span></td>
|
| | | </tr>
|
| | | </tbody>
|
| | | </table>
|
| | | <div class="pager" wicket:id="allHeads"></div>
|
| | | <!-- Close Heads Body -->
|
| | | </div>
|
| | |
|
| | | <!-- Close Tags and Heads Body -->
|
| | | <!-- Open Tags body -->
|
| | | <div style="width:65%">
|
| | | <!-- tags -->
|
| | | <div class="header" wicket:id="tags"></div> |
| | | <table style="width:100%" class="pretty">
|
| | | <tbody>
|
| | | <tr wicket:id="tag">
|
| | | <td class="date"><span wicket:id="tagDate"></span></td>
|
| | | <td><b><div wicket:id="tagName"></div></b></td>
|
| | | <td><div wicket:id="tagDescription"></div></td>
|
| | | <td class="rightAlign"><span wicket:id="tagLinks"></span></td>
|
| | | </tr>
|
| | | </tbody>
|
| | | </table>
|
| | | <div class="pager" wicket:id="allTags"></div> |
| | | <!-- Close Tags Body -->
|
| | | </div>
|
| | |
|
| | | <!-- footer -->
|
| | |
| | | import com.gitblit.wicket.WicketUtils;
|
| | | import com.gitblit.wicket.models.Metric;
|
| | | import com.gitblit.wicket.models.RefModel;
|
| | | import com.gitblit.wicket.panels.AnnotatedTagLinksPanel;
|
| | | import com.gitblit.wicket.panels.HeadLinksPanel;
|
| | | import com.gitblit.wicket.panels.RefsPanel;
|
| | | import com.gitblit.wicket.panels.ShortLogLinksPanel;
|
| | |
| | |
|
| | | public SummaryPage(PageParameters params) {
|
| | | super(params, "summary");
|
| | | |
| | | int numCommitsDef = 20;
|
| | | int numRefsDef = 5;
|
| | | |
| | | int numberCommits = StoredSettings.getInteger("summaryCommitCount", numCommitsDef);
|
| | | if (numberCommits <= 0) {
|
| | | numberCommits = numCommitsDef;
|
| | | }
|
| | |
|
| | | int numberRefs = StoredSettings.getInteger("summaryRefsCount", numRefsDef);
|
| | | if (numberRefs <= 0) {
|
| | | numberRefs = numRefsDef;
|
| | | }
|
| | | |
| | | Repository r = getRepository();
|
| | | final Map<ObjectId, List<String>> allRefs = JGitUtils.getAllRefs(r);
|
| | |
|
| | |
| | | add(new Label("repositoryLastChange", lastchange));
|
| | | add(new Label("repositoryCloneUrl", cloneurl));
|
| | |
|
| | | int summaryCount = 16;
|
| | |
|
| | | // shortlog
|
| | | add(new LinkPanel("shortlog", "title", "shortlog", ShortLogPage.class, newRepositoryParameter()));
|
| | |
|
| | | List<RevCommit> commits = JGitUtils.getRevLog(r, summaryCount);
|
| | | List<RevCommit> commits = JGitUtils.getRevLog(r, numberCommits);
|
| | | ListDataProvider<RevCommit> dp = new ListDataProvider<RevCommit>(commits);
|
| | | DataView<RevCommit> shortlogView = new DataView<RevCommit>("commit", dp) {
|
| | | private static final long serialVersionUID = 1L;
|
| | |
| | | }
|
| | | };
|
| | | add(shortlogView);
|
| | | add(new LinkPanel("shortlogMore", "link", "more...", ShortLogPage.class, newRepositoryParameter()));
|
| | | if (commits.size() < numberCommits) {
|
| | | add(new Label("shortlogMore", "").setVisible(false));
|
| | | } else {
|
| | | add(new LinkPanel("shortlogMore", "link", "more...", ShortLogPage.class, newRepositoryParameter()));
|
| | | }
|
| | |
|
| | | // tags
|
| | | List<RefModel> tags = JGitUtils.getTags(r, summaryCount);
|
| | | List<RefModel> tags = JGitUtils.getTags(r, numberRefs);
|
| | | add(new LinkPanel("tags", "title", "tags", TagsPage.class, newRepositoryParameter()));
|
| | |
|
| | | ListDataProvider<RefModel> tagsDp = new ListDataProvider<RefModel>(tags);
|
| | |
| | | item.add(new LinkPanel("tagName", "list name", entry.getDisplayName(), CommitPage.class, newCommitParameter(entry.getCommitId().getName())));
|
| | |
|
| | | if (entry.getCommitId().equals(entry.getObjectId())) {
|
| | | // lightweight tag on commit object
|
| | | // simple tag
|
| | | item.add(new Label("tagDescription", ""));
|
| | | item.add(new TagLinksPanel("tagLinks", repositoryName, entry));
|
| | | } else {
|
| | | // tag object
|
| | | // annotated tag
|
| | | item.add(new LinkPanel("tagDescription", "list subject", entry.getShortLog(), TagPage.class, newCommitParameter(entry.getObjectId().getName())));
|
| | | item.add(new AnnotatedTagLinksPanel("tagLinks", repositoryName, entry));
|
| | | }
|
| | |
|
| | | item.add(new TagLinksPanel("tagLinks", repositoryName, entry));
|
| | |
|
| | | setAlternatingBackground(item, counter);
|
| | | counter++;
|
| | | }
|
| | | };
|
| | | add(tagView);
|
| | | add(new LinkPanel("tagsMore", "link", "more...", TagsPage.class, newRepositoryParameter()));
|
| | | if (tags.size() < numberRefs) {
|
| | | add(new Label("allTags", "").setVisible(false));
|
| | | } else {
|
| | | add(new LinkPanel("allTags", "link", "all tags...", TagsPage.class, newRepositoryParameter()));
|
| | | }
|
| | |
|
| | | // heads
|
| | | List<RefModel> heads = JGitUtils.getHeads(r, summaryCount);
|
| | | List<RefModel> heads = JGitUtils.getHeads(r, numberRefs);
|
| | | add(new LinkPanel("heads", "title", "heads", HeadsPage.class, newRepositoryParameter()));
|
| | |
|
| | | ListDataProvider<RefModel> headsDp = new ListDataProvider<RefModel>(heads);
|
| | |
| | | }
|
| | | };
|
| | | add(headsView);
|
| | |
|
| | | if (heads.size() < numberRefs) {
|
| | | add(new Label("allHeads", "").setVisible(false));
|
| | | } else {
|
| | | add(new LinkPanel("allHeads", "link", "all heads...", HeadsPage.class, newRepositoryParameter()));
|
| | | }
|
| | | |
| | | // Display an activity line graph
|
| | | insertActivityGraph(r);
|
| | |
|
| | |
| | | <div wicket:id="pageLinks"></div>
|
| | |
|
| | | <!-- summary header -->
|
| | | <div class="header" wicket:id="commit"></div>
|
| | | <div style="padding-top: 5px;" class="header" wicket:id="commit"></div>
|
| | |
|
| | | <!-- commit info -->
|
| | | <table>
|
| | | <table class="plain">
|
| | | <tr><th>object</th><td><span wicket:id="tagId">Message goes here</span></td></tr>
|
| | | <tr><th>author</th><td><span wicket:id="tagAuthor">Message goes here</span></td></tr>
|
| | | <tr><th></th><td><span wicket:id="tagDate">Message goes here</span></td></tr>
|
| | | </table>
|
| | |
|
| | | <!-- full message -->
|
| | | <div class="commit_message" wicket:id="fullMessage"></div>
|
| | | <div style="border-bottom:0px;" class="commit_message" wicket:id="fullMessage"></div>
|
| | |
|
| | | <!-- footer -->
|
| | | <div wicket:id="pageFooter"></div>
|
| | |
| | | <div wicket:id="pageLinks"></div>
|
| | |
|
| | | <!-- shortlog -->
|
| | | <div class="header" wicket:id="summary"></div> |
| | | <table>
|
| | | <div style="margin-top:5px;" class="header" wicket:id="summary"></div> |
| | | <table class="pretty">
|
| | | <tbody>
|
| | | <tr wicket:id="tag">
|
| | | <td class="date"><span wicket:id="tagDate"></span></td>
|
| | | <td><b><div wicket:id="tagName"></div></b></td>
|
| | | <td><div wicket:id="tagDescription"></div></td>
|
| | | <td><span wicket:id="tagLinks"></span></td>
|
| | | <td class="rightAlign"><span wicket:id="tagLinks"></span></td>
|
| | | </tr>
|
| | | </tbody>
|
| | | </table>
|
| | |
| | | import com.gitblit.wicket.LinkPanel;
|
| | | import com.gitblit.wicket.RepositoryPage;
|
| | | import com.gitblit.wicket.models.RefModel;
|
| | | import com.gitblit.wicket.panels.AnnotatedTagLinksPanel;
|
| | | import com.gitblit.wicket.panels.TagLinksPanel;
|
| | |
|
| | |
|
| | |
| | | item.add(new LinkPanel("tagName", "list name", entry.getDisplayName(), CommitPage.class, newCommitParameter(entry.getObjectId().getName())));
|
| | |
|
| | | if (entry.getCommitId().equals(entry.getObjectId())) {
|
| | | // lightweight tag on commit object
|
| | | // simple tag on commit object
|
| | | item.add(new Label("tagDescription", ""));
|
| | | item.add(new TagLinksPanel("tagLinks", repositoryName, entry));
|
| | | } else {
|
| | | // tag object
|
| | | // annotated tag
|
| | | item.add(new LinkPanel("tagDescription", "list subject", entry.getShortLog(), TagPage.class, newCommitParameter(entry.getObjectId().getName())));
|
| | | item.add(new AnnotatedTagLinksPanel("tagLinks", repositoryName, entry));
|
| | | }
|
| | |
|
| | | item.add(new TagLinksPanel("tagLinks", repositoryName, entry));
|
| | |
|
| | | setAlternatingBackground(item, counter);
|
| | | counter++;
|
| | |
| | | <td><span wicket:id="pathName"></span></td>
|
| | | <td class="size"><span wicket:id="pathSize"></span></td>
|
| | | <td class="mode"><span wicket:id="pathPermissions"></span></td>
|
| | | <td><span wicket:id="treeLinks"></span></td>
|
| | | <td class="rightAlign"><span wicket:id="treeLinks"></span></td>
|
| | | </tr>
|
| | | </table>
|
| | |
|
| | |
| | | import com.gitblit.wicket.WicketUtils;
|
| | | import com.gitblit.wicket.models.PathModel;
|
| | | import com.gitblit.wicket.panels.PathBreadcrumbsPanel;
|
| | | import com.gitblit.wicket.panels.TreeBlobLinksPanel;
|
| | | import com.gitblit.wicket.panels.TreeLinksPanel;
|
| | |
|
| | |
|
| | |
| | | // folder/tree link
|
| | | item.add(new Label("pathSize", ""));
|
| | | item.add(new LinkPanel("pathName", null, entry.name, TreePage.class, newPathParameter(entry.path)));
|
| | | item.add(new TreeLinksPanel("treeLinks", repositoryName, entry));
|
| | | } else {
|
| | | // blob link
|
| | | item.add(new Label("pathSize", byteFormat.format(entry.size)));
|
| | | item.add(new LinkPanel("pathName", "list", entry.name, BlobPage.class, newPathParameter(entry.path)));
|
| | | item.add(new TreeBlobLinksPanel("treeLinks", repositoryName, entry));
|
| | | }
|
| | | item.add(new TreeLinksPanel("treeLinks", repositoryName, entry));
|
| | | }
|
| | | String clazz = counter % 2 == 0 ? "dark" : "light";
|
| | | WicketUtils.setCssClass(item, clazz);
|
New file |
| | |
| | | <?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">
|
| | | <wicket:panel>
|
| | | <div class="link">
|
| | | <span wicket:id="tag"></span> | <span wicket:id="commit"></span> | <span wicket:id="shortlog"></span>
|
| | | </div> |
| | | </wicket:panel>
|
| | | </html> |
New file |
| | |
| | | package com.gitblit.wicket.panels;
|
| | |
|
| | | import org.apache.wicket.PageParameters;
|
| | | import org.apache.wicket.markup.html.panel.Panel;
|
| | |
|
| | | 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 {
|
| | |
|
| | | 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())));
|
| | | }
|
| | | } |
| | |
| | | <wicket:panel>
|
| | | <div class="page_footer">
|
| | | <div style="float:right">
|
| | | <span wicket:id="gbVersion"></span> | |
| | | <a title="about git:blit" href="about">About Git:Blit</a>
|
| | | </div>
|
| | | <div wicket:id="footerText"></div>
|
| | | </div> |
| | | </div>
|
| | | </wicket:panel>
|
| | | </html> |
| | |
| | | import org.apache.wicket.markup.html.basic.Label;
|
| | | import org.apache.wicket.markup.html.panel.Panel;
|
| | |
|
| | | import com.gitblit.Constants;
|
| | | import com.gitblit.StoredSettings;
|
| | |
|
| | |
|
| | |
| | | public PageFooter(String id, String description) {
|
| | | super(id);
|
| | | add(new Label("footerText", description));
|
| | | add(new Label("gbVersion", "v" + Constants.VERSION));
|
| | | if (StoredSettings.getBoolean("aggressiveGC", false)) {
|
| | | System.gc();
|
| | | }
|
| | |
| | | <head>
|
| | | <title wicket:id="title">Message goes here</title>
|
| | | <link rel="stylesheet" type="text/css" href="gitblit.css"/>
|
| | | <link rel="shortcut icon" href="git-favicon.png" type="image/png" />
|
| | | <link rel="shortcut icon" href="gitblt-favicon.png" type="image/png" />
|
| | | </head>
|
| | |
|
| | | <div class="page_header">
|
| | |
| | | <wicket:panel>
|
| | | <!-- page nav links -->
|
| | | <div class="page_nav">
|
| | | <span wicket:id="summary"></span> | <span wicket:id="shortlog"></span> | <span wicket:id="commit"></span> | <span wicket:id="commitdiff"></span> | <span wicket:id="tree"></span>
|
| | | <span wicket:id="summary"></span> | <span wicket:id="shortlog"></span> | <span wicket:id="tags"></span> | <span wicket:id="commit"></span> | <span wicket:id="commitdiff"></span> | <span wicket:id="tree"></span>
|
| | | </div>
|
| | | </wicket:panel>
|
| | | </html> |
| | |
| | | import com.gitblit.wicket.pages.CommitPage;
|
| | | import com.gitblit.wicket.pages.ShortLogPage;
|
| | | import com.gitblit.wicket.pages.SummaryPage;
|
| | | import com.gitblit.wicket.pages.TagsPage;
|
| | | import com.gitblit.wicket.pages.TreePage;
|
| | |
|
| | |
|
| | |
| | | } else {
|
| | | add(new LinkPanel("shortlog", null, "shortlog", ShortLogPage.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)));
|
| | | }
|
| | |
|
| | | // commit
|
| | | if (pageName.equals("commit")) {
|
New file |
| | |
| | | <?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">
|
| | | <wicket:panel>
|
| | | <div class="link">
|
| | | <span wicket:id="link"></span> | <span wicket:id="raw"></span> | <span wicket:id="history"></span>
|
| | | </div> |
| | | </wicket:panel>
|
| | | </html> |
New file |
| | |
| | | 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 com.gitblit.wicket.LinkPanel;
|
| | | import com.gitblit.wicket.models.PathModel;
|
| | | import com.gitblit.wicket.pages.BlobPage;
|
| | |
|
| | |
|
| | | public class TreeBlobLinksPanel extends Panel {
|
| | |
|
| | | 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"));
|
| | | }
|
| | | } |
| | |
| | | <html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd">
|
| | | <wicket:panel>
|
| | | <div class="link">
|
| | | <span wicket:id="link"></span> | <span wicket:id="history"></span> | <span wicket:id="raw"></span>
|
| | | <span wicket:id="link"></span> | <span wicket:id="history"></span>
|
| | | </div>
|
| | | </wicket:panel>
|
| | | </html> |
| | |
| | |
|
| | | import com.gitblit.wicket.LinkPanel;
|
| | | import com.gitblit.wicket.models.PathModel;
|
| | | import com.gitblit.wicket.pages.BlobPage;
|
| | | import com.gitblit.wicket.pages.TreePage;
|
| | |
|
| | |
|
| | |
| | |
|
| | | public TreeLinksPanel(String id, String repositoryName, PathModel path) {
|
| | | super(id);
|
| | | if (path.isTree()) {
|
| | | 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 Label("raw", ""));
|
| | | } else {
|
| | | add(new LinkPanel("link", null, "view", BlobPage.class, new PageParameters("p=" + repositoryName + ",h=" + path.commitId + ",f=" + path.path)));
|
| | | add(new Label("history", "history"));
|
| | | add(new Label("raw", "download"));
|
| | | }
|
| | | add(new LinkPanel("link", null, "tree", TreePage.class, new PageParameters("p=" + repositoryName + ",h=" + path.commitId + ",f=" + path.path)));
|
| | | add(new Label("history", "history"));
|
| | | }
|
| | | } |