| | |
| | | import java.util.List;
|
| | | import java.util.Map;
|
| | |
|
| | | import org.apache.wicket.Component;
|
| | | import org.apache.wicket.PageParameters;
|
| | | import org.apache.wicket.extensions.markup.html.repeater.data.sort.OrderByBorder;
|
| | | import org.apache.wicket.extensions.markup.html.repeater.util.SortParam;
|
| | |
| | | import com.gitblit.utils.TimeUtils;
|
| | | import com.gitblit.wicket.GitBlitWebSession;
|
| | | import com.gitblit.wicket.WicketUtils;
|
| | | import com.gitblit.wicket.pages.BasePage;
|
| | | import com.gitblit.wicket.pages.EditRepositoryPage;
|
| | | import com.gitblit.wicket.pages.EmptyRepositoryPage;
|
| | | import com.gitblit.wicket.pages.SummaryPage;
|
| | |
|
| | | public class RepositoriesPanel extends BasePanel {
|
| | |
| | | }
|
| | |
|
| | | // repository swatch
|
| | | Label swatch = new Label("repositorySwatch", " ");
|
| | | Component swatch = new Label("repositorySwatch", " ").setEscapeModelStrings(false);
|
| | | WicketUtils.setCssBackground(swatch, entry.name);
|
| | | row.add(swatch);
|
| | | swatch.setVisible(showSwatch);
|
| | |
|
| | | if (entry.hasCommits && linksActive) {
|
| | | if (linksActive) {
|
| | | Class<? extends BasePage> linkPage;
|
| | | if (entry.hasCommits) {
|
| | | // repository has content
|
| | | linkPage = SummaryPage.class;
|
| | | } else {
|
| | | // new/empty repository OR proposed repository
|
| | | linkPage = EmptyRepositoryPage.class;
|
| | | }
|
| | |
|
| | | PageParameters pp = WicketUtils.newRepositoryParameter(entry.name);
|
| | | row.add(new LinkPanel("repositoryName", "list", repoName, SummaryPage.class, pp));
|
| | | row.add(new LinkPanel("repositoryName", "list", repoName, linkPage, pp));
|
| | | row.add(new LinkPanel("repositoryDescription", "list", entry.description,
|
| | | SummaryPage.class, pp));
|
| | | linkPage, pp));
|
| | | } else {
|
| | | // new/empty repository OR proposed repository
|
| | | // no links like on a federation page
|
| | | row.add(new Label("repositoryName", repoName));
|
| | | row.add(new Label("repositoryDescription", entry.description));
|
| | | }
|
| | |
|
| | | if (entry.hasCommits) {
|
| | | // Existing repository
|
| | | row.add(new Label("repositorySize", entry.size).setVisible(showSize));
|