Search in sources :

Example 1 with DataView

use of org.apache.wicket.markup.repeater.data.DataView in project gitblit by gitblit.

the class TicketsPage method buildPager.

protected void buildPager(final String query, final String milestone, final String[] states, final String assignedTo, final String sort, final boolean desc, final int page, int pageSize, int count, int total) {
    boolean showNav = total > (2 * pageSize);
    boolean allowPrev = page > 1;
    boolean allowNext = (pageSize * (page - 1) + count) < total;
    add(new BookmarkablePageLink<Void>("prevLink", TicketsPage.class, queryParameters(query, milestone, states, assignedTo, sort, desc, page - 1)).setEnabled(allowPrev).setVisible(showNav));
    add(new BookmarkablePageLink<Void>("nextLink", TicketsPage.class, queryParameters(query, milestone, states, assignedTo, sort, desc, page + 1)).setEnabled(allowNext).setVisible(showNav));
    if (total <= pageSize) {
        add(new Label("pageLink").setVisible(false));
        return;
    }
    // determine page numbers to display
    int pages = count == 0 ? 0 : ((total / pageSize) + (total % pageSize == 0 ? 0 : 1));
    // preferred number of pagelinks
    int segments = 5;
    if (pages < segments) {
        // not enough data for preferred number of page links
        segments = pages;
    }
    int minpage = Math.min(Math.max(1, page - 2), pages - (segments - 1));
    int maxpage = Math.min(pages, minpage + (segments - 1));
    List<Integer> sequence = new ArrayList<Integer>();
    for (int i = minpage; i <= maxpage; i++) {
        sequence.add(i);
    }
    ListDataProvider<Integer> pagesDp = new ListDataProvider<Integer>(sequence);
    DataView<Integer> pagesView = new DataView<Integer>("pageLink", pagesDp) {

        private static final long serialVersionUID = 1L;

        @Override
        public void populateItem(final Item<Integer> item) {
            final Integer i = item.getModelObject();
            LinkPanel link = new LinkPanel("page", null, "" + i, TicketsPage.class, queryParameters(query, milestone, states, assignedTo, sort, desc, i));
            link.setRenderBodyOnly(true);
            if (i == page) {
                WicketUtils.setCssClass(item, "active");
            }
            item.add(link);
        }
    };
    add(pagesView);
}
Also used : ListDataProvider(org.apache.wicket.markup.repeater.data.ListDataProvider) TicketLabel(com.gitblit.tickets.TicketLabel) Label(org.apache.wicket.markup.html.basic.Label) ArrayList(java.util.ArrayList) LinkPanel(com.gitblit.wicket.panels.LinkPanel) DataView(org.apache.wicket.markup.repeater.data.DataView) Item(org.apache.wicket.markup.repeater.Item)

Example 2 with DataView

use of org.apache.wicket.markup.repeater.data.DataView in project gitblit by gitblit.

the class TicketsPage method milestoneList.

