muck-users 0.2.20 → 0.2.21
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/app/controllers/admin/muck/users_controller.rb +8 -3
- data/app/views/admin/users/_ajax_search_box.html.erb +7 -1
- data/app/views/admin/users/_dashboard_widget.html.erb +4 -0
- data/app/views/admin/users/_search_box.html.erb +2 -2
- data/app/views/admin/users/_user_navigation.html.erb +6 -9
- data/app/views/admin/users/do_search.html.erb +1 -4
- data/app/views/admin/users/inactive.html.erb +0 -1
- data/app/views/admin/users/inactive_emails.html.erb +0 -1
- data/app/views/admin/users/index.html.erb +2 -10
- data/app/views/admin/users/search.html.erb +1 -5
- data/lib/muck_users.rb +6 -0
- data/locales/en.yml +3 -1
- data/muck-users.gemspec +15 -4
- data/public/images/admin/roles.gif +0 -0
- data/public/images/admin/source/User.png +0 -0
- data/public/images/admin/source/roles.png +0 -0
- data/public/images/admin/user.gif +0 -0
- data/rails/init.rb +1 -1
- data/test/rails_root/db/migrate/{20090602041838_create_users.rb → 20090327231918_create_users.rb} +11 -10
- data/test/rails_root/lib/tasks/muck.rake +1 -1
- data/test/rails_root/public/images/admin/Home.gif +0 -0
- data/test/rails_root/public/images/admin/roles.gif +0 -0
- data/test/rails_root/public/images/admin/source/Home.png +0 -0
- data/test/rails_root/public/images/admin/source/User.png +0 -0
- data/test/rails_root/public/images/admin/user.gif +0 -0
- data/test/rails_root/public/stylesheets/admin.css +14 -7
- data/test/rails_root/public/stylesheets/application.css +0 -0
- metadata +15 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.21
|
@@ -2,6 +2,7 @@ class Admin::Muck::UsersController < Admin::Muck::BaseController
|
|
2
2
|
unloadable
|
3
3
|
|
4
4
|
before_filter :get_user, :only => [:update, :destroy]
|
5
|
+
before_filter :setup_subnavigation
|
5
6
|
|
6
7
|
def index
|
7
8
|
@user_count = User.count
|
@@ -115,8 +116,12 @@ class Admin::Muck::UsersController < Admin::Muck::BaseController
|
|
115
116
|
|
116
117
|
private
|
117
118
|
|
118
|
-
|
119
|
-
|
120
|
-
|
119
|
+
def get_user
|
120
|
+
@user = User.find(params[:id])
|
121
|
+
end
|
122
|
+
|
123
|
+
def setup_subnavigation
|
124
|
+
@sub_navigation_path = 'admin/users/user_navigation'
|
125
|
+
end
|
121
126
|
|
122
127
|
end
|
@@ -1,6 +1,12 @@
|
|
1
|
-
<div id="ajax_search_box" class="box" style="display: none;" >
|
1
|
+
<div id="ajax_search_box" class="search-box" style="display: none;" >
|
2
2
|
<% form_remote_tag :action => 'ajax_search', :url => '/admin/users/ajax_search', :update => "manage" do %>
|
3
3
|
<%= text_field_tag :query, '', :class => 'span-5' %>
|
4
4
|
<%= submit_tag t("muck.users.admin.search_users") %>
|
5
5
|
<% end %>
|
6
6
|
</div>
|
7
|
+
<script type="text/javascript" language="JavaScript">
|
8
|
+
jQuery(document).ready(function() {
|
9
|
+
jQuery("#search_box").hide();
|
10
|
+
jQuery("#ajax_search_box").show();
|
11
|
+
});
|
12
|
+
</script>
|
@@ -1,11 +1,8 @@
|
|
1
|
-
|
1
|
+
<div id="user-navigation" class="navigation">
|
2
|
+
<ul>
|
3
|
+
<li><%= link_to t("muck.users.navigation.all_users"), admin_users_path %></li>
|
4
|
+
<li><%= link_to t("muck.users.navigation.inactive_users"), inactive_admin_users_path %></li>
|
5
|
+
</ul>
|
2
6
|
<%= render :partial => 'admin/users/search_box' -%>
|
3
7
|
<%= render :partial => 'admin/users/ajax_search_box' -%>
|
4
|
-
|
5
|
-
<ul>
|
6
|
-
<li><%= link_to t("muck.users.navigation.all_users"), admin_users_path %></li>
|
7
|
-
<li><%= link_to t("muck.users.navigation.inactive_users"), inactive_admin_users_path %></li>
|
8
|
-
<li><%= link_to t("muck.users.navigation.search_users"), search_admin_users_path %></li>
|
9
|
-
</ul>
|
10
|
-
</div>
|
11
|
-
<% end -%>
|
8
|
+
</div>
|
@@ -1,4 +1,3 @@
|
|
1
|
-
<%= render :partial => 'admin/users/user_navigation' -%>
|
2
1
|
<div>
|
3
2
|
<h2><%= t('muck.users.admin.unactivated_users', :count => @user_inactive_count) %>
|
4
3
|
<span class="link-button"><%= link_to t('muck.users.admin.activate_all_inactive_users'), activate_all_admin_users_path, :confirm => t('muck.users.admin.activate_all_inactive_users_confirm') %></span>
|
@@ -1,4 +1,3 @@
|
|
1
|
-
<%= render :partial => 'admin/users/user_navigation' -%>
|
2
1
|
<div id="inactive-emails" class="activity_box">
|
3
2
|
<h2><%= I18n.t("Inactive User's Emails (%{count} total)") % {:count => @user_inactive_count} %></h2>
|
4
3
|
<textarea id="user-emails"><%= @users.collect{|user| user.email}.join(', ') -%></textarea>
|
@@ -1,12 +1,4 @@
|
|
1
|
-
<%= render :partial => 'admin/users/user_navigation' -%>
|
2
1
|
<div>
|
3
2
|
<h2><%= t('muck.users.admin_users_title') %></h2>
|
4
|
-
|
5
|
-
</div>
|
6
|
-
|
7
|
-
<script type="text/javascript" language="JavaScript">
|
8
|
-
jQuery(document).ready(function() {
|
9
|
-
jQuery("#search_box").hide();
|
10
|
-
jQuery("#ajax_search_box").show();
|
11
|
-
});
|
12
|
-
</script>
|
3
|
+
<%= render :partial => 'admin/users/table' -%>
|
4
|
+
</div>
|
data/lib/muck_users.rb
CHANGED
@@ -8,3 +8,9 @@ ActiveRecord::Base.class_eval { include MuckUsers::Exceptions }
|
|
8
8
|
ActionController::Base.send :helper, MuckUsersHelper
|
9
9
|
|
10
10
|
I18n.load_path += Dir[ File.join(File.dirname(__FILE__), '..', 'locales', '*.{rb,yml}') ]
|
11
|
+
|
12
|
+
# Add admin link for users and roles
|
13
|
+
MuckEngine.add_muck_admin_nav_item(I18n.translate('muck.engine.admin_users'), '/admin/users', '/images/admin/user.gif') rescue nil
|
14
|
+
|
15
|
+
# Add users to the dashboard
|
16
|
+
MuckEngine.add_muck_dashboard_item('admin/users/dashboard_widget')
|
data/locales/en.yml
CHANGED
@@ -4,6 +4,7 @@ en:
|
|
4
4
|
users:
|
5
5
|
password_reset_link_sent: Instructions to reset your password have been emailed to you. Please check your email.
|
6
6
|
problem_creating_account: "There was a problem creating your account. Please correct the following errors:"
|
7
|
+
users_admin: Users
|
7
8
|
forgot_password: Forgot Password
|
8
9
|
application_base_url_not_set: Please set application_base_url in global_config.yml
|
9
10
|
what_is_the_email: What is the email address used to create your account?
|
@@ -55,6 +56,7 @@ en:
|
|
55
56
|
username_available: Username available
|
56
57
|
name: Name
|
57
58
|
account_activated: Your account has been activated! You can now login.
|
59
|
+
total_users: "Total Users: {{total}}"
|
58
60
|
request_username: Request Username
|
59
61
|
navigation:
|
60
62
|
inactive_users: Inactive Users
|
@@ -64,12 +66,12 @@ en:
|
|
64
66
|
email_available: Email available
|
65
67
|
welcome: Welcome
|
66
68
|
username_recover_prompt: Please provide the email that you used when you created your account, your username will be emailed to you.
|
69
|
+
user_successfully_deleted: User {{login}} was successfully deleted.
|
67
70
|
update_profile: Update your profile
|
68
71
|
request_username_subject: Forgotten username
|
69
72
|
forgot_username: Forgot Username
|
70
73
|
email_help: Please use a valid, current e-mail address. We will never share or spam your e-mail address.
|
71
74
|
access_denied: You don't have permission to access the requested page.
|
72
|
-
user_successfully_deleted: User {{login}} was successfully deleted.
|
73
75
|
username_help: You can use between 6 and 20 characters. If the name you want isn't available try adding numbers or punctuation.
|
74
76
|
sign_in_title: Sign In
|
75
77
|
problem_changing_password: There was a problem changing your password. {{errors}}
|
data/muck-users.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{muck-users}
|
8
|
-
s.version = "0.2.
|
8
|
+
s.version = "0.2.21"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Justin Ball", "Joel Duffin"]
|
12
|
-
s.date = %q{2010-01-
|
12
|
+
s.date = %q{2010-01-13}
|
13
13
|
s.description = %q{Easily add user signup, login and other features to your application}
|
14
14
|
s.email = %q{justin@tatemae.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -39,6 +39,7 @@ Gem::Specification.new do |s|
|
|
39
39
|
"app/views/admin/roles/show.html.erb",
|
40
40
|
"app/views/admin/users/_activate.html.erb",
|
41
41
|
"app/views/admin/users/_ajax_search_box.html.erb",
|
42
|
+
"app/views/admin/users/_dashboard_widget.html.erb",
|
42
43
|
"app/views/admin/users/_row.html.erb",
|
43
44
|
"app/views/admin/users/_search_box.html.erb",
|
44
45
|
"app/views/admin/users/_table.html.erb",
|
@@ -647,6 +648,10 @@ Gem::Specification.new do |s|
|
|
647
648
|
"locales/zh-TW.yml",
|
648
649
|
"locales/zh.yml",
|
649
650
|
"muck-users.gemspec",
|
651
|
+
"public/images/admin/roles.gif",
|
652
|
+
"public/images/admin/source/User.png",
|
653
|
+
"public/images/admin/source/roles.png",
|
654
|
+
"public/images/admin/user.gif",
|
650
655
|
"public/images/profile_default.jpg",
|
651
656
|
"rails/init.rb",
|
652
657
|
"tasks/rails.rake",
|
@@ -676,10 +681,10 @@ Gem::Specification.new do |s|
|
|
676
681
|
"test/rails_root/config/routes.rb",
|
677
682
|
"test/rails_root/db/.keep",
|
678
683
|
"test/rails_root/db/migrate/20090320174818_create_muck_permissions_and_roles.rb",
|
684
|
+
"test/rails_root/db/migrate/20090327231918_create_users.rb",
|
679
685
|
"test/rails_root/db/migrate/20090402234137_create_languages.rb",
|
680
686
|
"test/rails_root/db/migrate/20090426041056_create_countries.rb",
|
681
687
|
"test/rails_root/db/migrate/20090426041103_create_states.rb",
|
682
|
-
"test/rails_root/db/migrate/20090602041838_create_users.rb",
|
683
688
|
"test/rails_root/features/step_definitions/webrat_steps.rb",
|
684
689
|
"test/rails_root/features/support/env.rb",
|
685
690
|
"test/rails_root/lib/tasks/muck.rake",
|
@@ -689,6 +694,11 @@ Gem::Specification.new do |s|
|
|
689
694
|
"test/rails_root/public/500.html",
|
690
695
|
"test/rails_root/public/dispatch.rb",
|
691
696
|
"test/rails_root/public/favicon.ico",
|
697
|
+
"test/rails_root/public/images/admin/Home.gif",
|
698
|
+
"test/rails_root/public/images/admin/roles.gif",
|
699
|
+
"test/rails_root/public/images/admin/source/Home.png",
|
700
|
+
"test/rails_root/public/images/admin/source/User.png",
|
701
|
+
"test/rails_root/public/images/admin/user.gif",
|
692
702
|
"test/rails_root/public/images/arrow_down.gif",
|
693
703
|
"test/rails_root/public/images/arrow_left.gif",
|
694
704
|
"test/rails_root/public/images/arrow_right.gif",
|
@@ -1118,6 +1128,7 @@ Gem::Specification.new do |s|
|
|
1118
1128
|
"test/rails_root/public/robots.txt",
|
1119
1129
|
"test/rails_root/public/stylesheets/.keep",
|
1120
1130
|
"test/rails_root/public/stylesheets/admin.css",
|
1131
|
+
"test/rails_root/public/stylesheets/application.css",
|
1121
1132
|
"test/rails_root/public/stylesheets/blueprint/ie.css",
|
1122
1133
|
"test/rails_root/public/stylesheets/blueprint/liquid_screen.css",
|
1123
1134
|
"test/rails_root/public/stylesheets/blueprint/plugins/buttons/icons/cross.png",
|
@@ -1280,10 +1291,10 @@ Gem::Specification.new do |s|
|
|
1280
1291
|
"test/rails_root/config/initializers/session_store.rb",
|
1281
1292
|
"test/rails_root/config/routes.rb",
|
1282
1293
|
"test/rails_root/db/migrate/20090320174818_create_muck_permissions_and_roles.rb",
|
1294
|
+
"test/rails_root/db/migrate/20090327231918_create_users.rb",
|
1283
1295
|
"test/rails_root/db/migrate/20090402234137_create_languages.rb",
|
1284
1296
|
"test/rails_root/db/migrate/20090426041056_create_countries.rb",
|
1285
1297
|
"test/rails_root/db/migrate/20090426041103_create_states.rb",
|
1286
|
-
"test/rails_root/db/migrate/20090602041838_create_users.rb",
|
1287
1298
|
"test/rails_root/features/step_definitions/webrat_steps.rb",
|
1288
1299
|
"test/rails_root/features/support/env.rb",
|
1289
1300
|
"test/rails_root/public/dispatch.rb",
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/rails/init.rb
CHANGED
data/test/rails_root/db/migrate/{20090602041838_create_users.rb → 20090327231918_create_users.rb}
RENAMED
@@ -1,5 +1,4 @@
|
|
1
1
|
class CreateUsers < ActiveRecord::Migration
|
2
|
-
|
3
2
|
def self.up
|
4
3
|
create_table :users, :force => true do |t|
|
5
4
|
t.string :login
|
@@ -8,29 +7,31 @@ class CreateUsers < ActiveRecord::Migration
|
|
8
7
|
t.string :last_name
|
9
8
|
t.string :crypted_password
|
10
9
|
t.string :password_salt
|
11
|
-
t.string :persistence_token
|
12
|
-
t.string :single_access_token
|
13
|
-
t.string :perishable_token
|
10
|
+
t.string :persistence_token, :null => false
|
11
|
+
t.string :single_access_token, :null => false
|
12
|
+
t.string :perishable_token, :null => false
|
14
13
|
t.integer :login_count, :null => false, :default => 0
|
15
14
|
t.integer :failed_login_count, :null => false, :default => 0
|
16
15
|
t.datetime :last_request_at
|
17
|
-
t.datetime :last_login_at
|
18
16
|
t.datetime :current_login_at
|
17
|
+
t.datetime :last_login_at
|
19
18
|
t.string :current_login_ip
|
20
19
|
t.string :last_login_ip
|
21
|
-
t.boolean :terms_of_service,
|
22
|
-
t.string :time_zone,
|
20
|
+
t.boolean :terms_of_service, :default => false, :null => false
|
21
|
+
t.string :time_zone, :default => "UTC"
|
23
22
|
t.datetime :disabled_at
|
23
|
+
t.datetime :created_at
|
24
24
|
t.datetime :activated_at
|
25
|
-
t.
|
25
|
+
t.datetime :updated_at
|
26
|
+
t.string :identity_url
|
27
|
+
t.string :url_key
|
26
28
|
end
|
27
29
|
|
28
30
|
add_index :users, :login
|
29
31
|
add_index :users, :email
|
30
32
|
add_index :users, :persistence_token
|
31
|
-
add_index :users, :perishable_token
|
32
|
-
add_index :users, :single_access_token
|
33
33
|
add_index :users, :last_request_at
|
34
|
+
|
34
35
|
end
|
35
36
|
|
36
37
|
def self.down
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -1,12 +1,19 @@
|
|
1
|
-
/*
|
2
|
-
#main-navigation{
|
3
|
-
#account-navigation {
|
4
|
-
|
5
|
-
.navigation ul{
|
6
|
-
.navigation ul li{float:left;padding:0 4px 0 10px;list-style:none;font-weight:bold;}
|
1
|
+
/* header */
|
2
|
+
#main-navigation{}
|
3
|
+
#account-navigation {}
|
4
|
+
.navigation ul{padding:2px;margin:0;}
|
5
|
+
.navigation ul li{list-style:none;font-weight:bold;display:inline-block;}
|
7
6
|
.navigation ul li a{float:left;text-decoration:none;font-weight:bold;}
|
8
7
|
.navigation ul li a:hover{text-decoration:underline;}
|
9
|
-
|
8
|
+
#header{height:90px;border-bottom:solid 2px #333;}
|
9
|
+
#admin-account{width:100%;float:right;}
|
10
|
+
#admin-account ul{float:right;}
|
11
|
+
#admin-account ul li{margin:1px;padding:0 4px;float:left;}
|
12
|
+
#admin-nav li a{background-repeat:no-repeat;height:20px;margin:0 4px;padding-top:35px;text-align:center;width:40px;}
|
13
|
+
#sub-header{width:100%;float:left;}
|
14
|
+
/* dashboard widgets */
|
15
|
+
.dashboard-widget{padding:5px;}
|
16
|
+
.dashboard-widget h2{font-size:12px;border-bottom:solid 1px #555;}
|
10
17
|
/* themes */
|
11
18
|
#current-theme{clear:both;float:left;width:100%;}
|
12
19
|
.theme-block{width:250px;height:300px;float:left;clear:none;margin:10px;}
|
File without changes
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: muck-users
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.21
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Ball
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2010-01-
|
13
|
+
date: 2010-01-13 00:00:00 -07:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -95,6 +95,7 @@ files:
|
|
95
95
|
- app/views/admin/roles/show.html.erb
|
96
96
|
- app/views/admin/users/_activate.html.erb
|
97
97
|
- app/views/admin/users/_ajax_search_box.html.erb
|
98
|
+
- app/views/admin/users/_dashboard_widget.html.erb
|
98
99
|
- app/views/admin/users/_row.html.erb
|
99
100
|
- app/views/admin/users/_search_box.html.erb
|
100
101
|
- app/views/admin/users/_table.html.erb
|
@@ -703,6 +704,10 @@ files:
|
|
703
704
|
- locales/zh-TW.yml
|
704
705
|
- locales/zh.yml
|
705
706
|
- muck-users.gemspec
|
707
|
+
- public/images/admin/roles.gif
|
708
|
+
- public/images/admin/source/User.png
|
709
|
+
- public/images/admin/source/roles.png
|
710
|
+
- public/images/admin/user.gif
|
706
711
|
- public/images/profile_default.jpg
|
707
712
|
- rails/init.rb
|
708
713
|
- tasks/rails.rake
|
@@ -732,10 +737,10 @@ files:
|
|
732
737
|
- test/rails_root/config/routes.rb
|
733
738
|
- test/rails_root/db/.keep
|
734
739
|
- test/rails_root/db/migrate/20090320174818_create_muck_permissions_and_roles.rb
|
740
|
+
- test/rails_root/db/migrate/20090327231918_create_users.rb
|
735
741
|
- test/rails_root/db/migrate/20090402234137_create_languages.rb
|
736
742
|
- test/rails_root/db/migrate/20090426041056_create_countries.rb
|
737
743
|
- test/rails_root/db/migrate/20090426041103_create_states.rb
|
738
|
-
- test/rails_root/db/migrate/20090602041838_create_users.rb
|
739
744
|
- test/rails_root/features/step_definitions/webrat_steps.rb
|
740
745
|
- test/rails_root/features/support/env.rb
|
741
746
|
- test/rails_root/lib/tasks/muck.rake
|
@@ -745,6 +750,11 @@ files:
|
|
745
750
|
- test/rails_root/public/500.html
|
746
751
|
- test/rails_root/public/dispatch.rb
|
747
752
|
- test/rails_root/public/favicon.ico
|
753
|
+
- test/rails_root/public/images/admin/Home.gif
|
754
|
+
- test/rails_root/public/images/admin/roles.gif
|
755
|
+
- test/rails_root/public/images/admin/source/Home.png
|
756
|
+
- test/rails_root/public/images/admin/source/User.png
|
757
|
+
- test/rails_root/public/images/admin/user.gif
|
748
758
|
- test/rails_root/public/images/arrow_down.gif
|
749
759
|
- test/rails_root/public/images/arrow_left.gif
|
750
760
|
- test/rails_root/public/images/arrow_right.gif
|
@@ -1174,6 +1184,7 @@ files:
|
|
1174
1184
|
- test/rails_root/public/robots.txt
|
1175
1185
|
- test/rails_root/public/stylesheets/.keep
|
1176
1186
|
- test/rails_root/public/stylesheets/admin.css
|
1187
|
+
- test/rails_root/public/stylesheets/application.css
|
1177
1188
|
- test/rails_root/public/stylesheets/blueprint/ie.css
|
1178
1189
|
- test/rails_root/public/stylesheets/blueprint/liquid_screen.css
|
1179
1190
|
- test/rails_root/public/stylesheets/blueprint/plugins/buttons/icons/cross.png
|
@@ -1357,10 +1368,10 @@ test_files:
|
|
1357
1368
|
- test/rails_root/config/initializers/session_store.rb
|
1358
1369
|
- test/rails_root/config/routes.rb
|
1359
1370
|
- test/rails_root/db/migrate/20090320174818_create_muck_permissions_and_roles.rb
|
1371
|
+
- test/rails_root/db/migrate/20090327231918_create_users.rb
|
1360
1372
|
- test/rails_root/db/migrate/20090402234137_create_languages.rb
|
1361
1373
|
- test/rails_root/db/migrate/20090426041056_create_countries.rb
|
1362
1374
|
- test/rails_root/db/migrate/20090426041103_create_states.rb
|
1363
|
-
- test/rails_root/db/migrate/20090602041838_create_users.rb
|
1364
1375
|
- test/rails_root/features/step_definitions/webrat_steps.rb
|
1365
1376
|
- test/rails_root/features/support/env.rb
|
1366
1377
|
- test/rails_root/public/dispatch.rb
|