Giter Club home page Giter Club logo

ctfd_chinese_cn's Issues

建议去官方CTFd库去Fork一个然后提交一个requests

建议去官方CTFd库去Fork一个然后将主题文件放上去,再提交一个requests,让官方使用本库中的中文主题,这样你相当于对CTFd这样的大项目有了贡献,可以成为你的简历的,同时也方便我们国内的使用

3.4.0 submissions 页面不显示 user challenge

将submissions.html内容替换

{% extends "admin/base.html" %}

{% block stylesheets %}
{% endblock %}

{% block content %}

<div class="jumbotron">
	<div class="container">
		<h1>{% if type %}{{ type|title }} {% endif %}提交记录</h1>
	</div>
</div>

<div class="container">

	<div class="row">
		<div class="col-md-12">
			{% if q and field %}
			<h5 class="text-muted text-center">
				搜索 <strong>{{ field }}</strong> matching <strong>{{ q }}</strong>的记录
			</h5>
			<h6 class="text-muted text-center pb-3">
				Page {{ submissions.page }} of {{ submissions.total }} results
			</h6>
			{% endif %}

			{% with form = Forms.submissions.SubmissionSearchForm(field=field, q=q) %}
			<form method="GET" class="form-inline">
				<div class="form-group col-md-2 pr-0">
					{{ form.field(class="form-control custom-select w-100") }}
				</div>
				<div class="form-group col-md-8">
					{{ form.q(class="form-control w-100", placeholder="搜索...") }}
				</div>
				<div class="form-group col-md-2">
					<button type="submit" class="btn btn-primary w-100">
						<i class="fas fa-search" aria-hidden="true"></i>
					</button>
				</div>
			</form>
			{% endwith %}
		</div>
	</div>

	<hr>

	<div class="row">
		<div class="col-md-12">
			<div class="float-right pb-3">
				<div class="btn-group" role="group">
					<button type="button" class="btn btn-outline-danger" id="submission-delete-button">
						<i class="btn-fa fas fa-trash-alt"></i>
					</button>
				</div>
			</div>
		</div>
	</div>
	<div class="row">
		<div class="col-md-12">
			{% set mode = Configs.user_mode %}
			<table id="teamsboard" class="table table-striped border">
				<thead>
					<tr>
						<th class="border-right" data-checkbox>
							<div class="form-check text-center">
								<input type="checkbox" class="form-check-input" data-checkbox-all>&nbsp;
							</div>
						</th>
						<th class="text-center sort-col"><b>ID</b></th>
						{% if mode == UserModeTypes.TEAMS %}
						<th class="sort-col"><b>User</b></th>
						{% endif %}
						<th class="sort-col"><b>{{ get_mode_as_word(capitalize=True) }}</b></th>
						<th class="sort-col"><b>挑战</b></th>
						<th class="sort-col"><b>状态</b></th>
						<th class="sort-col"><b>提交归属</b></th>
						<th class="text-center sort-col"><b>时间</b></th>
					</tr>
				</thead>
				<tbody>
					{% for sub in submissions.items %}
					<tr>
						<td class="border-right" data-checkbox>
							<div class="form-check text-center">
								<input type="checkbox" class="form-check-input" value="{{ sub.id }}" data-submission-id="{{ sub.id }}">&nbsp;
							</div>
						</td>
						<td class="text-center" id="{{ sub.id }}">
							{{ sub.id }}
						</td>
						{% if mode == UserModeTypes.TEAMS %}
						<td>
							<a href="{{ url_for('admin.users_detail', user_id=sub.user_id) }}">
								{{ sub.user.name }}
							</a>
						</td>
						{% endif %}
						<td class="team" id="{{ sub.account_id }}">
							<a href="{{ generate_account_url(sub.account_id, admin=True) }}">
								{{ sub.account.name }}
							</a>
						</td>
						<td class="chal" id="{{ sub.challenge_id }}">
							<a href="{{ url_for('admin.challenges_detail', challenge_id=sub.challenge_id) }}">
								{{ sub.challenge.name }}
							</a>
						</td>
						<td>
							{{ sub.type }}
						</td>
						<td class="flag" id="{{ sub.id }}">
							<pre class="mb-0">{{ sub.provided }}</pre>
						</td>
						<td class="text-center solve-time">
							<span data-time="{{ sub.date | isoformat }}"></span>
						</td>
					</tr>
					{% endfor %}
				</tbody>
			</table>
			{% if submissions.pages > 1 %}
			<div class="text-center">页码
				<br>
				{% if submissions.page != 1 %}
					<a href="{{ prev_page }}">&lt;&lt;&lt;</a>
				{% endif %}
				<select class="page-select">
					{% for page in range(1, submissions.pages + 1) %}
					<option {% if submissions.page == page %}selected{% endif %}>{{ page }}</option>
					{% endfor %}
				</select>
				{% if submissions.next_num %}
					<a href="{{ next_page }}">&gt;&gt;&gt;</a>
				{% endif %}
			</div>
			{% endif %}
		</div>
	</div>
</div>
{% endblock %}

{% block scripts %}
{% endblock %}

{% block entrypoint %}
	<script defer src="{{ url_for('views.themes', theme='admin', path='js/pages/submissions.js') }}"></script>
{% endblock %}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.