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.
- checksums.yaml +4 -4
- data/.gitignore +0 -0
- data/Gemfile +0 -0
- data/LICENSE.txt +0 -0
- data/README.md +0 -0
- data/Rakefile +0 -0
- data/app/assets/fonts/caseadilla/glyphicons-halflings-regular.eot +0 -0
- data/app/assets/fonts/caseadilla/glyphicons-halflings-regular.svg +228 -228
- data/app/assets/fonts/caseadilla/glyphicons-halflings-regular.ttf +0 -0
- data/app/assets/fonts/caseadilla/glyphicons-halflings-regular.woff +0 -0
- data/app/assets/images/caseadilla/caseadilla.png +0 -0
- data/app/assets/javascripts/caseadilla/bootstrap.js +2114 -2114
- data/app/assets/javascripts/caseadilla/bootstrap3-wysihtml5.js +520 -520
- data/app/assets/javascripts/caseadilla/caseadilla.js +50 -50
- data/app/assets/javascripts/caseadilla/html5shiv.js +8 -8
- data/app/assets/javascripts/caseadilla/wysihtml5-0.3.0.min.js +260 -260
- data/app/assets/stylesheets/caseadilla/bootstrap-glyphicons.css.scss +2 -2
- data/app/assets/stylesheets/caseadilla/bootstrap-theme.css +442 -442
- data/app/assets/stylesheets/caseadilla/bootstrap-wysihtml5.css +101 -101
- data/app/assets/stylesheets/caseadilla/bootstrap.css +6203 -6203
- data/app/assets/stylesheets/caseadilla/caseadilla-bootstrap-overrides.css.scss +79 -79
- data/app/assets/stylesheets/caseadilla/caseadilla.scss +269 -269
- data/app/assets/stylesheets/caseadilla/login.css.scss +80 -80
- data/app/controllers/caseadilla/caseadilla_controller.rb +56 -56
- data/app/controllers/caseadilla/caseadilla_user_sessions_controller.rb +35 -35
- data/app/controllers/caseadilla/password_resets_controller.rb +63 -63
- data/app/controllers/caseadilla/roles_controller.rb +64 -64
- data/app/controllers/caseadilla/users_controller.rb +117 -117
- data/app/helpers/caseadilla/caseadilla_helper.rb +261 -261
- data/app/mailers/caseadilla/caseadilla_notification.rb +38 -38
- data/app/views/caseadilla/caseadilla/blank.html.erb +11 -11
- data/app/views/caseadilla/caseadilla_notification/generate_new_password.erb +11 -11
- data/app/views/caseadilla/caseadilla_notification/new_user_information.erb +11 -11
- data/app/views/caseadilla/caseadilla_notification/password_reset_instructions.erb +10 -10
- data/app/views/caseadilla/caseadilla_user_sessions/new.html.erb +38 -38
- data/app/views/caseadilla/roles/_form.html.erb +11 -11
- data/app/views/caseadilla/roles/_table.html.erb +27 -27
- data/app/views/caseadilla/roles/index.html.erb +14 -14
- data/app/views/caseadilla/roles/new.html.erb +17 -17
- data/app/views/caseadilla/roles/show.html.erb +17 -17
- data/app/views/caseadilla/users/index.html.erb +36 -36
- data/app/views/caseadilla/users/new.html.erb +49 -49
- data/app/views/caseadilla/users/show.html.erb +38 -38
- data/app/views/layouts/caseadilla_auth.html.erb +36 -36
- data/app/views/layouts/caseadilla_main.html.erb +110 -118
- data/caseadilla.gemspec +48 -48
- data/config/initializers/will_paginate.rb +39 -39
- data/config/routes.rb +22 -22
- data/lib/caseadilla.rb +13 -13
- data/lib/caseadilla/engine.rb +34 -34
- data/lib/caseadilla/version.rb +1 -1
- data/lib/generators/caseadilla/install/install_generator.rb +153 -153
- data/lib/generators/caseadilla/install/templates/app/assets/javascripts/caseadilla/custom.js +1 -1
- data/lib/generators/caseadilla/install/templates/app/assets/stylesheets/caseadilla/custom.css.scss +2 -2
- data/lib/generators/caseadilla/install/templates/app/helpers/caseadilla/config_helper.rb +44 -44
- data/lib/generators/caseadilla/install/templates/app/models/user.rb +23 -23
- data/lib/generators/caseadilla/install/templates/app/views/caseadilla/layouts/_tab_navigation.html.erb +1 -1
- data/lib/generators/caseadilla/install/templates/app/views/caseadilla/layouts/_top_navigation.html.erb +3 -3
- data/lib/generators/caseadilla/install/templates/public/robots.txt +4 -4
- data/lib/generators/caseadilla/install/templates/steak/config/initializers/caseadilla.rb +7 -7
- data/lib/generators/caseadilla/install/templates/steak/db/migrate/add_name_to_users.rb +8 -8
- data/lib/generators/caseadilla/install/templates/veggie/config/initializers/caseadilla.rb +7 -7
- data/lib/generators/caseadilla/scaffold/scaffold_generator.rb +110 -110
- data/lib/generators/caseadilla/scaffold/templates/controller.rb +71 -71
- data/lib/generators/caseadilla/scaffold/templates/migration.rb +12 -12
- data/lib/generators/caseadilla/scaffold/templates/model.rb +2 -2
- data/lib/generators/caseadilla/scaffold/templates/views/_form.html.erb +11 -11
- data/lib/generators/caseadilla/scaffold/templates/views/_table.html.erb +18 -18
- data/lib/generators/caseadilla/scaffold/templates/views/index.html.erb +14 -14
- data/lib/generators/caseadilla/scaffold/templates/views/new.html.erb +17 -17
- data/lib/generators/caseadilla/scaffold/templates/views/show.html.erb +17 -17
- data/lib/railties/tasks.rake +31 -31
- 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’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’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> </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> </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> </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> </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 %>
|