| | |
| | | import com.gitblit.SyndicationServlet;
|
| | | import com.gitblit.models.RepositoryModel;
|
| | | import com.gitblit.models.UserModel;
|
| | | import com.gitblit.utils.ByteFormat;
|
| | | import com.gitblit.utils.StringUtils;
|
| | | import com.gitblit.utils.TimeUtils;
|
| | | import com.gitblit.wicket.GitBlitWebSession;
|
| | |
| | | if (models == null) {
|
| | | linksActive = true;
|
| | | models = GitBlit.self().getRepositoryModels(user);
|
| | | final ByteFormat byteFormat = new ByteFormat();
|
| | | if (showSize) {
|
| | | for (RepositoryModel model : models) {
|
| | | model.size = byteFormat.format(GitBlit.self().calculateSize(model));
|
| | | }
|
| | | }
|
| | | } else {
|
| | | // disable links if the repositories are already provided
|
| | | // the repositories are most likely from a proposal
|
| | |
| | |
|
| | | if (entry.hasCommits) {
|
| | | // Existing repository
|
| | | if (showSize) {
|
| | | row.add(new Label("repositorySize", entry.size));
|
| | | } else {
|
| | | row.add(new Label("repositorySize").setVisible(false));
|
| | | }
|
| | | row.add(new Label("repositorySize", entry.size).setVisible(showSize));
|
| | | } else {
|
| | | // New repository
|
| | | row.add(new Label("repositorySize", "<span class='empty'>(empty)</span>")
|