protected DataView<TicketMilestone> milestoneList(String wicketId, List<TicketMilestone> milestones, final boolean acceptingUpdates) {
    ListDataProvider<TicketMilestone> milestonesDp = new ListDataProvider<TicketMilestone>(milestones);
    DataView<TicketMilestone> milestonesList = new DataView<TicketMilestone>(wicketId, milestonesDp) {

        private static final long serialVersionUID = 1L;

        @Override
        public void populateItem(final Item<TicketMilestone> item) {
            Fragment entryPanel = new Fragment("entryPanel", "milestoneListFragment", this);
            item.add(entryPanel);
            final TicketMilestone tm = item.getModelObject();
            String[] states;
            if (tm.isOpen()) {
                states = TicketsUI.openStatii;
            } else {
                states = TicketsUI.closedStatii;
            }
            PageParameters params = queryParameters(null, tm.name, states, null, null, true, 1);
            entryPanel.add(new LinkPanel("milestoneName", null, tm.name, TicketsPage.class, params).setRenderBodyOnly(true));
            String css;
            String status = tm.status.name();
            switch(tm.status) {
                case Open:
                    if (tm.isOverdue()) {
                        css = "aui-lozenge aui-lozenge-subtle aui-lozenge-error";
                        status = "overdue";
                    } else {
                        css = "aui-lozenge aui-lozenge-subtle";
                    }
                    break;
                default:
                    css = "aui-lozenge";
                    break;
            }
            Label stateLabel = new Label("milestoneState", status);
            WicketUtils.setCssClass(stateLabel, css);
            entryPanel.add(stateLabel);
            if (tm.due == null) {
                entryPanel.add(new Label("milestoneDue", getString("gb.notSpecified")));
            } else {
                entryPanel.add(WicketUtils.createDatestampLabel("milestoneDue", tm.due, getTimeZone(), getTimeUtils()));
            }
            if (acceptingUpdates) {
                entryPanel.add(new LinkPanel("editMilestone", null, getString("gb.edit"), EditMilestonePage.class, WicketUtils.newObjectParameter(repositoryName, tm.name)));
            } else {
                entryPanel.add(new Label("editMilestone").setVisible(false));
            }
            if (tm.isOpen()) {
                // re-load milestone with query results
                TicketMilestone m = app().tickets().getMilestone(getRepositoryModel(), tm.name);
                Fragment milestonePanel = new Fragment("milestonePanel", "openMilestoneFragment", this);
                Label label = new Label("progress");
                WicketUtils.setCssStyle(label, "width:" + m.getProgress() + "%;");
                milestonePanel.add(label);
                milestonePanel.add(new LinkPanel("openTickets", null, MessageFormat.format(getString("gb.nOpenTickets"), m.getOpenTickets()), TicketsPage.class, queryParameters(null, tm.name, TicketsUI.openStatii, null, null, true, 1)));
                milestonePanel.add(new LinkPanel("closedTickets", null, MessageFormat.format(getString("gb.nClosedTickets"), m.getClosedTickets()), TicketsPage.class, queryParameters(null, tm.name, TicketsUI.closedStatii, null, null, true, 1)));
                milestonePanel.add(new Label("totalTickets", MessageFormat.format(getString("gb.nTotalTickets"), m.getTotalTickets())));
                entryPanel.add(milestonePanel);
            } else {
                entryPanel.add(new Label("milestonePanel").setVisible(false));
            }
        }
    };
    return milestonesList;
}
Also used : ListDataProvider(org.apache.wicket.markup.repeater.data.ListDataProvider) TicketLabel(com.gitblit.tickets.TicketLabel) Label(org.apache.wicket.markup.html.basic.Label) PageParameters(org.apache.wicket.PageParameters) Fragment(org.apache.wicket.markup.html.panel.Fragment) LinkPanel(com.gitblit.wicket.panels.LinkPanel) DataView(org.apache.wicket.markup.repeater.data.DataView) Item(org.apache.wicket.markup.repeater.Item) TicketMilestone(com.gitblit.tickets.TicketMilestone)

Example 3 with DataView

use of org.apache.wicket.markup.repeater.data.DataView in project gitblit by gitblit.

the class UserPage method setup.

