caseadilla 0.0.1 → 0.0.2

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.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +0 -0
  3. data/Gemfile +0 -0
  4. data/LICENSE.txt +0 -0
  5. data/README.md +0 -0
  6. data/Rakefile +0 -0
  7. data/app/assets/fonts/caseadilla/glyphicons-halflings-regular.eot +0 -0
  8. data/app/assets/fonts/caseadilla/glyphicons-halflings-regular.svg +228 -228
  9. data/app/assets/fonts/caseadilla/glyphicons-halflings-regular.ttf +0 -0
  10. data/app/assets/fonts/caseadilla/glyphicons-halflings-regular.woff +0 -0
  11. data/app/assets/images/caseadilla/caseadilla.png +0 -0
  12. data/app/assets/javascripts/caseadilla/bootstrap.js +2114 -2114
  13. data/app/assets/javascripts/caseadilla/bootstrap3-wysihtml5.js +520 -520
  14. data/app/assets/javascripts/caseadilla/caseadilla.js +50 -50
  15. data/app/assets/javascripts/caseadilla/html5shiv.js +8 -8
  16. data/app/assets/javascripts/caseadilla/wysihtml5-0.3.0.min.js +260 -260
  17. data/app/assets/stylesheets/caseadilla/bootstrap-glyphicons.css.scss +2 -2
  18. data/app/assets/stylesheets/caseadilla/bootstrap-theme.css +442 -442
  19. data/app/assets/stylesheets/caseadilla/bootstrap-wysihtml5.css +101 -101
  20. data/app/assets/stylesheets/caseadilla/bootstrap.css +6203 -6203
  21. data/app/assets/stylesheets/caseadilla/caseadilla-bootstrap-overrides.css.scss +79 -79
  22. data/app/assets/stylesheets/caseadilla/caseadilla.scss +269 -269
  23. data/app/assets/stylesheets/caseadilla/login.css.scss +80 -80
  24. data/app/controllers/caseadilla/caseadilla_controller.rb +56 -56
  25. data/app/controllers/caseadilla/caseadilla_user_sessions_controller.rb +35 -35
  26. data/app/controllers/caseadilla/password_resets_controller.rb +63 -63
  27. data/app/controllers/caseadilla/roles_controller.rb +64 -64
  28. data/app/controllers/caseadilla/users_controller.rb +117 -117
  29. data/app/helpers/caseadilla/caseadilla_helper.rb +261 -261
  30. data/app/mailers/caseadilla/caseadilla_notification.rb +38 -38
  31. data/app/views/caseadilla/caseadilla/blank.html.erb +11 -11
  32. data/app/views/caseadilla/caseadilla_notification/generate_new_password.erb +11 -11
  33. data/app/views/caseadilla/caseadilla_notification/new_user_information.erb +11 -11
  34. data/app/views/caseadilla/caseadilla_notification/password_reset_instructions.erb +10 -10
  35. data/app/views/caseadilla/caseadilla_user_sessions/new.html.erb +38 -38
  36. data/app/views/caseadilla/roles/_form.html.erb +11 -11
  37. data/app/views/caseadilla/roles/_table.html.erb +27 -27
  38. data/app/views/caseadilla/roles/index.html.erb +14 -14
  39. data/app/views/caseadilla/roles/new.html.erb +17 -17
  40. data/app/views/caseadilla/roles/show.html.erb +17 -17
  41. data/app/views/caseadilla/users/index.html.erb +36 -36
  42. data/app/views/caseadilla/users/new.html.erb +49 -49
  43. data/app/views/caseadilla/users/show.html.erb +38 -38
  44. data/app/views/layouts/caseadilla_auth.html.erb +36 -36
  45. data/app/views/layouts/caseadilla_main.html.erb +110 -118
  46. data/caseadilla.gemspec +48 -48
  47. data/config/initializers/will_paginate.rb +39 -39
  48. data/config/routes.rb +22 -22
  49. data/lib/caseadilla.rb +13 -13
  50. data/lib/caseadilla/engine.rb +34 -34
  51. data/lib/caseadilla/version.rb +1 -1
  52. data/lib/generators/caseadilla/install/install_generator.rb +153 -153
  53. data/lib/generators/caseadilla/install/templates/app/assets/javascripts/caseadilla/custom.js +1 -1
  54. data/lib/generators/caseadilla/install/templates/app/assets/stylesheets/caseadilla/custom.css.scss +2 -2
  55. data/lib/generators/caseadilla/install/templates/app/helpers/caseadilla/config_helper.rb +44 -44
  56. data/lib/generators/caseadilla/install/templates/app/models/user.rb +23 -23
  57. data/lib/generators/caseadilla/install/templates/app/views/caseadilla/layouts/_tab_navigation.html.erb +1 -1
  58. data/lib/generators/caseadilla/install/templates/app/views/caseadilla/layouts/_top_navigation.html.erb +3 -3
  59. data/lib/generators/caseadilla/install/templates/public/robots.txt +4 -4
  60. data/lib/generators/caseadilla/install/templates/steak/config/initializers/caseadilla.rb +7 -7
  61. data/lib/generators/caseadilla/install/templates/steak/db/migrate/add_name_to_users.rb +8 -8
  62. data/lib/generators/caseadilla/install/templates/veggie/config/initializers/caseadilla.rb +7 -7
  63. data/lib/generators/caseadilla/scaffold/scaffold_generator.rb +110 -110
  64. data/lib/generators/caseadilla/scaffold/templates/controller.rb +71 -71
  65. data/lib/generators/caseadilla/scaffold/templates/migration.rb +12 -12
  66. data/lib/generators/caseadilla/scaffold/templates/model.rb +2 -2
  67. data/lib/generators/caseadilla/scaffold/templates/views/_form.html.erb +11 -11
  68. data/lib/generators/caseadilla/scaffold/templates/views/_table.html.erb +18 -18
  69. data/lib/generators/caseadilla/scaffold/templates/views/index.html.erb +14 -14
  70. data/lib/generators/caseadilla/scaffold/templates/views/new.html.erb +17 -17
  71. data/lib/generators/caseadilla/scaffold/templates/views/show.html.erb +17 -17
  72. data/lib/railties/tasks.rake +31 -31
  73. metadata +2 -2
