if (app().settings().getBoolean(Keys.web.generateActivityGraph, true)) {\r
Charts charts = createCharts(recentActivity);\r
add(charts);\r
- add(new Fragment("chartsPanel", "chartsFragment", this));\r
+ add(new Fragment("chartsPanel", "chartsFragment", ActivityPage.this));\r
} else {\r
add(new Label("chartsPanel").setVisible(false));\r
}\r
add(new Label("comparison").setVisible(false));
} else {
// active comparison
- Fragment comparison = new Fragment("comparison", "comparisonFragment", this);
+ Fragment comparison = new Fragment("comparison", "comparisonFragment", ComparePage.this);
add(comparison);
RevCommit fromCommit;
}\r
}\r
\r
- Fragment activityFragment = new Fragment("activity", "activityFragment", this);\r
+ Fragment activityFragment = new Fragment("activity", "activityFragment", DashboardPage.this);\r
add(activityFragment);\r
activityFragment.add(new Label("feedTitle", feedTitle));\r
if (digests.size() == 0) {\r
charts.addChart(chart);\r
\r
add(charts);\r
- frag.add(new Fragment("charts", "chartsFragment", this));\r
+ frag.add(new Fragment("charts", "chartsFragment", DashboardPage.this));\r
} else {\r
frag.add(new Label("charts").setVisible(false));\r
}\r
Fragment fragment;\r
MarkupDocument markupDoc = processor.parse(repositoryName, getBestCommitId(commit), documentPath, markupText);\r
if (MarkupSyntax.PLAIN.equals(markupDoc.syntax)) {\r
- fragment = new Fragment("doc", "plainContent", this);\r
+ fragment = new Fragment("doc", "plainContent", DocPage.this);\r
} else {\r
- fragment = new Fragment("doc", "markupContent", this);\r
+ fragment = new Fragment("doc", "markupContent", DocPage.this);\r
}\r
\r
// document page links\r
Fragment fragment = null;\r
if (roots.isEmpty()) {\r
// no identified root documents\r
- fragment = new Fragment("docs", "noIndexFragment", this);\r
+ fragment = new Fragment("docs", "noIndexFragment", DocsPage.this);\r
setResponsePage(NoDocsPage.class, params);\r
} else {\r
// root documents, use tabbed ui of index/root and document list\r
- fragment = new Fragment("docs", "tabsFragment", this);\r
+ fragment = new Fragment("docs", "tabsFragment", DocsPage.this);\r
ListDataProvider<MarkupDocument> docDp = new ListDataProvider<MarkupDocument>(roots);\r
\r
// tab titles\r
\r
// document list\r
final ByteFormat byteFormat = new ByteFormat();\r
- Fragment docs = new Fragment("documents", "documentsFragment", this);\r
+ Fragment docs = new Fragment("documents", "documentsFragment", DocsPage.this);\r
ListDataProvider<PathModel> pathsDp = new ListDataProvider<PathModel>(paths);\r
DataView<PathModel> pathsView = new DataView<PathModel>("document", pathsDp) {\r
private static final long serialVersionUID = 1L;\r
final Model<String> commitMessage = new Model<String>("Document update");
final Model<String> commitIdAtLoad = new Model<String>(displayedCommitId);
- fragment = new Fragment("doc", "markupContent", this);
+ fragment = new Fragment("doc", "markupContent", EditFilePage.this);
Form<Void> form = new Form<Void>("documentEditor") {
MarkupDocument markupDoc = processor.parse(repositoryName, displayedCommitId, documentPath, markupText);
final Model<String> documentContent = new Model<String>(markupDoc.html);
- fragment = new Fragment("doc", "plainContent", this);
+ fragment = new Fragment("doc", "plainContent", EditFilePage.this);
fragment.add(new Label("content", documentContent).setEscapeModelStrings(false));
}
} else {\r
statusChoices = Arrays.asList(TicketModel.Status.requestWorkflow);\r
}\r
- Fragment status = new Fragment("status", "statusFragment", this);\r
+ Fragment status = new Fragment("status", "statusFragment", EditTicketPage.this);\r
status.add(new DropDownChoice<TicketModel.Status>("status", statusModel, statusChoices));\r
form.add(status);\r
\r
}\r
Collections.sort(responsibles);\r
responsibles.add(new TicketResponsible(NIL, "", ""));\r
- Fragment responsible = new Fragment("responsible", "responsibleFragment", this);\r
+ Fragment responsible = new Fragment("responsible", "responsibleFragment", EditTicketPage.this);\r
responsible.add(new DropDownChoice<TicketResponsible>("responsible", responsibleModel, responsibles));\r
form.add(responsible.setVisible(!responsibles.isEmpty()));\r
\r
}\r
\r
// milestone\r
- Fragment milestone = new Fragment("milestone", "milestoneFragment", this);\r
+ Fragment milestone = new Fragment("milestone", "milestoneFragment", EditTicketPage.this);\r
milestone.add(new DropDownChoice<TicketMilestone>("milestone", milestoneModel, milestones));\r
form.add(milestone.setVisible(!milestones.isEmpty()));\r
\r
// priority\r
- Fragment priority = new Fragment("priority", "priorityFragment", this);\r
+ Fragment priority = new Fragment("priority", "priorityFragment", EditTicketPage.this);\r
List<TicketModel.Priority> priorityChoices = Arrays.asList(TicketModel.Priority.choices());\r
priority.add(new DropDownChoice<TicketModel.Priority>("priority", priorityModel, priorityChoices));\r
form.add(priority);\r
branches.remove(Repository.shortenRefName(getRepositoryModel().mergeTo));\r
branches.add(0, Repository.shortenRefName(getRepositoryModel().mergeTo));\r
\r
- Fragment mergeto = new Fragment("mergeto", "mergeToFragment", this);\r
+ Fragment mergeto = new Fragment("mergeto", "mergeToFragment", EditTicketPage.this);\r
mergeto.add(new DropDownChoice<String>("mergeto", mergeToModel, branches));\r
form.add(mergeto.setVisible(!branches.isEmpty()));\r
} else {\r
\r
Fragment repositoryTabs;\r
if (UserModel.ANONYMOUS.equals(user)) {\r
- repositoryTabs = new Fragment("repositoryTabs", "anonymousTabsFragment", this);\r
+ repositoryTabs = new Fragment("repositoryTabs", "anonymousTabsFragment", MyDashboardPage.this);\r
} else {\r
- repositoryTabs = new Fragment("repositoryTabs", "authenticatedTabsFragment", this);\r
+ repositoryTabs = new Fragment("repositoryTabs", "authenticatedTabsFragment", MyDashboardPage.this);\r
}\r
\r
add(repositoryTabs);\r
}\r
}\r
Collections.sort(responsibles);\r
- Fragment responsible = new Fragment("responsible", "responsibleFragment", this);\r
+ Fragment responsible = new Fragment("responsible", "responsibleFragment", NewTicketPage.this);\r
responsible.add(new DropDownChoice<TicketResponsible>("responsible", responsibleModel, responsibles));\r
form.add(responsible.setVisible(!responsibles.isEmpty()));\r
\r
// milestone\r
List<TicketMilestone> milestones = app().tickets().getMilestones(getRepositoryModel(), Status.Open);\r
- Fragment milestone = new Fragment("milestone", "milestoneFragment", this);\r
+ Fragment milestone = new Fragment("milestone", "milestoneFragment", NewTicketPage.this);\r
milestone.add(new DropDownChoice<TicketMilestone>("milestone", milestoneModel, milestones));\r
form.add(milestone.setVisible(!milestones.isEmpty()));\r
\r
// priority\r
- Fragment priority = new Fragment("priority", "priorityFragment", this);\r
+ Fragment priority = new Fragment("priority", "priorityFragment", NewTicketPage.this);\r
priority.add(new DropDownChoice<TicketModel.Priority>("priority", priorityModel, Arrays.asList(TicketModel.Priority.choices())));\r
form.add(priority);\r
\r
branches.remove(Repository.shortenRefName(getRepositoryModel().HEAD));\r
branches.add(0, Repository.shortenRefName(getRepositoryModel().HEAD));\r
\r
- Fragment mergeto = new Fragment("mergeto", "mergeToFragment", this);\r
+ Fragment mergeto = new Fragment("mergeto", "mergeToFragment", NewTicketPage.this);\r
mergeto.add(new DropDownChoice<String>("mergeto", mergeToModel, branches));\r
form.add(mergeto.setVisible(!branches.isEmpty()));\r
} else {\r
RepositoryModel model = getRepositoryModel();\r
if (StringUtils.isEmpty(model.originRepository)) {\r
if (model.isMirror) {\r
- add(new Fragment("repoIcon", "mirrorIconFragment", this));\r
- Fragment mirrorFrag = new Fragment("originRepository", "mirrorFragment", this);\r
+ add(new Fragment("repoIcon", "mirrorIconFragment", RepositoryPage.this));\r
+ Fragment mirrorFrag = new Fragment("originRepository", "mirrorFragment", RepositoryPage.this);\r
Label lbl = new Label("originRepository", MessageFormat.format(getString("gb.mirrorOf"), "<b>" + model.origin + "</b>"));\r
mirrorFrag.add(lbl.setEscapeModelStrings(false));\r
add(mirrorFrag);\r
} else {\r
if (model.isBare) {\r
- add(new Fragment("repoIcon", "repoIconFragment", this));\r
+ add(new Fragment("repoIcon", "repoIconFragment", RepositoryPage.this));\r
} else {\r
- add(new Fragment("repoIcon", "cloneIconFragment", this));\r
+ add(new Fragment("repoIcon", "cloneIconFragment", RepositoryPage.this));\r
}\r
add(new Label("originRepository", Optional.of(model.description).or("")));\r
}\r
if (origin == null) {\r
// no origin repository, show description if available\r
if (model.isBare) {\r
- add(new Fragment("repoIcon", "repoIconFragment", this));\r
+ add(new Fragment("repoIcon", "repoIconFragment", RepositoryPage.this));\r
} else {\r
- add(new Fragment("repoIcon", "cloneIconFragment", this));\r
+ add(new Fragment("repoIcon", "cloneIconFragment", RepositoryPage.this));\r
}\r
add(new Label("originRepository", Optional.of(model.description).or("")));\r
} else if (!user.canView(origin)) {\r
// show origin repository without link\r
- add(new Fragment("repoIcon", "forkIconFragment", this));\r
- Fragment forkFrag = new Fragment("originRepository", "originFragment", this);\r
+ add(new Fragment("repoIcon", "forkIconFragment", RepositoryPage.this));\r
+ Fragment forkFrag = new Fragment("originRepository", "originFragment", RepositoryPage.this);\r
forkFrag.add(new Label("originRepository", StringUtils.stripDotGit(model.originRepository)));\r
add(forkFrag);\r
} else {\r
// link to origin repository\r
- add(new Fragment("repoIcon", "forkIconFragment", this));\r
- Fragment forkFrag = new Fragment("originRepository", "originFragment", this);\r
+ add(new Fragment("repoIcon", "forkIconFragment", RepositoryPage.this));\r
+ Fragment forkFrag = new Fragment("originRepository", "originFragment", RepositoryPage.this);\r
forkFrag.add(new LinkPanel("originRepository", null, StringUtils.stripDotGit(model.originRepository),\r
SummaryPage.class, WicketUtils.newRepositoryParameter(model.originRepository)));\r
add(forkFrag);\r
}\r
\r
protected void addToolbarButton(String wicketId, String iconClass, String label, String url) {\r
- Fragment button = new Fragment(wicketId, "toolbarLinkFragment", this);\r
+ Fragment button = new Fragment(wicketId, "toolbarLinkFragment", RepositoryPage.this);\r
Label icon = new Label("icon");\r
WicketUtils.setCssClass(icon, iconClass);\r
button.add(icon);\r
value = getString("gb.missingUsername");\r
}\r
}\r
- Fragment partial = new Fragment(wicketId, "partialPersonIdent", this);\r
+ Fragment partial = new Fragment(wicketId, "partialPersonIdent", RepositoryPage.this);\r
LinkPanel link = new LinkPanel("personName", "list", value, GitSearchPage.class,\r
WicketUtils.newSearchParameter(repositoryName, objectId, value, searchType));\r
setPersonSearchTooltip(link, value, searchType);\r
partial.add(link);\r
return partial;\r
} else {\r
- Fragment fullPerson = new Fragment(wicketId, "fullPersonIdent", this);\r
+ Fragment fullPerson = new Fragment(wicketId, "fullPersonIdent", RepositoryPage.this);\r
LinkPanel nameLink = new LinkPanel("personName", "list", name, GitSearchPage.class,\r
WicketUtils.newSearchParameter(repositoryName, objectId, name, searchType));\r
setPersonSearchTooltip(nameLink, name, searchType);\r
* @return a submenu fragment
*/
private Fragment newSubmenu(String wicketId, String submenuTitle, List<MenuItem> menuItems) {
- Fragment submenu = new Fragment(wicketId, "submenuFragment", this);
+ Fragment submenu = new Fragment(wicketId, "submenuFragment", RootPage.this);
submenu.add(new Label("submenuTitle", submenuTitle).setRenderBodyOnly(true));
ListDataProvider<MenuItem> menuItemsDp = new ListDataProvider<MenuItem>(menuItems);
DataView<MenuItem> submenuItems = new DataView<MenuItem>("submenuItem", menuItemsDp) {
if (markupDoc == null || markupDoc.markup == null) {\r
add(new Label("readme").setVisible(false));\r
} else {\r
- Fragment fragment = new Fragment("readme", MarkupSyntax.PLAIN.equals(markupDoc.syntax) ? "plaintextPanel" : "markdownPanel", this);\r
+ Fragment fragment = new Fragment("readme", MarkupSyntax.PLAIN.equals(markupDoc.syntax) ? "plaintextPanel" : "markdownPanel", SummaryPage.this);\r
fragment.add(new Label("readmeFile", markupDoc.documentPath));\r
// Add the html to the page\r
Component content = new Label("readmeContent", markupDoc.html).setEscapeModelStrings(false);\r
closed = tm.getClosedTickets();\r
}\r
\r
- Fragment milestoneProgress = new Fragment("milestone", "milestoneProgressFragment", this);\r
+ Fragment milestoneProgress = new Fragment("milestone", "milestoneProgressFragment", TicketPage.this);\r
milestoneProgress.add(new LinkPanel("link", null, ticket.milestone, TicketsPage.class, milestoneParameters));\r
Label label = new Label("progress");\r
WicketUtils.setCssStyle(label, "width:" + progress + "%;");\r
/*\r
* LARGE STATUS INDICATOR WITH ICON (DISCUSSION TAB->SIDE BAR)\r
*/\r
- Fragment ticketStatus = new Fragment("ticketStatus", "ticketStatusFragment", this);\r
+ Fragment ticketStatus = new Fragment("ticketStatus", "ticketStatusFragment", TicketPage.this);\r
Label ticketIcon = TicketsUI.getStateIcon("ticketIcon", ticket);\r
ticketStatus.add(ticketIcon);\r
ticketStatus.add(new Label("ticketStatus", ticket.status.toString()));\r
/*\r
* OPEN TICKET\r
*/\r
- Fragment controls = new Fragment("controls", "openControlsFragment", this);\r
+ Fragment controls = new Fragment("controls", "openControlsFragment", TicketPage.this);\r
\r
/*\r
* STATUS\r
/*\r
* CLOSED TICKET\r
*/\r
- Fragment controls = new Fragment("controls", "closedControlsFragment", this);\r
+ Fragment controls = new Fragment("controls", "closedControlsFragment", TicketPage.this);\r
\r
String editHref = urlFor(EditTicketPage.class, params).toString();\r
controls.add(new ExternalLink("editLink", editHref, getString("gb.edit")));\r
if (comments.size() == 0) {\r
add(new Label("discussion").setVisible(false));\r
} else {\r
- Fragment discussionFragment = new Fragment("discussion", "discussionFragment", this);\r
+ Fragment discussionFragment = new Fragment("discussion", "discussionFragment", TicketPage.this);\r
ListDataProvider<Change> discussionDp = new ListDataProvider<Change>(discussion);\r
DataView<Change> discussionView = new DataView<Change>("discussion", discussionDp) {\r
private static final long serialVersionUID = 1L;\r
commitLink = mergedPatch.toString();\r
}\r
\r
- Fragment mergeFragment = new Fragment("entry", "mergeFragment", this);\r
+ Fragment mergeFragment = new Fragment("entry", "mergeFragment", TicketPage.this);\r
mergeFragment.add(new LinkPanel("commitLink", null, commitLink,\r
CommitPage.class, WicketUtils.newObjectParameter(repositoryName, resolvedBy)));\r
mergeFragment.add(new Label("toBranch", MessageFormat.format(getString("gb.toBranch"),\r
/*\r
* STATUS CHANGE\r
*/\r
- Fragment frag = new Fragment("entry", "statusFragment", this);\r
+ Fragment frag = new Fragment("entry", "statusFragment", TicketPage.this);\r
Label status = new Label("statusChange", entry.getStatus().toString());\r
String css = TicketsUI.getLozengeClass(entry.getStatus(), false);\r
WicketUtils.setCssClass(status, css);\r
String bugtraq = bugtraqProcessor().processText(getRepository(), repositoryName, entry.comment.text);\r
String comment = MarkdownUtils.transformGFM(app().settings(), bugtraq, repositoryName);\r
String safeComment = app().xssFilter().relaxed(comment);\r
- Fragment frag = new Fragment("entry", "commentFragment", this);\r
+ Fragment frag = new Fragment("entry", "commentFragment", TicketPage.this);\r
Label commentIcon = new Label("commentIcon");\r
if (entry.comment.src == CommentSource.Email) {\r
WicketUtils.setCssClass(commentIcon, "iconic-mail");\r
add(new Label("newComment").setVisible(false));\r
} else {\r
// permit user to comment\r
- Fragment newComment = new Fragment("newComment", "newCommentFragment", this);\r
+ Fragment newComment = new Fragment("newComment", "newCommentFragment", TicketPage.this);\r
AvatarImage img = new AvatarImage("newCommentAvatar", user.username, user.emailAddress,\r
"gravatar-round", avatarWidth, true);\r
newComment.add(img);\r
if (ticket.isOpen() && app().tickets().isAcceptingNewPatchsets(repository) && canPropose) {\r
// ticket & repo will accept a proposal patchset\r
// show the instructions for proposing a patchset\r
- Fragment changeIdFrag = new Fragment("patchset", "proposeFragment", this);\r
+ Fragment changeIdFrag = new Fragment("patchset", "proposeFragment", TicketPage.this);\r
changeIdFrag.add(new Label("proposeInstructions", MarkdownUtils.transformMarkdown(getString("gb.proposeInstructions"))).setEscapeModelStrings(false));\r
changeIdFrag.add(new Label("ptWorkflow", MessageFormat.format(getString("gb.proposeWith"), "Barnum")));\r
changeIdFrag.add(new Label("ptWorkflowSteps", getProposeWorkflow("propose_pt.md", repoUrl.url, ticket.number)).setEscapeModelStrings(false));\r
add(changeIdFrag);\r
} else {\r
// explain why you can't propose a patchset\r
- Fragment fragment = new Fragment("patchset", "canNotProposeFragment", this);\r
+ Fragment fragment = new Fragment("patchset", "canNotProposeFragment", TicketPage.this);\r
String reason = "";\r
if (ticket.isClosed()) {\r
reason = getString("gb.ticketIsClosed");\r
}\r
} else {\r
// show current patchset\r
- Fragment patchsetFrag = new Fragment("patchset", "patchsetFragment", this);\r
+ Fragment patchsetFrag = new Fragment("patchset", "patchsetFragment", TicketPage.this);\r
patchsetFrag.add(new Label("commitsInPatchset", MessageFormat.format(getString("gb.commitsInPatchsetN"), currentPatchset.number)));\r
\r
patchsetFrag.add(createMergePanel(user, repository));\r
/*\r
* ACTIVITY TAB\r
*/\r
- Fragment revisionHistory = new Fragment("activity", "activityFragment", this);\r
+ Fragment revisionHistory = new Fragment("activity", "activityFragment", TicketPage.this);\r
List<Change> events = new ArrayList<Change>(ticket.changes);\r
Collections.sort(events);\r
Collections.reverse(events);\r
patchsets.remove(currentPatchset);\r
Collections.reverse(patchsets);\r
\r
- Fragment panel = new Fragment(wicketId, "collapsiblePatchsetFragment", this);\r
+ Fragment panel = new Fragment(wicketId, "collapsiblePatchsetFragment", TicketPage.this);\r
\r
// patchset header\r
String ps = "<b>" + currentPatchset.number + "</b>";\r
}\r
\r
// user can review, add review controls\r
- Fragment reviewControls = new Fragment("reviewControls", "reviewControlsFragment", this);\r
+ Fragment reviewControls = new Fragment("reviewControls", "reviewControlsFragment", TicketPage.this);\r
\r
// show "approve" button if no review OR not current score\r
if (user.canApprovePatchset(repository) && (myReview == null || Score.approved != myReview.score)) {\r
if (allowMerge) {\r
if (MergeStatus.MERGEABLE == mergeStatus) {\r
// patchset can be cleanly merged to integration branch OR has already been merged\r
- Fragment mergePanel = new Fragment("mergePanel", "mergeableFragment", this);\r
+ Fragment mergePanel = new Fragment("mergePanel", "mergeableFragment", TicketPage.this);\r
mergePanel.add(new Label("mergeTitle", MessageFormat.format(getString("gb.patchsetMergeable"), ticket.mergeTo)));\r
if (user.canPush(repository)) {\r
// user can merge locally\r
return mergePanel;\r
} else if (MergeStatus.ALREADY_MERGED == mergeStatus) {\r
// patchset already merged\r
- Fragment mergePanel = new Fragment("mergePanel", "alreadyMergedFragment", this);\r
+ Fragment mergePanel = new Fragment("mergePanel", "alreadyMergedFragment", TicketPage.this);\r
mergePanel.add(new Label("mergeTitle", MessageFormat.format(getString("gb.patchsetAlreadyMerged"), ticket.mergeTo)));\r
return mergePanel;\r
} else if (MergeStatus.MISSING_INTEGRATION_BRANCH == mergeStatus) {\r
// target/integration branch is missing\r
- Fragment mergePanel = new Fragment("mergePanel", "notMergeableFragment", this);\r
+ Fragment mergePanel = new Fragment("mergePanel", "notMergeableFragment", TicketPage.this);\r
mergePanel.add(new Label("mergeTitle", MessageFormat.format(getString("gb.patchsetNotMergeable"), ticket.mergeTo)));\r
mergePanel.add(new Label("mergeMore", MessageFormat.format(getString("gb.missingIntegrationBranchMore"), ticket.mergeTo)));\r
return mergePanel;\r
} else {\r
// patchset can not be cleanly merged\r
- Fragment mergePanel = new Fragment("mergePanel", "notMergeableFragment", this);\r
+ Fragment mergePanel = new Fragment("mergePanel", "notMergeableFragment", TicketPage.this);\r
mergePanel.add(new Label("mergeTitle", MessageFormat.format(getString("gb.patchsetNotMergeable"), ticket.mergeTo)));\r
if (user.canPush(repository)) {\r
// user can merge locally\r
// merge not allowed\r
if (MergeStatus.ALREADY_MERGED == mergeStatus) {\r
// patchset already merged\r
- Fragment mergePanel = new Fragment("mergePanel", "alreadyMergedFragment", this);\r
+ Fragment mergePanel = new Fragment("mergePanel", "alreadyMergedFragment", TicketPage.this);\r
mergePanel.add(new Label("mergeTitle", MessageFormat.format(getString("gb.patchsetAlreadyMerged"), ticket.mergeTo)));\r
return mergePanel;\r
} else if (ticket.isVetoed(patchset)) {\r
// patchset has been vetoed\r
- Fragment mergePanel = new Fragment("mergePanel", "vetoedFragment", this);\r
+ Fragment mergePanel = new Fragment("mergePanel", "vetoedFragment", TicketPage.this);\r
mergePanel.add(new Label("mergeTitle", MessageFormat.format(getString("gb.patchsetNotMergeable"), ticket.mergeTo)));\r
return mergePanel;\r
} else if (repository.requireApproval) {\r
// patchset has been not been approved for merge\r
- Fragment mergePanel = new Fragment("mergePanel", "notApprovedFragment", this);\r
+ Fragment mergePanel = new Fragment("mergePanel", "notApprovedFragment", TicketPage.this);\r
mergePanel.add(new Label("mergeTitle", MessageFormat.format(getString("gb.patchsetNotApproved"), ticket.mergeTo)));\r
mergePanel.add(new Label("mergeMore", MessageFormat.format(getString("gb.patchsetNotApprovedMore"), ticket.mergeTo)));\r
return mergePanel;\r
}\r
\r
protected Component getMergeInstructions(UserModel user, RepositoryModel repository, String markupId, String infoKey) {\r
- Fragment cmd = new Fragment(markupId, "commandlineMergeFragment", this);\r
+ Fragment cmd = new Fragment(markupId, "commandlineMergeFragment", TicketPage.this);\r
cmd.add(new Label("instructions", MessageFormat.format(getString(infoKey), ticket.mergeTo)));\r
\r
// git instructions\r
protected Fragment createCopyFragment(String wicketId, String text) {\r
if (app().settings().getBoolean(Keys.web.allowFlashCopyToClipboard, true)) {\r
// clippy: flash-based copy & paste\r
- Fragment copyFragment = new Fragment(wicketId, "clippyPanel", this);\r
+ Fragment copyFragment = new Fragment(wicketId, "clippyPanel", TicketPage.this);\r
String baseUrl = WicketUtils.getGitblitURL(getRequest());\r
ShockWaveComponent clippy = new ShockWaveComponent("clippy", baseUrl + "/clippy.swf");\r
clippy.setValue("flashVars", "text=" + StringUtils.encodeURL(text));\r
return copyFragment;\r
} else {\r
// javascript: manual copy & paste with modal browser prompt dialog\r
- Fragment copyFragment = new Fragment(wicketId, "jsPanel", this);\r
+ Fragment copyFragment = new Fragment(wicketId, "jsPanel", TicketPage.this);\r
ContextImage img = WicketUtils.newImage("copyIcon", "clippy.png");\r
img.add(new JavascriptTextPrompt("onclick", "Copy to Clipboard (Ctrl+C, Enter)", text));\r
copyFragment.add(img);\r
\r
Fragment milestonePanel;\r
if (currentMilestone == null) {\r
- milestonePanel = new Fragment("milestonePanel", "noMilestoneFragment", this);\r
+ milestonePanel = new Fragment("milestonePanel", "noMilestoneFragment", TicketsPage.this);\r
add(milestonePanel);\r
} else {\r
- milestonePanel = new Fragment("milestonePanel", "milestoneProgressFragment", this);\r
+ milestonePanel = new Fragment("milestonePanel", "milestoneProgressFragment", TicketsPage.this);\r
milestonePanel.add(new Label("currentMilestone", currentMilestone.name));\r
if (currentMilestone.due == null) {\r
milestonePanel.add(new Label("currentDueDate", getString("gb.notSpecified")));\r
add(milestonePanel);\r
}\r
\r
- Fragment milestoneDropdown = new Fragment("milestoneDropdown", "milestoneDropdownFragment", this);\r
+ Fragment milestoneDropdown = new Fragment("milestoneDropdown", "milestoneDropdownFragment", TicketsPage.this);\r
PageParameters resetMilestone = queryParameters(queryParam, null, statiiParam, assignedToParam, sortBy, desc, 1);\r
milestoneDropdown.add(new BookmarkablePageLink<Void>("resetMilestone", TicketsPage.class, resetMilestone));\r
\r
if (dynamicQueries.size() == 0) {\r
add(new Label("dynamicQueries").setVisible(false));\r
} else {\r
- Fragment fragment = new Fragment("dynamicQueries", "dynamicQueriesFragment", this);\r
+ Fragment fragment = new Fragment("dynamicQueries", "dynamicQueriesFragment", TicketsPage.this);\r
ListDataProvider<TicketQuery> dynamicQueriesDp = new ListDataProvider<TicketQuery>(new ArrayList<TicketQuery>(dynamicQueries));\r
DataView<TicketQuery> dynamicQueriesList = new DataView<TicketQuery>("dynamicQuery", dynamicQueriesDp) {\r
private static final long serialVersionUID = 1L;\r
\r
@Override\r
public void populateItem(final Item<TicketMilestone> item) {\r
- Fragment entryPanel = new Fragment("entryPanel", "milestoneListFragment", this);\r
+ Fragment entryPanel = new Fragment("entryPanel", "milestoneListFragment", TicketsPage.this);\r
item.add(entryPanel);\r
\r
final TicketMilestone tm = item.getModelObject();\r
// re-load milestone with query results\r
TicketMilestone m = app().tickets().getMilestone(getRepositoryModel(), tm.name);\r
\r
- Fragment milestonePanel = new Fragment("milestonePanel", "openMilestoneFragment", this);\r
+ Fragment milestonePanel = new Fragment("milestonePanel", "openMilestoneFragment", TicketsPage.this);\r
Label label = new Label("progress");\r
WicketUtils.setCssStyle(label, "width:" + m.getProgress() + "%;");\r
milestonePanel.add(label);\r
WicketUtils.newPathParameter(repositoryName, id, entry.path)));\r
\r
// links\r
- Fragment links = new Fragment("pathLinks", "treeLinks", this);\r
+ Fragment links = new Fragment("pathLinks", "treeLinks", TreePage.this);\r
links.add(new BookmarkablePageLink<Void>("tree", TreePage.class,\r
WicketUtils.newPathParameter(repositoryName, id, entry.path)));\r
links.add(new BookmarkablePageLink<Void>("history", HistoryPage.class,\r
TreePage.class, WicketUtils.newPathParameter(submodulePath, submoduleId, ""))\r
.setEnabled(hasSubmodule));\r
\r
- Fragment links = new Fragment("pathLinks", "submoduleLinks", this);\r
+ Fragment links = new Fragment("pathLinks", "submoduleLinks", TreePage.this);\r
links.add(new BookmarkablePageLink<Void>("view", SummaryPage.class,\r
WicketUtils.newRepositoryParameter(submodulePath)).setEnabled(hasSubmodule));\r
links.add(new BookmarkablePageLink<Void>("tree", TreePage.class,\r
item.add(new Label("pathSize", byteFormat.format(entry.size)));\r
\r
// links\r
- Fragment links = new Fragment("pathLinks", "blobLinks", this);\r
+ Fragment links = new Fragment("pathLinks", "blobLinks", TreePage.this);\r
\r
if (entry.isFilestoreItem()) {\r
item.add(new LinkPanel("pathName", "list", displayPath, new Link<Object>("link", null) {\r
\r
// add the preferences tab\r
add(new Fragment("preferencesLink", "preferencesLinkFragment", this).setRenderBodyOnly(true));\r
- Fragment fragment = new Fragment("preferencesTab", "preferencesTabFragment", this);\r
+ Fragment fragment = new Fragment("preferencesTab", "preferencesTabFragment", UserPage.this);\r
fragment.add(prefs);\r
add(fragment.setRenderBodyOnly(true));\r
}\r
\r
private void addSshKeys(final UserModel user) {\r
- Fragment keysTab = new Fragment("sshKeysTab", "sshKeysTabFragment", this);\r
+ Fragment keysTab = new Fragment("sshKeysTab", "sshKeysTabFragment", UserPage.this);\r
keysTab.add(new SshKeysPanel("sshKeysPanel", user));\r
\r
// add the SSH keys tab\r
- add(new Fragment("sshKeysLink", "sshKeysLinkFragment", this).setRenderBodyOnly(true));\r
+ add(new Fragment("sshKeysLink", "sshKeysLinkFragment", UserPage.this).setRenderBodyOnly(true));\r
add(keysTab.setRenderBodyOnly(true));\r
}\r
\r
add(policiesGroup);\r
\r
if (app().settings().getBoolean(Keys.web.allowForking, true)) {\r
- Fragment fragment = new Fragment("allowForks", "allowForksFragment", this);\r
+ Fragment fragment = new Fragment("allowForks", "allowForksFragment", AccessPolicyPanel.this);\r
fragment.add(new BooleanOption("allowForks",\r
getString("gb.allowForks"),\r
getString("gb.allowForksDescription"),\r
item.add(shortlog);\r
\r
if (maxCount <= 0) {\r
- Fragment fragment = new Fragment("branchLinks", showDelete? "branchPageAdminLinks" : "branchPageLinks", this);\r
+ Fragment fragment = new Fragment("branchLinks", showDelete? "branchPageAdminLinks" : "branchPageLinks", BranchesPanel.this);\r
fragment.add(new BookmarkablePageLink<Void>("log", LogPage.class, shortUniqRef));\r
fragment.add(new BookmarkablePageLink<Void>("tree", TreePage.class, shortUniqRef));\r
String rawUrl = RawServlet.asLink(getContextUrl(), model.name, Repository.shortenRefName(entry.getName()), null);\r
}\r
item.add(fragment);\r
} else {\r
- Fragment fragment = new Fragment("branchLinks", "branchPanelLinks", this);\r
+ Fragment fragment = new Fragment("branchLinks", "branchPanelLinks", BranchesPanel.this);\r
fragment.add(new BookmarkablePageLink<Void>("log", LogPage.class, shortUniqRef));\r
fragment.add(new BookmarkablePageLink<Void>("tree", TreePage.class, shortUniqRef));\r
String rawUrl = RawServlet.asLink(getContextUrl(), model.name, Repository.shortenRefName(entry.getName()), null);\r
WicketUtils.setHtmlTooltip(commitHash, entry.getName());\r
item.add(commitHash);\r
\r
- Fragment links = new Fragment("historyLinks", "treeLinks", this);\r
+ Fragment links = new Fragment("historyLinks", "treeLinks", HistoryPanel.this);\r
links.add(new BookmarkablePageLink<Void>("commitdiff", CommitDiffPage.class,\r
WicketUtils.newObjectParameter(repositoryName, entry.getName())));\r
item.add(links);\r
WicketUtils.setHtmlTooltip(commitHash, submoduleId);\r
item.add(commitHash.setEnabled(hasSubmodule));\r
}\r
- Fragment links = new Fragment("historyLinks", "treeLinks", this);\r
+ Fragment links = new Fragment("historyLinks", "treeLinks", HistoryPanel.this);\r
links.add(new BookmarkablePageLink<Void>("commitdiff", CommitDiffPage.class,\r
WicketUtils.newObjectParameter(repositoryName, entry.getName())));\r
item.add(links);\r
WicketUtils.setHtmlTooltip(commitHash, entry.getName());\r
item.add(commitHash);\r
\r
- Fragment links = new Fragment("historyLinks", "blobLinks", this);\r
+ Fragment links = new Fragment("historyLinks", "blobLinks", HistoryPanel.this);\r
links.add(new BookmarkablePageLink<Void>("commitdiff", CommitDiffPage.class,\r
WicketUtils.newObjectParameter(repositoryName, entry.getName())));\r
links.add(new BookmarkablePageLink<Void>("difftocurrent", BlobDiffPage.class,\r
\r
Fragment iconFragment;\r
if (entry.isMirror) {\r
- iconFragment = new Fragment("repoIcon", "mirrorIconFragment", this);\r
+ iconFragment = new Fragment("repoIcon", "mirrorIconFragment", ProjectRepositoryPanel.this);\r
} else if (entry.isFork()) {\r
- iconFragment = new Fragment("repoIcon", "forkIconFragment", this);\r
+ iconFragment = new Fragment("repoIcon", "forkIconFragment", ProjectRepositoryPanel.this);\r
} else if (entry.isBare) {\r
- iconFragment = new Fragment("repoIcon", "repoIconFragment", this);\r
+ iconFragment = new Fragment("repoIcon", "repoIconFragment", ProjectRepositoryPanel.this);\r
} else {\r
- iconFragment = new Fragment("repoIcon", "cloneIconFragment", this);\r
+ iconFragment = new Fragment("repoIcon", "cloneIconFragment", ProjectRepositoryPanel.this);\r
}\r
if (showSwatch) {\r
WicketUtils.setCssStyle(iconFragment, "color:" + StringUtils.getColor(entry.toString()));\r
if (StringUtils.isEmpty(entry.originRepository)) {\r
add(new Label("originRepository").setVisible(false));\r
} else {\r
- Fragment forkFrag = new Fragment("originRepository", "originFragment", this);\r
+ Fragment forkFrag = new Fragment("originRepository", "originFragment", ProjectRepositoryPanel.this);\r
forkFrag.add(new LinkPanel("originRepository", null, StringUtils.stripDotGit(entry.originRepository),\r
SummaryPage.class, WicketUtils.newRepositoryParameter(entry.originRepository)));\r
add(forkFrag);\r
}\r
Fragment repositoryLinks;\r
if (user.canAdmin(entry)) {\r
- repositoryLinks = new Fragment("repositoryLinks", "repositoryOwnerLinks", this);\r
+ repositoryLinks = new Fragment("repositoryLinks", "repositoryOwnerLinks", ProjectRepositoryPanel.this);\r
repositoryLinks.add(new BookmarkablePageLink<Void>("editRepository", EditRepositoryPage.class,\r
WicketUtils.newRepositoryParameter(entry.name)));\r
} else {\r
- repositoryLinks = new Fragment("repositoryLinks", "repositoryUserLinks", this);\r
+ repositoryLinks = new Fragment("repositoryLinks", "repositoryUserLinks", ProjectRepositoryPanel.this);\r
}\r
\r
repositoryLinks.add(new BookmarkablePageLink<Void>("tree", TreePage.class, WicketUtils\r
\r
protected Fragment createPrimaryUrlPanel(String wicketId, final RepositoryModel repository, List<RepositoryUrl> repositoryUrls) {\r
\r
- Fragment urlPanel = new Fragment(wicketId, "repositoryUrlFragment", this);\r
+ Fragment urlPanel = new Fragment(wicketId, "repositoryUrlFragment", RepositoryUrlPanel.this);\r
urlPanel.setRenderBodyOnly(true);\r
\r
if (repositoryUrls.size() == 1) {\r
public void populateItem(final Item<RepositoryUrl> item) {\r
RepositoryUrl repoUrl = item.getModelObject();\r
// repository url\r
- Fragment fragment = new Fragment("repoUrl", "actionFragment", this);\r
+ Fragment fragment = new Fragment("repoUrl", "actionFragment", RepositoryUrlPanel.this);\r
Component content = new Label("content", repoUrl.url).setRenderBodyOnly(true);\r
WicketUtils.setCssClass(content, "commandMenuItem");\r
fragment.add(content);\r
}\r
};\r
\r
- Fragment urlMenuFragment = new Fragment("menu", "urlProtocolMenuFragment", this);\r
+ Fragment urlMenuFragment = new Fragment("menu", "urlProtocolMenuFragment", RepositoryUrlPanel.this);\r
urlMenuFragment.setRenderBodyOnly(true);\r
urlMenuFragment.add(new Label("menuText", getString("gb.url")));\r
urlMenuFragment.add(repoUrlMenuItems);\r
return;\r
}\r
\r
- Fragment appMenu = new Fragment("appMenu", "appMenuFragment", this);\r
+ Fragment appMenu = new Fragment("appMenu", "appMenuFragment", RepositoryUrlPanel.this);\r
appMenu.setRenderBodyOnly(true);\r
item.add(appMenu);\r
\r
@Override\r
public void populateItem(final Item<RepositoryUrl> repoLinkItem) {\r
RepositoryUrl repoUrl = repoLinkItem.getModelObject();\r
- Fragment fragment = new Fragment("actionItem", "actionFragment", this);\r
+ Fragment fragment = new Fragment("actionItem", "actionFragment", RepositoryUrlPanel.this);\r
fragment.add(createPermissionBadge("permission", repoUrl));\r
\r
if (!StringUtils.isEmpty(clientApp.cloneUrl)) {\r
}\r
};\r
\r
- Fragment applicationMenus = new Fragment(wicketId, "applicationMenusFragment", this);\r
+ Fragment applicationMenus = new Fragment(wicketId, "applicationMenusFragment", RepositoryUrlPanel.this);\r
applicationMenus.add(appMenus);\r
return applicationMenus;\r
}\r
protected Fragment createCopyFragment(String text) {\r
if (app().settings().getBoolean(Keys.web.allowFlashCopyToClipboard, true)) {\r
// clippy: flash-based copy & paste\r
- Fragment copyFragment = new Fragment("copyFunction", "clippyPanel", this);\r
+ Fragment copyFragment = new Fragment("copyFunction", "clippyPanel", RepositoryUrlPanel.this);\r
String baseUrl = WicketUtils.getGitblitURL(getRequest());\r
ShockWaveComponent clippy = new ShockWaveComponent("clippy", baseUrl + "/clippy.swf");\r
clippy.setValue("flashVars", "text=" + StringUtils.encodeURL(text));\r
return copyFragment;\r
} else {\r
// javascript: manual copy & paste with modal browser prompt dialog\r
- Fragment copyFragment = new Fragment("copyFunction", "jsPanel", this);\r
+ Fragment copyFragment = new Fragment("copyFunction", "jsPanel", RepositoryUrlPanel.this);\r
ContextImage img = WicketUtils.newImage("copyIcon", "clippy.png");\r
img.add(new JavascriptTextPrompt("onclick", "Copy to Clipboard (Ctrl+C, Enter)", text));\r
copyFragment.add(img);\r
}\r
\r
protected Component createRepositoryIndicators(RepositoryModel repository) {\r
- Fragment fragment = new Fragment("repositoryIndicators", "indicatorsFragment", this);\r
+ Fragment fragment = new Fragment("repositoryIndicators", "indicatorsFragment", RepositoryUrlPanel.this);\r
if (repository.isBare) {\r
fragment.add(new Label("workingCopyIndicator").setVisible(false));\r
} else {\r
- Fragment wc = new Fragment("workingCopyIndicator", "workingCopyFragment", this);\r
+ Fragment wc = new Fragment("workingCopyIndicator", "workingCopyFragment", RepositoryUrlPanel.this);\r
Label lbl = new Label("workingCopy", getString("gb.workingCopy"));\r
WicketUtils.setHtmlTooltip(lbl, getString("gb.workingCopyWarning"));\r
wc.add(lbl);\r
if (hasFork || !canFork) {\r
if (user.canFork() && !repository.allowForks) {\r
// show forks prohibited indicator\r
- Fragment wc = new Fragment("forksProhibitedIndicator", "forksProhibitedFragment", this);\r
+ Fragment wc = new Fragment("forksProhibitedIndicator", "forksProhibitedFragment", RepositoryUrlPanel.this);\r
Label lbl = new Label("forksProhibited", getString("gb.forksProhibited"));\r
WicketUtils.setHtmlTooltip(lbl, getString("gb.forksProhibitedWarning"));\r
wc.add(lbl);\r
}\r
item.add(messageLink);\r
\r
- Fragment fragment = new Fragment("tagLinks", "blobLinks", this);\r
+ Fragment fragment = new Fragment("tagLinks", "blobLinks", TagsPanel.this);\r
fragment.add(new BookmarkablePageLink<Void>("tag", TagPage.class, WicketUtils\r
.newObjectParameter(repositoryName, entry.getObjectId().getName()))\r
.setEnabled(entry.isAnnotatedTag()));\r
}\r
item.add(messageLink);\r
\r
- Fragment fragment = new Fragment("tagLinks", "annotatedLinks", this);\r
+ Fragment fragment = new Fragment("tagLinks", "annotatedLinks", TagsPanel.this);\r
fragment.add(new BookmarkablePageLink<Void>("tag", TagPage.class,\r
WicketUtils.newObjectParameter(repositoryName, entry.getObjectId()\r
.getName())).setEnabled(entry.isAnnotatedTag()));\r
item.add(new LinkPanel("tagDescription", "list", message, CommitPage.class,\r
WicketUtils.newObjectParameter(repositoryName, entry.getObjectId()\r
.getName())));\r
- Fragment fragment = new Fragment("tagLinks", "lightweightLinks", this);\r
+ Fragment fragment = new Fragment("tagLinks", "lightweightLinks", TagsPanel.this);\r
fragment.add(new BookmarkablePageLink<Void>("commit", CommitPage.class,\r
WicketUtils.newObjectParameter(repositoryName, entry\r
.getReferencedObjectId().getName())));\r
public TeamsPanel(String wicketId, final boolean showAdmin) {\r
super(wicketId);\r
\r
- Fragment adminLinks = new Fragment("adminPanel", "adminLinks", this);\r
+ Fragment adminLinks = new Fragment("adminPanel", "adminLinks", TeamsPanel.this);\r
adminLinks.add(new BookmarkablePageLink<Void>("newTeam", EditTeamPage.class));\r
add(adminLinks.setVisible(showAdmin));\r
\r
: ""));\r
item.add(new Label("repositories",\r
entry.repositories.size() > 0 ? ("" + entry.repositories.size()) : ""));\r
- Fragment teamLinks = new Fragment("teamLinks", "teamAdminLinks", this);\r
+ Fragment teamLinks = new Fragment("teamLinks", "teamAdminLinks", TeamsPanel.this);\r
teamLinks.add(new BookmarkablePageLink<Void>("editTeam", EditTeamPage.class,\r
WicketUtils.newTeamnameParameter(entry.name)));\r
Link<Void> deleteLink = new Link<Void>("deleteTeam") {\r
if (ticket.updatedAt == null) {
item.add(new Label("updated").setVisible(false));
} else {
- Fragment updated = new Fragment("updated", "updatedFragment", this);
+ Fragment updated = new Fragment("updated", "updatedFragment", TicketListPanel.this);
UserModel updater = app().users().getUserModel(ticket.updatedBy);
if (updater != null) {
updated.add(new LinkPanel("updatedBy", null, updater.getDisplayName(),
public UsersPanel(String wicketId, final boolean showAdmin) {\r
super(wicketId);\r
\r
- Fragment adminLinks = new Fragment("adminPanel", "adminLinks", this);\r
+ Fragment adminLinks = new Fragment("adminPanel", "adminLinks", UsersPanel.this);\r
adminLinks.add(new BookmarkablePageLink<Void>("newUser", EditUserPage.class));\r
add(adminLinks.setVisible(showAdmin));\r
\r
item.add(new Label("teams", entry.teams.size() > 0 ? ("" + entry.teams.size()) : ""));\r
item.add(new Label("repositories",\r
entry.permissions.size() > 0 ? ("" + entry.permissions.size()) : ""));\r
- Fragment userLinks = new Fragment("userLinks", "userAdminLinks", this);\r
+ Fragment userLinks = new Fragment("userLinks", "userAdminLinks", UsersPanel.this);\r
userLinks.add(new BookmarkablePageLink<Void>("editUser", EditUserPage.class,\r
WicketUtils.newUsernameParameter(entry.username)));\r
Link<Void> deleteLink = new Link<Void>("deleteUser") {\r