private void setup(PageParameters params) {
    setupPage("", "");
    // check to see if we should display a login message
    boolean authenticateView = app().settings().getBoolean(Keys.web.authenticateViewPages, true);
    if (authenticateView && !GitBlitWebSession.get().isLoggedIn()) {
        authenticationError("Please login");
        return;
    }
    String userName = WicketUtils.getUsername(params);
    if (StringUtils.isEmpty(userName)) {
        throw new GitblitRedirectException(GitBlitWebApp.get().getHomePage());
    }
    UserModel user = app().users().getUserModel(userName);
    if (user == null) {
        // construct a temporary user model
        user = new UserModel(userName);
    }
    add(new UserTitlePanel("userTitlePanel", user, user.username));
    UserModel sessionUser = GitBlitWebSession.get().getUser();
    boolean isMyProfile = sessionUser != null && sessionUser.equals(user);
    if (isMyProfile) {
        addPreferences(user);
        if (app().services().isServingSSH()) {
            // show the SSH key management tab
            addSshKeys(user);
        } else {
            // SSH daemon is disabled, hide keys tab
            add(new Label("sshKeysLink").setVisible(false));
            add(new Label("sshKeysTab").setVisible(false));
        }
    } else {
        // visiting user
        add(new Label("preferencesLink").setVisible(false));
        add(new Label("preferencesTab").setVisible(false));
        add(new Label("sshKeysLink").setVisible(false));
        add(new Label("sshKeysTab").setVisible(false));
    }
    List<RepositoryModel> repositories = getRepositories(params);
    Collections.sort(repositories, new Comparator<RepositoryModel>() {

        @Override
        public int compare(RepositoryModel o1, RepositoryModel o2) {
            // reverse-chronological sort
            return o2.lastChange.compareTo(o1.lastChange);
        }
    });
    final ListDataProvider<RepositoryModel> dp = new ListDataProvider<RepositoryModel>(repositories);
    DataView<RepositoryModel> dataView = new DataView<RepositoryModel>("repositoryList", dp) {

        private static final long serialVersionUID = 1L;

        @Override
        public void populateItem(final Item<RepositoryModel> item) {
            final RepositoryModel entry = item.getModelObject();
            ProjectRepositoryPanel row = new ProjectRepositoryPanel("repository", getLocalizer(), this, showAdmin, entry, getAccessRestrictions());
            item.add(row);
        }
    };
    add(dataView);
}
Also used : ListDataProvider(org.apache.wicket.markup.repeater.data.ListDataProvider) UserTitlePanel(com.gitblit.wicket.panels.UserTitlePanel) Label(org.apache.wicket.markup.html.basic.Label) RepositoryModel(com.gitblit.models.RepositoryModel) GitblitRedirectException(com.gitblit.wicket.GitblitRedirectException) UserModel(com.gitblit.models.UserModel) DataView(org.apache.wicket.markup.repeater.data.DataView) ParameterMenuItem(com.gitblit.models.Menu.ParameterMenuItem) Item(org.apache.wicket.markup.repeater.Item) ProjectRepositoryPanel(com.gitblit.wicket.panels.ProjectRepositoryPanel)

Example 4 with DataView

use of org.apache.wicket.markup.repeater.data.DataView in project gitblit by gitblit.

the class ReflogPanel method setup.

