use of br.com.caelum.vraptor.Get in project mamute by caelum.
the class RankingController method tagRank.
@Get
public void tagRank(String tagName) {
Tag tag = tags.findByName(tagName);
if (tag == null) {
result.notFound();
}
result.include("tag", tag);
DateTime after = new DateTime().minusDays(30);
result.include("tag", tag);
result.include("answerersAllTime", reputationEvents.getTopAnswerersSummaryAllTime(tag));
result.include("answerersLastMonth", reputationEvents.getTopAnswerersSummaryAfter(tag, after));
result.include("askersAllTime", reputationEvents.getTopAskersSummaryAllTime(tag));
result.include("askersLastMonth", reputationEvents.getTopAskersSummaryAfter(tag, after));
result.include("usersActive", true);
result.include("noDefaultActive", true);
}
use of br.com.caelum.vraptor.Get in project mamute by caelum.
the class TagPageController method showTagPage.
@Get
public void showTagPage(String tagName) {
TagPage tagPage = tagPages.findByTag(tagName);
result.include(tagPage);
result.include("hasAbout", tags.hasAbout(tagPage.getTag()));
}
use of br.com.caelum.vraptor.Get in project agiletickets by caelum.
the class EspetaculosController method sessao.
@Get
@Path("/sessao/{id}")
public void sessao(Long id) {
Sessao sessao = agenda.sessao(id);
if (sessao == null) {
result.notFound();
}
result.include("sessao", sessao);
}
use of br.com.caelum.vraptor.Get in project agiletickets by caelum.
the class EspetaculosController method sessoes.
@Get
@Path("/espetaculo/{espetaculoId}/sessoes")
public void sessoes(Long espetaculoId) {
Espetaculo espetaculo = carregaEspetaculo(espetaculoId);
result.include("espetaculo", espetaculo);
}
use of br.com.caelum.vraptor.Get in project mamute by caelum.
the class ListController method withTag.
@Get
public void withTag(String tagName, Integer p, boolean semRespostas) {
Integer page = getPage(p);
Tag tag = tags.findByName(tagName);
if (tag == null) {
result.notFound();
return;
}
List<Question> questionsWithTag = questions.withTagVisible(tag, page, semRespostas);
result.include("totalPages", questions.numberOfPages(tag));
result.include("tag", tag);
result.include("recentTags", recentTagsContainer.getRecentTagsUsage());
result.include("questions", questionsWithTag);
result.include("currentPage", page);
result.include("hasAbout", tags.hasAbout(tag));
if (semRespostas) {
result.include("unansweredActive", true);
result.include("noDefaultActive", true);
result.include("unansweredTagLinks", true);
}
}
Aggregations