Skip to content

Commit

Permalink
Merge pull request #56 from antlu/master
Browse files Browse the repository at this point in the history
Add a time note to recent contributors; increase data chunks from GitHub
  • Loading branch information
astynax committed Jan 10, 2020
2 parents 87a7d05 + 49b5f2b commit f117454
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 3 deletions.
2 changes: 1 addition & 1 deletion contributors/utils/github_lib.py
Expand Up @@ -35,7 +35,7 @@ def get_headers():

def get_one_item_at_a_time(url, additional_params=None, session=None):
"""Return data from all pages (one instance at a time)."""
query_params = {'page': 1}
query_params = {'page': 1, 'per_page': 100}
query_params.update(additional_params or {})
req = session or requests
response = req.get(url, headers=get_headers(), params=query_params)
Expand Down
1 change: 1 addition & 0 deletions contributors/views/home.py
Expand Up @@ -34,4 +34,5 @@ def get_context_data(self, **kwargs):
)

context['contributors'] = recent_contributors
context['since_datetime'] = dt_days_ago
return context
Binary file modified locale/ru/LC_MESSAGES/django.mo
Binary file not shown.
12 changes: 10 additions & 2 deletions locale/ru/LC_MESSAGES/django.po
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-01-01 14:28+0500\n"
"POT-Creation-Date: 2020-01-10 16:26+0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand Down Expand Up @@ -255,7 +255,7 @@ msgstr "Администрирование"
msgid "Log out"
msgstr "Выйти"

#: templates/components/navbar.html
#: templates/components/navbar.html templates/registration/login.html
msgid "Log in"
msgstr "Войти"

Expand Down Expand Up @@ -310,6 +310,14 @@ msgstr "Имя"
msgid "Recently active contributors"
msgstr "Недавно активные участники"

#: templates/home.html
msgid "since"
msgstr "с"

#: templates/home.html
msgid "for the past month"
msgstr "за прошедший месяц"

#: templates/registration/registration.html
msgid "Registration"
msgstr "Регистрация"
Expand Down
9 changes: 9 additions & 0 deletions static/css/base.css
Expand Up @@ -15,6 +15,15 @@ table.dataTable, table.dataTable th, table.dataTable td {
top: 48px;
}

a#note {
display: inline-block;
cursor:default;
text-decoration: none;
border-bottom-style: dotted;
border-bottom-width: 1px;
margin-bottom: 8px;
}

/* Django admin styles */
caption.app-header {
position: relative;
Expand Down
5 changes: 5 additions & 0 deletions static/js/scripts.js
Expand Up @@ -23,3 +23,8 @@ $(document).ready(function () {
});
}).draw();
});

// Activate Bootstrap tooltips
$(document).ready(function () {
$('[data-toggle="tooltip"]').tooltip();
});
7 changes: 7 additions & 0 deletions templates/home.html
Expand Up @@ -2,6 +2,13 @@
{% load i18n %}

{% block header %}{% trans "Recently active contributors" %}{% endblock %}
{% block additional %}
<a id="note" href="javascript:void(0)"
data-toggle="tooltip" data-placement="right"
title="{% trans 'since' %} {{ since_datetime|date:'DATE_FORMAT' }}">
{% trans "for the past month" %}
</a>
{% endblock %}
{% block thead %}
<tr>
<th scope="col">#</th>
Expand Down

0 comments on commit f117454

Please sign in to comment.