/doc/rfcNNNN/: show rfc stream
- Legacy-Id: 2172
This commit is contained in:
parent
7884fe77ee
commit
241c446940
|
@ -291,6 +291,17 @@ class RfcWrapper:
|
|||
return self._rfc_doc_list("also")
|
||||
def has_errata(self):
|
||||
return self._rfcindex and (self._rfcindex.has_errata > 0)
|
||||
def stream_name(self):
|
||||
if not self._rfcindex:
|
||||
return None
|
||||
else:
|
||||
x = self._rfcindex.stream
|
||||
if x == "INDEPENDENT":
|
||||
return "Independent Submission Stream"
|
||||
elif x == "LEGACY":
|
||||
return "Legacy Stream"
|
||||
else:
|
||||
return x+" Stream"
|
||||
|
||||
def in_ietf_process(self):
|
||||
return self.ietf_process != None
|
||||
|
@ -300,11 +311,6 @@ class RfcWrapper:
|
|||
types = types.replace("ascii","txt")
|
||||
return ["."+x for x in types.split(",")]
|
||||
|
||||
# TODO:
|
||||
# also/bcp_number/std_number/fyi_number
|
||||
# group_acronym
|
||||
# ad_name
|
||||
|
||||
def friendly_state(self):
|
||||
if self.in_ietf_process():
|
||||
s = self.ietf_process.main_state
|
||||
|
@ -325,7 +331,7 @@ class RfcWrapper:
|
|||
return '<a href="%s">RFC %d</a>' % (self.get_absolute_url(), self.rfc_number)
|
||||
|
||||
def to_json(self):
|
||||
result = jsonify_helper(self, ['rfc_number', 'title', 'publication_date', 'maturity_level', 'obsoleted_by','obsoletes','updated_by','updates','has_errata','file_types','in_ietf_process', 'friendly_state'])
|
||||
result = jsonify_helper(self, ['rfc_number', 'title', 'publication_date', 'maturity_level', 'obsoleted_by','obsoletes','updated_by','updates','also','has_errata','stream_name','file_types','in_ietf_process', 'friendly_state'])
|
||||
if self.in_ietf_process():
|
||||
result['ietf_process'] = self.ietf_process.to_json_helper()
|
||||
return simplejson.dumps(result, indent=2)
|
||||
|
|
|
@ -39,7 +39,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
{% block doc_h1 %}{{ doc.title|escape }}<br/>RFC {{ doc.rfc_number }}{% endblock %}
|
||||
|
||||
{% block doc_metatable %}
|
||||
<tr><td style="width:18ex;">Document type:</td><td>RFC - {{ doc.maturity_level }}
|
||||
<tr><td style="width:18ex;">Document type:</td><td>RFC - {{ doc.maturity_level }} {% if doc.stream_name %}({{ doc.stream_name }}){% endif %}
|
||||
{% if doc.obsoleted_by %}<br />Obsoleted by {{ doc.obsoleted_by|urlize_ietf_docs }}{%endif %}
|
||||
{% if doc.updated_by %}<br />Updated by {{ doc.updated_by|urlize_ietf_docs }}{%endif %}
|
||||
{% if doc.obsoletes %}<br />Obsoletes {{ doc.obsoletes|urlize_ietf_docs }}{%endif %}
|
||||
|
|
Loading…
Reference in a new issue