@@ -1,39 +1,39 @@
1
- module Caseadilla
2
-
3
- class CaseadillaNotification < ActionMailer::Base
4
-
5
- self.prepend_view_path File.join(File.dirname(__FILE__), '..', 'views', 'caseadilla')
6
-
7
- def generate_new_password from, caseadilla_admin_user, host, pass
8
- @name = caseadilla_admin_user.name
9
- @host = host
10
- @login = caseadilla_admin_user.login
11
- @pass = pass
12
- @from_text = caseadilla_config_website_name
13
-
14
- mail(:to => caseadilla_admin_user.email, :from => from, :subject => "[#{caseadilla_config_website_name}] New password")
15
- end
16
-
17
- def new_user_information from, caseadilla_admin_user, host, pass
18
- @name = caseadilla_admin_user.name
19
- @host = host
20
- @login = caseadilla_admin_user.login
21
- @pass = pass
22
- @from_text = caseadilla_config_website_name
23
-
24
- mail(:to => caseadilla_admin_user.email, :from => from, :subject => "[#{caseadilla_config_website_name}] New user account")
25
- end
26
-
27
- def password_reset_instructions from, caseadilla_admin_user, host
28
- ActionMailer::Base.default_url_options[:host] = host.gsub("http://", "")
29
- @name = caseadilla_admin_user.name
30
- @host = host
31
- @login = caseadilla_admin_user.login
32
- @reset_password_url = edit_caseadilla_password_reset_url + "/?token=#{caseadilla_admin_user.perishable_token}"
33
- @from_text = caseadilla_config_website_name
34
-
35
- mail(:to => caseadilla_admin_user.email, :from => from, :subject => "[#{caseadilla_config_website_name}] Password reset instructions")
36
- end
37
-
38
- end
1
+ module Caseadilla
2
+
3
+ class CaseadillaNotification < ActionMailer::Base
4
+
5
+ self.prepend_view_path File.join(File.dirname(__FILE__), '..', 'views', 'caseadilla')
6
+
7
+ def generate_new_password from, caseadilla_admin_user, host, pass
8
+ @name = caseadilla_admin_user.name
9
+ @host = host
10
+ @login = caseadilla_admin_user.login
11
+ @pass = pass
12
+ @from_text = caseadilla_config_website_name
13
+
14
+ mail(:to => caseadilla_admin_user.email, :from => from, :subject => "[#{caseadilla_config_website_name}] New password")
15
+ end
16
+
17
+ def new_user_information from, caseadilla_admin_user, host, pass
18
+ @name = caseadilla_admin_user.name
19
+ @host = host
20
+ @login = caseadilla_admin_user.login
21
+ @pass = pass
22
+ @from_text = caseadilla_config_website_name
23
+
24
+ mail(:to => caseadilla_admin_user.email, :from => from, :subject => "[#{caseadilla_config_website_name}] New user account")
25
+ end
26
+
27
+ def password_reset_instructions from, caseadilla_admin_user, host
28
+ ActionMailer::Base.default_url_options[:host] = host.gsub("http://", "")
29
+ @name = caseadilla_admin_user.name
30
+ @host = host
31
+ @login = caseadilla_admin_user.login
32
+ @reset_password_url = edit_caseadilla_password_reset_url + "/?token=#{caseadilla_admin_user.perishable_token}"
33
+ @from_text = caseadilla_config_website_name
34
+
35
+ mail(:to => caseadilla_admin_user.email, :from => from, :subject => "[#{caseadilla_config_website_name}] Password reset instructions")
36
+ end
37
+
38
+ end
39
39
  end
