Skip to content
This repository was archived by the owner on Jun 18, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions django-verdant/rca/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -4572,14 +4572,6 @@ class RcaNowPage(Page, SocialFields):
class Meta:
verbose_name = 'RCA Now Page'

def author_profile_page(self):
"""Return the profile page for the author of this post, if one exists (and is live)"""
if self.owner:
try:
return NewStudentPage.objects.filter(live=True, owner=self.owner)[0]
except IndexError:
return None


RcaNowPage.content_panels = [
InlinePanel('carousel_items', label="Carousel content"),
Expand Down Expand Up @@ -4817,13 +4809,6 @@ class RcaBlogPage(Page, SocialFields):
class Meta:
verbose_name = 'Blog Page'

def author_profile_page(self):
"""Return the profile page for the author of this post, if one exists (and is live)"""
if self.owner:
try:
return NewStudentPage.objects.filter(live=True, owner=self.owner)[0]
except IndexError:
return None

def blog_index(self):
"""Return the parent blog index for the blog page, so that it can be displayed in the Homepage packery area"""
Expand Down
13 changes: 4 additions & 9 deletions django-verdant/rca/templates/rca/rca_blog_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,10 @@
<section class="four">
<div class="meta-data">
<dl>
{% with self.author_profile_page as author_profile_page %}
{% if author_profile_page %}
<dd>By</dd>
<dt><a href="{% pageurl author_profile_page %}">{{ author_profile_page.title }}</a></dt>
{% elif self.author %}
<dd>By</dd>
<dt>{{ self.author }}</dt>
{% endif %}
{% endwith %}
{% if self.author %}
<dd>By</dd>
<dt>{{ self.author }}</dt>
{% endif %}

<dd>Date</dd>
<dt>{{ self.date|date:"j F Y" }}</dt>
Expand Down
13 changes: 4 additions & 9 deletions django-verdant/rca/templates/rca/rca_now_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,10 @@
<section class="four">
<div class="meta-data">
<dl>
{% with self.author_profile_page as author_profile_page %}
{% if author_profile_page %}
<dd>By</dd>
<dt><a href="{% pageurl author_profile_page %}">{{ author_profile_page.title }}</a></dt>
{% elif self.author %}
<dd>By</dd>
<dt>{{ self.author }}</dt>
{% endif %}
{% endwith %}
{% if self.author %}
<dd>By</dd>
<dt>{{ self.author }}</dt>
{% endif %}

<dd>Date</dd>
<dt>{{ self.date|date:"j F Y" }}</dt>
Expand Down