<commit_before>{% extends "dashboard/action.html" %}{% load bootstrap4 %}{% load i18n %}{% load icons %}
{% load static %}

{% block title%}{% trans "Namensschilder erstellen" %} | {% trans "Dashboard" %}{% endblock %}


{% block content_dashboard_view %}
{% bootstrap_messages %}

<div class="card mb-3">
	<div class="card-header bg-primary text-white">
		<h3>{% trans "Namensschilder erstellen" %} <span class="badge badge-pill badge-light text-primary">{{ count_staff }}</span></h3>
	</div>

	<div class="card-body">
		<div class="table-responsive">
			<table class="table table-striped">
				<thead>
					<tr>
						<th>Name</th>
						<th>{% trans "Tutor" %}</th>
						<th>{% trans "Jobs" %}</th>
					</tr>
				</thead>
				<tbody>
					{% for orga in staff %}
					<tr>
						<td>{{ orga.prename }} {{ orga.name }}</td>
						<td>{% if orga.is_tutor %}{% icon "check" %}{% else %}{% icon "times" %}{% endif %} </td>
						<td>{{ orga.get_approved_orgajob_names | join:", " }}</td>
					</tr>
					{% endfor %}
				</tbody>
			</table>
		</div>
		<form action="{{ request.path }}" method="post">{% csrf_token %}
			<input type="hidden" name="action" value="all_nametags">
			<button class="float-right btn btn-primary" type="submit">{% trans "PDF mit allen Namensschildern erstellen" %}</button>
		</form>
	</div>
</div>
<form action="{{ request.path }}" method="post">{% csrf_token %}
	<div class="card mb-3">
		<div class="card-header bg-primary text-white">
			<h3>{% trans "Einzelschild" %}</h3>
		</div>
		<div class="card-body">
			{% if img %}
			<img class="center-block" style="width:30em;" src="data:image/png;base64,{{ img }}">
			<br>
			{% endif %}
			<div class="form-row">
				<div class="form-group col-4">
                    <img class="img-fluid col-8" src="{% static 'website/ophasen-wesen.svg' %}" />
                </div>
				<div class="form-group col-6 float-right">
					<label for="prename"> {% trans "Vorname" %}</label>
					<input tabindex="1" class="form-control" id="prename" name="prename" required>
					<label for="name"> {% trans "Nachname" %}</label>
					<input tabindex="2" class="form-control" id="name" name="name" required>
				</div>
			</div>
			<br>
			<div class="table-responsive">
				<table class="table table-bordered table-striped table-highlight text-center">
					<tbody>
						<tr>
							<td class="align-middle"><input type="checkbox" tabindex="3" name="tutor" id="tutor"/></td>
							<td class="align-middle"><input type="checkbox" tabindex="4" name="orga" id="orga" /></td>
							<td><input type="text" tabindex="5" class="form-control" name="extrahead" id="extrahead" placeholder="{% trans "Zusätzlicher Buchstabe" %}" /></td>
							<td class="align-middle"><input type="checkbox" tabindex="7" name="helpdesk" id="helpdesk"/></td>
							<td class="align-middle"><input type="checkbox" tabindex="8" name="leitung" id="leitung"/></td>
						</tr>
                        <th class="align-bottom"><label for="tutor">{% trans "Tutor" %}</label></th>
                        <th class="align-bottom"><label for="orga">{% trans "Orga" %}</label></th>
						<th><input tabindex="6" type="text" class="form-control" name="extrarow" id="extrarow" placeholder="{% trans "Zusätzliche Aufgabe" %}"/></th>
                        <th class="align-bottom"><label for="helpdesk">{% trans "Helpdesk" %}</label></th>
                        <th class="align-bottom"><label for="leitung">{% trans "Leitung" %}</label></th>
                    </tbody>
				</table>
			</div>
			<input type="hidden" name="action" value="single_nametag">
			<button tabindex="9" class="float-right btn btn-primary" type="submit">{% trans "Namensschild erstellen" %}</button>
		</div>
	</div>
