Commit d3967caa1642096764ec63f2804f995be5a629ef
1 parent
9531868c
Exists in
master
and in
5 other branches
Adding search button [Issue #13]
Showing
2 changed files
with
34 additions
and
3 deletions
Show diff stats
@@ -0,0 +1,22 @@ | @@ -0,0 +1,22 @@ | ||
1 | +# -*- coding: utf-8 -*- | ||
2 | +# Generated by Django 1.9.7 on 2016-09-07 02:32 | ||
3 | +from __future__ import unicode_literals | ||
4 | + | ||
5 | +import django.core.validators | ||
6 | +from django.db import migrations, models | ||
7 | +import re | ||
8 | + | ||
9 | + | ||
10 | +class Migration(migrations.Migration): | ||
11 | + | ||
12 | + dependencies = [ | ||
13 | + ('users', '0009_auto_20160906_1450'), | ||
14 | + ] | ||
15 | + | ||
16 | + operations = [ | ||
17 | + migrations.AlterField( | ||
18 | + model_name='user', | ||
19 | + name='username', | ||
20 | + field=models.CharField(help_text='A short name that will be used to identify you in the platform and to access it', max_length=35, unique=True, validators=[django.core.validators.RegexValidator(re.compile('^[\\w.@+-]+$', 32), 'Type a valid username. This fields should only contain letters, numbers and the characteres: @/./+/-/_ .', 'invalid')], verbose_name='Login'), | ||
21 | + ), | ||
22 | + ] |
users/templates/list_users.html
@@ -28,7 +28,16 @@ | @@ -28,7 +28,16 @@ | ||
28 | {% endblock %} | 28 | {% endblock %} |
29 | 29 | ||
30 | {% block content %} | 30 | {% block content %} |
31 | - <input type="text" class="form-control" name="search" placeholder="search.."> | 31 | + <form action="" method="GET" class="form-horizontal"> |
32 | + <div class="form-group"> | ||
33 | + <div class="col-md-9 col-sm-9 col-xs-9"> | ||
34 | + <input type="text" class="form-control" name="search" placeholder="{% trans 'Search...' %}" /> | ||
35 | + </div> | ||
36 | + <div class="col-md-3 col-sm-3 col-xs-3"> | ||
37 | + <input type="submit" class="btn btn-primary" value="{% trans 'Search' %}" /> | ||
38 | + </div> | ||
39 | + </div> | ||
40 | + </form> | ||
32 | 41 | ||
33 | {% if users|length > 0 %} | 42 | {% if users|length > 0 %} |
34 | {% for acc in users %} | 43 | {% for acc in users %} |
@@ -43,8 +52,8 @@ | @@ -43,8 +52,8 @@ | ||
43 | <p>{% trans 'Email' %}: {{ acc.email }}</p> | 52 | <p>{% trans 'Email' %}: {{ acc.email }}</p> |
44 | <p>{% trans 'Contact' %}: {{ acc.phone }}</p> | 53 | <p>{% trans 'Contact' %}: {{ acc.phone }}</p> |
45 | <div align="right"> | 54 | <div align="right"> |
46 | - <a href="javascript:void(0)" class="btn btn-raised btn-inverse">{% trans 'Edit' %}</a> | ||
47 | - <a href="javascript:void(0)" class="btn btn-raised btn-danger">{% trans 'Delete' %}</a> | 55 | + <a href="javascript:void(0)" class="btn btn-raised btn-success">{% trans 'Edit' %}</a> |
56 | + <a href="javascript:void(0)" class="btn btn-raised btn-primary">{% trans 'Delete' %}</a> | ||
48 | </div> | 57 | </div> |
49 | </div> | 58 | </div> |
50 | </div> | 59 | </div> |