kuhsaft 0.3.0 → 0.3.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.
data/.gitignore CHANGED
@@ -15,3 +15,4 @@ spec/dummy/public/javascripts/**/*
15
15
  Gemfile.lock
16
16
  .DS_Store
17
17
  .sass-cache
18
+ tags
data/CHANGELOG.md ADDED
@@ -0,0 +1,18 @@
1
+ ## Master
2
+
3
+ ### Bug fixes
4
+
5
+ ### Improvements
6
+
7
+ ### New features
8
+
9
+ ## 0.3.0 - August 8, 2011
10
+
11
+ ### Improvements
12
+
13
+ - moved assets to a rails 3.1 compatible location. ([@effkay][])
14
+
15
+ [@manufaktor]: https://github.com/manufaktor
16
+ [@effkay]: https://github.com/effkay
17
+ [@iphilgood]: https://github.com/iphilgood
18
+ [melinda]: http://www.melinda-lini.de/
data/README.md CHANGED
@@ -72,6 +72,78 @@ Create a toplevel page and set the page type to "navigation". You can now get th
72
72
 
73
73
  navigation_for(:slug => 'main-navigation') { |pages| ... }
74
74
 
75
+ ## Integrating custom Models into Kuhsaft (aka Rails Admin Lite)
76
+
77
+ There is a chance that Pages and Assets is not enough for you and you
78
+ need custom models in your Rails app. It's your lucky day, because
79
+ Kuhsaft was designed with the goal to easily integrate into a usual
80
+ Rails app.
81
+
82
+ There is one caveat though: You need to **stay in the Kuhsaft namespaces
83
+ for your admin controllers and views** if you want to use the Kuhsaft UI
84
+ as a backend to your models.
85
+
86
+ There is a high probability that we will ship our own generators for all
87
+ this stuff in the future, meanwhile, you'll have to do some manual work:
88
+
89
+ Add the route to your resource, within the locale scope and the cms
90
+ namespace:
91
+
92
+ ```ruby
93
+ scope ':locale' do
94
+ namespace :cms do
95
+ resources :projects
96
+ end
97
+ end
98
+ ```
99
+
100
+ Put your admin controller for the model in question in
101
+ `app/controllers/cms/` and keep it in the `Cms` namespace, e.g:
102
+
103
+ ```ruby
104
+ module Cms
105
+ class ProjectsController < Kuhsaft::Cms::AdminController
106
+ def index
107
+ # do somethinng
108
+ end
109
+ end
110
+ end
111
+ ```
112
+
113
+ As you can see you have to inherit from `Kuhsaft::Cms::AdminController`
114
+
115
+ As with the controllers, you have to respect the namespaces when adding
116
+ the view. For the example above, we would create an index view in
117
+ `app/views/cms/projects/`
118
+
119
+ As an example, the view might look something like this:
120
+
121
+ ```ruby
122
+ - content_for :admin_toolbar do
123
+ = link_to t('.create'), new_cms_project_path, :class => 'button'
124
+
125
+ - content_for :cms_language_tabs do
126
+ - Kuhsaft::Page.translation_locales.each do |locale|
127
+ %li{ :class => (:current if params[:locale] == locale.to_s) }= link_to locale.to_s, cms_projects_path(:locale => locale)
128
+
129
+ %ul.pages-root.sortable
130
+ -@projects.each do |project|
131
+ %li.can-drag.project
132
+ .branch
133
+ =link_to project.name, cms_project_path(project)
134
+ ```
135
+
136
+ Note that we can acess the admin_toolbar and the language tabs from here
137
+ as well.
138
+
139
+ Finally, you need to create a partial called
140
+ `_admin_navigation.html.haml` in `app/views/cms/`. This partial is used
141
+ to render the additional navigation tabs in the Kuhsaft UI:
142
+
143
+ ```ruby
144
+ = admin_tab('Projects', cms_projects_path())
145
+ ```
146
+
75
147
  # LICENSE
76
-
148
+
77
149
  See the file LICENSE.
@@ -11,7 +11,7 @@ body
11
11
  background: #cccccb
12
12
 
13
13
  #kuhsaft-wrapper
14
- //background: #e9e9e9 url(/images/kuhsaft/wrapper-bg.png) repeat-x left 100px
14
+ //background: #e9e9e9 url(/assets/kuhsaft/wrapper-bg.png) repeat-x left 100px
15
15
  width: 960px
16
16
  margin: 0 auto
17
17
 
@@ -19,7 +19,7 @@ body
19
19
  display: none
20
20
 
21
21
  .cms-header
22
- background: url(/images/kuhsaft/header-bg.jpg)
22
+ background: url(/assets/kuhsaft/header-bg.jpg)
23
23
  border-bottom: 1px solid #cccccb
24
24
  +min-height(150px)
25
25
 
@@ -34,11 +34,11 @@ body
34
34
 
35
35
  .page-tree-breadcrumb
36
36
  margin-bottom: 20px
