{% extends 'templates/main.volt' %} {% block content %} {{ partial('macros/question') }} {% set published_types = {'0':'全部','1':'审核中','2':'已发布','3':'未通过'} %} {% set published = request.get('published','trim','0') %}
{{ partial('user/console/menu') }}
我的提问 {% for key,value in published_types %} {% set class = (published == key) ? 'layui-btn layui-btn-xs' : 'none' %} {% set url = (key == '0') ? url({'for':'home.uc.questions'}) : url({'for':'home.uc.questions'},{'published':key}) %} {{ value }} {% endfor %}
{% if pager.total_pages > 0 %} {% for item in pager.items %} {% set show_url = url({'for':'home.question.show','id':item.id}) %} {% set edit_url = url({'for':'home.question.edit','id':item.id}) %} {% set delete_url = url({'for':'home.question.delete','id':item.id}) %} {% endfor %}
问题 回答 浏览 操作

标题:{{ item.title }}

创建:{{ item.create_time|time_ago }} 状态:{{ publish_status(item.published) }}

{{ item.answer_count }} {{ item.view_count }} 编辑 删除
{{ partial('partials/pager') }} {% endif %}
{% endblock %}