def issue_toc(issue_id): issue = controllers.get_issue_by_iid(issue_id) journal = controllers.get_journal_by_jid(issue.journal_jid) articles = controllers.get_articles_by_iid(issue.iid) context = {'journal': journal, 'issue': issue, 'articles': articles} return render_template("issue/toc.html", **context)
def journal_detail(journal_id): journal = controllers.get_journal_by_jid(journal_id) if not journal: abort(404, 'Journal not found') context = {'journal': journal} return render_template("journal/detail.html", **context)
def issue_grid(journal_id): journal = controllers.get_journal_by_jid(journal_id) if not journal: abort(404, 'Journal not found') issues = controllers.get_issues_by_jid(journal_id) result_dict = OrderedDict() for issue in issues: key_year = str(issue.year) key_volume = str(issue.volume) result_dict.setdefault(key_year, OrderedDict()) result_dict[key_year].setdefault(key_volume, []).append(issue) context = { 'journal': journal, 'result_dict': result_dict, } return render_template("issue/grid.html", **context)