37
- background: url(/images/kuhsaft/pages-breadcrumb-icon.png) no-repeat left 5px
37
+ background: url(/assets/kuhsaft/pages-breadcrumb-icon.png) no-repeat left 5px
38
38
  padding-left: 18px
39
39
 
40
40
  a
41
- background: url(/images/kuhsaft/page-tree-breadcrumb-arrow.png) no-repeat right center
41
+ background: url(/assets/kuhsaft/page-tree-breadcrumb-arrow.png) no-repeat right center
42
42
  padding-right: 15px
43
43
 
44
44
  a:last-child
@@ -65,7 +65,7 @@ body
65
65
  li.current
66
66
  border-left: 1px solid #7c7a7f
67
67
  a
68
- background: #cccccb url(/images/kuhsaft/module-nav-tab-bg.png) repeat-x
68
+ background: #cccccb url(/assets/kuhsaft/module-nav-tab-bg.png) repeat-x
69
69
  border-left: 1px solid #e6e6e6
70
70
  +text-shadow(#efefef, 0px, 1px, 0px)
71
71
  +link-colors($color1, $color2, $color1, $color1, $color1)
@@ -76,7 +76,7 @@ body
76
76
  .language-tabs
77
77
  border:
78
78
  bottom: 1px solid #cfcfcf
79
- background: #e3e3e3 url(/images/kuhsaft/tab-bg.png) repeat-x
79
+ background: #e3e3e3 url(/assets/kuhsaft/tab-bg.png) repeat-x
80
80
  height: 40px
81
81
 
82
82
  li
@@ -147,10 +147,10 @@ h1
147
147
  color: #858592
148
148
 
149
149
  .new-page
150
- background: url(/images/kuhsaft/page-new-icon.png) no-repeat left 3px
150
+ background: url(/assets/kuhsaft/page-new-icon.png) no-repeat left 3px
151
151
 
152
152
  .edit-page
153
- background: url(/images/kuhsaft/page-edit-icon.png) no-repeat left 7px
153
+ background: url(/assets/kuhsaft/page-edit-icon.png) no-repeat left 7px
154
154
 
155
155
  a
156
156
  text-decoration: none
@@ -289,12 +289,12 @@ ul.pages-root
289
289
  left: 1px solid #b2b2b2
290
290
 
291
291
  .icon.add-child-page
292
- background: url(/images/kuhsaft/add-child-page.png) no-repeat center center
292
+ background: url(/assets/kuhsaft/add-child-page.png) no-repeat center center
293
293
  width: 28px
294
294
  border-right: 0px
295
295
 
296
296
  .icon.delete
297
- background: url(/images/kuhsaft/delete.png) no-repeat center center
297
+ background: url(/assets/kuhsaft/delete.png) no-repeat center center
298
298
  width: 22px
299
299
  border-left: 0px
300
300
 
@@ -307,14 +307,14 @@ ul.pages-root
307
307
  +float_right
308
308
 
309
309
  .drag-handler
310
- background: $color3 url(/images/kuhsaft/page-part-draggable-area.png) no-repeat top right
310
+ background: $color3 url(/assets/kuhsaft/page-part-draggable-area.png) no-repeat top right
311
311
  width: 91px
312
312
  height: 22px
313
313
  margin: 0px 7px 0px 0px
314
314
  float: right
315
- cursor: url(/images/kuhsaft/openhand.cur), default !important
315
+ cursor: url(/assets/kuhsaft/openhand.cur), default !important
316
316
  &:active
317
- cursor: url(/images/kuhsaft/closedhand.cur), default !important
317
+ cursor: url(/assets/kuhsaft/closedhand.cur), default !important
318
318
 
319
319
  .destroy-handler
320
320
  text-align: right
@@ -44,10 +44,10 @@ select
44
44
  .toggle
45
45
  color: $color1
46
46
  padding-left: 20px
47
- background: url(/images/kuhsaft/toggle-arrow-open.png) no-repeat left center
47
+ background: url(/assets/kuhsaft/toggle-arrow-open.png) no-repeat left center
48
48
 
49
49
  .toggle.closed
50
- background: url(/images/kuhsaft/toggle-arrow-closed.png) no-repeat left center
50
+ background: url(/assets/kuhsaft/toggle-arrow-closed.png) no-repeat left center
51
51
 
52
52
  #kuhsaft_page_page_part_type
53
53
  +float_left
@@ -1,3 +1,3 @@
1
1
  module Kuhsaft
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kuhsaft
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 17
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 0
10
- version: 0.3.0
9
+ - 1
10
+ version: 0.3.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - "Immanuel H\xC3\xA4ussermann"
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2011-08-08 00:00:00 +02:00
20
+ date: 2011-08-09 00:00:00 +02:00
21
21
  default_executable:
22
22
  dependencies:
23
23
  - !ruby/object:Gem::Dependency
@@ -299,6 +299,7 @@ files:
299
299
  - .gitignore
300
300
  - .rspec
301
301
  - .rvmrc
302
+ - CHANGELOG.md
302
303
  - Gemfile
303
304
  - Guardfile
304
305
  - LICENSE