caseadilla 0.0.1
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 +7 -0
- data/.gitignore +18 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +33 -0
- data/Rakefile +1 -0
- data/app/assets/fonts/caseadilla/glyphicons-halflings-regular.eot +0 -0
- data/app/assets/fonts/caseadilla/glyphicons-halflings-regular.svg +229 -0
- 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 -0
- data/app/assets/javascripts/caseadilla/bootstrap3-wysihtml5.js +521 -0
- data/app/assets/javascripts/caseadilla/caseadilla.js +51 -0
- data/app/assets/javascripts/caseadilla/html5shiv.js +8 -0
- data/app/assets/javascripts/caseadilla/wysihtml5-0.3.0.min.js +261 -0
- data/app/assets/stylesheets/caseadilla/bootstrap-glyphicons.css.scss +2 -0
- data/app/assets/stylesheets/caseadilla/bootstrap-theme.css +442 -0
- data/app/assets/stylesheets/caseadilla/bootstrap-wysihtml5.css +102 -0
- data/app/assets/stylesheets/caseadilla/bootstrap.css +6203 -0
- data/app/assets/stylesheets/caseadilla/caseadilla-bootstrap-overrides.css.scss +80 -0
- data/app/assets/stylesheets/caseadilla/caseadilla.scss +270 -0
- data/app/assets/stylesheets/caseadilla/login.css.scss +81 -0
- data/app/controllers/caseadilla/caseadilla_controller.rb +57 -0
- data/app/controllers/caseadilla/caseadilla_user_sessions_controller.rb +36 -0
- data/app/controllers/caseadilla/password_resets_controller.rb +64 -0
- data/app/controllers/caseadilla/roles_controller.rb +65 -0
- data/app/controllers/caseadilla/users_controller.rb +118 -0
- data/app/helpers/caseadilla/caseadilla_helper.rb +262 -0
- data/app/mailers/caseadilla/caseadilla_notification.rb +39 -0
- data/app/views/caseadilla/caseadilla/blank.html.erb +12 -0
- data/app/views/caseadilla/caseadilla_notification/generate_new_password.erb +12 -0
- data/app/views/caseadilla/caseadilla_notification/new_user_information.erb +12 -0
- data/app/views/caseadilla/caseadilla_notification/password_reset_instructions.erb +11 -0
- data/app/views/caseadilla/caseadilla_user_sessions/new.html.erb +39 -0
- data/app/views/caseadilla/roles/_form.html.erb +11 -0
- data/app/views/caseadilla/roles/_table.html.erb +28 -0
- data/app/views/caseadilla/roles/index.html.erb +15 -0
- data/app/views/caseadilla/roles/new.html.erb +18 -0
- data/app/views/caseadilla/roles/show.html.erb +18 -0
- data/app/views/caseadilla/users/index.html.erb +37 -0
- data/app/views/caseadilla/users/new.html.erb +50 -0
- data/app/views/caseadilla/users/show.html.erb +39 -0
- data/app/views/layouts/caseadilla_auth.html.erb +36 -0
- data/app/views/layouts/caseadilla_main.html.erb +119 -0
- data/caseadilla.gemspec +49 -0
- data/config/initializers/will_paginate.rb +40 -0
- data/config/routes.rb +23 -0
- data/lib/caseadilla.rb +14 -0
- data/lib/caseadilla/engine.rb +35 -0
- data/lib/caseadilla/version.rb +3 -0
- data/lib/generators/caseadilla/install/install_generator.rb +154 -0
- data/lib/generators/caseadilla/install/templates/app/assets/javascripts/caseadilla/custom.js +2 -0
- data/lib/generators/caseadilla/install/templates/app/assets/stylesheets/caseadilla/custom.css.scss +2 -0
- data/lib/generators/caseadilla/install/templates/app/helpers/caseadilla/config_helper.rb +45 -0
- data/lib/generators/caseadilla/install/templates/app/models/user.rb +24 -0
- data/lib/generators/caseadilla/install/templates/app/views/caseadilla/layouts/_tab_navigation.html.erb +2 -0
- data/lib/generators/caseadilla/install/templates/app/views/caseadilla/layouts/_top_navigation.html.erb +4 -0
- data/lib/generators/caseadilla/install/templates/public/robots.txt +5 -0
- data/lib/generators/caseadilla/install/templates/steak/config/initializers/caseadilla.rb +8 -0
- data/lib/generators/caseadilla/install/templates/steak/db/migrate/add_name_to_users.rb +9 -0
- data/lib/generators/caseadilla/install/templates/veggie/config/initializers/caseadilla.rb +8 -0
- data/lib/generators/caseadilla/scaffold/scaffold_generator.rb +111 -0
- data/lib/generators/caseadilla/scaffold/templates/controller.rb +72 -0
- data/lib/generators/caseadilla/scaffold/templates/migration.rb +13 -0
- data/lib/generators/caseadilla/scaffold/templates/model.rb +3 -0
- data/lib/generators/caseadilla/scaffold/templates/views/_form.html.erb +12 -0
- data/lib/generators/caseadilla/scaffold/templates/views/_table.html.erb +19 -0
- data/lib/generators/caseadilla/scaffold/templates/views/index.html.erb +15 -0
- data/lib/generators/caseadilla/scaffold/templates/views/new.html.erb +18 -0
- data/lib/generators/caseadilla/scaffold/templates/views/show.html.erb +18 -0
- data/lib/railties/tasks.rake +32 -0
- metadata +231 -0
|
@@ -0,0 +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
|
|
39
|
+
end
|
|
@@ -0,0 +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>
|
|
12
|
+
</div>
|
|
@@ -0,0 +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 />
|
|
12
|
+
<%= @from_text %>
|
|
@@ -0,0 +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 />
|
|
11
|
+
<%= @from_text %>
|
|
@@ -0,0 +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
|
+
|
|
39
|
+
<% end %>
|
|
@@ -0,0 +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 %>
|
|
28
|
+
</table>
|
|
@@ -0,0 +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
|
+
|
|
15
|
+
<% end %>
|
|
@@ -0,0 +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>
|
|
18
|
+
<% end %>
|
|
@@ -0,0 +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>
|
|
18
|
+
<% end %>
|
|
@@ -0,0 +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>
|
|
37
|
+
<% end %>
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<h2>Add a new user</h2>
|
|
2
|
+
|
|
3
|
+
<%= form_for @caseadilla_user, url: caseadilla_users_path do |form| %>
|
|
4
|
+
|
|
5
|
+
<div class="row">
|
|
6
|
+
<div class="col-lg-6">
|
|
7
|
+
<%= caseadilla_text_field form, @caseadilla_user, :first_name %>
|
|
8
|
+
</div>
|
|
9
|
+
<div class="col-lg-6">
|
|
10
|
+
<%= caseadilla_text_field form, @caseadilla_user, :last_name %>
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
13
|
+
|
|
14
|
+
<div class="row">
|
|
15
|
+
<div class="col-lg-6">
|
|
16
|
+
<%= caseadilla_text_field form, @caseadilla_user, :email %>
|
|
17
|
+
</div>
|
|
18
|
+
<div class="col-lg-6">
|
|
19
|
+
<%= caseadilla_time_zone_select form, @caseadilla_user, :time_zone, ActiveSupport::TimeZone.us_zones %>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
|
|
23
|
+
<!-- TODO: User roles -->
|
|
24
|
+
|
|
25
|
+
<div class="row">
|
|
26
|
+
<div class="col-lg-6">
|
|
27
|
+
<%= caseadilla_password_field form, @caseadilla_user, :password, {:caseadilla_label => "Password"} %>
|
|
28
|
+
</div>
|
|
29
|
+
<div class="col-lg-6">
|
|
30
|
+
<%= caseadilla_password_field form, @caseadilla_user, :password_confirmation, {:caseadilla_label => "Repeat password"} %>
|
|
31
|
+
</div>
|
|
32
|
+
<div class="col-lg-12 password-checkbox">
|
|
33
|
+
<div class="checkbox">
|
|
34
|
+
<label>
|
|
35
|
+
<%= check_box_tag :generate_random_password, "1", false, {:id => 'generate-random-password-checkbox'} %> Generate random password
|
|
36
|
+
</label>
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
|
|
41
|
+
<p class="submits">
|
|
42
|
+
<%= link_to 'Cancel', caseadilla_users_path, :class => 'btn btn-mini btn-danger' %>
|
|
43
|
+
<%= form.submit "Add new user", :class => "btn btn-mini btn-primary" %>
|
|
44
|
+
</p>
|
|
45
|
+
|
|
46
|
+
<% end %>
|
|
47
|
+
|
|
48
|
+
<%= content_for :sidebar do %>
|
|
49
|
+
<li><%= link_to "#{caseadilla_show_icon('th-list')}Back to list".html_safe, caseadilla_users_path %></li>
|
|
50
|
+
<% end %>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<h2>View user</h2>
|
|
2
|
+
|
|
3
|
+
<%= simple_form_for @caseadilla_user, as: resource_name, url: caseadilla_user_path(@caseadilla_user), html:{ method: :put } do |f| %>
|
|
4
|
+
|
|
5
|
+
<div class="row">
|
|
6
|
+
<div class="col-lg-6">
|
|
7
|
+
<%= caseadilla_text_field f, f.object, :first_name, {value: @caseadilla_user.first_name, caseadilla_label: "First name"} %>
|
|
8
|
+
</div>
|
|
9
|
+
<div class="col-lg-6">
|
|
10
|
+
<%= caseadilla_text_field f, f.object, :last_name, {value: @caseadilla_user.last_name, caseadilla_label: "Last name"} %>
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
13
|
+
|
|
14
|
+
<div class="row">
|
|
15
|
+
<div class="col-lg-6">
|
|
16
|
+
<%= caseadilla_text_field f, f.object, :email, {value: @caseadilla_user.email} %>
|
|
17
|
+
</div>
|
|
18
|
+
<div class="col-lg-6">
|
|
19
|
+
<%= caseadilla_time_zone_select f, f.object, :time_zone, ActiveSupport::TimeZone.us_zones, {selected: @caseadilla_user.time_zone} %>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
|
|
23
|
+
<div class="row">
|
|
24
|
+
<div class="col-lg-6">
|
|
25
|
+
<%= caseadilla_collection_select f, f.object, :role_id, Role.all, :id, :title, {selected: @caseadilla_user.role_id} %>
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
<p class="submits">
|
|
30
|
+
<%= link_to 'Cancel', caseadilla_users_path, :class => 'btn btn-mini btn-danger' %>
|
|
31
|
+
<%= f.submit "Save changes", :class => "btn btn-mini btn-primary" %>
|
|
32
|
+
</p>
|
|
33
|
+
<% end %>
|
|
34
|
+
|
|
35
|
+
<%= content_for :sidebar do %>
|
|
36
|
+
<% if current_user #.is_admin? %>
|
|
37
|
+
<li><%= link_to "#{caseadilla_show_icon('th-list')}Back to list".html_safe, caseadilla_users_path %></li>
|
|
38
|
+
<% end %>
|
|
39
|
+
<% end %>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>Welcome to <%= caseadilla_config_website_name %></title>
|
|
7
|
+
<%= stylesheet_link_tag "caseadilla/login" %>
|
|
8
|
+
<%= javascript_include_tag "caseadilla/caseadilla" %>
|
|
9
|
+
<%= csrf_meta_tag %>
|
|
10
|
+
|
|
11
|
+
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
|
|
12
|
+
<!--[if lt IE 9]>
|
|
13
|
+
<%= javascript_include_tag("caseadilla/html5shiv") %>
|
|
14
|
+
<![endif]-->
|
|
15
|
+
|
|
16
|
+
</head>
|
|
17
|
+
|
|
18
|
+
<body>
|
|
19
|
+
<div class="container-narrow">
|
|
20
|
+
<div class="jumbotron">
|
|
21
|
+
<div class="row brand">
|
|
22
|
+
<%= image_tag(caseadilla_config_logo, :alt => caseadilla_config_website_name) %>
|
|
23
|
+
</div>
|
|
24
|
+
<%= yield %>
|
|
25
|
+
</div>
|
|
26
|
+
<div class="row">
|
|
27
|
+
<div class="col-lg-12">
|
|
28
|
+
<hr />
|
|
29
|
+
<footer>
|
|
30
|
+
<p><%= caseadilla_get_footer_string(false) %></p>
|
|
31
|
+
</footer>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
</body>
|
|
36
|
+
</html>
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
|
|
7
|
+
<title><%= caseadilla_generate_page_title %></title>
|
|
8
|
+
<% caseadilla_config_stylesheet_includes.each do |stylesheet| %>
|
|
9
|
+
<%= stylesheet_link_tag(stylesheet) %>
|
|
10
|
+
<% end %>
|
|
11
|
+
|
|
12
|
+
<% caseadilla_config_javascript_includes.each do |javascript| %>
|
|
13
|
+
<%= javascript_include_tag(javascript) %>
|
|
14
|
+
<% end %>
|
|
15
|
+
|
|
16
|
+
<%= csrf_meta_tag %>
|
|
17
|
+
|
|
18
|
+
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
|
|
19
|
+
<!--[if lt IE 9]>
|
|
20
|
+
<%= javascript_include_tag("caseadilla/html5shiv") %>
|
|
21
|
+
<![endif]-->
|
|
22
|
+
|
|
23
|
+
<script type="text/javascript">
|
|
24
|
+
var current_controller = "<%= controller_name %>";
|
|
25
|
+
</script>
|
|
26
|
+
|
|
27
|
+
</head>
|
|
28
|
+
|
|
29
|
+
<body>
|
|
30
|
+
<div class="navbar navbar-static-top">
|
|
31
|
+
<% if current_user != nil %>
|
|
32
|
+
<div class="container">
|
|
33
|
+
<div id="user-info">
|
|
34
|
+
<ul>
|
|
35
|
+
<li class="hidden-sm">Hello <%= link_to current_user.first_name, caseadilla_user_path(current_user) %></li>
|
|
36
|
+
<li class="hidden-sm"><%= Time.zone.name %></li>
|
|
37
|
+
|
|
38
|
+
<% if current_user #.is_admin? %>
|
|
39
|
+
<li><%= link_to 'Users', caseadilla_users_path %></li>
|
|
40
|
+
<% end %>
|
|
41
|
+
<% if current_user #.is_admin? %>
|
|
42
|
+
<li><%= link_to 'Roles', caseadilla_roles_path %></li>
|
|
43
|
+
<% end %>
|
|
44
|
+
|
|
45
|
+
<%= render :partial => '/caseadilla/layouts/top_navigation' %>
|
|
46
|
+
<li class="last-item signout"><%= link_to 'Sign out', destroy_user_session_path, :method => :delete %></li>
|
|
47
|
+
</ul>
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
<% end %>
|
|
51
|
+
|
|
52
|
+
<div class="container">
|
|
53
|
+
<%= link_to(image_tag(caseadilla_config_logo, :alt => caseadilla_config_website_name), {:controller => :caseadilla}, :class => "navbar-brand") %>
|
|
54
|
+
</div>
|
|
55
|
+
<div class="container">
|
|
56
|
+
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".nav-collapse">
|
|
57
|
+
<span class="icon-bar"></span>
|
|
58
|
+
<span class="icon-bar"></span>
|
|
59
|
+
<span class="icon-bar"></span>
|
|
60
|
+
</button>
|
|
61
|
+
|
|
62
|
+
<div class="nav-collapse collapse">
|
|
63
|
+
<ul class="nav navbar-nav">
|
|
64
|
+
<%= render :partial => '/caseadilla/layouts/tab_navigation' %>
|
|
65
|
+
</ul>
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
|
|
70
|
+
<div class="container">
|
|
71
|
+
<div id="content">
|
|
72
|
+
<div class="row">
|
|
73
|
+
<% if content_for?(:sidebar) %>
|
|
74
|
+
<div id="right-column" class="col-lg-2">
|
|
75
|
+
<ul class="nav nav-pills nav-stacked content-bottom-padding">
|
|
76
|
+
<%= yield :sidebar %>
|
|
77
|
+
</ul>
|
|
78
|
+
</div>
|
|
79
|
+
<div id="left-column" class="col-lg-10 content-bottom-padding">
|
|
80
|
+
<% else %>
|
|
81
|
+
<div class="col-lg-12 content-bottom-padding">
|
|
82
|
+
<% end %>
|
|
83
|
+
|
|
84
|
+
<% if flash[:warning] %>
|
|
85
|
+
<div id="error" class="alert alert-danger alert-dismissible fade in" role="alert">
|
|
86
|
+
<button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">×</span><!-- <span class="sr-only">Close</span> --></button>
|
|
87
|
+
<%= flash[:warning] %>
|
|
88
|
+
</div>
|
|
89
|
+
<% end %>
|
|
90
|
+
<% if flash[:notice] %>
|
|
91
|
+
<div id="notice" class="alert alert-success alert-dismissible fade in" role="alert">
|
|
92
|
+
<button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">×</span><!-- <span class="sr-only">Close</span> --></button>
|
|
93
|
+
<%= flash[:notice] %>
|
|
94
|
+
</div>
|
|
95
|
+
<% end %>
|
|
96
|
+
<% if content_for?(:help) %>
|
|
97
|
+
<div id="help" class="alert alert-info alert-dismissible fade in" role="alert">
|
|
98
|
+
<button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">×</span><!-- <span class="sr-only">Close</span> --></button>
|
|
99
|
+
<%= yield :help %>
|
|
100
|
+
</div>
|
|
101
|
+
<% end %>
|
|
102
|
+
|
|
103
|
+
<%= yield %>
|
|
104
|
+
|
|
105
|
+
</div>
|
|
106
|
+
|
|
107
|
+
</div>
|
|
108
|
+
<div class="row">
|
|
109
|
+
<div class="col-lg-12">
|
|
110
|
+
<hr />
|
|
111
|
+
<footer>
|
|
112
|
+
<p><%= caseadilla_get_footer_string(true) %></p>
|
|
113
|
+
</footer>
|
|
114
|
+
</div>
|
|
115
|
+
</div>
|
|
116
|
+
</div>
|
|
117
|
+
</div>
|
|
118
|
+
</body>
|
|
119
|
+
</html>
|