unknown_admin 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/app/views/admin/resources/_breadcrumb.html.erb +7 -2
- data/lib/unknown_admin/version.rb +1 -1
- metadata +2 -38
- data/app/models/user.rb +0 -4
- data/app/views/admin/users/_form.html.erb +0 -102
- data/app/views/admin/users/_form_new.html.erb +0 -66
- data/app/views/admin/users/token_fields.json.rabl +0 -2
@@ -1,6 +1,11 @@
|
|
1
1
|
<ul class="breadcrumb">
|
2
2
|
<li><%= link_to "Home",admin_root_url %><span class="divider">/</span></li>
|
3
|
-
<% association_chain
|
4
|
-
<li><%= link_to
|
3
|
+
<% if association_chain.count > 0 %>
|
4
|
+
<li><%= link_to association_chain[0].class.model_name.human.pluralize,[:admin]+[association_chain[0].class] %><span class="divider">/</span></li>
|
5
|
+
<% association_chain[1..-1].each do |ancestor| %>
|
6
|
+
<li><%= link_to ancestor.class.model_name.human.pluralize,[:admin]+association_chain[0..(association_chain.find_index(ancestor))-1]+[ancestor.class] %><span class="divider">/</span></li>
|
7
|
+
<% end %>
|
8
|
+
|
5
9
|
<% end %>
|
10
|
+
<li><%= link_to resource_class.model_name.human.pluralize,[:admin]+association_chain+[resource_class] %><span class="divider"></span></li>
|
6
11
|
</ul>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unknown_admin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,24 +10,8 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-
|
13
|
+
date: 2013-05-13 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
|
-
- !ruby/object:Gem::Dependency
|
16
|
-
name: rails
|
17
|
-
requirement: !ruby/object:Gem::Requirement
|
18
|
-
none: false
|
19
|
-
requirements:
|
20
|
-
- - ~>
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: 3.2.9
|
23
|
-
type: :runtime
|
24
|
-
prerelease: false
|
25
|
-
version_requirements: !ruby/object:Gem::Requirement
|
26
|
-
none: false
|
27
|
-
requirements:
|
28
|
-
- - ~>
|
29
|
-
- !ruby/object:Gem::Version
|
30
|
-
version: 3.2.9
|
31
15
|
- !ruby/object:Gem::Dependency
|
32
16
|
name: inherited_resources
|
33
17
|
requirement: !ruby/object:Gem::Requirement
|
@@ -140,22 +124,6 @@ dependencies:
|
|
140
124
|
- - ~>
|
141
125
|
- !ruby/object:Gem::Version
|
142
126
|
version: '2.0'
|
143
|
-
- !ruby/object:Gem::Dependency
|
144
|
-
name: strong_parameters
|
145
|
-
requirement: !ruby/object:Gem::Requirement
|
146
|
-
none: false
|
147
|
-
requirements:
|
148
|
-
- - ~>
|
149
|
-
- !ruby/object:Gem::Version
|
150
|
-
version: '0.1'
|
151
|
-
type: :runtime
|
152
|
-
prerelease: false
|
153
|
-
version_requirements: !ruby/object:Gem::Requirement
|
154
|
-
none: false
|
155
|
-
requirements:
|
156
|
-
- - ~>
|
157
|
-
- !ruby/object:Gem::Version
|
158
|
-
version: '0.1'
|
159
127
|
description: UnknownAdmin makes it easy to create a zero-configuratin admin-tool for
|
160
128
|
your models, but still allows a lot of cusomizations to make it fit your needs.
|
161
129
|
email:
|
@@ -171,7 +139,6 @@ files:
|
|
171
139
|
- app/controllers/admin/users_controller.rb
|
172
140
|
- app/helpers/admin/resources_helper.rb
|
173
141
|
- app/helpers/bootstrap_flash_helper.rb
|
174
|
-
- app/models/user.rb
|
175
142
|
- app/views/admin/admin/index.html.erb
|
176
143
|
- app/views/admin/resources/_breadcrumb.html.erb
|
177
144
|
- app/views/admin/resources/_condition_fields.html.erb
|
@@ -188,9 +155,6 @@ files:
|
|
188
155
|
- app/views/admin/resources/index.html.erb
|
189
156
|
- app/views/admin/resources/new.html.erb
|
190
157
|
- app/views/admin/resources/show.html.erb
|
191
|
-
- app/views/admin/users/_form.html.erb
|
192
|
-
- app/views/admin/users/_form_new.html.erb
|
193
|
-
- app/views/admin/users/token_fields.json.rabl
|
194
158
|
- app/views/devise/confirmations/new.html.erb
|
195
159
|
- app/views/devise/mailer/confirmation_instructions.html.erb
|
196
160
|
- app/views/devise/mailer/reset_password_instructions.html.erb
|
data/app/models/user.rb
DELETED
@@ -1,102 +0,0 @@
|
|
1
|
-
<%= form_for([:admin,@user]) do |f| %>
|
2
|
-
<ul id="myTab" class="nav nav-tabs">
|
3
|
-
<li class="active">
|
4
|
-
<a href="#main" data-toggle="tab">Main Setup</a>
|
5
|
-
</li>
|
6
|
-
<li>
|
7
|
-
<a href="#roles" data-toggle="tab">Roles</a>
|
8
|
-
</li>
|
9
|
-
</ul>
|
10
|
-
<div id="userTabContent" class="tab-content">
|
11
|
-
<div class="tab-pane fade in active" id="main">
|
12
|
-
<div class="control-group">
|
13
|
-
<%= f.label :id,:class=>"control-label"%>
|
14
|
-
<div class="controls">
|
15
|
-
<%= f.text_field :id,disabled:true %>
|
16
|
-
</div>
|
17
|
-
</div>
|
18
|
-
<div class="control-group">
|
19
|
-
<%= f.label :email,:class=>"control-label"%>
|
20
|
-
<div class="controls">
|
21
|
-
<%= f.text_field :email %>
|
22
|
-
</div>
|
23
|
-
</div>
|
24
|
-
<div class="control-group">
|
25
|
-
<%= f.label :username,:class=>"control-label"%>
|
26
|
-
<div class="controls">
|
27
|
-
<%= f.text_field :username %>
|
28
|
-
</div>
|
29
|
-
</div>
|
30
|
-
<div class="control-group">
|
31
|
-
<%= f.label :gender,:class=>"control-label" %>
|
32
|
-
<div class="controls">
|
33
|
-
<%= f.select(:gender,[[:male,:male],[:female,:female]]) %>
|
34
|
-
</div>
|
35
|
-
</div>
|
36
|
-
<div class="control-group">
|
37
|
-
<%= f.label :preferred_locale,:class=>"control-label" %>
|
38
|
-
<div class="controls">
|
39
|
-
<%= f.select(:preferred_locale_id,Locale.localizations.map { |locale| [locale.language_name, locale.id] }) %>
|
40
|
-
</div>
|
41
|
-
</div>
|
42
|
-
<div class="control-group">
|
43
|
-
<%= f.label :active,:class=>"control-label" %>
|
44
|
-
<div class="controls">
|
45
|
-
<%= f.check_box :active %>
|
46
|
-
</div>
|
47
|
-
</div>
|
48
|
-
<div class="control-group">
|
49
|
-
<%= f.label :first_name,:class=>"control-label" %>
|
50
|
-
<div class="controls">
|
51
|
-
<%= f.text_field :first_name %>
|
52
|
-
</div>
|
53
|
-
</div>
|
54
|
-
<div class="control-group">
|
55
|
-
<%= f.label :last_name,:class=>"control-label" %>
|
56
|
-
<div class="controls">
|
57
|
-
<%= f.text_field :last_name %>
|
58
|
-
</div>
|
59
|
-
</div>
|
60
|
-
<% if params[:action]=="new" %>
|
61
|
-
<div class="control-group">
|
62
|
-
<%= f.label :password,:class=>"control-label" %>
|
63
|
-
<div class="controls">
|
64
|
-
<%= f.password_field :password %>
|
65
|
-
</div>
|
66
|
-
</div>
|
67
|
-
<div class="control-group">
|
68
|
-
<%= f.label :password_confirmation,:class=>"control-label" %>
|
69
|
-
<div class="controls">
|
70
|
-
<%= f.password_field :password_confirmation %>
|
71
|
-
</div>
|
72
|
-
</div>
|
73
|
-
<% end %>
|
74
|
-
<div class="control-group">
|
75
|
-
<%= f.label :country, :class => 'control-label' %>
|
76
|
-
<div class="controls">
|
77
|
-
<%= f.collection_select :country_id, Country.order(:name), :id, :name, {}, {class:"chosen_field"} %>
|
78
|
-
</div>
|
79
|
-
</div>
|
80
|
-
</div>
|
81
|
-
<div class="tab-pane fade" id="membership">
|
82
|
-
|
83
|
-
<div class="control-group">
|
84
|
-
|
85
|
-
</div>
|
86
|
-
</div>
|
87
|
-
<div class="tab-pane fade" id="roles">
|
88
|
-
<h1>System Roles</h1>
|
89
|
-
<div class="control-group">
|
90
|
-
<%= f.label :roles,:class=>"control-label" %>
|
91
|
-
<div class="controls">
|
92
|
-
<%= f.collection_select :role_ids, Role.order(:name), :id, :name, {}, {multiple: true,class:"chosen_field"} %>
|
93
|
-
</div>
|
94
|
-
</div>
|
95
|
-
</div>
|
96
|
-
</div>
|
97
|
-
<%= change_info_for @user %>
|
98
|
-
<%= form_actions f,@user %>
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
<% end %>
|
@@ -1,66 +0,0 @@
|
|
1
|
-
<%= form_for(@user,:html=>{:class=>"form-inline"}) do |f| %>
|
2
|
-
<% if @user.errors.any? %>
|
3
|
-
<div id="error_explanation">
|
4
|
-
<h2><%= pluralize(@user.errors.count, "error") %> prohibited this user from being saved:</h2>
|
5
|
-
<ul>
|
6
|
-
<% @user.errors.full_messages.each do |msg| %>
|
7
|
-
<li>
|
8
|
-
<%= msg %>
|
9
|
-
</li>
|
10
|
-
<% end %>
|
11
|
-
</ul>
|
12
|
-
</div>
|
13
|
-
<% end %>
|
14
|
-
<ul id="myTab" class="nav nav-tabs">
|
15
|
-
<li class="active">
|
16
|
-
<a href="#main" data-toggle="tab">Main Setup</a>
|
17
|
-
</li>
|
18
|
-
|
19
|
-
</ul>
|
20
|
-
<div id="userTabContent" class="tab-content">
|
21
|
-
<div class="tab-pane fade in active" id="main">
|
22
|
-
<div class="control-group">
|
23
|
-
<%= f.label :login_id,:class=>"control-label"%>
|
24
|
-
<div class="controls">
|
25
|
-
<%= f.text_field :login_id %>
|
26
|
-
</div>
|
27
|
-
</div>
|
28
|
-
<div class="control-group">
|
29
|
-
<%= f.label :locale,:class=>"control-label" %>
|
30
|
-
<div class="controls">
|
31
|
-
<%= f.select(:pref_locale,Locale.active.map { |locale| [locale.language_name, locale.locale_id] }) %>
|
32
|
-
</div>
|
33
|
-
</div>
|
34
|
-
<div class="control-group">
|
35
|
-
<%= f.label :status,:class=>"control-label" %>
|
36
|
-
<div class="controls">
|
37
|
-
<%= f.select(:status,[["active",'A'],["inactive",'I']]) %>
|
38
|
-
</div>
|
39
|
-
</div>
|
40
|
-
<div class="control-group">
|
41
|
-
<%= f.label :salutation,:class=>"control-label" %>
|
42
|
-
<div class="controls">
|
43
|
-
<%= f.select(:salutation,Salutation.all.map { |sal| [sal.title, sal.id] })%>
|
44
|
-
</div>
|
45
|
-
</div>
|
46
|
-
<div class="control-group">
|
47
|
-
<%= f.label :first_name,:class=>"control-label" %>
|
48
|
-
<div class="controls">
|
49
|
-
<%= f.text_field :first_name %>
|
50
|
-
</div>
|
51
|
-
</div>
|
52
|
-
<div class="control-group">
|
53
|
-
<%= f.label :last_name,:class=>"control-label" %>
|
54
|
-
<div class="controls">
|
55
|
-
<%= f.text_field :last_name %>
|
56
|
-
</div>
|
57
|
-
</div>
|
58
|
-
|
59
|
-
</div>
|
60
|
-
|
61
|
-
</div>
|
62
|
-
<%= form_actions f,@user%>
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
<% end %>
|