Add mail to link to Secretariat on country page in case people are
missing a country or alias, adjust wording a bit on status page. - Legacy-Id: 12866
This commit is contained in:
parent
6964337853
commit
d5e98c9644
|
@ -518,6 +518,8 @@ IPR_EMAIL_FROM = 'ietf-ipr@ietf.org'
|
|||
|
||||
IANA_EVAL_EMAIL = "drafts-eval@icann.org"
|
||||
|
||||
SECRETARIAT_TICKET_EMAIL = "ietf-action@ietf.org"
|
||||
|
||||
# Put real password in settings_local.py
|
||||
IANA_SYNC_PASSWORD = "secret"
|
||||
IANA_SYNC_CHANGES_URL = "https://datatracker.iana.org:4443/data-tracker/changes"
|
||||
|
|
|
@ -30,7 +30,7 @@ class CountryAlias(models.Model):
|
|||
"""Records that alias should be treated as country for statistical
|
||||
purposes."""
|
||||
|
||||
alias = models.CharField(max_length=255, help_text="Note that lower-case aliases are matched case-insensitive while aliases with at least one uppercase letter is matched case-sensitive.")
|
||||
alias = models.CharField(max_length=255, help_text="Note that lower-case aliases are matched case-insensitive while aliases with at least one uppercase letter is matched case-sensitive. So 'United States' is best entered as 'united states' so it both matches 'United States' and 'United states' and 'UNITED STATES', whereas 'US' is best entered as 'US' so it doesn't accidentally match an ordinary word like 'us'.")
|
||||
country = models.ForeignKey(CountryName, max_length=255)
|
||||
|
||||
def __unicode__(self):
|
||||
|
|
|
@ -190,3 +190,18 @@ def clean_country_name(country_name):
|
|||
return country_name
|
||||
|
||||
return ""
|
||||
|
||||
|
||||
def compute_hirsch_index(citation_counts):
|
||||
"""Computes the h-index given a sequence containing the number of
|
||||
citations for each document."""
|
||||
|
||||
i = 0
|
||||
|
||||
for count in sorted(citation_counts, reverse=True):
|
||||
if i + 1 > count:
|
||||
break
|
||||
|
||||
i += 1
|
||||
|
||||
return i
|
||||
|
|
|
@ -536,7 +536,8 @@ def known_countries_list(request, stats_type=None, acronym=None):
|
|||
c.aliases = sorted(c.countryalias_set.all(), key=lambda a: a.pk)
|
||||
|
||||
return render(request, "stats/known_countries_list.html", {
|
||||
"countries": countries
|
||||
"countries": countries,
|
||||
"ticket_email_address": settings.SECRETARIAT_TICKET_EMAIL,
|
||||
})
|
||||
|
||||
|
||||
|
|
|
@ -9,6 +9,12 @@
|
|||
|
||||
<h1>{% block title %}Countries known to the Datatracker{% endblock %}</h1>
|
||||
|
||||
<p>In case you think a country or an alias is missing from the list, you can <a href="mailto:{{ ticket_email_address }}">file a ticket</a>.</p>
|
||||
|
||||
{% if request.user.is_staff %}
|
||||
<p>Note: since you're an admin, the country names are linked to their corresponding admin page.</p>
|
||||
{% endif %}
|
||||
|
||||
<table class="table table-condensed table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -19,7 +25,15 @@
|
|||
<tbody>
|
||||
{% for c in countries %}
|
||||
<tr>
|
||||
<td>{{ c.name }}</td>
|
||||
<td>
|
||||
{% if request.user.is_staff %}
|
||||
<a href="{% url "admin:name_countryname_change" c.pk %}">
|
||||
{% endif %}
|
||||
{{ c.name }}
|
||||
{% if request.user.is_staff %}
|
||||
</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% for a in c.aliases %}
|
||||
{{ a.alias }}{% if not forloop.last %},{% endif %}
|
||||
|
|
|
@ -223,7 +223,7 @@
|
|||
|
||||
{% if author.country and not author.cleaned_country %}
|
||||
<br>
|
||||
<b class="text-warning">Unrecognized country: "{{ author.country }}"</b>: Please use a <a href="{% url "ietf.stats.views.known_countries_list" %}">recognized country name</a>.
|
||||
<b class="text-warning">Unrecognized country: "{{ author.country }}"</b>: See <a href="{% url "ietf.stats.views.known_countries_list" %}">recognized country names</a>.
|
||||
{% endif %}
|
||||
|
||||
</td>
|
||||
|
|
Loading…
Reference in a new issue