| | |
| | |
|
| | | import java.text.MessageFormat;
|
| | | import java.util.Arrays;
|
| | | import java.util.Date;
|
| | | import java.util.List;
|
| | |
|
| | | import org.apache.wicket.PageParameters;
|
| | |
| | |
|
| | | import com.gitblit.models.RefModel;
|
| | | import com.gitblit.utils.JGitUtils;
|
| | | import com.gitblit.utils.JGitUtils.SearchType;
|
| | | import com.gitblit.wicket.WicketUtils;
|
| | | import com.gitblit.wicket.panels.GravatarImage;
|
| | | import com.gitblit.wicket.panels.LinkPanel;
|
| | | import com.gitblit.wicket.panels.RefsPanel;
|
| | |
|
| | |
| | | Repository r = getRepository();
|
| | |
|
| | | // Find tag in repository
|
| | | List<RefModel> tags = JGitUtils.getTags(r, -1);
|
| | | List<RefModel> tags = JGitUtils.getTags(r, true, -1);
|
| | | RefModel tagRef = null;
|
| | | for (RefModel tag : tags) {
|
| | | if (tag.getName().equals(objectId) || tag.getObjectId().getName().equals(objectId)) {
|
| | |
| | | break;
|
| | | }
|
| | | add(new LinkPanel("commit", "title", tagRef.displayName, linkClass, linkParameters));
|
| | | add(new GravatarImage("taggerAvatar", tagRef.getAuthorIdent()));
|
| | | |
| | | add(new RefsPanel("tagName", repositoryName, Arrays.asList(tagRef)));
|
| | | add(new Label("tagId", tagRef.getObjectId().getName()));
|
| | | add(new LinkPanel("taggedObject", "list", tagRef.getReferencedObjectId().getName(),
|
| | | linkClass, linkParameters));
|
| | | add(new Label("taggedObjectType", getString(typeKey)));
|
| | |
|
| | | add(createPersonPanel("tagger", tagRef.getAuthorIdent(), SearchType.AUTHOR));
|
| | | add(WicketUtils.createTimestampLabel("tagDate", tagRef.getAuthorIdent().getWhen(),
|
| | | getTimeZone()));
|
| | | add(createPersonPanel("tagger", tagRef.getAuthorIdent(), com.gitblit.Constants.SearchType.AUTHOR));
|
| | | Date when = new Date(0);
|
| | | if (tagRef.getAuthorIdent() != null) {
|
| | | when = tagRef.getAuthorIdent().getWhen();
|
| | | }
|
| | | add(WicketUtils.createTimestampLabel("tagDate", when, getTimeZone()));
|
| | |
|
| | | addFullText("fullMessage", tagRef.getFullMessage(), true);
|
| | | }
|