Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Generate PDFs from Power Test Records" #596

Closed
wants to merge 1 commit into from
Closed
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
4 changes: 0 additions & 4 deletions RIGS/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -943,10 +943,6 @@ def get_absolute_url(self):
def activity_feed_string(self):
return str(self.event)

@property
def name(self):
return f"Power Test Record - {self.event}"


class EventCheckIn(models.Model):
event = models.ForeignKey('Event', related_name='crew', on_delete=models.CASCADE)
Expand Down
4 changes: 0 additions & 4 deletions RIGS/templates/base_print.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@
<paraStyle name="center" alignment="center"/>
<paraStyle name="page-head" alignment="center" fontName="OpenSans-Bold" fontSize="16" leading="18" spaceAfter="0"/>

{% block extrastyles %}
{% endblock %}

<paraStyle name="style.event_description" fontName="OpenSans" textColor="DarkGray" />
<paraStyle name="style.item_description" fontName="OpenSans" textColor="DarkGray" leftIndent="10" />
<paraStyle name="style.specific_description" fontName="OpenSans" textColor="DarkGray" fontSize="10" />
Expand Down Expand Up @@ -140,7 +137,6 @@
<nextFrame/>
{% block content %}
{% endblock %}
<namedString id="lastPage"><pageNumber/></namedString>
</story>

</document>
1 change: 0 additions & 1 deletion RIGS/templates/hs/power_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@
</div>
</div>
<div class="col-12 text-right">
{% button 'print' 'pt_print' object.pk %}
{% button 'edit' url='pt_edit' pk=object.pk %}
{% button 'view' url='event_detail' pk=object.event.pk text="Event" %}
{% include 'partials/review_status.html' with perm=perms.RIGS.review_power review='pt_review' %}
Expand Down
170 changes: 0 additions & 170 deletions RIGS/templates/hs/power_print.xml

This file was deleted.

1 change: 0 additions & 1 deletion RIGS/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@
name='pt_edit'),
path('event/power/<int:pk>/review/', permission_required_with_403('RIGS.review_power')(views.MarkReviewed.as_view()),
name='pt_review', kwargs={'model': 'PowerTestRecord'}),
path('event/power/<int:pk>/print/', permission_required_with_403('RIGS.view_powertestrecord')(views.PowerPrint.as_view()), name='pt_print'),

path('event/<int:pk>/checkin/', login_required(views.EventCheckIn.as_view()),
name='event_checkin'),
Expand Down
10 changes: 0 additions & 10 deletions RIGS/views/hs.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,16 +232,6 @@ def get_context_data(self, **kwargs):
return context


class PowerPrint(PrintView):
model = models.PowerTestRecord
template_name = 'hs/power_print.xml'

def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
context['filename'] = f"PowerTestRecord_for_{context['object'].event.display_id}.pdf"
return context


class EventCheckIn(generic.CreateView, ModalURLMixin):
model = models.EventCheckIn
template_name = 'hs/eventcheckin_form.html'
Expand Down
Loading