tb_core 1.2.8 → 1.3.0.beta1
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/app/assets/javascripts/admin/core/application.js +1 -2
- data/app/assets/javascripts/admin/core/dashboard.js +1 -1
- data/app/assets/javascripts/admin/core/modal.js +4 -13
- data/app/assets/javascripts/admin/core/users.js +0 -120
- data/app/assets/stylesheets/admin/core/application.css.scss +106 -367
- data/app/assets/stylesheets/admin/core/login.css.scss +3 -29
- data/app/controllers/admin/application_controller.rb +1 -2
- data/app/controllers/admin/user_sessions_controller.rb +0 -3
- data/app/controllers/admin/users_controller.rb +3 -13
- data/app/controllers/password_resets_controller.rb +1 -0
- data/app/controllers/spud/application_controller.rb +8 -14
- data/app/controllers/user_sessions_controller.rb +1 -0
- data/app/helpers/admin/application_helper.rb +11 -15
- data/app/helpers/twice_baked/application_helper.rb +24 -1
- data/app/models/spud/spud_user_model.rb +7 -0
- data/app/views/admin/dashboard/index.html.erb +2 -4
- data/app/views/admin/password_resets/index.html.erb +4 -4
- data/app/views/admin/password_resets/show.html.erb +10 -9
- data/app/views/admin/roles/_form.html.erb +20 -22
- data/app/views/admin/roles/index.html.erb +23 -21
- data/app/views/admin/settings/_form.html.erb +36 -45
- data/app/views/admin/settings/edit.html.erb +1 -1
- data/app/views/admin/setup/new.html.erb +37 -46
- data/app/views/admin/user_sessions/new.html.erb +15 -12
- data/app/views/admin/users/_form.html.erb +16 -86
- data/app/views/admin/users/edit.html.erb +1 -1
- data/app/views/admin/users/index.html.erb +47 -27
- data/app/views/admin/users/new.html.erb +1 -1
- data/app/views/admin/users/show.html.erb +21 -31
- data/app/views/layouts/admin/_flashes.html.erb +19 -0
- data/app/views/layouts/admin/application.html.erb +39 -48
- data/app/views/layouts/admin/detail.html.erb +16 -30
- data/app/views/layouts/admin/error_page.html.erb +2 -1
- data/app/views/layouts/admin/login.html.erb +4 -11
- data/app/views/layouts/user_sessions.html.erb +6 -0
- data/app/views/password_resets/index.html.erb +4 -4
- data/app/views/password_resets/show.html.erb +7 -7
- data/app/views/user_sessions/new.html.erb +6 -6
- data/config/locales/en.yml +10 -0
- data/lib/generators/spud/module_generator.rb +6 -4
- data/lib/generators/spud/setup_generator.rb +7 -39
- data/lib/generators/spud/templates/assets/application.css.scss +5 -0
- data/lib/generators/spud/templates/assets/application.js +1 -0
- data/lib/generators/spud/templates/views/admin/_form.html.erb +7 -18
- data/lib/generators/spud/templates/views/admin/index.html.erb +39 -28
- data/lib/generators/spud/templates/views/admin/show.html.erb +6 -7
- data/lib/generators/spud/templates/views/frontend/index.html.erb +2 -1
- data/lib/generators/spud/templates/views/frontend/show.html.erb +6 -4
- data/lib/generators/spud/templates/views/layouts/application.html.erb +16 -6
- data/lib/spud_core/configuration.rb +1 -1
- data/lib/spud_core/engine.rb +9 -1
- data/lib/spud_core/version.rb +1 -1
- data/lib/tb_core/form_builder.rb +254 -0
- data/spec/helpers/spud/admin/application_helper_spec.rb +5 -5
- metadata +38 -14
- data/app/assets/javascripts/admin/core/split_pane.js +0 -150
- data/app/assets/libs/bootstrap/css/bootstrap-responsive.css +0 -1088
- data/app/assets/libs/bootstrap/css/bootstrap.css.scss +0 -5893
- data/app/assets/libs/bootstrap/img/glyphicons-halflings-white.png +0 -0
- data/app/assets/libs/bootstrap/img/glyphicons-halflings.png +0 -0
- data/app/assets/libs/bootstrap/js/bootstrap.js +0 -2025
- data/app/assets/stylesheets/admin/core/roles.css +0 -4
- data/app/assets/stylesheets/admin/core/split_pane.css.scss +0 -126
- data/app/assets/stylesheets/admin/core/users.css.scss +0 -9
@@ -1,22 +1,25 @@
|
|
1
1
|
<%= form_for @user_session, :url => admin_login_path do |f| %>
|
2
2
|
|
3
|
-
<%=
|
3
|
+
<%= tb_form_errors(f.object) %>
|
4
4
|
|
5
|
-
|
5
|
+
<% if params[:return_to] %>
|
6
|
+
<%= hidden_field_tag :return_to, params[:return_to] %>
|
7
|
+
<% end %>
|
8
|
+
<div class="form-group">
|
6
9
|
<% if Spud::Core.config.use_email_as_login %>
|
7
|
-
<%= f.label :email %>
|
8
|
-
<%= f.text_field :email, :placeholder => 'Email', :autofocus => 'autofocus', :autocomplete => 'username' %>
|
10
|
+
<%= f.label :email, :class => 'form-label' %>
|
11
|
+
<%= f.text_field :email, :placeholder => 'Email', :autofocus => 'autofocus', :autocomplete => 'username', :class => 'form-control' %>
|
9
12
|
<% else %>
|
10
|
-
<%= f.label :login %>
|
11
|
-
<%= f.text_field :login, :placeholder => 'Username', :autofocus => 'autofocus', :autocomplete => 'username' %>
|
13
|
+
<%= f.label :login, :class => 'form-label' %>
|
14
|
+
<%= f.text_field :login, :placeholder => 'Username', :autofocus => 'autofocus', :autocomplete => 'username', :class => 'form-control' %>
|
12
15
|
<% end %>
|
13
16
|
</div>
|
14
|
-
<div class="
|
15
|
-
<%= f.label :password %>
|
16
|
-
<%= f.password_field :password, :placeholder => 'Password', :autocomplete => 'current-password' %>
|
17
|
+
<div class="form-group">
|
18
|
+
<%= f.label :password, :class => 'form-label' %>
|
19
|
+
<%= f.password_field :password, :placeholder => 'Password', :autocomplete => 'current-password', :class => 'form-control' %>
|
17
20
|
</div>
|
18
|
-
<div class="
|
19
|
-
<%= f.submit "Login", :class => 'btn' %> or <%=link_to "Forgot Password?", admin_password_resets_path %>
|
21
|
+
<div class="form-group">
|
22
|
+
<%= f.submit "Login", :class => 'btn btn-primary' %> or <%=link_to "Forgot Password?", admin_password_resets_path %>
|
20
23
|
</div>
|
21
24
|
|
22
|
-
<% end %>
|
25
|
+
<% end %>
|
@@ -1,95 +1,25 @@
|
|
1
|
-
<%=
|
1
|
+
<%= tb_form_error_header(f.object) %>
|
2
2
|
|
3
|
-
<
|
4
|
-
<legend>User Details</legend>
|
3
|
+
<h4>User Details</h4>
|
5
4
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
</div>
|
14
|
-
<% end %>
|
15
|
-
|
16
|
-
<div class="control-group">
|
17
|
-
<%=f.label :email,:class=> "control-label"%>
|
18
|
-
<div class="controls">
|
19
|
-
<%=f.text_field :email, :title => "",:size => 25%>
|
20
|
-
<p class="help-block">The email address must be a valid email address.</p>
|
21
|
-
</div>
|
22
|
-
|
23
|
-
</div>
|
24
|
-
<div class="control-group">
|
25
|
-
<%=f.label :first_name,:class=> "control-label"%>
|
26
|
-
<div class="controls">
|
27
|
-
<%=f.text_field :first_name, :title => "",:size => 25%>
|
28
|
-
</div>
|
29
|
-
|
30
|
-
</div>
|
31
|
-
<div class="control-group">
|
32
|
-
<%=f.label :last_name,:class=> "control-label"%>
|
33
|
-
<div class="controls">
|
34
|
-
<%=f.text_field :last_name, :title => "",:size => 25%>
|
35
|
-
</div>
|
36
|
-
|
37
|
-
</div>
|
38
|
-
<div class="control-group">
|
39
|
-
<%=f.label :time_zone,:class => "control-label"%>
|
40
|
-
<div class="controls">
|
41
|
-
<%=f.time_zone_select :time_zone,ActiveSupport::TimeZone.us_zones,:default => Rails.application.config.time_zone%>
|
42
|
-
</div>
|
43
|
-
</div>
|
44
|
-
|
45
|
-
</fieldset>
|
5
|
+
<% if !Spud::Core.config.use_email_as_login %>
|
6
|
+
<%= f.tb_text_field :login %>
|
7
|
+
<% end %>
|
8
|
+
<%= f.tb_text_field :email %>
|
9
|
+
<%= f.tb_text_field :first_name %>
|
10
|
+
<%= f.tb_text_field :last_name %>
|
11
|
+
<%= f.tb_time_zone_select :time_zone, ActiveSupport::TimeZone.us_zones, {:default => Rails.application.config.time_zone} %>
|
46
12
|
|
47
13
|
<%= render :partial => 'form_additions', :locals => {:f => f} %>
|
48
14
|
|
49
|
-
<
|
50
|
-
<legend>Credentials</legend>
|
51
|
-
|
52
|
-
<div class="control-group">
|
53
|
-
<%=f.label :password,:class=> "control-label"%>
|
54
|
-
<div class="controls">
|
55
|
-
<%=f.password_field :password, :title => "",:size => 25%>
|
56
|
-
<p class="help-block">Password must be at least 8 characters</p>
|
57
|
-
</div>
|
58
|
-
|
59
|
-
</div>
|
60
|
-
<div class="control-group">
|
61
|
-
<%=f.label :password_confirmation,"Confirm",:class=> "control-label"%>
|
62
|
-
<div class="controls">
|
63
|
-
<%=f.password_field :password_confirmation, :title => "",:size => 25%>
|
64
|
-
<p class="help-block">Retype your password here.</p>
|
65
|
-
</div>
|
66
|
-
|
67
|
-
</div>
|
68
|
-
|
69
|
-
</fieldset>
|
70
|
-
<fieldset>
|
71
|
-
<legend>Permissions</legend>
|
15
|
+
<h4>Credentials</h4>
|
72
16
|
|
73
|
-
|
74
|
-
|
75
|
-
<div class="controls">
|
76
|
-
<label class="checkbox inline">
|
77
|
-
<%= f.check_box :super_admin, :title => "" %>
|
78
|
-
The super administrator bypasses all permissions and roles.
|
79
|
-
</label>
|
80
|
-
</div>
|
81
|
-
</div>
|
17
|
+
<%= f.tb_password_field :password %>
|
18
|
+
<%= f.tb_password_field :password_confirmation %>
|
82
19
|
|
83
|
-
|
84
|
-
<%= f.label :role, 'Role', :class => 'control-label' %>
|
85
|
-
<div class="controls">
|
86
|
-
<%= f.select :spud_role_id, options_from_collection_for_select(SpudRole.all, :id, :name, f.object.spud_role_id), :include_blank => 'No Role' %>
|
87
|
-
</div>
|
88
|
-
</div>
|
20
|
+
<h4>Permissions</h4>
|
89
21
|
|
90
|
-
|
22
|
+
<%= f.tb_check_box :super_admin, :help_block => 'The super administrator bypasses all permissions and roles.' %>
|
23
|
+
<%= f.tb_select :spud_role_id, options_from_collection_for_select(SpudRole.all, :id, :name, f.object.spud_role_id), {:include_blank => 'No Role'} %>
|
91
24
|
|
92
|
-
|
93
|
-
<%= f.submit "Save User", :class=>"btn btn-primary", "data-loading-text" => "Saving..." %>
|
94
|
-
or <%= link_to "Cancel", '#', :class => "btn admin-user-edit-cancel-btn" %>
|
95
|
-
</div>
|
25
|
+
<%= f.tb_save_buttons('User', @user.new_record? ? admin_users_path : admin_user_path(@user)) %>
|
@@ -1,3 +1,3 @@
|
|
1
|
-
<%= form_for @user, :url => admin_user_path(@user), :html=> {:class => "form-horizontal
|
1
|
+
<%= form_for @user, :url => admin_user_path(@user), :builder => TbCore::FormBuilder, :html => {:class => "form-horizontal"} do |f| %>
|
2
2
|
<%= render :partial => "form", :locals => {:f => f} %>
|
3
3
|
<% end %>
|
@@ -1,34 +1,54 @@
|
|
1
1
|
<%= content_for :data_controls do %>
|
2
|
-
|
3
|
-
|
4
|
-
|
2
|
+
<%= form_tag admin_users_path, :method => :get, :class => 'form-inline' do %>
|
3
|
+
<div class="form-group">
|
4
|
+
<div class="input-group">
|
5
|
+
<div class="input-group-addon"><span class="glyphicon glyphicon-search"></span></div>
|
6
|
+
<%= search_field_tag :search, params[:search], :placeholder => 'Search', :class => 'form-control' %>
|
7
|
+
<% if params[:search] %>
|
8
|
+
<div class="input-group-addon">
|
9
|
+
<%= link_to raw('<span class="glyphicon glyphicon-remove"></span>'), admin_users_path %>
|
10
|
+
</div>
|
11
|
+
<% end %>
|
12
|
+
</div>
|
13
|
+
</div>
|
14
|
+
<div class="form-group">
|
15
|
+
<%= link_to 'Roles', admin_roles_path, :class => 'btn btn-default admin-role-btn' %>
|
16
|
+
<%= link_to "New User", new_admin_user_path, :class => "btn btn-primary admin-user-add-btn", :title => "New User" %>
|
17
|
+
</div>
|
18
|
+
<% end %>
|
5
19
|
<% end %>
|
6
20
|
|
7
21
|
<%= content_for :detail do %>
|
22
|
+
<div class="table-responsive">
|
23
|
+
<table class="table table-striped table-hover">
|
24
|
+
<thead>
|
25
|
+
<th>Name</th>
|
26
|
+
<th>Email</th>
|
27
|
+
<th>Last Login</th>
|
28
|
+
<th> </th>
|
29
|
+
</thead>
|
30
|
+
<tbody>
|
31
|
+
<% cache [:admin, @spud_users] do %>
|
32
|
+
<% @spud_users.each do |spud_user| %>
|
33
|
+
<tr>
|
34
|
+
<td><%= spud_user.full_name %></td>
|
35
|
+
<td><%= mail_to spud_user.email %></td>
|
36
|
+
<td><%= timestamp(spud_user.last_login_at) %></td>
|
37
|
+
<td class="table-actions">
|
38
|
+
<%= link_to 'Details', admin_user_path(spud_user), :class => 'btn btn-default btn-sm' %>
|
39
|
+
<%= link_to 'Edit', edit_admin_user_path(spud_user), :class => 'btn btn-default btn-sm' %>
|
40
|
+
<%= link_to 'Delete', admin_user_path(spud_user), :method => :delete, :data => {:confirm => 'Are you sure you want to delete this Comic book?'}, :class => 'btn btn-danger btn-sm' %>
|
41
|
+
</td>
|
42
|
+
</tr>
|
43
|
+
<% end %>
|
44
|
+
<% end %>
|
45
|
+
</tbody>
|
46
|
+
</table>
|
47
|
+
</div>
|
8
48
|
|
9
|
-
|
10
|
-
<div class="split-pane-toolbar">
|
11
|
-
<div class="split-pane-toolbar-left">
|
12
|
-
<%= form_tag admin_users_path, :method => :get, :class => 'split-pane-search-form' do %>
|
13
|
-
<input type="search" name="search" id="search" results="5" autosave="spud-admin-user-search" value="<%= params[:search] %>"/>
|
14
|
-
<% end %>
|
15
|
-
<%= link_to 'X', admin_users_path, :class => 'btn btn-small split-pane-search-clear-btn' %>
|
16
|
-
</div>
|
17
|
-
<div class="split-pane-toolbar-right">
|
18
|
-
<span class="split-pane-toolbar-title"></span>
|
19
|
-
</div>
|
20
|
-
</div>
|
21
|
-
<div class="split-pane-left">
|
22
|
-
<%= render 'index' %>
|
23
|
-
</div>
|
24
|
-
<div class="split-pane-right">
|
25
|
-
<div class="split-pane-right-content">
|
26
|
-
</div>
|
27
|
-
</div>
|
28
|
-
</div>
|
29
|
-
|
30
|
-
<script>
|
31
|
-
$(document).ready(spud.admin.users.index);
|
32
|
-
</script>
|
49
|
+
<%= will_paginate @spud_users, :renderer => BootstrapPagination::Rails %>
|
33
50
|
|
51
|
+
<script>
|
52
|
+
$(document).ready(spud.admin.users.index);
|
53
|
+
</script>
|
34
54
|
<% end %>
|
@@ -1,3 +1,3 @@
|
|
1
|
-
<%= form_for @user, :url => admin_users_path, :html=> {:class => "form-horizontal admin-user-form"} do |f| %>
|
1
|
+
<%= form_for @user, :url => admin_users_path, :builder => TbCore::FormBuilder, :html=> {:class => "form-horizontal admin-user-form"} do |f| %>
|
2
2
|
<%= render :partial => "form", :locals => {:f => f} %>
|
3
3
|
<% end %>
|
@@ -1,31 +1,21 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
</
|
13
|
-
<
|
14
|
-
<
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
<dd><%= timestamp @user.last_login_at %></dd>
|
23
|
-
<dt>Created At</dt>
|
24
|
-
<dd><%= timestamp @user.created_at %></dd>
|
25
|
-
<dt>Role:</dt>
|
26
|
-
<dd><%= @user.role.blank? ? 'None' : @user.role.name %></dd>
|
27
|
-
<dt>Super Admin?<dt>
|
28
|
-
<dd><%= @user.super_admin? ? 'Yes' : 'No' %></dd>
|
29
|
-
<%= render 'show_additions' %>
|
30
|
-
</dl>
|
31
|
-
</div>
|
1
|
+
<%= content_for :data_controls do %>
|
2
|
+
<%= link_to 'Edit', edit_admin_user_path(@user), :class => 'btn btn-primary admin-user-edit-btn', :title => "Edit" %>
|
3
|
+
<% end %>
|
4
|
+
|
5
|
+
<dl class="dl-horizontal">
|
6
|
+
<% if !Spud::Core.config.use_email_as_login %>
|
7
|
+
<dt>Login</dt>
|
8
|
+
<dd><%= @user.login %></dd>
|
9
|
+
<% end %>
|
10
|
+
<dt>Email</dt>
|
11
|
+
<dd><%= mail_to @user.email %></dd>
|
12
|
+
<dt>Last Login</dt>
|
13
|
+
<dd><%= timestamp @user.last_login_at %></dd>
|
14
|
+
<dt>Created At</dt>
|
15
|
+
<dd><%= timestamp @user.created_at %></dd>
|
16
|
+
<dt>Role:</dt>
|
17
|
+
<dd><%= @user.role.blank? ? 'None' : @user.role.name %></dd>
|
18
|
+
<dt>Super Admin?<dt>
|
19
|
+
<dd><%= @user.super_admin? ? 'Yes' : 'No' %></dd>
|
20
|
+
<%= render 'show_additions' %>
|
21
|
+
</dl>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<% if flash[:notice] %>
|
2
|
+
<div class="alert alert-success">
|
3
|
+
<a class="close" data-dismiss="alert">×</a>
|
4
|
+
<%= flash[:notice] %>
|
5
|
+
</div>
|
6
|
+
<% end %>
|
7
|
+
<% if flash[:warning] %>
|
8
|
+
<div class="alert alert-warning">
|
9
|
+
<a class="close" data-dismiss="alert">×</a>
|
10
|
+
<%= flash[:warning] %>
|
11
|
+
</div>
|
12
|
+
<% end %>
|
13
|
+
<% if flash[:error]%>
|
14
|
+
<div class="alert alert-error">
|
15
|
+
<a class="close" data-dismiss="alert">×</a>
|
16
|
+
<%= flash[:error] %>
|
17
|
+
</div>
|
18
|
+
<% end %>
|
19
|
+
|
@@ -1,10 +1,12 @@
|
|
1
1
|
<!DOCTYPE html>
|
2
|
-
<html>
|
2
|
+
<html lang="en">
|
3
3
|
<head>
|
4
4
|
<title><%= Spud::Core.config.site_name %> Admin</title>
|
5
5
|
<%= stylesheet_link_tag *Spud::Core.config.admin_stylesheets %>
|
6
6
|
<%= javascript_include_tag *Spud::Core.config.admin_javascripts %>
|
7
7
|
<%= csrf_meta_tags %>
|
8
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
9
|
+
<meta name="viewport" content="width=device-width"/>
|
8
10
|
<%= yield :head %>
|
9
11
|
</head>
|
10
12
|
<body>
|
@@ -14,60 +16,49 @@
|
|
14
16
|
</div>
|
15
17
|
<% end %>
|
16
18
|
<div id="header" style="<%=header_style%>">
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
<div id="multisite_switcher" class="right_floated">
|
28
|
-
<%=form_tag admin_switch_path do%>
|
29
|
-
<%=select_tag :multisite_select,options_for_select([[Spud::Core.site_name,nil]] + Spud::Core.multisite_config.collect{|c| [c[:site_name],c[:site_id]]},session[:admin_site])%>
|
30
|
-
<% end %>
|
31
|
-
</div>
|
19
|
+
<div class="container">
|
20
|
+
<%= link_to '/' do %>
|
21
|
+
<h1><%= Spud::Core.config.site_name %></h1>
|
22
|
+
<% end %>
|
23
|
+
<% if current_user %>
|
24
|
+
<div class="pull-right">
|
25
|
+
Hello <%= current_user.full_name %> |
|
26
|
+
<%= link_to "Settings", admin_settings_path %> |
|
27
|
+
<%= link_to "Logout", admin_logout_path %>
|
28
|
+
</div>
|
32
29
|
<% end %>
|
33
|
-
<% end %>
|
34
|
-
</div>
|
35
|
-
<div id="breadcrumbs">
|
36
|
-
<%= render_breadcrumbs :separator => ' / ' %>
|
37
|
-
</div>
|
38
|
-
<div id="content">
|
39
|
-
<% if flash[:notice] %>
|
40
|
-
<div class="alert alert-success">
|
41
|
-
<a class="close" data-dismiss="alert">×</a>
|
42
|
-
<%= flash[:notice] %>
|
43
|
-
</div>
|
44
|
-
<% end %>
|
45
|
-
<% if flash[:warning] %>
|
46
|
-
<div class="alert alert-warning">
|
47
|
-
<a class="close" data-dismiss="alert">×</a>
|
48
|
-
<%= flash[:warning] %>
|
49
|
-
</div>
|
50
|
-
<% end %>
|
51
|
-
<% if flash[:error]%>
|
52
|
-
<div class="alert alert-error">
|
53
|
-
<a class="close" data-dismiss="alert">×</a>
|
54
|
-
<%= flash[:error] %>
|
55
30
|
</div>
|
56
|
-
|
31
|
+
</div>
|
32
|
+
|
33
|
+
<div class="container">
|
34
|
+
|
35
|
+
<ol class="breadcrumb">
|
36
|
+
<%= render_breadcrumbs :tag => :li, :separator => "" %>
|
37
|
+
</ol>
|
38
|
+
|
39
|
+
<%= render :partial => '/layouts/admin/flashes' %>
|
40
|
+
|
57
41
|
<%= content_for?(:content) ? yield(:content) : yield %>
|
58
42
|
</div>
|
59
43
|
|
60
|
-
<div
|
61
|
-
<div class="modal-
|
62
|
-
<
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
44
|
+
<div class="modal fade" id="modal_window">
|
45
|
+
<div class="modal-dialog">
|
46
|
+
<div class="modal-content">
|
47
|
+
<div class="modal-header">
|
48
|
+
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
49
|
+
<h4 class="modal-title"></h4>
|
50
|
+
</div>
|
51
|
+
<div class="modal-body">
|
52
|
+
<p>One fine body…</p>
|
53
|
+
</div>
|
54
|
+
<div class="modal-footer modal-footer-default">
|
55
|
+
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
56
|
+
<button type="button" class="btn btn-primary form-submit">Save changes</button>
|
57
|
+
</div>
|
58
|
+
</div>
|
69
59
|
</div>
|
70
60
|
</div>
|
71
61
|
|
62
|
+
|
72
63
|
</body>
|
73
64
|
</html>
|
@@ -1,31 +1,17 @@
|
|
1
|
-
<%=content_for :content do %>
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
<%= yield(:detail_nav)%>
|
18
|
-
</div>
|
19
|
-
</div>
|
20
|
-
<div id="detail_main_wrapper">
|
21
|
-
<div id="detail_main">
|
22
|
-
<%= content_for?(:detail) ? yield(:detail) : yield %></div>
|
23
|
-
</div>
|
24
|
-
<br style="clear:both;"/>
|
25
|
-
<%else%>
|
26
|
-
<%= content_for?(:detail) ? yield(:detail) : yield %>
|
27
|
-
<%end%>
|
28
|
-
</div>
|
29
|
-
</div>
|
30
|
-
<%end%>
|
1
|
+
<%= content_for :content do %>
|
2
|
+
<div class="detail-wrapper">
|
3
|
+
<div class="data-controls">
|
4
|
+
<%= yield :data_controls %>
|
5
|
+
</div>
|
6
|
+
<h2 class="detail-title">
|
7
|
+
<% if @page_thumbnail %>
|
8
|
+
<%= image_tag(@page_thumbnail, :class => 'app-thumbnail') %>
|
9
|
+
<% end%>
|
10
|
+
<%= @page_name %>
|
11
|
+
</h2>
|
12
|
+
<div class="details">
|
13
|
+
<%= content_for?(:detail) ? yield(:detail) : yield %>
|
14
|
+
</div>
|
15
|
+
</div>
|
16
|
+
<% end %>
|
31
17
|
<%= render :template => 'layouts/admin/application' %>
|
@@ -1,10 +1,11 @@
|
|
1
1
|
<%= content_for :content do %>
|
2
|
-
<div class="
|
2
|
+
<div class="detail-wrapper">
|
3
3
|
<h2>
|
4
4
|
<%= @error.code %>: <%= @error.title %>!
|
5
5
|
</h2>
|
6
6
|
<div id="details">
|
7
7
|
<p><%= @error.message %></p>
|
8
|
+
<p>Your user might not have admin rights, or you might be trying to access a module that you have not been granted permission to.</p>
|
8
9
|
<p>Requested URL: <%= @error.request_url %></p>
|
9
10
|
</div>
|
10
11
|
</div>
|
@@ -4,21 +4,14 @@
|
|
4
4
|
<title><%= Spud::Core.config.site_name %> Admin: Login</title>
|
5
5
|
<%= stylesheet_link_tag 'admin/core/application' %>
|
6
6
|
<%= csrf_meta_tags %>
|
7
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
8
|
+
<meta name="viewport" content="width=device-width"/>
|
7
9
|
</head>
|
8
10
|
<body>
|
9
11
|
|
10
|
-
<div class="
|
11
|
-
<div class="login-form">
|
12
|
+
<div class="container">
|
13
|
+
<div class="login-form col-md-6 col-md-offset-3">
|
12
14
|
<h1><%= @login_title || 'Login' %></h1>
|
13
|
-
<% if flash[:notice] %>
|
14
|
-
<div class="alert">
|
15
|
-
<%= flash[:notice] %>
|
16
|
-
</div>
|
17
|
-
<% elsif flash[:error] %>
|
18
|
-
<div class="alert alert-error">
|
19
|
-
<%= flash[:error] %>
|
20
|
-
</div>
|
21
|
-
<% end %>
|
22
15
|
<%= yield %>
|
23
16
|
</div>
|
24
17
|
</div>
|
@@ -3,11 +3,11 @@
|
|
3
3
|
<h1>Password Reset</h1>
|
4
4
|
|
5
5
|
<%= form_tag password_resets_path, :class => 'password-reset-form' do %>
|
6
|
-
<div class="form-
|
7
|
-
<%= label_tag :email %>
|
8
|
-
<%= text_field_tag :email, params[:email], :placeholder => 'email', :autofocus => 'autofocus' %>
|
6
|
+
<div class="form-group">
|
7
|
+
<%= label_tag :email, 'Email', :class => 'form-label' %>
|
8
|
+
<%= text_field_tag :email, params[:email], :placeholder => 'email', :autofocus => 'autofocus', :class => 'form-control' %>
|
9
9
|
</div>
|
10
|
-
<div class="form-
|
10
|
+
<div class="form-group form-row-actions">
|
11
11
|
<%= submit_tag 'Submit', :class => 'btn btn-primary' %> or <%= link_to 'Cancel', login_path %>
|
12
12
|
</div>
|
13
13
|
<% end %>
|
@@ -7,15 +7,15 @@
|
|
7
7
|
<% if params[:return_to] %>
|
8
8
|
<%= hidden_field_tag :return_to, params[:return_to] %>
|
9
9
|
<% end %>
|
10
|
-
<div class="form-
|
11
|
-
<%= f.label :password %>
|
12
|
-
<%= f.password_field :password, :placeholder => 'password', :autofocus => 'autofocus' %>
|
10
|
+
<div class="form-group">
|
11
|
+
<%= f.label :password, :class => 'form-label' %>
|
12
|
+
<%= f.password_field :password, :placeholder => 'password', :autofocus => 'autofocus', :class => 'form-control' %>
|
13
13
|
</div>
|
14
|
-
<div class="form-
|
15
|
-
<%= f.label :password_confirmation, 'Confirm password' %>
|
16
|
-
<%= f.password_field :password_confirmation, 'placeholder' => 'confirm password' %>
|
14
|
+
<div class="form-group">
|
15
|
+
<%= f.label :password_confirmation, 'Confirm password', :class=>'form-label' %>
|
16
|
+
<%= f.password_field :password_confirmation, 'placeholder' => 'confirm password', :class=>'form-control' %>
|
17
17
|
</div>
|
18
|
-
<div class="form-
|
18
|
+
<div class="form-group form-group-actions">
|
19
19
|
<%= f.submit "Reset Password", :class => 'btn btn-primary' %>
|
20
20
|
</div>
|
21
21
|
<% end %>
|
@@ -7,20 +7,20 @@
|
|
7
7
|
<% if params[:return_to] %>
|
8
8
|
<%= hidden_field_tag :return_to, params[:return_to] %>
|
9
9
|
<% end %>
|
10
|
-
<div class="form-
|
10
|
+
<div class="form-group">
|
11
11
|
<% if Spud::Core.config.use_email_as_login %>
|
12
12
|
<%= f.label :email %>
|
13
|
-
<%= f.text_field :email, :placeholder => 'Email', :autofocus => 'autofocus', :autocomplete => 'username' %>
|
13
|
+
<%= f.text_field :email, :placeholder => 'Email', :autofocus => 'autofocus', :autocomplete => 'username', :class => 'form-control' %>
|
14
14
|
<% else %>
|
15
15
|
<%= f.label :login %>
|
16
|
-
<%= f.text_field :login, :placeholder => 'Username', :autofocus => 'autofocus', :autocomplete => 'username' %>
|
16
|
+
<%= f.text_field :login, :placeholder => 'Username', :autofocus => 'autofocus', :autocomplete => 'username', :class => 'form-control' %>
|
17
17
|
<% end %>
|
18
18
|
</div>
|
19
|
-
<div class="form-
|
19
|
+
<div class="form-group">
|
20
20
|
<%= f.label :password %>
|
21
|
-
<%= f.password_field :password, :placeholder => 'Password', :autocomplete => 'current-password' %>
|
21
|
+
<%= f.password_field :password, :placeholder => 'Password', :autocomplete => 'current-password', :class => 'form-control' %>
|
22
22
|
</div>
|
23
|
-
<div class="form-
|
23
|
+
<div class="form-group">
|
24
24
|
<%= f.submit "Login", :class => 'btn btn-primary' %> <span>or</span> <%=link_to "Forgot Password?", password_resets_path %>
|
25
25
|
</div>
|
26
26
|
<% end %>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# Sample localization file for English. Add more files in this directory for other locales.
|
2
|
+
# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
|
3
|
+
|
4
|
+
en:
|
5
|
+
hello: "Hello world"
|
6
|
+
activerecord:
|
7
|
+
attributes:
|
8
|
+
spud_user:
|
9
|
+
spud_role_id: 'Role'
|
10
|
+
password_confirmation: 'Confirm Password'
|
@@ -48,13 +48,15 @@ EOF
|
|
48
48
|
def field_for_attribute(type, name)
|
49
49
|
case type
|
50
50
|
when 'integer'
|
51
|
-
"<%= f.
|
51
|
+
"<%= f.tb_number_field :#{name} %>"
|
52
52
|
when 'text'
|
53
|
-
"<%= f.
|
53
|
+
"<%= f.tb_text_area :#{name}, :rows => 4 %>"
|
54
54
|
when 'boolean'
|
55
|
-
"<%= f.
|
55
|
+
"<%= f.tb_check_box :#{name} %>"
|
56
|
+
when 'date'
|
57
|
+
"<%= f.tb_date_select :#{name} %>"
|
56
58
|
else
|
57
|
-
"<%= f.
|
59
|
+
"<%= f.tb_text_field :#{name} %>"
|
58
60
|
end
|
59
61
|
end
|
60
62
|
|