protected void setup(List<RefLogEntry> changes) {
    ListDataProvider<RefLogEntry> dp = new ListDataProvider<RefLogEntry>(changes);
    DataView<RefLogEntry> changeView = new DataView<RefLogEntry>("change", dp) {

        private static final long serialVersionUID = 1L;

        @Override
        public void populateItem(final Item<RefLogEntry> changeItem) {
            final RefLogEntry change = changeItem.getModelObject();
            String dateFormat = app().settings().getString(Keys.web.datetimestampLongFormat, "EEEE, MMMM d, yyyy HH:mm Z");
            TimeZone timezone = getTimeZone();
            DateFormat df = new SimpleDateFormat(dateFormat);
            df.setTimeZone(timezone);
            Calendar cal = Calendar.getInstance(timezone);
            String fullRefName = change.getChangedRefs().get(0);
            String shortRefName = fullRefName;
            String ticketId = null;
            boolean isTag = false;
            boolean isTicket = false;
            if (shortRefName.startsWith(Constants.R_TICKET)) {
                ticketId = fullRefName.substring(Constants.R_TICKET.length());
                shortRefName = MessageFormat.format(getString("gb.ticketN"), ticketId);
                isTicket = true;
            } else if (shortRefName.startsWith(Constants.R_HEADS)) {
                shortRefName = shortRefName.substring(Constants.R_HEADS.length());
            } else if (shortRefName.startsWith(Constants.R_TAGS)) {
                shortRefName = shortRefName.substring(Constants.R_TAGS.length());
                isTag = true;
            }
            String fuzzydate;
            TimeUtils tu = getTimeUtils();
            Date changeDate = change.date;
            if (TimeUtils.isToday(changeDate, timezone)) {
                fuzzydate = tu.today();
            } else if (TimeUtils.isYesterday(changeDate, timezone)) {
                fuzzydate = tu.yesterday();
            } else {
                // calculate a fuzzy time ago date
                cal.setTime(changeDate);
                cal.set(Calendar.HOUR_OF_DAY, 0);
                cal.set(Calendar.MINUTE, 0);
                cal.set(Calendar.SECOND, 0);
                cal.set(Calendar.MILLISECOND, 0);
                Date date = cal.getTime();
                fuzzydate = getTimeUtils().timeAgo(date);
            }
            changeItem.add(new Label("whenChanged", fuzzydate + ", " + df.format(changeDate)));
            Label changeIcon = new Label("changeIcon");
            if (Type.DELETE.equals(change.getChangeType(fullRefName))) {
                WicketUtils.setCssClass(changeIcon, "iconic-trash-stroke");
            } else if (isTag) {
                WicketUtils.setCssClass(changeIcon, "iconic-tag");
            } else if (isTicket) {
                WicketUtils.setCssClass(changeIcon, "fa fa-ticket");
            } else {
                WicketUtils.setCssClass(changeIcon, "iconic-upload");
            }
            changeItem.add(changeIcon);
            if (change.user.username.equals(change.user.emailAddress) && change.user.emailAddress.indexOf('@') > -1) {
                // username is an email address - 1.2.1 push log bug
                changeItem.add(new Label("whoChanged", change.user.getDisplayName()));
            } else if (change.user.username.equals(UserModel.ANONYMOUS.username)) {
                // anonymous change
                changeItem.add(new Label("whoChanged", getString("gb.anonymousUser")));
            } else {
                // link to user account page
                changeItem.add(new LinkPanel("whoChanged", null, change.user.getDisplayName(), UserPage.class, WicketUtils.newUsernameParameter(change.user.username)));
            }
            boolean isDelete = false;
            boolean isRewind = false;
            String what;
            String by = null;
            switch(change.getChangeType(fullRefName)) {
                case CREATE:
                    if (isTag) {
                        // new tag
                        what = getString("gb.pushedNewTag");
                    } else {
                        // new branch
                        what = getString("gb.pushedNewBranch");
                    }
                    break;
                case DELETE:
                    isDelete = true;
                    if (isTag) {
                        what = getString("gb.deletedTag");
                    } else {
                        what = getString("gb.deletedBranch");
                    }
                    break;
                case UPDATE_NONFASTFORWARD:
                    isRewind = true;
                default:
                    what = MessageFormat.format(change.getCommitCount() > 1 ? getString("gb.pushedNCommitsTo") : getString("gb.pushedOneCommitTo"), change.getCommitCount());
                    if (change.getAuthorCount() == 1) {
                        by = MessageFormat.format(getString("gb.byOneAuthor"), change.getAuthorIdent().getName());
                    } else {
                        by = MessageFormat.format(getString("gb.byNAuthors"), change.getAuthorCount());
                    }
                    break;
            }
            changeItem.add(new Label("whatChanged", what));
            changeItem.add(new Label("byAuthors", by).setVisible(!StringUtils.isEmpty(by)));
            changeItem.add(new Label("refRewind", getString("gb.rewind")).setVisible(isRewind));
            if (isDelete) {
                // can't link to deleted ref
                changeItem.add(new Label("refChanged", shortRefName));
            } else if (isTag) {
                // link to tag
                changeItem.add(new LinkPanel("refChanged", null, shortRefName, TagPage.class, WicketUtils.newObjectParameter(change.repository, fullRefName)));
            } else if (isTicket) {
                // link to ticket
                changeItem.add(new LinkPanel("refChanged", null, shortRefName, TicketsPage.class, WicketUtils.newObjectParameter(change.repository, ticketId)));
            } else {
                // link to tree
                changeItem.add(new LinkPanel("refChanged", null, shortRefName, TreePage.class, WicketUtils.newObjectParameter(change.repository, fullRefName)));
            }
            int maxCommitCount = 5;
            List<RepositoryCommit> commits = change.getCommits();
            if (commits.size() > maxCommitCount) {
                commits = new ArrayList<RepositoryCommit>(commits.subList(0, maxCommitCount));
            }
            // compare link
            String compareLinkText = null;
            if ((change.getCommitCount() <= maxCommitCount) && (change.getCommitCount() > 1)) {
                compareLinkText = MessageFormat.format(getString("gb.viewComparison"), commits.size());
            } else if (change.getCommitCount() > maxCommitCount) {
                int diff = change.getCommitCount() - maxCommitCount;
                compareLinkText = MessageFormat.format(diff > 1 ? getString("gb.nMoreCommits") : getString("gb.oneMoreCommit"), diff);
            }
            if (StringUtils.isEmpty(compareLinkText)) {
                changeItem.add(new Label("compareLink").setVisible(false));
            } else {
                String endRangeId = change.getNewId(fullRefName);
                String startRangeId = change.getOldId(fullRefName);
                changeItem.add(new LinkPanel("compareLink", null, compareLinkText, ComparePage.class, WicketUtils.newRangeParameter(change.repository, startRangeId, endRangeId)));
            }
            ListDataProvider<RepositoryCommit> cdp = new ListDataProvider<RepositoryCommit>(commits);
            DataView<RepositoryCommit> commitsView = new DataView<RepositoryCommit>("commit", cdp) {

                private static final long serialVersionUID = 1L;

                @Override
                public void populateItem(final Item<RepositoryCommit> commitItem) {
                    final RepositoryCommit commit = commitItem.getModelObject();
                    // author gravatar
                    commitItem.add(new AvatarImage("commitAuthor", commit.getAuthorIdent(), null, 16, false));
                    // merge icon
                    if (commit.getParentCount() > 1) {
                        commitItem.add(WicketUtils.newImage("commitIcon", "commit_merge_16x16.png"));
                    } else {
                        commitItem.add(WicketUtils.newBlankImage("commitIcon"));
                    }
                    // short message
                    String shortMessage = commit.getShortMessage();
                    String trimmedMessage = shortMessage;
                    if (commit.getRefs() != null && commit.getRefs().size() > 0) {
                        trimmedMessage = StringUtils.trimString(shortMessage, Constants.LEN_SHORTLOG_REFS);
                    } else {
                        trimmedMessage = StringUtils.trimString(shortMessage, Constants.LEN_SHORTLOG);
                    }
                    LinkPanel shortlog = new LinkPanel("commitShortMessage", "list", trimmedMessage, CommitPage.class, WicketUtils.newObjectParameter(change.repository, commit.getName()));
                    if (!shortMessage.equals(trimmedMessage)) {
                        WicketUtils.setHtmlTooltip(shortlog, shortMessage);
                    }
                    commitItem.add(shortlog);
                    // commit hash link
                    int hashLen = app().settings().getInteger(Keys.web.shortCommitIdLength, 6);
                    LinkPanel commitHash = new LinkPanel("hashLink", null, commit.getName().substring(0, hashLen), CommitPage.class, WicketUtils.newObjectParameter(change.repository, commit.getName()));
                    WicketUtils.setCssClass(commitHash, "shortsha1");
                    WicketUtils.setHtmlTooltip(commitHash, commit.getName());
                    commitItem.add(commitHash);
                }
            };
            changeItem.add(commitsView);
        }
    };
    add(changeView);
}
Also used : ListDataProvider(org.apache.wicket.markup.repeater.data.ListDataProvider) Label(org.apache.wicket.markup.html.basic.Label) RefLogEntry(com.gitblit.models.RefLogEntry) TimeUtils(com.gitblit.utils.TimeUtils) Item(org.apache.wicket.markup.repeater.Item) TreePage(com.gitblit.wicket.pages.TreePage) Calendar(java.util.Calendar) ComparePage(com.gitblit.wicket.pages.ComparePage) RepositoryCommit(com.gitblit.models.RepositoryCommit) Date(java.util.Date) DataView(org.apache.wicket.markup.repeater.data.DataView) TimeZone(java.util.TimeZone) TicketsPage(com.gitblit.wicket.pages.TicketsPage) SimpleDateFormat(java.text.SimpleDateFormat) DateFormat(java.text.DateFormat) SimpleDateFormat(java.text.SimpleDateFormat)