</form>
<div class="card mb-3">
	<div class="card-header bg-primary text-white">
		<h3>{% trans "Gruppenschilder erstellen" %} <span class="badge badge-pill badge-light text-primary">{{ groupscount }}</span></h3>
	</div>
	<div class="card-body">
		{% trans "Erstellt eine PDF-Datei mit Schildern (Name und Bild für jede Gruppe)" %}
		<form action="{{ request.path }}" method="post">{% csrf_token %}
			<input type="hidden" name="action" value="group_signs">
			{% if groups_without_picture != 0 %}
			{% url 'dashboard:staff:group_picture_add' as group_picture_url%}
			<div class="alert alert-danger" role="alert">{% blocktrans count counter=groups_without_picture %}
				Es gibt <strong>eine</strong>
				Gruppe ohne Bilder.
				{% plural %}
				Es gibt <strong>{{ groups_without_picture }}</strong>
				Gruppen ohne Bilder.
				{% endblocktrans %}
				{% blocktrans %}
				Wenn nicht alle Bilder eingetragen sind, funktioniert die Generierung nicht.
				Bilder können <a href="{{ group_picture_url }}">hier</a> nachgetragen werden.
				{% endblocktrans %}
			</div>
			<button class="float-right btn btn-primary disabled" type="button">{% trans "PDF mit allen Gruppenschildern erstellen" %}</button>
			{% else %}
			<button class="float-right btn btn-primary" type="submit">{% trans "PDF mit allen Gruppenschildern erstellen" %}</button>
			{% endif %}
		</form>
	</div>
</div>
<div class="card mb-3"><commit_msg>Fix box sizing of tutor nametag card in dashboard<commit_after>{% extends "dashboard/action.html" %}{% load bootstrap4 %}{% load i18n %}{% load icons %}
{% load static %}

{% block title%}{% trans "Namensschilder erstellen" %} | {% trans "Dashboard" %}{% endblock %}


{% block content_dashboard_view %}
{% bootstrap_messages %}

    <div class="card mb-3 vh-25">
        <div class="card-header bg-primary text-white">
            <h3>{% trans "Namensschilder erstellen" %} <span
                    class="badge badge-pill badge-light text-primary">{{ count_staff }}</span></h3>
        </div>

        <div class="card-body overflow-auto">
            <div class="table-responsive">
                <table class="table table-striped">
                    <thead>
                    <tr>
                        <th>Name</th>
                        <th>{% trans "Tutor" %}</th>
                        <th>{% trans "Jobs" %}</th>
                    </tr>
                    </thead>
                    <tbody>
                    {% for orga in staff %}
                        <tr>
                            <td>{{ orga.prename }} {{ orga.name }}</td>
                            <td>{% if orga.is_tutor %}{% icon "check" %}{% else %}{% icon "times" %}{% endif %} </td>
                            <td>{{ orga.get_approved_orgajob_names | join:", " }}</td>
                        </tr>
                    {% endfor %}
                    </tbody>
                </table>
            </div>
        </div>
        <div class="card-footer">
            <form action="{{ request.path }}" method="post">{% csrf_token %}
                <input type="hidden" name="action" value="all_nametags">
                <button class="float-right btn btn-primary"
                        type="submit">{% trans "PDF mit allen Namensschildern erstellen" %}</button>
            </form>
        </div>
    </div>
    <form action="{{ request.path }}" method="post">{% csrf_token %}
        <div class="card mb-3">
            <div class="card-header bg-primary text-white">
                <h3>{% trans "Einzelschild" %}</h3>
            </div>
            <div class="card-body">
                {% if img %}
                    <img class="center-block" style="width:30em;" src="data:image/png;base64,{{ img }}">
                    <br>
                {% endif %}
                <div class="form-row">
                    <div class="form-group col-4">
                        <img class="img-fluid col-8" src="{% static 'website/ophasen-wesen.svg' %}"/>
                    </div>
                    <div class="form-group col-6 float-right">
                        <label for="prename"> {% trans "Vorname" %}</label>
                        <input tabindex="1" class="form-control" id="prename" name="prename" required>
                        <label for="name"> {% trans "Nachname" %}</label>
                        <input tabindex="2" class="form-control" id="name" name="name" required>
                    </div>
                </div>
                <br>
                <div class="table-responsive">
                    <table class="table table-bordered table-striped table-highlight text-center">
                        <tbody>
                        <tr>
                            <td class="align-middle"><input type="checkbox" tabindex="3" name="tutor" id="tutor"/></td>
                            <td class="align-middle"><input type="checkbox" tabindex="4" name="orga" id="orga"/></td>
                            <td><input type="text" tabindex="5" class="form-control" name="extrahead" id="extrahead"
                                       placeholder="{% trans "Zusätzlicher Buchstabe" %}"/></td>
                            <td class="align-middle"><input type="checkbox" tabindex="7" name="helpdesk" id="helpdesk"/>
                            </td>
                            <td class="align-middle"><input type="checkbox" tabindex="8" name="leitung" id="leitung"/>
                            </td>
                        </tr>
                        <th class="align-bottom"><label for="tutor">{% trans "Tutor" %}</label></th>
                        <th class="align-bottom"><label for="orga">{% trans "Orga" %}</label></th>
                        <th><input tabindex="6" type="text" class="form-control" name="extrarow" id="extrarow"
                                   placeholder="{% trans "Zusätzliche Aufgabe" %}"/></th>
                        <th class="align-bottom"><label for="helpdesk">{% trans "Helpdesk" %}</label></th>
                        <th class="align-bottom"><label for="leitung">{% trans "Leitung" %}</label></th>
                        </tbody>
                    </table>
                </div>
                <input type="hidden" name="action" value="single_nametag">
            </div>
            <div class="card-footer">
                <button tabindex="9" class="float-right btn btn-primary"
                        type="submit">{% trans "Namensschild erstellen" %}</button>

            </div>
        </div>
    </form>
