fix merge conflicts

This commit is contained in:
2022-03-06 12:48:31 +00:00
36 changed files with 121 additions and 0 deletions

View File

@@ -17,8 +17,13 @@ def index(request):
t = set(t for t in get_tags(posts_for_tags))
# set the pinned post
<<<<<<< HEAD
pinned_post = Post.articles.pinned()
if pinned_post:
=======
featured_post = Post.articles.get_pinned_article()
if featured_post:
>>>>>>> 3837b9ae32918b2a2fef76f460522465c7cf557f
# remove the pinned post
posts.remove(pinned_post)
@@ -27,9 +32,13 @@ def index(request):
if not featured_event:
featured_event = Event.only_events.past_events().first()
<<<<<<< HEAD
featured_meeting = deque([])
featured_meeting.append(FetMeeting.objects.future_events().first())
featured_meeting.append(FetMeeting.objects.past_events().first())
=======
featured_meeting = deque(FetMeeting.objects.get_meetings())
>>>>>>> 3837b9ae32918b2a2fef76f460522465c7cf557f
context = {
"posts": deque(list(posts)[:5]),

View File

@@ -81,10 +81,15 @@ def jobs_view(request, slug=None):
def members_view(request, filter=None):
pinned_job_groups, unpinned_job_groups = __get_job_groups()
<<<<<<< HEAD
for elem in Member.MemberRole:
if filter == elem.label.lower():
members = Member.all_members.filter(role=elem.value)
break
=======
if filter in Member.MemberRole:
members = Member.all_members.filter(role=filter)
>>>>>>> 3837b9ae32918b2a2fef76f460522465c7cf557f
else:
logger.info("Wrong member role '{}'".format(filter))
raise Http404("no member role")

View File

@@ -173,7 +173,20 @@ class FetMeetingManager(PublishedManager, Manager):
qs = self.published().filter(event_start__gt=date_today)
return qs.reverse()
<<<<<<< HEAD
def past_events(self):
date_today = timezone.now()
qs = self.published().filter(event_start__lt=date_today)
return qs
=======
def get_meetings(self):
meetings = []
if self._get_future_events().first():
meetings.append(self._get_future_events().first())
if self._get_past_events().first():
meetings.append(self._get_past_events().first())
return meetings
>>>>>>> 3837b9ae32918b2a2fef76f460522465c7cf557f

View File

@@ -201,8 +201,13 @@ def show(request, id=None):
"files": files,
"author": author,
"author_image": author_image,
<<<<<<< HEAD
"next": __next(post, public_only),
"previous": __previous(post, public_only),
=======
"next": get_next_dict(p),
"previous": get_previous_dict(p),
>>>>>>> 3837b9ae32918b2a2fef76f460522465c7cf557f
"related_posts": related_posts[0:6],
"ep_agenda_link": ep_agenda_link,
"ep_protocol_link": ep_protocol_link,
@@ -305,3 +310,27 @@ def __previous(post=None, public=True):
break
return d
def get_previous_dict(post=None):
# TODO: Docstring
posts = None
d = post.slug
if post:
# TODO: bad implementation but it works!!
if post.post_type == "N" or post.post_type == "E":
posts = Post.articles.get_visible_articles()
elif post.post_type == "F":
posts = FetMeeting.objects.get_queryset().order_by("-event_start")
if posts:
for k, v in enumerate(posts):
if post.slug == v.slug:
if k < 1:
d = posts[len(posts) - 1].slug
else:
d = posts[k - 1].slug
break
return d

Binary file not shown.

Before

Width:  |  Height:  |  Size: 549 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 534 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 516 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 422 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 446 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 529 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 590 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 721 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 382 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 487 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 361 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 192 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 140 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 184 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 173 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 232 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

View File

@@ -40,8 +40,11 @@
<link rel="stylesheet" href="{% static 'fonts/Besley-2.0/besley.css' %}">
<link rel="stylesheet" href="{% static 'fonts/Fira_Code-6.2/fira_code.css' %}">
<<<<<<< HEAD
{% block galleryheader %}
{% endblock %}
=======
>>>>>>> 3837b9ae32918b2a2fef76f460522465c7cf557f
{% block extraheader %}
{% endblock %}
</head>
@@ -69,8 +72,13 @@
x-transition:leave-end="transform opacity-0 scale-90"
>
<li><a href="{% url 'posts:posts.index' %}">News</a></li>
<<<<<<< HEAD
<li><a href="{% url 'members_view' 'active' %}">Fachschaft</a></li>
<li><a href="{% url 'gallery' %}">Galerie</a></li>
=======
<li><a href="{% url 'members_view' 'A' %}">Fachschaft</a></li>
<li><a href="/fotos/">Fotos</a></li>
>>>>>>> 3837b9ae32918b2a2fef76f460522465c7cf557f
<li><a href="{% url 'blackboard' %}">Blackboard</a></li>
<li><a href="{% url 'contact' %}">Kontakt</a></li>
@@ -122,6 +130,7 @@
<footer>
<ul class="icon-list">
<li>
<<<<<<< HEAD
<a href="{% url 'facebook' %}"><i class="fab fa-facebook"></i></a>
</li>
<li>
@@ -132,6 +141,18 @@
</li>
<li>
<a href="{% url 'telegram' %}"><i class="fab fa-telegram"></i></a>
=======
<a href="https://facebook.fet.at/"><i class="fab fa-facebook"></i></a>
</li>
<li>
<a href="https://instagram.fet.at/"><i class="fab fa-instagram"></i></a>
</li>
<li>
<a href="https://discord.fet.at/"><i class="fab fa-discord"></i></a>
</li>
<li>
<a href="https://telegram.fet.at/"><i class="fab fa-telegram"></i></a>
>>>>>>> 3837b9ae32918b2a2fef76f460522465c7cf557f
</li>
<li>
<a href="mailto:service@fet.at"><i class="fas fa-envelope"></i></a>

View File

@@ -22,9 +22,13 @@
{% endwith %}
{% endif %}
{% for post in featured_meeting %}
<<<<<<< HEAD
{% if post %}
{% include 'posts/partials/_meeting_row.html' %}
{% endif %}
=======
{% include 'posts/partials/_meeting_row.html' %}
>>>>>>> 3837b9ae32918b2a2fef76f460522465c7cf557f
{% endfor %}
</div>
@@ -91,7 +95,11 @@
</span>
<i class="fab fa-discord text-4xl"></i>
</div>
<<<<<<< HEAD
<a href="{% url 'discord' %}" class="flex-1">
=======
<a href="https://discord.fet.at/" class="flex-1">
>>>>>>> 3837b9ae32918b2a2fef76f460522465c7cf557f
FET Discord-Server<br>
<span class="hidden lg:inline text-sm text-gray-300 dark:text-gray-400">Du hast Fragen zum Studium oder möchtest dich einfach mich anderen Studierenden austauschen? </span><span class="text-sm text-gray-300 dark:text-gray-400">Klicke hier zum Beitreten <span class="hidden sm:inline"><i class="far fa-angle-right"></i></span></span>
</a>

View File

@@ -12,8 +12,11 @@
<link rel="stylesheet" href="{% static 'app.css' %}">
<link rel="stylesheet" href="{% static 'fet.css' %}">
<link href="{% static 'fontawesomefree/css/all.min.css' %}" rel="stylesheet" type="text/css">
<<<<<<< HEAD
{% block galleryheader %}
{% endblock %}
=======
>>>>>>> 3837b9ae32918b2a2fef76f460522465c7cf557f
{% block extraheader %}
{% endblock %}
</head>

View File

@@ -50,8 +50,13 @@
<hr class="">
<<<<<<< HEAD
<li class="{% if 'pension' in request.path %}active{% endif %}">
<a href="{% url 'members_view' 'pension' %}">Pension</a>
=======
<li class="{% if '/members/P' == request.path %}active{% endif %}">
<a href="{% url 'members_view' 'P' %}">Pension</a>
>>>>>>> 3837b9ae32918b2a2fef76f460522465c7cf557f
</li>
<li class="{% if '/members/' == request.path %}active{% endif %}">

View File

@@ -10,7 +10,15 @@
<a href="{{ post.url }}"><h3 class="text-gray-50">{{ post.title | safe }}</h3></a>
<div class="text-gray-200">
<i class="fas fa-clock"></i>
<<<<<<< HEAD
{{ post.date|date:"d. F Y" }}
=======
{% if post.post_type != 'N' %}
{{ post.event_start|date:"d. F Y" }}
{% else %}
{{ post.public_date|date:"d. F Y" }}
{% endif %}
>>>>>>> 3837b9ae32918b2a2fef76f460522465c7cf557f
</div>
</div>
</div>

View File

@@ -2,7 +2,15 @@
<a href="{{ post.url }}" class="block p-4">
<div class="float-right px-2 py-0.5 rounded-full text-sm font-medium text-proprietary dark:text-blue-100 bg-blue-200 dark:bg-proprietary-dark">
<i class="fa-solid fa-calendar-days mr-1"></i>
<<<<<<< HEAD
<p>{{ post.date|date:"d. F Y" }}</p>
=======
{% if post.post_type != 'N' %}
{{ post.event_start|date:"d.m.Y" }}
{% else %}
{{ post.public_date|date:"d.m.Y" }}
{% endif %}
>>>>>>> 3837b9ae32918b2a2fef76f460522465c7cf557f
</div>
<h3 class="text-gray-800 dark:text-gray-200 leading-relaxed">{{ post.title | safe | truncatechars:60 }}</h3>
</a>

View File

@@ -65,7 +65,11 @@
<div class="sm:flex flex-col justify-evenly text-gray-600 dark:text-gray-300 text-sm sm:text-base">
<a href="{% url 'member' author.id %}" class="underline">{{ author.firstname }}</a>
<span class="sm:hidden"> am </span>
<<<<<<< HEAD
<span>{{ post.date|date:"d. F Y" }}</span>
=======
<span>{{ post.public_date|date:"d. F Y" }}</span>
>>>>>>> 3837b9ae32918b2a2fef76f460522465c7cf557f
</div>
{% elif post.author %}
@@ -73,7 +77,11 @@
<div class="sm:flex flex-col justify-evenly text-gray-600 dark:text-gray-300 text-sm sm:text-base">
<a class="underline">{{ post.author|capfirst }}</a>
<span class="sm:hidden"> am </span>
<<<<<<< HEAD
<span>{{ post.date|date:"d. F Y" }}</span>
=======
<span>{{ post.public_date|date:"d. F Y" }}</span>
>>>>>>> 3837b9ae32918b2a2fef76f460522465c7cf557f
</div>
{% else %}
@@ -81,7 +89,11 @@
<div class="sm:flex flex-col justify-evenly text-gray-600 dark:text-gray-300 text-sm sm:text-base">
<a class="underline">fet.at Redaktion</a>
<span class="sm:hidden"> am </span>
<<<<<<< HEAD
<span>{{ post.date|date:"d. F Y" }}</span>
=======
<span>{{ post.public_date|date:"d. F Y" }}</span>
>>>>>>> 3837b9ae32918b2a2fef76f460522465c7cf557f
</div>
{% endif %}