forked from adamlaska/datatracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprofile.html
More file actions
149 lines (138 loc) · 4.82 KB
/
profile.html
File metadata and controls
149 lines (138 loc) · 4.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
{% extends "base.html" %}
{# Copyright The IETF Trust 2015, All Rights Reserved #}
{% load origin %}
{% load markup_tags %}
{% load static %}
{% load ietf_filters %}
{% load group_filters %}
{% block title %}Profile for {{ persons.0 }}{% endblock %}
{% block content %}
{% origin %}
{% if persons|length > 1 %}
<div class="col-md-12">
<h4>More than one person with this name has been found. Showing all:</h4>
<hr>
</div>
{% endif %}
{% for person in persons %}
<div class="col-md-12">
{% if not forloop.first %}<hr>{% endif %}
<h1>{{ person.name }} {% if person.ascii != person.name %}<br><small>({{person.ascii}})</small>{% endif %}</h1>
<div class="bio-text">
{% if person.photo %}
<a href="{{person.photo.url}}">
<img class="bio-photo" src="{{ person.photo.url }}" alt="Photo of {{ person }}" />
</a>
{% endif %}
{{ person.biography | apply_markup:"restructuredtext" }}
</div>
</div>
{% if person.role_set.exists %}
<div class="col-md-12">
<h2 id="roles">Roles</h2>
<table class="table">
{% for role in person.role_set.all|active_roles %}
<tr>
<td>
{{ role.name.name }}
{% if role.group.type_id == 'sdo' %}for{% elif role.name_id == 'reviewer' %}in{% else %}of{% endif %}
<a href="{% url 'ietf.group.views.group_about' acronym=role.group.acronym %}">{{ role.group.name }}</a>
(<a href="{% url 'ietf.group.views.group_about' acronym=role.group.acronym %}">{{ role.group.acronym }}</a>)
</td>
<td>
<a href="mailto:{{role.email.address}}">{{ role.email.address }}</a>
</td>
</tr>
{% empty %}
{{ person.first_name }} has no active roles as of {{ today }}.
{% endfor %}
</table>
</div>
{% endif %}
{% if person.personextresource_set.exists %}
<div class="col-md-12">
<h2 id="extresources">External Resources</h2>
<table class="table">
{% for extres in person.personextresource_set.all %}
<tr>
<td class="col-md-1"><span title="{{ extres.name.name }}">{% firstof extres.display_name extres.name.name %}</span></td>
<td class="col-md-11">{{extres.value}}</td>
</tr>
{% endfor %}
</table>
</div>
{% endif %}
<div class="col-md-6">
<h2 id="rfcs">RFCs <small>({{person.rfcs|length}})</small></h2>
{% if person.rfcs %}
<table class="table">
{% for doc in person.rfcs %}
<tr>
<td><a href="{{ doc.get_absolute_url }}">{{ doc.canonical_name }}</a></td>
<td>{{ doc.pub_date|date:"b Y"|title|nbsp }}</td>
<td>{{ doc.title }}<br>
{% with doc.referenced_by_rfcs.count as refbycount %}
{% if refbycount %}
Cited by <a style="text-decoration: underline" href="{% url 'ietf.doc.views_doc.document_referenced_by' doc.canonical_name %}" rel="nofollow">{{ refbycount }} RFC{{ refbycount|pluralize}}</a>
{% endif %}
{% endwith %}
</td>
</tr>
{% endfor %}
</table>
{% else %}
{{ person.first_name }} has no RFCs as of {{ today }}.
{% endif %}
</div>
<div class="col-md-6">
<h2 id="drafts">Active Drafts <small>({{person.active_drafts|length}})</small></h2>
{% if person.active_drafts.exists %}
<ul>
{% for doc in person.active_drafts %}
<li>
<a href="{{ doc.get_absolute_url }}">{{ doc.canonical_name }}</a>
</li>
{% endfor %}
</ul>
{% else %}
{{ person.first_name }} has no active drafts as of {{ today }}.
{% endif %}
</div>
<div class="col-md-6">
<h2>Expired Drafts <small>excluding replaced drafts</small></h2>
{% if person.expired_drafts.exists %}
<ul>
{% for doc in person.expired_drafts %}
{% if not doc.replaced_by %}
<li><a href="{{ doc.get_absolute_url }}">{{ doc.canonical_name }}</a></li>
{% endif %}
{% endfor %}
</ul>
{% else %}
{{ person.first_name }} has no expired drafts as of {{ today }}.
{% endif %}
</div>
{% if person.has_drafts %}
<div id="chart" style="width:100%; height:400px; margin-top:1em;" class="panel panel-default panel-body col-md-12"></div>
{% endif %}
{% endfor %}
{% endblock %}
{% block js %}
{% if persons|length == 1 %}
<script src="{% static 'highcharts/highstock.js' %}"></script>
<script src="{% static 'highcharts/modules/exporting.js' %}"></script>
<script>
$(function () {
$.getJSON('{% url "ietf.doc.views_stats.chart_conf_person_drafts" id=persons.0.id %}', function (conf) {
// Create the chart
chart = Highcharts.stockChart('chart', conf);
chart.showLoading();
$.getJSON('{% url "ietf.doc.views_stats.chart_data_person_drafts" id=persons.0.id %}', function (data) {
chart.series[0].setData(data);
chart.hideLoading();
});
});
});
</script>
{% endif %}
{% endblock %}