Skip to content

Commit

Permalink
Updated FOD job for MARC batch
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremy Nelson committed Aug 30, 2013
1 parent fcc499c commit 3b4c7b7
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 8 deletions.
4 changes: 2 additions & 2 deletions marc_batch/jobs/fod.py
Expand Up @@ -164,8 +164,8 @@ def validate300(self,marc_record):
raw_string = ''.join(field300.get_subfields('b'))
good_300b = '{0}, {1}'.format('digital',
DIGITAL_RE.sub('',raw_string).strip())
if good300b[-1] == ",":
good300b =
if good_300b[-1] == ",":
good_300b = good_300b[:-1]
subfield_e = field300['e']
if subfield_e is not None:
good_300b += " + "
Expand Down
84 changes: 79 additions & 5 deletions marc_batch/templates/marc_batch/finished.html
Expand Up @@ -4,9 +4,83 @@
{% block more-css %}{% endblock %}


{% block app-main-body %}
<h1>Finished {{ log.job.name }}</h1>
<p>
{{ log }}
</p>
{% block body %}
{# START title Row #}
<div class="row" id="first-container">
<div class="col-sm-12 col-md-12">
<h1>Finished {{ log_entry.job.name }}</h1>
{# END title Row #}
</div>
{# START log details row #}
<div clas="row">
{# START log detail col #}
<div class="col-sm-6 col-md-6">
<div class="table-responsive">
<table class="table table-hover">
<tr>
<th>Processed on</th>
<td>{{ log_entry.created_on|date:"F d, Y H:i a"}}</td>
</tr>
<tr>
<th>Description</th>
<td>
{{ log_entry.description }}
</td>
</tr>
<tr>
<th>New Records</th>
<td>
{% if log_entry.new_records %}
{{ log_entry.new_records }}
{% else %}
0
{% endif %}
</td>
</tr>
<tr>
<th>Overlaid Records</th>
<td>
{% if log_entry.overload_records %}
{{ log_entry.overload_records }}
{% else %}
0
{% endif %}
</td>
</tr>
<tr>
<th>Rejected Records</th>
<td>
{% if log_entry.rejected_records %}
{{ log_entry.rejected_records }}
{% else %}
0
{% endif %}
</td>
</tr>

<tr>
<th>Modified MARC File</th>
<td> <a class="btn btn-success btn-mini"
title="Download Modified MARC File"
href="/apps/{{ app.url }}download?log_pk={{ log.pk }}">
<i class="glyphicon glyphicon-download-alt"></i>
</a>
</td>
</tr>
<tr>
<th>Original MARC File</th>
<td>
<a class="btn btn-success btn-mini"
href="/apps/{{ app.url }}download?original=yes&log_pk={{ log.pk }}"
title="Download Original MARC File">
<i class="glyphicon glyphicon-download-alt"></i>
</a>
</td>
</tr>
</table>
</div>
{# END log detail col #}
</div>
{# END log details row #}
</div>
{% endblock %}
2 changes: 1 addition & 1 deletion marc_batch/views.py
Expand Up @@ -173,7 +173,7 @@ def job_finished(request,job_log_pk):
:param request: HTTP Request
:param job_log_pk: Job Log's primary key
"""
job_log = JobLog.objects.get(pk=job_log_pk)
job_log = ILSJobLog.objects.get(pk=job_log_pk)
return direct_to_template(request,
'marc_batch/finished.html',
{'app':APP,
Expand Down

0 comments on commit 3b4c7b7

Please sign in to comment.