citygate 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/app/controllers/citygate/admin/users_controller.rb +7 -0
- data/app/models/citygate/user.rb +1 -1
- data/app/views/citygate/admin/users/index.html.erb +23 -13
- data/app/views/citygate/shared/_navigation.html.erb +4 -2
- data/config/locales/views/admin/users/en.yml +6 -1
- data/lib/citygate/engine.rb +1 -1
- data/lib/citygate/version.rb +1 -1
- metadata +4 -4
data/app/models/citygate/user.rb
CHANGED
@@ -15,7 +15,7 @@ module Citygate
|
|
15
15
|
devise :encryptor => :sha1
|
16
16
|
# @!endgroup
|
17
17
|
|
18
|
-
attr_accessible :first_name, :last_name, :email, :password, :password_confirmation, :remember_me, :confirmed_at
|
18
|
+
attr_accessible :first_name, :last_name, :email, :password, :password_confirmation, :remember_me, :confirmed_at, :role_id
|
19
19
|
|
20
20
|
has_many :authorizations, :dependent => :destroy
|
21
21
|
belongs_to :role
|
@@ -1,14 +1,24 @@
|
|
1
|
-
<
|
2
|
-
<% @users.each do |user| %>
|
3
|
-
<div class="user">
|
4
|
-
<span class="email"><%= user.email %></span>
|
5
|
-
<%= content_tag(:span, user.full_name) if user.full_name %>
|
6
|
-
<div class="user-links">
|
7
|
-
<%= link_to t('admin.users.index.show_link'), admin_user_path(user), :class => "show-link" %>
|
8
|
-
<%= link_to t('admin.users.index.edit_link'), edit_admin_user_path(user), :class => "edit-link" if can? :update, user %>
|
9
|
-
</div>
|
10
|
-
</div>
|
11
|
-
<% end %>
|
1
|
+
<h1><%= t('admin.users.index.title') %></h1>
|
12
2
|
|
13
|
-
|
14
|
-
|
3
|
+
<table class='list'>
|
4
|
+
<thead>
|
5
|
+
<tr>
|
6
|
+
<th><%= t('admin.users.show.first_name') %></th>
|
7
|
+
<th><%= t('admin.users.show.last_name') %></th>
|
8
|
+
<th><%= t('admin.users.show.email') %></th>
|
9
|
+
<th></th>
|
10
|
+
</tr>
|
11
|
+
</thead>
|
12
|
+
<tbody>
|
13
|
+
<% @users.each do |user| %>
|
14
|
+
<tr>
|
15
|
+
<td><%= user.first_name %></td>
|
16
|
+
<td><%= user.last_name %></td>
|
17
|
+
<td><%= truncate(user.email, length: 25) %></td>
|
18
|
+
<td><i class='icon-pencil'></i><%= link_to t('admin.users.index.edit_link'), edit_admin_user_path(user) %><i class='icon-trash'></i><%= link_to t('admin.users.index.delete_link'), admin_user_path(user), confirm: t('admin.actions.confirm'), :method => :delete, class: 'danger' if can? :update, user %></td>
|
19
|
+
</tr>
|
20
|
+
<% end %>
|
21
|
+
</tbody>
|
22
|
+
</table>
|
23
|
+
|
24
|
+
<%= will_paginate @users %>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<nav>
|
2
2
|
<ul>
|
3
3
|
<% if user_signed_in? %>
|
4
|
-
<% if can?(:manage, Citygate::User)
|
4
|
+
<% if can?(:manage, Citygate::User) %>
|
5
5
|
<li><i class='icon-cog'></i><%= link_to t('navigation.links.admin'), citygate.admin_users_path %></li>
|
6
6
|
<% end %>
|
7
7
|
|
@@ -12,7 +12,9 @@
|
|
12
12
|
<li><%= link_to t('navigation.links.sign_up'), citygate.new_user_registration_path %></li>
|
13
13
|
|
14
14
|
<% Citygate::User.omniauth_providers.each do |provider| %>
|
15
|
-
|
15
|
+
<% if provider != "facebook" %>
|
16
|
+
<li><%= link_to t('navigation.links.omniauth', provider: provider.to_s.titleize), "/users/auth/#{provider.to_s}", :id => "#{provider.to_s}" %></li>
|
17
|
+
<% end %>
|
16
18
|
<% end -%>
|
17
19
|
<% end %>
|
18
20
|
</ul>
|
@@ -2,11 +2,15 @@ en:
|
|
2
2
|
admin:
|
3
3
|
users:
|
4
4
|
index:
|
5
|
+
title: "Users"
|
5
6
|
show_link: "Show"
|
6
7
|
edit_link: "Edit"
|
8
|
+
delete_link: "Delete"
|
7
9
|
show:
|
8
10
|
labels:
|
9
11
|
name: "Name"
|
12
|
+
first_name: "First name"
|
13
|
+
last_name: "Last name"
|
10
14
|
email: "Email"
|
11
15
|
edit:
|
12
16
|
title: "Edit Profile"
|
@@ -25,8 +29,9 @@ en:
|
|
25
29
|
label:
|
26
30
|
user:
|
27
31
|
name: "Name"
|
32
|
+
first_name: "First name"
|
33
|
+
last_name: "Last name"
|
28
34
|
email: "Email"
|
29
35
|
password: "Password"
|
30
36
|
password_confirmation: "Password Confirmation"
|
31
37
|
current_password: "Current Password"
|
32
|
-
|
data/lib/citygate/engine.rb
CHANGED
@@ -27,7 +27,7 @@ module Citygate
|
|
27
27
|
# Accepts the same options as will_paginate and uses
|
28
28
|
# them in the backend
|
29
29
|
mattr_accessor :will_paginate_options
|
30
|
-
@@will_paginate_options = {per_page:
|
30
|
+
@@will_paginate_options = {per_page: 10}
|
31
31
|
|
32
32
|
# If the mount path of citygate in the app changes,
|
33
33
|
# this must change
|
data/lib/citygate/version.rb
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: citygate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0.
|
5
|
+
version: 0.0.8
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Group Buddies
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2012-09-
|
13
|
+
date: 2012-09-19 00:00:00 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|
@@ -468,7 +468,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
468
468
|
requirements:
|
469
469
|
- - ">="
|
470
470
|
- !ruby/object:Gem::Version
|
471
|
-
hash:
|
471
|
+
hash: 2053322453284048139
|
472
472
|
segments:
|
473
473
|
- 0
|
474
474
|
version: "0"
|
@@ -477,7 +477,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
477
477
|
requirements:
|
478
478
|
- - ">="
|
479
479
|
- !ruby/object:Gem::Version
|
480
|
-
hash:
|
480
|
+
hash: 2053322453284048139
|
481
481
|
segments:
|
482
482
|
- 0
|
483
483
|
version: "0"
|