<div class="card mb-3">
	<div class="card-header bg-primary text-white">
		<h3>{% trans "Gruppenschilder erstellen" %} <span class="badge badge-pill badge-light text-primary">{{ groupscount }}</span></h3>
	</div>
	<div class="card-body">
		{% trans "Erstellt eine PDF-Datei mit Schildern (Name und Bild für jede Gruppe)" %}
		<form action="{{ request.path }}" method="post">{% csrf_token %}
			<input type="hidden" name="action" value="group_signs">
			{% if groups_without_picture != 0 %}
			{% url 'dashboard:staff:group_picture_add' as group_picture_url%}
			<div class="alert alert-danger" role="alert">{% blocktrans count counter=groups_without_picture %}
				Es gibt <strong>eine</strong>
				Gruppe ohne Bilder.
				{% plural %}
				Es gibt <strong>{{ groups_without_picture }}</strong>
				Gruppen ohne Bilder.
				{% endblocktrans %}
				{% blocktrans %}
				Wenn nicht alle Bilder eingetragen sind, funktioniert die Generierung nicht.
				Bilder können <a href="{{ group_picture_url }}">hier</a> nachgetragen werden.
				{% endblocktrans %}
			</div>
			<button class="float-right btn btn-primary disabled" type="button">{% trans "PDF mit allen Gruppenschildern erstellen" %}</button>
			{% else %}
			<button class="float-right btn btn-primary" type="submit">{% trans "PDF mit allen Gruppenschildern erstellen" %}</button>
			{% endif %}
		</form>
	</div>
</div>
<div class="card mb-3">
{'fraction_non_alphanumeric': 0.18027152431689294, 'fraction_numerical': 0.0053273758377728134, 'mean_word_length': 2.355145575093687, 'pattern_counts': {'":': 0, '<': 279, '<?xml version=': 0, '>': 279, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1688065', 'n_tokens_mistral': 4081, 'n_tokens_neox': 3584, 'n_words': 838}