Projet

Général

Profil

0001-profile-add-data-type-in-list-of-fields-33913.patch

Frédéric Péters, 23 juin 2019 11:43

Télécharger (3,09 ko)

Voir les différences:

Subject: [PATCH] profile: add data type in list of fields (#33913)

 hobo/profile/migrations/0001_initial.py                      | 2 ++
 hobo/profile/models.py                                       | 2 ++
 hobo/profile/templates/profile/attributedefinition_list.html | 2 +-
 hobo/static/css/style.css                                    | 5 +++++
 4 files changed, 10 insertions(+), 1 deletion(-)
hobo/profile/migrations/0001_initial.py
27 27
                        (b'string', 'String'),
28 28
                        (b'boolean', 'Boolean'),
29 29
                        (b'date', 'Date'),
30
                        (b'email', 'Email'),
31
                        (b'title', 'Civility'),
30 32
                        (b'birthdate', 'Birthdate'),
31 33
                        (b'fr_postcode', 'French Postcode'),
32 34
                        (b'phone_number', 'Phone Number'),
hobo/profile/models.py
43 43
                ('string', _('String')),
44 44
                ('boolean', _('Boolean')),
45 45
                ('date', _('Date')),
46
                ('email', _('Email')),
47
                ('title', _('Civility')),
46 48
                ('birthdate', _('Birthdate')),
47 49
                ('fr_postcode', _('French Postcode')),
48 50
                ('phone_number', _('Phone Number')),
hobo/profile/templates/profile/attributedefinition_list.html
24 24
<div class="objects-list" id="attributes-list" data-reorder-url="{% url 'profile-reorder' %}">
25 25
 {% for object in object_list %}
26 26
 <div data-attribute-id="{{object.id}}" {% if object.disabled %}class="disabled"{% endif %}>
27
   <span class="handle">⣿</span> <span class="label">{{object.label}}</span>
27
   <span class="handle">⣿</span> <span class="label">{{object.label}} <span class="extra-info">({{object.get_kind_display}})</span></span>
28 28
   <a rel="popup" href="{% url 'profile-attribute-options' name=object.name %}">{% trans 'options' %}</a>
29 29
 </div>
30 30
 {% endfor %}
hobo/static/css/style.css
105 105
	color: #aaa;
106 106
}
107 107

  
108
span.extra-info {
109
	font-size: 80%;
110
	color: #aaa;
111
}
112

  
108 113
div#attributes-list a {
109 114
	float: right;
110 115
}
111
-