@@ -1,12 +1,12 @@
1
- <br />
2
- <br />
3
- <div class="container">
4
- <div class="jumbotron" style="text-align: center;">
5
- <h1>Welcome to Caseadilla</h1>
6
- <br />
7
- <p>You&rsquo;re ready to begin scaffolding and customizing!</p>
8
- <p><small style="font-size: 0.7em;">To remove this screen, set <code>caseadilla_config_dashboard_url</code></small></p>
9
- <br />
10
- <p><a href="https://github.com/zeiv/caseadilla/blob/master/README.rdoc" class="btn btn-primary btn-large">View README on GitHub</a></p>
11
- </div>
1
+ <br />
2
+ <br />
3
+ <div class="container">
4
+ <div class="jumbotron" style="text-align: center;">
5
+ <h1>Welcome to Caseadilla</h1>
6
+ <br />
7
+ <p>You&rsquo;re ready to begin scaffolding and customizing!</p>
8
+ <p><small style="font-size: 0.7em;">To remove this screen, set <code>caseadilla_config_dashboard_url</code></small></p>
9
+ <br />
10
+ <p><a href="https://github.com/zeiv/caseadilla/blob/master/README.rdoc" class="btn btn-primary btn-large">View README on GitHub</a></p>
11
+ </div>
12
12
  </div>
@@ -1,12 +1,12 @@
1
- Dear <%= @name %>,<br />
2
- <br />
3
- Your password has been reset by an administrator for your account at:<br />
4
- <br />
5
- <%= @host %>/caseadilla<br />
6
- <br />
7
- Username: <%= @login %><br />
8
- New password: <%= @pass %><br />
9
- <br />
10
- From<br />
11
- <br />
1
+ Dear <%= @name %>,<br />
2
+ <br />
3
+ Your password has been reset by an administrator for your account at:<br />
4
+ <br />
5
+ <%= @host %>/caseadilla<br />
6
+ <br />
7
+ Username: <%= @login %><br />
8
+ New password: <%= @pass %><br />
9
+ <br />
10
+ From<br />
11
+ <br />
12
12
  <%= @from_text %>
