parent
cd03c2109a
commit
617469405a
|
@ -197,6 +197,7 @@ FIRST_CUTOFF_DAYS = 5
|
|||
SECOND_CUTOFF_DAYS = 3
|
||||
|
||||
STAGING_PATH = '/a/www/www6s/staging/'
|
||||
STAGING_URL = 'http://www.ietf.org/staging/'
|
||||
IDNITS_PATH = '/a/www/ietf-datatracker/release/idnits'
|
||||
MAX_PLAIN_DRAFT_SIZE = 6291456 # Max size of the txt draft in bytes
|
||||
|
||||
|
|
0
ietf/submit/templatetags/__init__.py
Normal file
0
ietf/submit/templatetags/__init__.py
Normal file
17
ietf/submit/templatetags/submit_tags.py
Normal file
17
ietf/submit/templatetags/submit_tags.py
Normal file
|
@ -0,0 +1,17 @@
|
|||
import os
|
||||
|
||||
from django import template
|
||||
from django.conf import settings
|
||||
|
||||
register = template.Library()
|
||||
|
||||
|
||||
@register.inclusion_tag('submit/submission_files.html', takes_context=True)
|
||||
def show_submission_files(context, submission):
|
||||
result = []
|
||||
for ext in submission.file_type.split(','):
|
||||
source = os.path.join(settings.STAGING_PATH, '%s-%s%s' % (submission.filename, submission.revision, ext))
|
||||
if os.path.exists(source):
|
||||
result.append({'name': '[%s version ]' % ext[1:].capitalize(),
|
||||
'url': '%s%s-%s%s' % (settings.STAGING_URL, submission.filename, submission.revision, ext)})
|
||||
return {'files': result}
|
|
@ -1,4 +1,5 @@
|
|||
{% extends "submit/draft_status.html" %}
|
||||
{% load submit_tags %}
|
||||
{% block title %}Adjust Meta-Data{% endblock %}
|
||||
|
||||
{% block morecss %}
|
||||
|
@ -87,7 +88,9 @@ table.ietf-table span.field-error { display: block; color: red; }
|
|||
</div>
|
||||
|
||||
<table class="metadata-table">
|
||||
<tr><th>Document</th><td>{{ detail.filename }} <a class="twopages_trigger" href="#">[View first two pages]</a></td></tr>
|
||||
<tr><th>Document</th><td>{{ detail.filename }} <a class="twopages_trigger" href="#">[View first two pages]</a>
|
||||
{% show_submission_files detail %}
|
||||
</td></tr>
|
||||
<tr><th>Submission date</th><td>{{ detail.submission_date }}</td></tr>
|
||||
<tr><th>WG</th><td>{{ validation.wg|default:"Individual Submission" }}</td></tr>
|
||||
<tr><th>File size</th><td>{{ detail.filesize|filesizeformat }}</td></tr>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{% extends "submit/submit_base.html" %}
|
||||
{% load submit_tags %}
|
||||
{% block title %}Submission status{% endblock %}
|
||||
|
||||
{% block morecss %}
|
||||
|
@ -130,7 +131,9 @@ returned to the submitter.
|
|||
{% endif %}
|
||||
|
||||
<table class="metadata-table">
|
||||
<tr><th>Document</th><td>{{ detail.filename }} <a class="twopages_trigger" href="#">[View first two pages]</a></td></tr>
|
||||
<tr><th>Document</th><td>{{ detail.filename }} <a class="twopages_trigger" href="#">[View first two pages]</a>
|
||||
{% show_submission_files detail %}
|
||||
</td></tr>
|
||||
<tr{% if validation.warnings.revision %} class="warning"{% endif %}><th>Revision</th><td>{{ detail.revision }}<div class="warn_message">{{ validation.warnings.revision }}</div></td></tr>
|
||||
<tr><th>Submission date</th><td>{{ detail.submission_date }}</td></tr>
|
||||
<tr><th>Title</th><td>{{ detail.id_document_name }}</td></tr>
|
||||
|
|
7
ietf/templates/submit/submission_files.html
Normal file
7
ietf/templates/submit/submission_files.html
Normal file
|
@ -0,0 +1,7 @@
|
|||
{% if files %}
|
||||
<ul>
|
||||
{% for file in files %}
|
||||
<li><a href="{{ file.url }}" target="_blank">{{ file.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
Loading…
Reference in a new issue