|
|
@ -623,7 +623,7 @@ def before_request():
|
|
|
|
g.user = current_user
|
|
|
|
g.user = current_user
|
|
|
|
g.allow_registration = config.config_public_reg
|
|
|
|
g.allow_registration = config.config_public_reg
|
|
|
|
g.allow_upload = config.config_uploading
|
|
|
|
g.allow_upload = config.config_uploading
|
|
|
|
g.public_shelfes = ub.session.query(ub.Shelf).filter(ub.Shelf.is_public == 1).all()
|
|
|
|
g.public_shelfes = ub.session.query(ub.Shelf).filter(ub.Shelf.is_public == 1).order_by(ub.Shelf.name).all()
|
|
|
|
if not config.db_configured and request.endpoint not in ('basic_configuration', 'login') and '/static/' not in request.path:
|
|
|
|
if not config.db_configured and request.endpoint not in ('basic_configuration', 'login') and '/static/' not in request.path:
|
|
|
|
return redirect(url_for('basic_configuration'))
|
|
|
|
return redirect(url_for('basic_configuration'))
|
|
|
|
|
|
|
|
|
|
|
@ -1250,7 +1250,7 @@ def language(name, page):
|
|
|
|
@login_required_if_no_ano
|
|
|
|
@login_required_if_no_ano
|
|
|
|
def category_list():
|
|
|
|
def category_list():
|
|
|
|
entries = db.session.query(db.Tags, func.count('books_tags_link.book').label('count'))\
|
|
|
|
entries = db.session.query(db.Tags, func.count('books_tags_link.book').label('count'))\
|
|
|
|
.join(db.books_tags_link).join(db.Books).filter(common_filters())\
|
|
|
|
.join(db.books_tags_link).join(db.Books).order_by(db.Tags.name).filter(common_filters())\
|
|
|
|
.group_by('books_tags_link.tag').all()
|
|
|
|
.group_by('books_tags_link.tag').all()
|
|
|
|
return render_title_template('list.html', entries=entries, folder='category', title=_(u"Category list"))
|
|
|
|
return render_title_template('list.html', entries=entries, folder='category', title=_(u"Category list"))
|
|
|
|
|
|
|
|
|
|
|
|