@@ -1,12 +1,12 @@
1
- Dear <%= @name %>,<br />
2
- <br />
3
- A new user account has been created for you at:<br />
4
- <br />
5
- <%= @host %>/caseadilla<br />
6
- <br />
7
- Username: <%= @login %><br />
8
- Password: <%= @pass %><br />
9
- <br />
10
- From<br />
11
- <br />
1
+ Dear <%= @name %>,<br />
2
+ <br />
3
+ A new user account has been created for you at:<br />
4
+ <br />
5
+ <%= @host %>/caseadilla<br />
6
+ <br />
7
+ Username: <%= @login %><br />
8
+ Password: <%= @pass %><br />
9
+ <br />
10
+ From<br />
11
+ <br />
12
12
  <%= @from_text %>
@@ -1,11 +1,11 @@
1
- Dear <%= @name %>,<br />
2
- <br />
3
- A request to reset the password for username '<%= @login %>' has been made.<br />
4
- If you did not make this request, simply ignore this email.<br />
5
- Otherwise, click the link below to proceed:<br />
6
- <br />
7
- <%= @reset_password_url %><br />
8
- <br />
9
- From<br />
10
- <br />
1
+ Dear <%= @name %>,<br />
2
+ <br />
3
+ A request to reset the password for username '<%= @login %>' has been made.<br />
4
+ If you did not make this request, simply ignore this email.<br />
5
+ Otherwise, click the link below to proceed:<br />
6
+ <br />
7
+ <%= @reset_password_url %><br />
8
+ <br />
9
+ From<br />
10
+ <br />
11
11
  <%= @from_text %>
@@ -1,39 +1,39 @@
1
- <%= form_for resource, as: resource_name, url: session_path(resource_name) do |f| %>
2
-
3
- <% if flash[:warning] %>
4
- <div id="error" class="alert alert-danger alert-dismissible fade in" role="alert">
5
- <button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">×</span><!-- <span class="sr-only">Close</span> --></button>
6
- <%= flash[:warning] %>
7
- </div>
8
- <% end %>
9
- <% if flash[:notice] %>
10
- <div id="notice" class="alert alert-success alert-dismissible fade in" role="alert">
11
- <button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">×</span><!-- <span class="sr-only">Close</span> --></button>
12
- <%= flash[:notice] %>
13
- </div>
14
- <% end %>
15
-
16
- <div class="form-group">
17
- <%= f.text_field :email, :placeholder => "Email", :class => "form-control input-large" %>
18
- </div>
19
- <div class="form-group">
20
- <%= f.password_field :password, :placeholder => "Password", :class => "form-control input-large" %>
21
- </div>
22
-
23
- <div class="form-group">
24
- <div class="checkbox-inline">
25
- <label>
26
- <%= f.check_box :remember_me %> Remember me
27
- </label>
28
- </div>
29
- </div>
30
-
31
- <div class="form-group">
32
- <%= f.submit "Sign in", :class => "btn btn-success btn-large btn-block" %>
33
- </div>
34
-
35
- <div class="form-group">
36
- <%= link_to "Forgot your password?", new_password_path(:user) %>
37
- </div>
38
-
1
+ <%= form_for resource, as: resource_name, url: session_path(resource_name) do |f| %>
2
+
3
+ <% if flash[:warning] %>
4
+ <div id="error" class="alert alert-danger alert-dismissible fade in" role="alert">
5
+ <button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">×</span><!-- <span class="sr-only">Close</span> --></button>
6
+ <%= flash[:warning] %>
7
+ </div>
8
+ <% end %>
9
+ <% if flash[:notice] %>
10
+ <div id="notice" class="alert alert-success alert-dismissible fade in" role="alert">
11
+ <button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">×</span><!-- <span class="sr-only">Close</span> --></button>
12
+ <%= flash[:notice] %>
13
+ </div>
14
+ <% end %>
15
+
16
+ <div class="form-group">
17
+ <%= f.text_field :email, :placeholder => "Email", :class => "form-control input-large" %>
18
+ </div>
19
+ <div class="form-group">
20
+ <%= f.password_field :password, :placeholder => "Password", :class => "form-control input-large" %>
21
+ </div>
22
+
23
+ <div class="form-group">
24
+ <div class="checkbox-inline">
25
+ <label>
26
+ <%= f.check_box :remember_me %> Remember me
27
+ </label>
28
+ </div>
29
+ </div>
30
+
31
+ <div class="form-group">
32
+ <%= f.submit "Sign in", :class => "btn btn-success btn-large btn-block" %>
33
+ </div>
34
+
35
+ <div class="form-group">
36
+ <%= link_to "Forgot your password?", new_password_path(:user) %>
37
+ </div>
38
+
39
39
  <% end %>
