| | |
| | | private static final long serialVersionUID = 1L;
|
| | |
|
| | | public RepositoriesPanel(String wicketId, final boolean showAdmin,
|
| | | List<RepositoryModel> models,
|
| | | List<RepositoryModel> models, boolean enableLinks,
|
| | | final Map<AccessRestrictionType, String> accessRestrictionTranslations) {
|
| | | super(wicketId);
|
| | |
|
| | | final boolean linksActive;
|
| | | final boolean linksActive = enableLinks;
|
| | | final boolean showSize = GitBlit.getBoolean(Keys.web.showRepositorySizes, true);
|
| | |
|
| | | final UserModel user = GitBlitWebSession.get().getUser();
|
| | | if (models == null) {
|
| | | linksActive = true;
|
| | | models = GitBlit.self().getRepositoryModels(user);
|
| | | } else {
|
| | | // disable links if the repositories are already provided
|
| | | // the repositories are most likely from a proposal
|
| | | linksActive = false;
|
| | | }
|
| | |
|
| | | final IDataProvider<RepositoryModel> dp;
|
| | |
|
| | |
| | | item.add(row);
|
| | |
|
| | | // try to strip group name for less cluttered list
|
| | | String repoName = entry.name;
|
| | | String repoName = entry.toString();
|
| | | if (!StringUtils.isEmpty(currGroupName) && (repoName.indexOf('/') > -1)) {
|
| | | repoName = repoName.substring(currGroupName.length() + 1);
|
| | | }
|
| | |
|
| | | |
| | | // repository swatch
|
| | | Component swatch = new Label("repositorySwatch", " ").setEscapeModelStrings(false);
|
| | | WicketUtils.setCssBackground(swatch, entry.name);
|
| | | WicketUtils.setCssBackground(swatch, entry.toString());
|
| | | row.add(swatch);
|
| | | swatch.setVisible(showSwatch);
|
| | |
|