##// END OF EJS Templates
ui: fix avatars rendering
marcink -
r3686:8b2d8eff new-ui
parent child Browse files
Show More
@@ -1,65 +1,64 b''
1 <%namespace name="base" file="/base/base.mako"/>
1 <%namespace name="base" file="/base/base.mako"/>
2 <div class="panel panel-default user-profile">
2 <div class="panel panel-default user-profile">
3 <div class="panel-heading">
3 <div class="panel-heading">
4 <h3 class="panel-title">${_('My Profile')}</h3>
4 <h3 class="panel-title">${_('My Profile')}</h3>
5 <a href="${h.route_path('my_account_edit')}" class="panel-edit">${_('Edit')}</a>
5 <a href="${h.route_path('my_account_edit')}" class="panel-edit">${_('Edit')}</a>
6 </div>
6 </div>
7
7
8 <div class="panel-body fields">
8 <div class="panel-body fields">
9 <div class="field">
9 <div class="field">
10 <div class="label">
10 <div class="label">
11 ${_('Photo')}:
11 ${_('Photo')}:
12 </div>
12 </div>
13 <div class="input">
13 <div class="input">
14 <div class="text-as-placeholder">
14 <div class="text-as-placeholder">
15 %if c.visual.use_gravatar:
15 %if c.visual.use_gravatar:
16 ${base.gravatar(c.user.email, 100)}
16 ${base.gravatar(c.user.email, 100)}
17 %else:
17 %else:
18 ${base.gravatar(c.user.email, 20)}
18 ${base.gravatar(c.user.email, 100)}
19 ${_('Avatars are disabled')}
20 %endif
19 %endif
21 </div>
20 </div>
22 </div>
21 </div>
23 </div>
22 </div>
24 <div class="field">
23 <div class="field">
25 <div class="label">
24 <div class="label">
26 ${_('Username')}:
25 ${_('Username')}:
27 </div>
26 </div>
28 <div class="input">
27 <div class="input">
29 <div class="text-as-placeholder">
28 <div class="text-as-placeholder">
30 ${c.user.username}
29 ${c.user.username}
31 </div>
30 </div>
32 </div>
31 </div>
33 </div>
32 </div>
34 <div class="field">
33 <div class="field">
35 <div class="label">
34 <div class="label">
36 ${_('First Name')}:
35 ${_('First Name')}:
37 </div>
36 </div>
38 <div class="input">
37 <div class="input">
39 <div class="text-as-placeholder">
38 <div class="text-as-placeholder">
40 ${c.user.first_name}
39 ${c.user.first_name}
41 </div>
40 </div>
42 </div>
41 </div>
43 </div>
42 </div>
44 <div class="field">
43 <div class="field">
45 <div class="label">
44 <div class="label">
46 ${_('Last Name')}:
45 ${_('Last Name')}:
47 </div>
46 </div>
48 <div class="input">
47 <div class="input">
49 <div class="text-as-placeholder">
48 <div class="text-as-placeholder">
50 ${c.user.last_name}
49 ${c.user.last_name}
51 </div>
50 </div>
52 </div>
51 </div>
53 </div>
52 </div>
54 <div class="field">
53 <div class="field">
55 <div class="label">
54 <div class="label">
56 ${_('Email')}:
55 ${_('Email')}:
57 </div>
56 </div>
58 <div class="input">
57 <div class="input">
59 <div class="text-as-placeholder">
58 <div class="text-as-placeholder">
60 ${c.user.email or _('Missing email, please update your user email address.')}
59 ${c.user.email or _('Missing email, please update your user email address.')}
61 </div>
60 </div>
62 </div>
61 </div>
63 </div>
62 </div>
64 </div>
63 </div>
65 </div> No newline at end of file
64 </div>
@@ -1,71 +1,70 b''
1 <%namespace name="base" file="/base/base.mako"/>
1 <%namespace name="base" file="/base/base.mako"/>
2 <div class="panel panel-default user-profile">
2 <div class="panel panel-default user-profile">
3 <div class="panel-heading">
3 <div class="panel-heading">
4 <h3 class="panel-title">${_('My Profile')}</h3>
4 <h3 class="panel-title">${_('My Profile')}</h3>
5 <a href="${h.route_path('my_account_profile')}" class="panel-edit">Close</a>
5 <a href="${h.route_path('my_account_profile')}" class="panel-edit">Close</a>
6 </div>
6 </div>
7
7
8 <div class="panel-body">
8 <div class="panel-body">
9 <% readonly = None %>
9 <% readonly = None %>
10 <% disabled = "" %>
10 <% disabled = "" %>
11
11
12 %if c.extern_type != 'rhodecode':
12 %if c.extern_type != 'rhodecode':
13 <% readonly = "readonly" %>
13 <% readonly = "readonly" %>
14 <% disabled = "disabled" %>
14 <% disabled = "disabled" %>
15 <div class="infoform">
15 <div class="infoform">
16 <div class="fields">
16 <div class="fields">
17 <p>${_('Your user account details are managed by an external source. Details cannot be managed here.')}
17 <p>${_('Your user account details are managed by an external source. Details cannot be managed here.')}
18 <br/>${_('Source type')}: <strong>${c.extern_type}</strong>
18 <br/>${_('Source type')}: <strong>${c.extern_type}</strong>
19 </p>
19 </p>
20
20
21 <div class="field">
21 <div class="field">
22 <div class="label">
22 <div class="label">
23 <label for="username">${_('Username')}:</label>
23 <label for="username">${_('Username')}:</label>
24 </div>
24 </div>
25 <div class="input">
25 <div class="input">
26 ${c.user.username}
26 ${c.user.username}
27 </div>
27 </div>
28 </div>
28 </div>
29
29
30 <div class="field">
30 <div class="field">
31 <div class="label">
31 <div class="label">
32 <label for="name">${_('First Name')}:</label>
32 <label for="name">${_('First Name')}:</label>
33 </div>
33 </div>
34 <div class="input">
34 <div class="input">
35 ${c.user.firstname}
35 ${c.user.firstname}
36 </div>
36 </div>
37 </div>
37 </div>
38
38
39 <div class="field">
39 <div class="field">
40 <div class="label">
40 <div class="label">
41 <label for="lastname">${_('Last Name')}:</label>
41 <label for="lastname">${_('Last Name')}:</label>
42 </div>
42 </div>
43 <div class="input-valuedisplay">
43 <div class="input-valuedisplay">
44 ${c.user.lastname}
44 ${c.user.lastname}
45 </div>
45 </div>
46 </div>
46 </div>
47 </div>
47 </div>
48 </div>
48 </div>
49 % else:
49 % else:
50 <div class="form">
50 <div class="form">
51 <div class="fields">
51 <div class="fields">
52 <div class="field">
52 <div class="field">
53 <div class="label photo">
53 <div class="label photo">
54 ${_('Photo')}:
54 ${_('Photo')}:
55 </div>
55 </div>
56 <div class="input profile">
56 <div class="input profile">
57 %if c.visual.use_gravatar:
57 %if c.visual.use_gravatar:
58 ${base.gravatar(c.user.email, 100)}
58 ${base.gravatar(c.user.email, 100)}
59 <p class="help-block">${_('Change your avatar at')} <a href="http://gravatar.com">gravatar.com</a>.</p>
59 <p class="help-block">${_('Change your avatar at')} <a href="http://gravatar.com">gravatar.com</a>.</p>
60 %else:
60 %else:
61 ${base.gravatar(c.user.email, 20)}
61 ${base.gravatar(c.user.email, 100)}
62 ${_('Avatars are disabled')}
63 %endif
62 %endif
64 </div>
63 </div>
65 </div>
64 </div>
66 ${c.form.render()| n}
65 ${c.form.render()| n}
67 </div>
66 </div>
68 </div>
67 </div>
69 % endif
68 % endif
70 </div>
69 </div>
71 </div> No newline at end of file
70 </div>
@@ -1,151 +1,150 b''
1 <%namespace name="base" file="/base/base.mako"/>
1 <%namespace name="base" file="/base/base.mako"/>
2
2
3 <div class="panel panel-default user-profile">
3 <div class="panel panel-default user-profile">
4 <div class="panel-heading">
4 <div class="panel-heading">
5 <h3 class="panel-title">${_('User Profile')}</h3>
5 <h3 class="panel-title">${_('User Profile')}</h3>
6 </div>
6 </div>
7 <div class="panel-body">
7 <div class="panel-body">
8 <div class="user-profile-content">
8 <div class="user-profile-content">
9 ${h.secure_form(h.route_path('user_update', user_id=c.user.user_id), class_='form', request=request)}
9 ${h.secure_form(h.route_path('user_update', user_id=c.user.user_id), class_='form', request=request)}
10 <% readonly = None %>
10 <% readonly = None %>
11 <% disabled = "" %>
11 <% disabled = "" %>
12 %if c.extern_type != 'rhodecode':
12 %if c.extern_type != 'rhodecode':
13 <% readonly = "readonly" %>
13 <% readonly = "readonly" %>
14 <% disabled = " disabled" %>
14 <% disabled = " disabled" %>
15 <div class="infoform">
15 <div class="infoform">
16 <div class="fields">
16 <div class="fields">
17 <p>${_('This user was created from external source (%s). Editing some of the settings is limited.' % c.extern_type)}</p>
17 <p>${_('This user was created from external source (%s). Editing some of the settings is limited.' % c.extern_type)}</p>
18 </div>
18 </div>
19 </div>
19 </div>
20 %endif
20 %endif
21 <div class="form">
21 <div class="form">
22 <div class="fields">
22 <div class="fields">
23 <div class="field">
23 <div class="field">
24 <div class="label photo">
24 <div class="label photo">
25 ${_('Photo')}:
25 ${_('Photo')}:
26 </div>
26 </div>
27 <div class="input profile">
27 <div class="input profile">
28 %if c.visual.use_gravatar:
28 %if c.visual.use_gravatar:
29 ${base.gravatar(c.user.email, 100)}
29 ${base.gravatar(c.user.email, 100)}
30 <p class="help-block">${_('Change the avatar at')} <a href="http://gravatar.com">gravatar.com</a>.</p>
30 <p class="help-block">${_('Change the avatar at')} <a href="http://gravatar.com">gravatar.com</a>.</p>
31 %else:
31 %else:
32 ${base.gravatar(c.user.email, 20)}
32 ${base.gravatar(c.user.email, 100)}
33 ${_('Avatars are disabled')}
34 %endif
33 %endif
35 </div>
34 </div>
36 </div>
35 </div>
37 <div class="field">
36 <div class="field">
38 <div class="label">
37 <div class="label">
39 ${_('Username')}:
38 ${_('Username')}:
40 </div>
39 </div>
41 <div class="input">
40 <div class="input">
42 ${h.text('username', class_='%s medium' % disabled, readonly=readonly)}
41 ${h.text('username', class_='%s medium' % disabled, readonly=readonly)}
43 </div>
42 </div>
44 </div>
43 </div>
45 <div class="field">
44 <div class="field">
46 <div class="label">
45 <div class="label">
47 <label for="name">${_('First Name')}:</label>
46 <label for="name">${_('First Name')}:</label>
48 </div>
47 </div>
49 <div class="input">
48 <div class="input">
50 ${h.text('firstname', class_="medium")}
49 ${h.text('firstname', class_="medium")}
51 </div>
50 </div>
52 </div>
51 </div>
53
52
54 <div class="field">
53 <div class="field">
55 <div class="label">
54 <div class="label">
56 <label for="lastname">${_('Last Name')}:</label>
55 <label for="lastname">${_('Last Name')}:</label>
57 </div>
56 </div>
58 <div class="input">
57 <div class="input">
59 ${h.text('lastname', class_="medium")}
58 ${h.text('lastname', class_="medium")}
60 </div>
59 </div>
61 </div>
60 </div>
62
61
63 <div class="field">
62 <div class="field">
64 <div class="label">
63 <div class="label">
65 <label for="email">${_('Email')}:</label>
64 <label for="email">${_('Email')}:</label>
66 </div>
65 </div>
67 <div class="input">
66 <div class="input">
68 ## we should be able to edit email !
67 ## we should be able to edit email !
69 ${h.text('email', class_="medium")}
68 ${h.text('email', class_="medium")}
70 </div>
69 </div>
71 </div>
70 </div>
72 <div class="field">
71 <div class="field">
73 <div class="label">
72 <div class="label">
74 ${_('New Password')}:
73 ${_('New Password')}:
75 </div>
74 </div>
76 <div class="input">
75 <div class="input">
77 ${h.password('new_password',class_='%s medium' % disabled,autocomplete="off",readonly=readonly)}
76 ${h.password('new_password',class_='%s medium' % disabled,autocomplete="off",readonly=readonly)}
78 </div>
77 </div>
79 </div>
78 </div>
80 <div class="field">
79 <div class="field">
81 <div class="label">
80 <div class="label">
82 ${_('New Password Confirmation')}:
81 ${_('New Password Confirmation')}:
83 </div>
82 </div>
84 <div class="input">
83 <div class="input">
85 ${h.password('password_confirmation',class_="%s medium" % disabled,autocomplete="off",readonly=readonly)}
84 ${h.password('password_confirmation',class_="%s medium" % disabled,autocomplete="off",readonly=readonly)}
86 </div>
85 </div>
87 </div>
86 </div>
88 <div class="field">
87 <div class="field">
89 <div class="label-text">
88 <div class="label-text">
90 ${_('Active')}:
89 ${_('Active')}:
91 </div>
90 </div>
92 <div class="input user-checkbox">
91 <div class="input user-checkbox">
93 ${h.checkbox('active',value=True)}
92 ${h.checkbox('active',value=True)}
94 </div>
93 </div>
95 </div>
94 </div>
96 <div class="field">
95 <div class="field">
97 <div class="label-text">
96 <div class="label-text">
98 ${_('Super Admin')}:
97 ${_('Super Admin')}:
99 </div>
98 </div>
100 <div class="input user-checkbox">
99 <div class="input user-checkbox">
101 ${h.checkbox('admin',value=True)}
100 ${h.checkbox('admin',value=True)}
102 </div>
101 </div>
103 </div>
102 </div>
104 <div class="field">
103 <div class="field">
105 <div class="label-text">
104 <div class="label-text">
106 ${_('Authentication type')}:
105 ${_('Authentication type')}:
107 </div>
106 </div>
108 <div class="input">
107 <div class="input">
109 <p>${c.extern_type}</p>
108 <p>${c.extern_type}</p>
110 ${h.hidden('extern_type', readonly="readonly")}
109 ${h.hidden('extern_type', readonly="readonly")}
111 <p class="help-block">${_('User was created using an external source. He is bound to authentication using this method.')}</p>
110 <p class="help-block">${_('User was created using an external source. He is bound to authentication using this method.')}</p>
112 </div>
111 </div>
113 </div>
112 </div>
114 <div class="field">
113 <div class="field">
115 <div class="label-text">
114 <div class="label-text">
116 ${_('Name in Source of Record')}:
115 ${_('Name in Source of Record')}:
117 </div>
116 </div>
118 <div class="input">
117 <div class="input">
119 <p>${c.extern_name}</p>
118 <p>${c.extern_name}</p>
120 ${h.hidden('extern_name', readonly="readonly")}
119 ${h.hidden('extern_name', readonly="readonly")}
121 </div>
120 </div>
122 </div>
121 </div>
123 <div class="field">
122 <div class="field">
124 <div class="label">
123 <div class="label">
125 ${_('Language')}:
124 ${_('Language')}:
126 </div>
125 </div>
127 <div class="input">
126 <div class="input">
128 ## allowed_languages is defined in the users.py
127 ## allowed_languages is defined in the users.py
129 ## c.language comes from base.py as a default language
128 ## c.language comes from base.py as a default language
130 ${h.select('language', c.language, c.allowed_languages)}
129 ${h.select('language', c.language, c.allowed_languages)}
131 <p class="help-block">${h.literal(_('User interface language. Help translate %(rc_link)s into your language.') % {'rc_link': h.link_to('RhodeCode Enterprise', h.route_url('rhodecode_translations'))})}</p>
130 <p class="help-block">${h.literal(_('User interface language. Help translate %(rc_link)s into your language.') % {'rc_link': h.link_to('RhodeCode Enterprise', h.route_url('rhodecode_translations'))})}</p>
132 </div>
131 </div>
133 </div>
132 </div>
134 <div class="buttons">
133 <div class="buttons">
135 ${h.submit('save', _('Save'), class_="btn")}
134 ${h.submit('save', _('Save'), class_="btn")}
136 ${h.reset('reset', _('Reset'), class_="btn")}
135 ${h.reset('reset', _('Reset'), class_="btn")}
137 </div>
136 </div>
138 </div>
137 </div>
139 </div>
138 </div>
140 ${h.end_form()}
139 ${h.end_form()}
141 </div>
140 </div>
142 </div>
141 </div>
143 </div>
142 </div>
144
143
145 <script>
144 <script>
146 $('#language').select2({
145 $('#language').select2({
147 'containerCssClass': "drop-menu",
146 'containerCssClass': "drop-menu",
148 'dropdownCssClass': "drop-menu-dropdown",
147 'dropdownCssClass': "drop-menu-dropdown",
149 'dropdownAutoWidth': true
148 'dropdownAutoWidth': true
150 });
149 });
151 </script>
150 </script>
@@ -1,58 +1,57 b''
1 <%namespace name="base" file="/base/base.mako"/>
1 <%namespace name="base" file="/base/base.mako"/>
2
2
3 <div class="panel panel-default user-profile">
3 <div class="panel panel-default user-profile">
4 <div class="panel-heading">
4 <div class="panel-heading">
5 <h3 class="panel-title">${_('User Profile')}</h3>
5 <h3 class="panel-title">${_('User Profile')}</h3>
6 %if c.is_super_admin:
6 %if c.is_super_admin:
7 ${h.link_to(_('Edit'), h.route_path('user_edit', user_id=c.user.user_id), class_='panel-edit')}
7 ${h.link_to(_('Edit'), h.route_path('user_edit', user_id=c.user.user_id), class_='panel-edit')}
8 %endif
8 %endif
9 </div>
9 </div>
10
10
11 <div class="panel-body user-profile-content">
11 <div class="panel-body user-profile-content">
12 <div class="fieldset">
12 <div class="fieldset">
13 <div class="left-label">
13 <div class="left-label">
14 ${_('Photo')}:
14 ${_('Photo')}:
15 </div>
15 </div>
16 <div class="right-content">
16 <div class="right-content">
17 %if c.visual.use_gravatar:
17 %if c.visual.use_gravatar:
18 ${base.gravatar(c.user.email, 100)}
18 ${base.gravatar(c.user.email, 100)}
19 %else:
19 %else:
20 ${base.gravatar(c.user.email, 20)}
20 ${base.gravatar(c.user.email, 100)}
21 ${_('Avatars are disabled')}
22 %endif
21 %endif
23 </div>
22 </div>
24 </div>
23 </div>
25 <div class="fieldset">
24 <div class="fieldset">
26 <div class="left-label">
25 <div class="left-label">
27 ${_('Username')}:
26 ${_('Username')}:
28 </div>
27 </div>
29 <div class="right-content">
28 <div class="right-content">
30 ${c.user.username}
29 ${c.user.username}
31 </div>
30 </div>
32 </div>
31 </div>
33 <div class="fieldset">
32 <div class="fieldset">
34 <div class="left-label">
33 <div class="left-label">
35 ${_('First name')}:
34 ${_('First name')}:
36 </div>
35 </div>
37 <div class="right-content">
36 <div class="right-content">
38 ${c.user.first_name}
37 ${c.user.first_name}
39 </div>
38 </div>
40 </div>
39 </div>
41 <div class="fieldset">
40 <div class="fieldset">
42 <div class="left-label">
41 <div class="left-label">
43 ${_('Last name')}:
42 ${_('Last name')}:
44 </div>
43 </div>
45 <div class="right-content">
44 <div class="right-content">
46 ${c.user.last_name}
45 ${c.user.last_name}
47 </div>
46 </div>
48 </div>
47 </div>
49 <div class="fieldset">
48 <div class="fieldset">
50 <div class="left-label">
49 <div class="left-label">
51 ${_('Email')}:
50 ${_('Email')}:
52 </div>
51 </div>
53 <div class="right-content">
52 <div class="right-content">
54 ${c.user.email or _('Missing email, please update your user email address.')}
53 ${c.user.email or _('Missing email, please update your user email address.')}
55 </div>
54 </div>
56 </div>
55 </div>
57 </div>
56 </div>
58 </div> No newline at end of file
57 </div>
General Comments 0
You need to be logged in to leave comments. Login now