@@ -1,11 +1,11 @@
1
- <!-- Scaffolding generated by Caseadilla 0.0.1 -->
2
-
3
-
4
- <div class="row">
5
- <div class="col-lg-6">
6
- <%= caseadilla_text_field f, f.object, :title %>
7
- </div>
8
- <div class="col-lg-6">
9
-
10
- </div>
11
- </div>
1
+ <!-- Scaffolding generated by Caseadilla 0.0.1 -->
2
+
3
+
4
+ <div class="row">
5
+ <div class="col-lg-6">
6
+ <%= caseadilla_text_field f, f.object, :title %>
7
+ </div>
8
+ <div class="col-lg-6">
9
+
10
+ </div>
11
+ </div>
@@ -1,28 +1,28 @@
1
- <!-- Scaffolding generated by Caseadilla 0.0.1 -->
2
-
3
- <table class="table table-striped table-hover table-condensed">
4
- <thead>
5
- <tr>
6
- <th><%= caseadilla_sort_link "Title", :title %></th>
7
- <th>&nbsp;</th>
8
- </tr>
9
- </thead>
10
-
11
- <% roles.each do |role| %>
12
- <% if role.title == 'admin' or 'user' %>
13
- <tr>
14
- <td><%= caseadilla_table_cell_no_link role.title %></td>
15
- <td class="locked">
16
- <%= caseadilla_show_row_icon("lock")%>
17
- </td>
18
- </tr>
19
- <% else %>
20
- <tr>
21
- <td><%= caseadilla_table_cell_link role.title, caseadilla_role_path(role) %></td>
22
- <td class="delete">
23
- <%= link_to(caseadilla_show_row_icon("trash"), caseadilla_role_path(role), :method => :delete, :data => { :confirm => "Are you sure you want to delete this role?" }) %>
24
- </td>
25
- </tr>
26
- <% end %>
27
- <% end %>
1
+ <!-- Scaffolding generated by Caseadilla 0.0.1 -->
2
+
3
+ <table class="table table-striped table-hover table-condensed">
4
+ <thead>
5
+ <tr>
6
+ <th><%= caseadilla_sort_link "Title", :title %></th>
7
+ <th>&nbsp;</th>
8
+ </tr>
9
+ </thead>
10
+
11
+ <% roles.each do |role| %>
12
+ <% if role.title == 'admin' or 'user' %>
13
+ <tr>
14
+ <td><%= caseadilla_table_cell_no_link role.title %></td>
15
+ <td class="locked">
16
+ <%= caseadilla_show_row_icon("lock")%>
17
+ </td>
18
+ </tr>
19
+ <% else %>
20
+ <tr>
21
+ <td><%= caseadilla_table_cell_link role.title, caseadilla_role_path(role) %></td>
22
+ <td class="delete">
23
+ <%= link_to(caseadilla_show_row_icon("trash"), caseadilla_role_path(role), :method => :delete, :data => { :confirm => "Are you sure you want to delete this role?" }) %>
24
+ </td>
25
+ </tr>
26
+ <% end %>
27
+ <% end %>
28
28
  </table>
