Files
fet2020/fet2020/templates/blackboard/index.html

79 lines
4.1 KiB
HTML

{% extends 'base.html' %}
{% load flatpages %}
{% block title %}Jobs{% endblock %}
{% block content %}
<!-- Main Content -->
<main class="container mx-auto w-full px-4 mt-8 flex-1">
<h1 class="page-title">Jobs</h1>
<div class="lg:w-2/3 xl:w-7/12 mx-auto">
{% get_flatpages '/blackboard-info/' as bb_infos %}
{% if bb_infos %}
<section class="my-8 flex flex-col gap-2">
<div class="db-page-content">
<!-- Content from DB here: -->
{{ bb_infos.first.content|safe }}
</div>
{% if request.user.is_authenticated %}
<a href="{% url 'admin:core_customflatpage_change' bb_infos.first.id %}" class="self-center sm:self-end btn-small btn-primary w-full sm:w-auto max-w-sm">
<i class="fa-solid fa-pen-to-square mr-1"></i>Info-Text bearbeiten
</a>
{% endif %}
</section>
{% endif %}
{% if job_postings %}
<section class="my-8 flex flex-col gap-2">
<div class="jobsList">
{% for job in job_postings %}
{% if not forloop.first %}
<hr>
{% endif %}
{% include 'blackboard/partials/_show_job_posting.html' %}
{% endfor %}
</div>
{% if request.user.is_authenticated %}
<div class="inline-flex flex-col sm:flex-row sm:justify-end gap-2 w-full sm:w-auto">
<a href="{% url 'admin:blackboard_jobposting_add' %}" class="self-center block btn-small btn-primary w-full sm:w-auto max-w-sm">
<i class="fa-solid fa-square-plus mr-1"></i>Neuer Eintrag
</a>
</div>
{% endif %}
</section>
{% else %}
<section class="my-8 p-8 flex flex-col gap-2 items-center border-2 border-dashed rounded border-gray-300 dark:border-gray-600">
{% get_flatpages '/blackboard-blank/' as bb_blanks %}
{% if bb_blanks %}
<div class="text-center text-gray-600 dark:text-gray-300">
<svg xmlns="http://www.w3.org/2000/svg" class="mx-auto h-8 w-8 text-gray-400 dark:text-gray-400 text-2xl mb-4" viewBox="0 0 20 20" fill="currentColor">
<path fill-rule="evenodd" d="M5 2a1 1 0 011 1v1h1a1 1 0 010 2H6v1a1 1 0 01-2 0V6H3a1 1 0 010-2h1V3a1 1 0 011-1zm0 10a1 1 0 011 1v1h1a1 1 0 110 2H6v1a1 1 0 11-2 0v-1H3a1 1 0 110-2h1v-1a1 1 0 011-1zM12 2a1 1 0 01.967.744L14.146 7.2 17.5 9.134a1 1 0 010 1.732l-3.354 1.935-1.18 4.455a1 1 0 01-1.933 0L9.854 12.8 6.5 10.866a1 1 0 010-1.732l3.354-1.935 1.18-4.455A1 1 0 0112 2z"
clip-rule="evenodd"/>
</svg>
{{ bb_blanks.first.content|safe }}
</div>
{% endif %}
{% if request.user.is_authenticated %}
<div class="inline-flex flex-col sm:flex-row gap-2 w-full sm:w-auto">
<a href="{% url 'admin:blackboard_jobposting_add' %}" class="self-center block btn-small btn-primary w-full sm:w-auto max-w-sm">
<i class="fa-solid fa-square-plus mr-1"></i>Neuer Eintrag
</a>
{% if bb_blanks %}
<a href="{% url 'admin:core_customflatpage_change' bb_blanks.first.id %}" class="self-center block btn-small btn-primary w-full sm:w-auto max-w-sm">
<i class="fa-solid fa-pen-to-square mr-1"></i>Fülltext bearbeiten
</a>
{% endif %}
</div>
{% endif %}
</section>
{% endif %}
</div>
</main>
{% endblock %}