'wip(semantic):调整模板文件'

This commit is contained in:
zhengxinonly
2021-09-08 01:05:54 +08:00
parent e918727984
commit 7505e4552b
29 changed files with 588 additions and 414 deletions
+9 -3
View File
@@ -8,16 +8,22 @@ from applications.view import index_bp
@index_bp.get('/rights/')
@authorize("admin:power:main", log=True)
def rights_index():
return render_template('rights/main.html')
return render_template('admin/rights/rights.html')
@index_bp.get('/rights/power/<int:power_id>')
@authorize("admin:power:edit", log=True)
def get(power_id):
def rights_edit(power_id):
power = RightsPower.query.filter_by(id=power_id).first()
icon = str(power.icon).split()
if len(icon) == 2:
icon = icon[1]
else:
icon = None
return render_template('rights/edit.html', power=power, icon=icon)
return render_template('admin/rights/rights_edit.html', power=power, icon=icon)
@index_bp.get('/rights/add')
@authorize("admin:power:main", log=True)
def rights_add():
return render_template('admin/rights/rights_add.html')