Example 5 with DataView

use of org.apache.wicket.markup.repeater.data.DataView in project gitblit by gitblit.

the class RepositoryUrlPanel method createApplicationMenus.

protected Fragment createApplicationMenus(String wicketId, final UserModel user, final RepositoryModel repository, final List<RepositoryUrl> repositoryUrls) {
    final List<GitClientApplication> displayedApps = new ArrayList<GitClientApplication>();
    final String userAgent = ((WebClientInfo) GitBlitWebSession.get().getClientInfo()).getUserAgent();
    if (user.canClone(repository)) {
        for (GitClientApplication app : app().gitblit().getClientApplications()) {
            if (app.isActive && app.allowsPlatform(userAgent)) {
                displayedApps.add(app);
            }
        }
    }
    final String baseURL = WicketUtils.getGitblitURL(RequestCycle.get().getRequest());
    ListDataProvider<GitClientApplication> displayedAppsDp = new ListDataProvider<GitClientApplication>(displayedApps);
    DataView<GitClientApplication> appMenus = new DataView<GitClientApplication>("appMenus", displayedAppsDp) {

        private static final long serialVersionUID = 1L;

        @Override
        public void populateItem(final Item<GitClientApplication> item) {
            final GitClientApplication clientApp = item.getModelObject();
            // filter the urls for the client app
            List<RepositoryUrl> urls = new ArrayList<RepositoryUrl>();
            for (RepositoryUrl repoUrl : repositoryUrls) {
                if (clientApp.minimumPermission == null || !repoUrl.hasPermission()) {
                    // no minimum permission or untracked permissions, assume it is satisfactory
                    if (clientApp.supportsTransport(repoUrl.url)) {
                        urls.add(repoUrl);
                    }
                } else if (repoUrl.permission.atLeast(clientApp.minimumPermission)) {
                    // repo url meets minimum permission requirement
                    if (clientApp.supportsTransport(repoUrl.url)) {
                        urls.add(repoUrl);
                    }
                }
            }
            if (urls.size() == 0) {
                // do not show this app menu because there are no urls
                item.add(new Label("appMenu").setVisible(false));
                return;
            }
            Fragment appMenu = new Fragment("appMenu", "appMenuFragment", this);
            appMenu.setRenderBodyOnly(true);
            item.add(appMenu);
            // menu button
            appMenu.add(new Label("applicationName", clientApp.name));
            // application icon
            Component img;
            if (StringUtils.isEmpty(clientApp.icon)) {
                img = WicketUtils.newClearPixel("applicationIcon").setVisible(false);
            } else {
                if (clientApp.icon.contains("://")) {
                    // external image
                    img = new ExternalImage("applicationIcon", clientApp.icon);
                } else {
                    // context image
                    img = WicketUtils.newImage("applicationIcon", clientApp.icon);
                }
            }
            appMenu.add(img);
            // application menu title, may be a link
            if (StringUtils.isEmpty(clientApp.productUrl)) {
                appMenu.add(new Label("applicationTitle", clientApp.toString()));
            } else {
                appMenu.add(new LinkPanel("applicationTitle", null, clientApp.toString(), clientApp.productUrl, true));
            }
            // brief application description
            if (StringUtils.isEmpty(clientApp.description)) {
                appMenu.add(new Label("applicationDescription").setVisible(false));
            } else {
                appMenu.add(new Label("applicationDescription", clientApp.description));
            }
            // brief application legal info, copyright, license, etc
            if (StringUtils.isEmpty(clientApp.legal)) {
                appMenu.add(new Label("applicationLegal").setVisible(false));
            } else {
                appMenu.add(new Label("applicationLegal", clientApp.legal));
            }
            // a nested repeater for all action items
            ListDataProvider<RepositoryUrl> urlsDp = new ListDataProvider<RepositoryUrl>(urls);
            DataView<RepositoryUrl> actionItems = new DataView<RepositoryUrl>("actionItems", urlsDp) {

                private static final long serialVersionUID = 1L;

                @Override
                public void populateItem(final Item<RepositoryUrl> repoLinkItem) {
                    RepositoryUrl repoUrl = repoLinkItem.getModelObject();
                    Fragment fragment = new Fragment("actionItem", "actionFragment", this);
                    fragment.add(createPermissionBadge("permission", repoUrl));
                    if (!StringUtils.isEmpty(clientApp.cloneUrl)) {
                        // custom registered url
                        String url = substitute(clientApp.cloneUrl, repoUrl.url, baseURL, user.username, repository.name);
                        fragment.add(new LinkPanel("content", "applicationMenuItem", getString("gb.clone") + " " + repoUrl.url, url));
                        repoLinkItem.add(fragment);
                        fragment.add(new Label("copyFunction").setVisible(false));
                    } else if (!StringUtils.isEmpty(clientApp.command)) {
                        // command-line
                        String command = substitute(clientApp.command, repoUrl.url, baseURL, user.username, repository.name);
                        Label content = new Label("content", command);
                        WicketUtils.setCssClass(content, "commandMenuItem");
                        fragment.add(content);
                        repoLinkItem.add(fragment);
                        // copy function for command
                        fragment.add(createCopyFragment(command));
                    }
                }
            };
            appMenu.add(actionItems);
        }
    };
    Fragment applicationMenus = new Fragment(wicketId, "applicationMenusFragment", this);
    applicationMenus.add(appMenus);
    return applicationMenus;
}
Also used : WebClientInfo(org.apache.wicket.protocol.http.request.WebClientInfo) ListDataProvider(org.apache.wicket.markup.repeater.data.ListDataProvider) GitClientApplication(com.gitblit.models.GitClientApplication) ArrayList(java.util.ArrayList) Label(org.apache.wicket.markup.html.basic.Label) RepositoryUrl(com.gitblit.models.RepositoryUrl) Fragment(org.apache.wicket.markup.html.panel.Fragment) DataView(org.apache.wicket.markup.repeater.data.DataView) Item(org.apache.wicket.markup.repeater.Item) ExternalImage(com.gitblit.wicket.ExternalImage) Component(org.apache.wicket.Component)