@@ -1,15 +1,15 @@
1
- <!-- Scaffolding generated by Caseadilla 0.0.1 -->
2
-
3
- <h2>Roles<%= caseadilla_pagination_details @roles %></h2>
4
-
5
- <%= render :partial => 'caseadilla/roles/table', :locals => { :roles => @roles } %>
6
-
7
- <div class="text-center">
8
- <%= will_paginate @roles %>
9
- </div>
10
-
11
- <%= content_for :sidebar do %>
12
-
13
- <li><%= link_to "#{caseadilla_show_icon "plus-sign"}Add a new role".html_safe, new_caseadilla_role_path %></li>
14
-
1
+ <!-- Scaffolding generated by Caseadilla 0.0.1 -->
2
+
3
+ <h2>Roles<%= caseadilla_pagination_details @roles %></h2>
4
+
5
+ <%= render :partial => 'caseadilla/roles/table', :locals => { :roles => @roles } %>
6
+
7
+ <div class="text-center">
8
+ <%= will_paginate @roles %>
9
+ </div>
10
+
11
+ <%= content_for :sidebar do %>
12
+
13
+ <li><%= link_to "#{caseadilla_show_icon "plus-sign"}Add a new role".html_safe, new_caseadilla_role_path %></li>
14
+
15
15
  <% end %>
@@ -1,18 +1,18 @@
1
- <!-- Scaffolding generated by Caseadilla 0.0.1 -->
2
-
3
- <h2>Add a new role</h2>
4
-
5
- <%= form_for @role, :url => caseadilla_roles_path do |f| %>
6
-
7
- <%= render :partial => 'caseadilla/roles/form', :locals => { :f => f } %>
8
-
9
- <p class="submits">
10
- <%= link_to 'Cancel', caseadilla_roles_path, :class => 'btn btn-mini btn-danger' %>
11
- <%= f.submit "Add new role", :class => "btn btn-mini btn-primary" %>
12
- </p>
13
-
14
- <% end %>
15
-
16
- <%= content_for :sidebar do %>
17
- <li><%= link_to "#{caseadilla_show_icon "th-list"}Back to list".html_safe, caseadilla_roles_path %></li>
1
+ <!-- Scaffolding generated by Caseadilla 0.0.1 -->
2
+
3
+ <h2>Add a new role</h2>
4
+
5
+ <%= form_for @role, :url => caseadilla_roles_path do |f| %>
6
+
7
+ <%= render :partial => 'caseadilla/roles/form', :locals => { :f => f } %>
8
+
9
+ <p class="submits">
10
+ <%= link_to 'Cancel', caseadilla_roles_path, :class => 'btn btn-mini btn-danger' %>
11
+ <%= f.submit "Add new role", :class => "btn btn-mini btn-primary" %>
12
+ </p>
13
+
14
+ <% end %>
15
+
16
+ <%= content_for :sidebar do %>
17
+ <li><%= link_to "#{caseadilla_show_icon "th-list"}Back to list".html_safe, caseadilla_roles_path %></li>
18
18
  <% end %>
@@ -1,18 +1,18 @@
1
- <!-- Scaffolding generated by Caseadilla 0.0.1 -->
2
-
3
- <h2>View role</h2>
4
-
5
- <%= form_for @role, :url => caseadilla_role_path(@role) do |f| %>
6
-
7
- <%= render :partial => 'caseadilla/roles/form', :locals => { :f => f } %>
8
-
9
- <p class="submits">
10
- <%= link_to 'Cancel', caseadilla_roles_path, :class => 'btn btn-mini btn-danger' %>
11
- <%= f.submit "Save changes", :class => "btn btn-mini btn-primary" %>
12
- </p>
13
-
14
- <% end %>
15
-
16
- <%= content_for :sidebar do %>
17
- <li><%= link_to "#{caseadilla_show_icon "th-list"}Back to list".html_safe, caseadilla_roles_path %></li>
1
+ <!-- Scaffolding generated by Caseadilla 0.0.1 -->
2
+
3
+ <h2>View role</h2>
4
+
5
+ <%= form_for @role, :url => caseadilla_role_path(@role) do |f| %>
6
+
7
+ <%= render :partial => 'caseadilla/roles/form', :locals => { :f => f } %>
8
+
9
+ <p class="submits">
10
+ <%= link_to 'Cancel', caseadilla_roles_path, :class => 'btn btn-mini btn-danger' %>
11
+ <%= f.submit "Save changes", :class => "btn btn-mini btn-primary" %>
12
+ </p>
13
+
14
+ <% end %>
15
+
16
+ <%= content_for :sidebar do %>
17
+ <li><%= link_to "#{caseadilla_show_icon "th-list"}Back to list".html_safe, caseadilla_roles_path %></li>
18
18
  <% end %>
