Skip to content

Commit 9a4bcd1

Browse files
authored
Merge pull request #64 from tvdeyen/fontawesome
FontAwesome icons
2 parents 3a72f14 + 8bf1e52 commit 9a4bcd1

4 files changed

Lines changed: 23 additions & 51 deletions

File tree

app/assets/stylesheets/alchemy-devise/users.scss

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -5,38 +5,3 @@ form {
55
width: 50%;
66
}
77
}
8-
9-
.icon {
10-
11-
&.user {
12-
background-position: 0 -104px;
13-
14-
&.female {
15-
background-position: -128px -104px;
16-
}
17-
}
18-
19-
&.user_add {
20-
background-position: -96px -104px;
21-
}
22-
23-
&.user_delete {
24-
background-position: -32px -104px;
25-
26-
&.female {
27-
background-position: -160px -104px;
28-
}
29-
}
30-
31-
&.user_edit {
32-
background-position: -64px -104px;
33-
34-
&.female {
35-
background-position: -192px -104px;
36-
}
37-
}
38-
}
39-
40-
span.module.users {
41-
background-position: -80px 0;
42-
}
Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
11
<tr class="<%= cycle('even', 'odd') %>">
2-
<td class="icon"><%= content_tag 'span', '', class: "icon user#{user.gender == 'female' ? ' female' : ' male'}" %></td>
3-
<td>
4-
<%= render_icon(user.logged_in? ? 'online' : 'offline') %>
2+
<td class="icon">
3+
<%= render_icon(:user, style: user.logged_in? ? 'solid' : 'regular') %>
4+
</td>
5+
<td class="login">
6+
<% if can?(:edit, user) %>
7+
<%= link_to_dialog user.login,
8+
alchemy.edit_admin_user_path(user), {
9+
title: Alchemy.t(:edit_user),
10+
overflow: true,
11+
size: '430x560'
12+
},
13+
title: Alchemy.t(:edit_user) %>
14+
<% end %>
515
</td>
6-
<td class="login"><%= user.login %></td>
716
<td class="name"><%= user.firstname %></td>
817
<td><%= user.lastname %></td>
918
<td class="email"><%= user.email %></td>
@@ -15,20 +24,17 @@
1524
<%= delete_button alchemy.admin_user_path(user), {
1625
message: Alchemy.t(:confirm_to_delete_user),
1726
title: Alchemy.t(:delete_user),
18-
icon: "user_delete#{user.gender == 'female' ? ' female' : ' male'}"
27+
icon: :minus
1928
} %>
2029
<% end %>
2130
<% if can?(:edit, user) %>
22-
<%= link_to_dialog '',
31+
<%= link_to_dialog render_icon(:edit),
2332
alchemy.edit_admin_user_path(user), {
2433
title: Alchemy.t(:edit_user),
2534
overflow: true,
2635
size: '430x560'
27-
}, {
28-
class: "icon user_edit#{user.gender == 'female' ? ' female' : ' male'}",
29-
title: Alchemy.t(:edit_user)
30-
}
31-
%>
36+
},
37+
title: Alchemy.t(:edit_user) %>
3238
<% end %>
3339
</td>
3440
</tr>

app/views/alchemy/admin/users/index.html.erb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<%= toolbar(
22
buttons: [
33
{
4-
icon: 'user_add',
4+
icon: :plus,
55
label: Alchemy.t(:create_user),
66
url: alchemy.new_admin_user_path,
77
title: Alchemy.t(:create_user),
@@ -23,7 +23,6 @@
2323
<thead>
2424
<tr>
2525
<th class="icon"></th>
26-
<th class="login_status"></th>
2726
<th class="login">
2827
<%= sort_link @query, :login, hide_indicator: true %>
2928
</th>

app/views/alchemy/user_sessions/new.html.erb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@
33
<%= alchemy_form_for :user, url: {action: 'create'}, id: 'login' do |f| %>
44
<%= f.input Devise.authentication_keys.first, autofocus: true %>
55
<%= f.input :password %>
6-
<p class="foot_note">
7-
<%= link_to Alchemy.t('Forgot your password?'), new_password_path %>
8-
</p>
6+
<div class="input">
7+
<small class="hint">
8+
<%= link_to Alchemy.t('Forgot your password?'), new_password_path %>
9+
</small>
10+
</div>
911
<div class="submit">
1012
<%= hidden_field_tag 'user_screensize' %>
1113
<button><%= Alchemy.t(:login) %></button>

0 commit comments

Comments
 (0)