Aggregations

Item (org.apache.wicket.markup.repeater.Item)17 DataView (org.apache.wicket.markup.repeater.data.DataView)17 Label (org.apache.wicket.markup.html.basic.Label)15 ListDataProvider (org.apache.wicket.markup.repeater.data.ListDataProvider)11 LinkPanel (com.gitblit.wicket.panels.LinkPanel)6 ArrayList (java.util.ArrayList)6 AjaxRequestTarget (org.apache.wicket.ajax.AjaxRequestTarget)5 AjaxLink (org.apache.wicket.ajax.markup.html.AjaxLink)5 Fragment (org.apache.wicket.markup.html.panel.Fragment)5 ListDataProvider (com.evolveum.midpoint.web.component.util.ListDataProvider)4 VisibleEnableBehaviour (com.evolveum.midpoint.web.component.util.VisibleEnableBehaviour)4 UserModel (com.gitblit.models.UserModel)4 WebMarkupContainer (org.apache.wicket.markup.html.WebMarkupContainer)4 NavigatorPanel (com.evolveum.midpoint.web.component.data.paging.NavigatorPanel)3 TicketLabel (com.gitblit.tickets.TicketLabel)3 Component (org.apache.wicket.Component)3 IModel (org.apache.wicket.model.IModel)3 ParameterMenuItem (com.gitblit.models.Menu.ParameterMenuItem)2 RepositoryModel (com.gitblit.models.RepositoryModel)2 RepositoryUrl (com.gitblit.models.RepositoryUrl)2