kilt-cms 0.5.2 → 0.5.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/README.rdoc +3 -1
  3. data/app/views/kilt/kilt/index.html.erb +1 -1
  4. data/app/views/layouts/kilt/cms/_menu.html.erb +9 -0
  5. data/app/views/layouts/kilt/cms.html.erb +2 -14
  6. data/lib/generators/kilt/backend_generator.rb +1 -1
  7. data/lib/generators/kilt/frontend_generator.rb +2 -2
  8. data/lib/generators/kilt/templates/backend/kilt.rb +4 -1
  9. data/lib/generators/kilt/templates/frontend/index.html.erb +2 -2
  10. data/test/dummy/config/routes.rb +1 -1
  11. data/test/dummy/log/development.log +1011 -0
  12. data/test/dummy/tmp/data/meta_request/07d67b60-38fd-4ffd-86fd-a072b551b839.json +1 -0
  13. data/test/dummy/tmp/data/meta_request/0d4d1d5f-5737-4351-9511-c97ab2650383.json +1 -0
  14. data/test/dummy/tmp/data/meta_request/0fce7ad0-05ce-40ae-bd4d-010bc2c98690.json +1 -0
  15. data/test/dummy/tmp/data/meta_request/1f867ba1-7b05-4635-83fd-5529bed6adbc.json +1 -0
  16. data/test/dummy/tmp/data/meta_request/26d7fbdf-372a-44f1-8a5d-8106802b7aea.json +1 -0
  17. data/test/dummy/tmp/data/meta_request/a501070f-b628-4480-8257-581d41fff6b6.json +1 -0
  18. data/test/dummy/tmp/data/meta_request/a6f59116-be3e-470d-869b-70aa26ffd7c1.json +1 -0
  19. data/test/dummy/tmp/data/meta_request/bf8596ed-9c06-46d2-89af-af26523039b2.json +1 -0
  20. data/test/dummy/tmp/data/meta_request/ee8867fc-03db-460d-9f57-389115bee3a8.json +1 -0
  21. data/test/dummy/tmp/data/meta_request/f3be321f-57f5-4968-9808-1b7b7112791d.json +1 -0
  22. data/test/dummy/tmp/pids/server.pid +1 -0
  23. metadata +25 -22
  24. data/test/dummy/tmp/data/meta_request/2ff92b3b-2e2c-438e-a687-d2900c8722e3.json +0 -1
  25. data/test/dummy/tmp/data/meta_request/4a2f197b-3f28-4ade-962e-0337d56878b1.json +0 -1
  26. data/test/dummy/tmp/data/meta_request/7eb04de5-6edf-4ea2-a4cf-994e6173b529.json +0 -1
  27. data/test/dummy/tmp/data/meta_request/96ec6abc-1da4-45e1-a397-79e849741501.json +0 -1
  28. data/test/dummy/tmp/data/meta_request/a9566f73-bde1-4346-b254-011381243ddc.json +0 -1
  29. data/test/dummy/tmp/data/meta_request/a9eb2875-930e-49ed-ab2f-40aba11bb132.json +0 -1
  30. data/test/dummy/tmp/data/meta_request/bcd27bed-9cac-4c32-8030-2699415e91a1.json +0 -1
  31. data/test/dummy/tmp/data/meta_request/e6152727-3e54-4858-ad8f-6e57e247a8a5.json +0 -1
  32. data/test/dummy/tmp/data/meta_request/e7db6149-e316-4ad1-a3a8-c014d0e7092b.json +0 -1
  33. data/test/dummy/tmp/data/meta_request/fc793f84-b287-4459-b902-705b1d2b1141.json +0 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e9d5ad3c7123436f190ffd8cb9c74cba3531a0a0
4
- data.tar.gz: 597381939db6577f5bc445fb9b265ac915b09de0
3
+ metadata.gz: 3096ca8e8099534c4b7d5c1fc5661ec91ef3be31
4
+ data.tar.gz: 6a31b28e68a0029c7c56aad7acae5d680f9ed9d6
5
5
  SHA512:
6
- metadata.gz: 70922db389dc9c8c3cb3792e187713ca4638ef0a946e93e6b048c558893fd704fdc8c6139ebfd6c2ecf1f6c3b2f7be49759a87ae32e668898a12fed4ff1d50bf
7
- data.tar.gz: be42bb51f31c738eba21b1953f5c076d575c76d8551a91c2ab7a35162ea95c24604fbc6e0a0e8130cdedcbb3870eae58cc8ab76f13ddf7338f8bdca0c0e531c8
6
+ metadata.gz: 00896a07817fb6e574e57c782b7a101aaf55d3400eb764a76f396cfa087454fc6806c20499e8c38b6529663601714918746be7b8d3009c57dd2a09a2d38c21b7
7
+ data.tar.gz: c1d2ed1673dbc629d60b3a7b39c941145c6a161d1b1912717d6b94a1df263ccb37a83120cd8d7f423ba4ce6964f5f58dfc4abef157ed91973254f1d944f4469c
data/README.rdoc CHANGED
@@ -66,7 +66,9 @@ Note: We're trying to find a way around that last step, but for now we're just e
66
66
 
