初始提交:人事共享服务中心钉钉登录功能
This commit is contained in:
48
templates/admin_demands.html
Normal file
48
templates/admin_demands.html
Normal file
@@ -0,0 +1,48 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block title %}管理后台{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2>管理后台 - 所有需求</h2>
|
||||
{% if demands %}
|
||||
<div class="question-list">
|
||||
{% for demand in demands %}
|
||||
<div class="question-item">
|
||||
<div class="question-header">
|
||||
<span class="branch">{{ get_branch_name(demand.branch) }}</span>
|
||||
<span class="time">{{ demand.created_at.strftime('%Y-%m-%d %H:%M') }}</span>
|
||||
<span class="status {% if demand.is_public %}public{% else %}private{% endif %}">
|
||||
{% if demand.is_public %}公开{% else %}私有{% endif %}
|
||||
</span>
|
||||
<span class="user">提交者: {{ demand.user.username }}</span>
|
||||
</div>
|
||||
<h3 class="demand-title">{{ demand.title }}</h3>
|
||||
<p class="content">{{ demand.content }}</p>
|
||||
<div class="question-footer">
|
||||
<span class="contact">联系方式: {{ demand.contact }}</span>
|
||||
{% if demand.answer %}
|
||||
<div class="answer">
|
||||
<strong>回答:</strong>
|
||||
<p>{{ demand.answer }}</p>
|
||||
<span class="answer-time">回答时间: {{ demand.answered_at.strftime('%Y-%m-%d %H:%M') }}</span>
|
||||
</div>
|
||||
{% else %}
|
||||
<span class="status waiting">待回答</span>
|
||||
{% endif %}
|
||||
<div class="actions">
|
||||
<a href="{{ url_for('edit_demand', id=demand.id) }}" class="btn btn-edit">编辑</a>
|
||||
<a href="{{ url_for('answer_demand', id=demand.id) }}" class="btn btn-answer">回答</a>
|
||||
<form method="POST" action="{{ url_for('toggle_public', id=demand.id) }}" style="display: inline;">
|
||||
<button type="submit" class="btn btn-toggle">
|
||||
{% if demand.is_public %}设为私有{% else %}设为公开{% endif %}
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% else %}
|
||||
<p class="empty">暂无需求</p>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user