Skip to content

Commit d3058d3

Browse files
committed
Merge pull request #38 from interlegis/upstream/master
Various changes
2 parents 98a98f2 + 0b2b382 commit d3058d3

16 files changed

Lines changed: 685 additions & 118 deletions

File tree

README.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ Application that integrates existing systems to represent the contributions of t
2424
Features
2525
========
2626

27-
* Developerd by Interlegis Communities http://colab.interlegis.leg.br/
27+
* Developed by Interlegis Communities http://colab.interlegis.leg.br/
2828

29-
* Writed with Python http://python.org/
29+
* Written with Python http://python.org/
3030

31-
* Build in Django Web Framework https://www.djangoproject.com/
31+
* Built in Django Web Framework https://www.djangoproject.com/
3232

3333
* Search engine with Solr https://lucene.apache.org/solr/
3434

src/accounts/templates/accounts/user_detail.html

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
{% trans "Messages" as group_collabs %}
99
{% trans "Contributions" as type_collabs %}
1010

11-
{% include "pizza-chart.html" with chart_data=type_count chart_div="collabs" chart_height=300 name=type_collabs %}
12-
{% include "pizza-chart.html" with chart_data=list_activity chart_div="collabs2" chart_height=300 name=group_collabs %}
11+
{% include "doughnut-chart.html" with chart_data=type_count chart_canvas="collabs" name=type_collabs %}
12+
{% include "doughnut-chart.html" with chart_data=list_activity chart_canvas="collabs2" name=group_collabs %}
1313
{% endblock %}
1414

1515
{% block main-content %}
@@ -97,10 +97,14 @@ <h1>
9797
<div class="col-lg-4 col-md-4 col-sm-7">
9898
<div class="panel panel-default">
9999
<div class="panel-heading">
100-
<h3 class="panel-title">{% trans "Contributions by Type" %}</h3>
100+
<h3 class="panel-title">{% trans "Collaborations by Type" %}</h3>
101101
</div>
102102
<div class="panel-body">
103103
<div id="collabs"></div>
104+
<div class="chart collabs">
105+
<canvas width="200" height="200"></canvas>
106+
<p></p>
107+
</div>
104108
</div>
105109
</div>
106110
</div>
@@ -112,7 +116,10 @@ <h3 class="panel-title">{% trans "Contributions by Type" %}</h3>
112116
<h3 class="panel-title">{% trans "Participation by Group" %}</h3>
113117
</div>
114118
<div class="panel-body">
115-
<div id="collabs2"></div>
119+
<div class="chart collabs2">
120+
<canvas width="200" height="200"></canvas>
121+
<p></p>
122+
</div>
116123
</div>
117124
</div>
118125
</div>
@@ -150,13 +157,13 @@ <h3>{% trans "Latest posted" %} </h3>
150157
{% endfor %}
151158
</ul>
152159
<a href="{% url 'haystack_search' %}?type=thread&amp;author={{ user_.username }}">
153-
{% trans "View more discussions..." %}
160+
{% trans "View more posts..." %}
154161
</a>
155162
<div>&nbsp;</div>
156163
</div>
157164

158165
<div class="col-lg-6 col-md-6 col-sm-12">
159-
<h3>{% trans "Contributions" %}</h3>
166+
<h3>{% trans "Latest contributions" %}</h3>
160167
<ul class="message-list">
161168
{% for result in results %}
162169
{% include "message-preview.html" %}

src/accounts/templates/accounts/user_update_form.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ <h3 class="panel-title">
190190
</div>
191191
<div class="panel-body">
192192
<div class="form-group">
193-
{% trans "This feature is available only for who needs to change the password for some reason as having an old user with the same username, forgot your password to commit, usage of other XMPP Client for connection. Usually, you won't need to change this password. Only change it if you are sure about what you are doing." %}
193+
{% trans "This feature is available only for those who need to change the password for some reason as having an old user with the same username, forgot your password to commit, usage of other XMPP Client for connection. Usually, you won't need to change this password. Only change it if you are sure about what you are doing." %}
194194
</div>
195195
<a href="{% url 'change_password' %}" class="btn btn-default pull-right"><span class="icon-warning-sign"></span> {% trans "Change Password" %}</a>
196196
</div>

src/accounts/utils/mailman.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,16 @@ def get_list_description(listname, lists=None):
8282
lists = dict(lists)
8383

8484
return lists.get(listname)
85+
86+
87+
def list_users(listname):
88+
url = get_url(listname)
89+
90+
params = {}
91+
92+
try:
93+
users = requests.get(url, timeout=TIMEOUT, params=params)
94+
except requests.exceptions.RequestException:
95+
return []
96+
97+
return users.json()

src/colab/custom_settings.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,7 @@
306306
DPASTE_EXPIRE_DEFAULT = DPASTE_EXPIRE_CHOICES[4][0]
307307
DPASTE_DEFAULT_GIST_DESCRIPTION = 'Gist created on Colab Interlegis'
308308
DPASTE_DEFAULT_GIST_NAME = 'colab_paste'
309+
DPASTE_LEXER_DEFAULT = 'text'
309310

310311
try:
311312
from local_settings import *
65 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)