Skip to content

Commit

Permalink
DigitalCampus#300: Implementing ajax pagination...
Browse files Browse the repository at this point in the history
  • Loading branch information
jjoseba committed Apr 22, 2016
1 parent ace76ed commit bfe3abf
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 3 deletions.
2 changes: 1 addition & 1 deletion oppia/profile/views.py
Expand Up @@ -566,7 +566,7 @@ def list_users(request):
{
'page': users,
'page_ordering':ordering,
'users_list_template':'export',
'users_list_template':'select',
'ajax_url':request.path
},
context_instance=RequestContext(request),)
4 changes: 3 additions & 1 deletion oppia/static/oppia/style.css
Expand Up @@ -242,7 +242,9 @@ div.date-picker-row-fluid .controls{ width: 100%;}
float: left;
border-bottom-width: 0;
}

.table-fixed tr {
clear:left;
}
.hidden-fields{ display:none; }

}
Expand Down
6 changes: 6 additions & 0 deletions oppia/templates/oppia/profile/list/header-user-select.html
@@ -0,0 +1,6 @@
{% load i18n %}
{% load sort_link %}

<th class="col-xs-2 col-sm-1"></th>
<th class="col-xs-7 col-sm-7">{% sort_link 'first_name' 'User' %}</th>
<th class="col-xs-3 col-sm-4">{% sort_link 'date_joined' 'Registration date' %}</th>
13 changes: 13 additions & 0 deletions oppia/templates/oppia/profile/list/row-user-select.html
@@ -0,0 +1,13 @@
{% load i18n %}
{% load display_functions %}

<tr id="{{ user.username }}">
<td class="col-xs-2 col-sm-1">
<button class="btn btn-sm btn-primary btn-add"><i class="glyphicon glyphicon-plus"></i> <i class="glyphicon glyphicon-ok hidden"></i> </button>
<button class="btn btn-sm btn-primary btn-remove removing" style="display: none;"><i class="glyphicon glyphicon-remove"></i> </button>
</td>
<td class="col-xs-7 col-sm-7 ">{% if OPPIA_SHOW_GRAVATARS %} {{ user|gravatar:24 }} {% endif %}
{{ user.first_name }} {{ user.last_name }}
</td>
<td class="col-xs-3 col-sm-4 ">{{ user.date_joined|date:"d/m/Y" }}</td>
</tr>
2 changes: 1 addition & 1 deletion oppia/views.py
Expand Up @@ -634,7 +634,7 @@ def cohort_add(request):
'form': form,
'page': users,
'page_ordering':ordering,
'users_list_template':'default'
'users_list_template':'select'
},context_instance=RequestContext(request))

def cohort_view(request,cohort_id):
Expand Down

0 comments on commit bfe3abf

Please sign in to comment.