sortlog.html 2.14 KB
Newer Older
1
{% from 'macros.html' import moderator_delete %}
Andreas Valder's avatar
Andreas Valder committed
2 3 4 5 6
{% extends "base.html" %}
{% block content %}
<div class="panel-group">
	<div class="panel panel-default">
		<div class="panel-heading">
7 8
			<h1 class="panel-title">Sortierlog 
				<a class="btn btn-default" href="{{url_for('sort_now', ref=request.url)}}">Jetzt einsortieren</a>
9
				<button class="btn btn-default" onclick="$('button[data-path^=\'sorterrorlog.\'][data-path$=\'.deleted\']').each(function (e) { moderator.api.set($(this).data('path'),1,false); }); window.location.reload();">Alle Fehler entfernen</button>
10
			</h1>
Andreas Valder's avatar
Andreas Valder committed
11
		</div>
12 13 14
		<div class="panel-body">
			<p>Hier werden die hochgeladenen Videos einsortiert und geloggt wo jede Datei einsortiert wurde.</p>
		</div>
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
		{% if sorterrorlog %}
		<div class="table-responsive" style="max-height: 250px">
			<table class="table table-condensed">
				<tr>
					<th></th>
					<th>Zeit</th>
					<th>Pfad</th>
					<th>Course</th>
					<th>Matches</th>
				</tr>
				{% for i in sorterrorlog %}
					<tr class="danger">
						<td>{{ moderator_delete(['sorterrorlog',i.id,'deleted']) }}</td>
						<td>{{i.when}}</td>
						<td><a href="{{ config.VIDEOPREFIX }}/{{i.path}}">{{i.path}}</a></td>
						<td><a href="{{url_for('course', id=i.course_id)}}">{{i.course_id}}</a></td>
						<td>
							{% for j in i.matches.split(',') %}
								{% if not loop.first %},{% endif %}
								<a href="{{url_for('course', id=i.course_id)}}#lecture-{{j}}">{{j}}</a>
							{% endfor %}
						</td>
					</tr>
				{% endfor %}
			</table>
		</div>
		{% endif %}
Andreas Valder's avatar
Andreas Valder committed
42 43 44 45 46 47 48 49 50
		<div class="table-responsive">
			<table class="table table-condensed">
				<tr>
					<th>Zeit</th>
					<th>Pfad</th>
					<th>Course</th>
					<th>Lecture</th>
					<th>Video id</th>
				</tr>
51
				{% for i in sortlog %}
Andreas Valder's avatar
Andreas Valder committed
52 53
					<tr>
						<td>{{i.when}}</td>
54 55 56
						<td><a href="{{ config.VIDEOPREFIX }}/{{i.path}}">{{i.path}}</a></td>
						<td><a href="{{url_for('course', id=i.course_id)}}">{{i.course_id}}</a></td>
						<td><a href="{{url_for('course', id=i.course_id)}}#lecture-{{i.lecture_id}}">{{i.lecture_id}}</a></td>
57
						<td>{{i.video_id}}</td>
Andreas Valder's avatar
Andreas Valder committed
58 59 60 61 62 63 64
					</tr>
				{% endfor %}
			</table>
		</div>
	</div>
</div>
{% endblock %}