Skip to content

Commit d2a093a

Browse files
committed
Use new fontawesome based icons for users module
Combines the login status into the icon. Solid icon is online user, while regular icon is offline user.
1 parent 3a72f14 commit d2a093a

3 files changed

Lines changed: 7 additions & 47 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: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
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') %>
54
</td>
65
<td class="login"><%= user.login %></td>
76
<td class="name"><%= user.firstname %></td>
@@ -15,20 +14,17 @@
1514
<%= delete_button alchemy.admin_user_path(user), {
1615
message: Alchemy.t(:confirm_to_delete_user),
1716
title: Alchemy.t(:delete_user),
18-
icon: "user_delete#{user.gender == 'female' ? ' female' : ' male'}"
17+
icon: :minus
1918
} %>
2019
<% end %>
2120
<% if can?(:edit, user) %>
22-
<%= link_to_dialog '',
21+
<%= link_to_dialog render_icon(:edit),
2322
alchemy.edit_admin_user_path(user), {
2423
title: Alchemy.t(:edit_user),
2524
overflow: true,
2625
size: '430x560'
27-
}, {
28-
class: "icon user_edit#{user.gender == 'female' ? ' female' : ' male'}",
29-
title: Alchemy.t(:edit_user)
30-
}
31-
%>
26+
},
27+
title: Alchemy.t(:edit_user) %>
3228
<% end %>
3329
</td>
3430
</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>

0 commit comments

Comments
 (0)