| | |
| | | import com.gitblit.utils.JGitUtils;
|
| | | import com.gitblit.utils.JGitUtils.SearchType;
|
| | | import com.gitblit.utils.StringUtils;
|
| | | import com.gitblit.wicket.models.RepositoryModel;
|
| | | import com.gitblit.wicket.pages.BranchesPage;
|
| | | import com.gitblit.wicket.pages.DocsPage;
|
| | | import com.gitblit.wicket.pages.LogPage;
|
| | |
| | | public abstract class RepositoryPage extends BasePage {
|
| | |
|
| | | protected final String repositoryName;
|
| | | protected final String objectId;
|
| | | protected String description;
|
| | | protected final String objectId; |
| | |
|
| | | private transient Repository r = null;
|
| | | |
| | | private RepositoryModel m = null;
|
| | |
|
| | | private final Logger logger = LoggerFactory.getLogger(RepositoryPage.class);
|
| | |
|
| | |
| | | List<String> extraPageLinks = new ArrayList<String>();
|
| | |
|
| | | // Conditionally add tickets page
|
| | | boolean checkTickets = JGitUtils.getRepositoryUseTickets(r);
|
| | | if (checkTickets && JGitUtils.getTicketsBranch(r) != null) {
|
| | | if (getRepositoryModel().useTickets && JGitUtils.getTicketsBranch(r) != null) {
|
| | | extraPageLinks.add("tickets");
|
| | | }
|
| | |
|
| | | // Conditionally add docs page
|
| | | boolean checkDocs = JGitUtils.getRepositoryUseDocs(r);
|
| | | if (checkDocs) {
|
| | | if (getRepositoryModel().useDocs) {
|
| | | extraPageLinks.add("docs");
|
| | | }
|
| | |
|
| | |
| | | redirectToInterceptPage(new RepositoriesPage());
|
| | | return null;
|
| | | }
|
| | | description = JGitUtils.getRepositoryDescription(r);
|
| | | this.r = r;
|
| | | }
|
| | | return r;
|
| | | }
|
| | | |
| | | protected RepositoryModel getRepositoryModel() {
|
| | | if (m == null) {
|
| | | m = GitBlit.self().getRepositoryModel(repositoryName);
|
| | | }
|
| | | return m;
|
| | | }
|
| | |
|
| | | protected void addRefs(Repository r, RevCommit c) {
|
| | | add(new RefsPanel("refsPanel", repositoryName, c, JGitUtils.getAllRefs(r)));
|