67
67
  - From here, try using it on the front-end by creating controllers and views like you would in any other rails app. Instead of calling to a database, though, use the Kilt methods found in the rake taske, or listed on the homepage.
68
68
 
69
+ - You can override the admin menu by copying app/views/layouts/kilt/cms/_menu.html.erb to your own project.
70
+
69
71
  - Dig around the code looking for holes/problems/questions, and keep a list, please.
70
72
 
71
73
 
72
-
74
+
@@ -1,5 +1,5 @@
1
1
  <div class="wr">
2
- <h2>Objects</h2>
2
+ <h2>Dashboard</h2>
3
3
 
4
4
  <ul class="object-list">
5
5
  <% @types.each do |type| %>
@@ -0,0 +1,9 @@
1
+ <header class="hd">
2
+ <div class="wr">
3
+ <h6><a href="<%= kilt_engine.root_path %>"><%= Kilt.config.name %></a></h6>
4
+ <a class="button small dashboard" href="<%= kilt_engine.root_path %>">Dashboard</a>
5
+ <% Kilt.types.each do |type| %>
6
+ <%= link_to type.pluralize.capitalize, list_path(type.pluralize), class: "button small dashboard" %>
7
+ <% end %>
8
+ </div>
9
+ </header>
@@ -18,24 +18,12 @@
18
18
  <%= csrf_meta_tags %>
19
19
  </head>
20
20
  <body>
21
- <header class="hd">
22
- <div class="wr">
23
- <h6><a href="/admin"><%= Kilt.config.name %></a></h6>
24
- <a class="button small dashboard" href="/admin">Dashboard</a>
25
- <!--
26
- <div class="user">
27
- <span class="greeting">Hello, <span class="user-name">Decimus Meridius</span></span>
28
- <a class="button log-out">Log out</a>
29
- </div>
30
- -->
31
- </div>
32
- </header>
21
+
22
+ <%= render partial: 'layouts/kilt/cms/menu' %>
33
23
 
34
24
  <section class="body">
35
25
  <%= yield %>
36
26
  </section>
37
27
 
38
-
39
-
40
28
  </body>
41
29
  </html>
@@ -12,7 +12,7 @@ module Kilt
12
12
  template 'config.yml.erb', Rails.root.join('config', 'kilt', 'config.yml')
13
13
  copy_file 'creds.yml.example', Rails.root.join('config', 'kilt', 'creds.yml.example')
14
14
  copy_file 'kilt.rb', Rails.root.join('config', 'initializers', 'kilt.rb')
15
- inject_into_file Rails.root.join('config', 'routes.rb'), "\n\tmount Kilt::Engine => '/admin'\n", :after => "#{Rails.application.class.parent_name.camelize}::Application.routes.draw do\n"
15
+ inject_into_file Rails.root.join('config', 'routes.rb'), "\n\tmount Kilt::Engine => '/admin', as: 'kilt_engine'\n", :after => "#{Rails.application.class.parent_name.camelize}::Application.routes.draw do\n"
16
16
  end
17
17
  end
18
18
  end
@@ -6,11 +6,11 @@ module Kilt
6
6
  source_root File.expand_path("../templates/frontend",__FILE__)
7
7
 
8
8
  def generate
9
- #copy files, templates for app-specific naming, inject index action into routs
9
+ #copy files, templates for app-specific naming, inject index action into routes
10
10
  template 'home_controller.rb.erb', Rails.root.join('app', 'controllers', "#{file_name}_controller.rb")
11
11
  copy_file 'application.html.erb', Rails.root.join('app','views','layouts','application.html.erb')
12
12
  copy_file 'index.html.erb', Rails.root.join('app', 'views', "#{file_name}", 'index.html.erb')
13
- inject_into_file Rails.root.join('config','routes.rb'),"\n\tget '/' => '#{file_name}#index'\n", :after => "mount Kilt::Engine => '/admin'\n"
13
+ inject_into_file Rails.root.join('config','routes.rb'),"\n\tget '/' => '#{file_name}#index'\n", :after => "mount Kilt::Engine => '/admin', as: 'kilt_engine'\n"
14
14
  #handle assets, sans named files
15
15
  directory 'assets/images', Rails.root.join('app','assets','images')
16
16
  directory 'assets/javascripts', Rails.root.join('app','assets','javascripts')
@@ -8,4 +8,7 @@ Settings.add_source!("#{Rails.root}/config/kilt/creds.yml")
8
8
  Settings.reload!
9
9
 
10
10
  # Attach the Kilt config the content pulled in by RailsConfig
11
- Kilt.config = Settings
11
+ Kilt.config = Settings
12
+
13
+ # Ensure we have a database set up
14
+ Kilt::Utils.setup_db
@@ -1,5 +1,5 @@
1
- <%= link_to "Admin", "/admin" %>
1
+ <%= link_to "Admin", kilt_engine.root_path %>
2
2
 
3
3
  <pre>
4
4
  <%= Kilt::Utils.tips %>
5
- </pre>
5
+ </pre>
@@ -1,6 +1,6 @@
1
1
  Rails.application.routes.draw do
2
2
 
3
- mount Kilt::Engine => '/admin'
3
+ mount Kilt::Engine => '/admin', :as => 'kilt_engine'
4
4
 
5
5
  get '/' => 'dummy#index'
6
6