| | |
| | | roots.add(0, "");
|
| | | groups.put("", rootRepositories);
|
| | | }
|
| | | |
| | |
|
| | | List<RepositoryModel> groupedModels = new ArrayList<RepositoryModel>();
|
| | | for (String root : roots) {
|
| | | List<RepositoryModel> subModels = groups.get(root);
|
| | |
| | |
|
| | | final String baseUrl = WicketUtils.getGitblitURL(getRequest());
|
| | | final boolean showSwatch = GitBlit.getBoolean(Keys.web.repositoryListSwatches, true);
|
| | | |
| | |
|
| | | DataView<RepositoryModel> dataView = new DataView<RepositoryModel>("row", dp) {
|
| | | private static final long serialVersionUID = 1L;
|
| | | int counter;
|
| | |
| | | counter = 0;
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void populateItem(final Item<RepositoryModel> item) {
|
| | | final RepositoryModel entry = item.getModelObject();
|
| | | if (entry instanceof GroupRepositoryModel) {
|
| | |
| | | currGroupName = entry.name;
|
| | | Fragment row = new Fragment("rowContent", "groupRepositoryRow", this);
|
| | | item.add(row);
|
| | | |
| | |
|
| | | String name = groupRow.name;
|
| | | if (name.startsWith(ModelUtils.getUserRepoPrefix())) {
|
| | | // user page
|
| | |
| | | if (!StringUtils.isEmpty(currGroupName) && (repoName.indexOf('/') > -1)) {
|
| | | repoName = repoName.substring(currGroupName.length() + 1);
|
| | | }
|
| | | |
| | |
|
| | | // repository swatch
|
| | | Component swatch;
|
| | | if (entry.isBare){
|
| | |
| | | } else {
|
| | | row.add(WicketUtils.newClearPixel("sparkleshareIcon").setVisible(false));
|
| | | }
|
| | | |
| | |
|
| | | if (entry.isMirror) {
|
| | | row.add(WicketUtils.newImage("mirrorIcon", "mirror_16x16.png",
|
| | | getString("gb.isMirror")));
|
| | | } else {
|
| | | row.add(WicketUtils.newClearPixel("mirrorIcon").setVisible(false));
|
| | | }
|
| | |
|
| | | if (entry.isFork()) {
|
| | | row.add(WicketUtils.newImage("forkIcon", "commit_divide_16x16.png",
|
| | | getString("gb.isFork")));
|
| | | } else {
|
| | | row.add(WicketUtils.newClearPixel("forkIcon").setVisible(false));
|
| | | }
|
| | |
|
| | | if (entry.useTickets) {
|
| | | row.add(WicketUtils.newImage("ticketsIcon", "bug_16x16.png",
|
| | | getString("gb.tickets")));
|
| | | } else {
|
| | | row.add(WicketUtils.newBlankImage("ticketsIcon"));
|
| | | }
|
| | |
|
| | | if (entry.useDocs) {
|
| | | row.add(WicketUtils
|
| | | .newImage("docsIcon", "book_16x16.png", getString("gb.docs")));
|
| | | } else {
|
| | | row.add(WicketUtils.newBlankImage("docsIcon"));
|
| | | }
|
| | |
|
| | | if (entry.isFrozen) {
|