@@ -1,37 +1,37 @@
1
- <h2>Users<%= caseadilla_pagination_details @users %></h2>
2
-
3
- <table class="table table-striped table-hover table-condensed">
4
- <thead>
5
- <tr>
6
- <th><%= caseadilla_sort_link 'Email', :email %></th>
7
- <th><%= caseadilla_sort_link 'Name', :last_name %></th>
8
- <th>Role</th>
9
- <th>&nbsp;</th>
10
- </tr>
11
- </thead>
12
-
13
- <% @users.each do |user| %>
14
- <tr>
15
- <td><%= caseadilla_table_cell_link user.email, caseadilla_user_path(user) %></td>
16
- <td><%= caseadilla_table_cell_link user.name, caseadilla_user_path(user) %></td>
17
- <td><%= caseadilla_table_cell_link user.role_symbols.join(', ').titleize, caseadilla_user_path(user) %></td>
18
- <td class="delete">
19
- <% confirm_message = "Are you sure you want to delete #{user.email}?" %>
20
-
21
- <% if user.id == current_user.id %>
22
- <% confirm_message += "\n\nWARNING: This is your user account. You will be signed out if you proceed." %>
23
- <% end %>
24
-
25
- <%= link_to(caseadilla_show_row_icon("trash"), caseadilla_user_path(user), :method => :delete, :data => { :confirm => confirm_message }) %>
26
- </td>
27
- </tr>
28
- <% end %>
29
- </table>
30
-
31
- <div class="text-center">
32
- <%= will_paginate @users %>
33
- </div>
34
-
35
- <%= content_for :sidebar do %>
36
- <li><%= link_to "#{caseadilla_show_icon('plus-sign')}Add a new user".html_safe, new_caseadilla_user_path %></li>
1
+ <h2>Users<%= caseadilla_pagination_details @users %></h2>
2
+
3
+ <table class="table table-striped table-hover table-condensed">
4
+ <thead>
5
+ <tr>
6
+ <th><%= caseadilla_sort_link 'Email', :email %></th>
7
+ <th><%= caseadilla_sort_link 'Name', :last_name %></th>
8
+ <th>Role</th>
9
+ <th>&nbsp;</th>
10
+ </tr>
11
+ </thead>
12
+
13
+ <% @users.each do |user| %>
14
+ <tr>
15
+ <td><%= caseadilla_table_cell_link user.email, caseadilla_user_path(user) %></td>
16
+ <td><%= caseadilla_table_cell_link user.name, caseadilla_user_path(user) %></td>
17
+ <td><%= caseadilla_table_cell_link user.role_symbols.join(', ').titleize, caseadilla_user_path(user) %></td>
18
+ <td class="delete">
19
+ <% confirm_message = "Are you sure you want to delete #{user.email}?" %>
20
+
21
+ <% if user.id == current_user.id %>
22
+ <% confirm_message += "\n\nWARNING: This is your user account. You will be signed out if you proceed." %>
23
+ <% end %>
24
+
25
+ <%= link_to(caseadilla_show_row_icon("trash"), caseadilla_user_path(user), :method => :delete, :data => { :confirm => confirm_message }) %>
26
+ </td>
27
+ </tr>
28
+ <% end %>
29
+ </table>
30
+
31
+ <div class="text-center">
32
+ <%= will_paginate @users %>
33
+ </div>
34
+
35
+ <%= content_for :sidebar do %>
36
+ <li><%= link_to "#{caseadilla_show_icon('plus-sign')}Add a new user".html_safe, new_caseadilla_user_path %></li>
37
37
  <% end %>