AdminSpace 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.
- data/README.md +2 -2
- data/app/views/admin_space/base/_form.html.haml +7 -0
- data/app/views/admin_space/base/edit.html.haml +1 -0
- data/app/views/admin_space/base/index.html.haml +12 -0
- data/app/views/admin_space/base/new.html.haml +2 -0
- data/app/views/admin_space/base/{show.html.erb → show.html.haml} +0 -0
- data/app/views/layouts/admin_space.html.haml +10 -0
- data/lib/{admin_space.rb → AdminSpace.rb} +1 -1
- data/lib/admin_space/route.rb +0 -2
- metadata +25 -10
- data/app/views/admin_space/base/_form.html.erb +0 -9
- data/app/views/admin_space/base/edit.html.erb +0 -1
- data/app/views/admin_space/base/index.html.erb +0 -20
- data/app/views/admin_space/base/new.html.erb +0 -3
- data/app/views/layouts/admin_space.html.erb +0 -17
- data/lib/admin_space/version.rb +0 -3
data/README.md
CHANGED
@@ -7,12 +7,12 @@ AdminSpace handle admin namespace, controllers, views in your application
|
|
7
7
|
Using bundler:
|
8
8
|
In your Gemfile
|
9
9
|
```
|
10
|
-
gem '
|
10
|
+
gem 'AdminSpace'
|
11
11
|
```
|
12
12
|
|
13
13
|
Or manually :
|
14
14
|
```
|
15
|
-
gem install
|
15
|
+
gem install AdminSpace
|
16
16
|
```
|
17
17
|
|
18
18
|
## Usage
|
@@ -0,0 +1 @@
|
|
1
|
+
= render partial: :form
|
@@ -0,0 +1,12 @@
|
|
1
|
+
%h1= @resource_name.camelize
|
2
|
+
%table
|
3
|
+
%thead
|
4
|
+
%tr
|
5
|
+
- (@resource_class.accessible_attributes - [""]).each do |attr|
|
6
|
+
%th= attr
|
7
|
+
%tbody
|
8
|
+
- @resources.each do |resource|
|
9
|
+
%tr
|
10
|
+
- (@resource_class.accessible_attributes - [""]).each do |attr|
|
11
|
+
%td= link_to resource.send(attr), [:admin, resource]
|
12
|
+
= link_to 'New', [:new, :admin, @resource_name]
|
File without changes
|
data/lib/admin_space/route.rb
CHANGED
@@ -5,8 +5,6 @@ module ActionDispatch::Routing
|
|
5
5
|
with_options controller: :base do |admin|
|
6
6
|
yield admin
|
7
7
|
end
|
8
|
-
# match ':type/:id', controller: :base, action: :show, constraints: { :id => /\d/ }
|
9
|
-
# match ':type/(:action/(:id(.:format)))', controller: :base
|
10
8
|
|
11
9
|
# List all model and build routes
|
12
10
|
models = []
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: AdminSpace
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,23 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
date: 2012-11-19 00:00:00.000000000 Z
|
13
|
-
dependencies:
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: haml
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
14
30
|
description: AdminSpace handle admin namespace for you
|
15
31
|
email:
|
16
32
|
- thomas@lauro.fr
|
@@ -20,15 +36,14 @@ extra_rdoc_files: []
|
|
20
36
|
files:
|
21
37
|
- app/controllers/admin_space/base.rb
|
22
38
|
- app/controllers/admin_space/base_controller.rb
|
23
|
-
- app/views/admin_space/base/_form.html.
|
24
|
-
- app/views/admin_space/base/edit.html.
|
25
|
-
- app/views/admin_space/base/index.html.
|
26
|
-
- app/views/admin_space/base/new.html.
|
27
|
-
- app/views/admin_space/base/show.html.
|
28
|
-
- app/views/layouts/admin_space.html.
|
39
|
+
- app/views/admin_space/base/_form.html.haml
|
40
|
+
- app/views/admin_space/base/edit.html.haml
|
41
|
+
- app/views/admin_space/base/index.html.haml
|
42
|
+
- app/views/admin_space/base/new.html.haml
|
43
|
+
- app/views/admin_space/base/show.html.haml
|
44
|
+
- app/views/layouts/admin_space.html.haml
|
29
45
|
- lib/admin_space/route.rb
|
30
|
-
- lib/
|
31
|
-
- lib/admin_space.rb
|
46
|
+
- lib/AdminSpace.rb
|
32
47
|
- Gemfile
|
33
48
|
- LICENSE.txt
|
34
49
|
- README.md
|
@@ -1,9 +0,0 @@
|
|
1
|
-
<dl style="clear: both; overflow: hidden;">
|
2
|
-
<% (@resource_class.accessible_attributes - [""]).each do |attr| %>
|
3
|
-
<dt style="clear: both; float: left; width: 100px;"><label><%= attr %></label></dt>
|
4
|
-
<dd style="float: left">
|
5
|
-
<%= f.text_field attr %>
|
6
|
-
</dd>
|
7
|
-
<% end %>
|
8
|
-
</dl>
|
9
|
-
<input type="submit" value="Add"/>
|
@@ -1 +0,0 @@
|
|
1
|
-
<%= render partial: :form %>
|
@@ -1,20 +0,0 @@
|
|
1
|
-
<h1><%= @resource_name.camelize %></h1>
|
2
|
-
<table>
|
3
|
-
<thead>
|
4
|
-
<tr>
|
5
|
-
<% (@resource_class.accessible_attributes - [""]).each do |attr| %>
|
6
|
-
<th><%= attr %></th>
|
7
|
-
<% end %>
|
8
|
-
</tr>
|
9
|
-
</thead>
|
10
|
-
<tbody>
|
11
|
-
<% @resources.each do |resource| %>
|
12
|
-
<tr>
|
13
|
-
<% (@resource_class.accessible_attributes - [""]).each do |attr| %>
|
14
|
-
<td><%= link_to resource.send(attr), [:admin, resource] %></td>
|
15
|
-
<% end %>
|
16
|
-
</tr>
|
17
|
-
<% end %>
|
18
|
-
</tbody>
|
19
|
-
</table>
|
20
|
-
<a href="<%= new_admin_user_path %>">New</a>
|
@@ -1,17 +0,0 @@
|
|
1
|
-
<html>
|
2
|
-
<head>
|
3
|
-
</head>
|
4
|
-
<body>
|
5
|
-
<div id="menu">
|
6
|
-
<ul>
|
7
|
-
<% Dir.glob( 'app/models/*' ).each do |model| %>
|
8
|
-
<% model_name = File.basename(model).gsub( /^(.+).rb/, '\1').pluralize %>
|
9
|
-
<li><%= link_to model_name, [:admin, model_name] %></li>
|
10
|
-
<% end %>
|
11
|
-
</ul>
|
12
|
-
</div>
|
13
|
-
<div class="container">
|
14
|
-
<%= yield %>
|
15
|
-
</div>
|
16
|
-
</body>
|
17
|
-
</html>
|
data/lib/admin_space/version.rb
DELETED