manifest-rails 0.0.4 → 0.1.0
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/MIT-LICENSE +1 -1
- data/README.rdoc +3 -0
- data/app/assets/javascripts/manifest/main.js +17 -0
- data/app/assets/stylesheets/manifest/_forms.css.scss +42 -21
- data/app/assets/stylesheets/manifest/_tables.css.scss +24 -20
- data/app/assets/stylesheets/manifest/main.css.scss +72 -0
- data/app/assets/stylesheets/manifest/sessions.css.scss +9 -0
- data/app/controllers/manifest/content_blocks_controller.rb +14 -11
- data/app/controllers/manifest/manifest_controller.rb +3 -8
- data/app/controllers/manifest/pages_controller.rb +2 -5
- data/app/controllers/manifest/sessions_controller.rb +1 -1
- data/app/controllers/pages_controller.rb +1 -8
- data/app/form_builders/manifest/labelled_form_builder.rb +23 -0
- data/app/models/content_block.rb +6 -2
- data/app/models/page.rb +18 -13
- data/app/views/layouts/manifest/manifest.html.erb +19 -18
- data/app/views/layouts/manifest/sessions.html.erb +10 -7
- data/app/views/manifest/content_blocks/_form.html.erb +24 -26
- data/app/views/manifest/content_blocks/edit.html.erb +1 -9
- data/app/views/manifest/content_blocks/index.html.erb +14 -14
- data/app/views/manifest/content_blocks/new.html.erb +1 -1
- data/app/views/manifest/pages/_form.html.erb +9 -10
- data/app/views/manifest/pages/edit.html.erb +1 -9
- data/app/views/manifest/pages/index.html.erb +5 -3
- data/app/views/manifest/pages/new.html.erb +1 -1
- data/app/views/manifest/pages/show.html.erb +29 -6
- data/config/initializers/manifest.rb +1 -1
- data/config/routes.rb +1 -1
- data/db/migrate/20120303200114_create_pages.rb +10 -0
- data/db/migrate/20120304152605_create_content_blocks.rb +13 -0
- data/db/migrate/20120304155055_add_index_to_pages.rb +5 -0
- data/db/migrate/20120304155130_add_index_to_content_blocks.rb +5 -0
- data/db/migrate/20120305164036_create_editors.rb +11 -0
- data/lib/active_record/base/data_type_for_manifest.rb +11 -0
- data/lib/generators/manifest/data_type/data_type_generator.rb +13 -2
- data/lib/generators/manifest/data_type/templates/_form.html.erb +19 -0
- data/lib/generators/manifest/data_type/templates/controller.rb +41 -4
- data/lib/generators/manifest/data_type/templates/edit.html.erb +3 -0
- data/lib/generators/manifest/data_type/templates/index.html.erb +4 -0
- data/lib/generators/manifest/data_type/templates/model.rb +1 -1
- data/lib/generators/manifest/data_type/templates/new.html.erb +3 -0
- data/lib/generators/manifest/install/USAGE +1 -3
- data/lib/generators/manifest/install/install_generator.rb +13 -4
- data/lib/generators/manifest/install/templates/create_content_blocks.rb +1 -1
- data/lib/generators/manifest/install/templates/create_pages.rb +1 -1
- data/lib/manifest.rb +4 -9
- data/lib/manifest/engine.rb +0 -3
- data/lib/manifest/version.rb +1 -1
- metadata +54 -115
- data/README.md +0 -37
- data/app/assets/images/manifest/grid.png +0 -0
- data/app/assets/images/manifest/sketch.png +0 -0
- data/app/assets/javascripts/manifest/manifest.js +0 -7
- data/app/assets/stylesheets/manifest/_mixins.css.scss +0 -41
- data/app/assets/stylesheets/manifest/manifest.css.scss +0 -137
- data/app/controllers/manifest/editors_controller.rb +0 -3
- data/app/models/user.rb +0 -8
- data/lib/active_record/base/acts_as_manifest.rb +0 -8
data/README.md
DELETED
@@ -1,37 +0,0 @@
|
|
1
|
-
# Manifest
|
2
|
-
|
3
|
-
Manifest is a Rails Engine content management system. It's goal is to keep the content management and creation of new data types as "Rails-like" as possible.
|
4
|
-
|
5
|
-
## Installation
|
6
|
-
|
7
|
-
### In your Gemfile:
|
8
|
-
|
9
|
-
```ruby
|
10
|
-
gem 'manifest-rails'
|
11
|
-
```
|
12
|
-
|
13
|
-
### Run the install generator:
|
14
|
-
|
15
|
-
```bash
|
16
|
-
rails g manifest:install Page
|
17
|
-
```
|
18
|
-
|
19
|
-
*The "Page" argument can be literally anything, it only satisfies an internal ActiveRecord generator requirement. You could write `rails g manifest:install Cats` and it wouldn't matter.*
|
20
|
-
|
21
|
-
### Run the migrations:
|
22
|
-
|
23
|
-
```bash
|
24
|
-
rake db:migrate
|
25
|
-
```
|
26
|
-
|
27
|
-
### Create your first editor account in the console:
|
28
|
-
|
29
|
-
```bash
|
30
|
-
rails console production
|
31
|
-
```
|
32
|
-
|
33
|
-
```ruby
|
34
|
-
Editor.create(email: 'user@example.com', password: 'password')
|
35
|
-
```
|
36
|
-
|
37
|
-
### Visit http://localhost/manifest for content management.
|
Binary file
|
Binary file
|
@@ -1,41 +0,0 @@
|
|
1
|
-
$accent: #38c;
|
2
|
-
$base: 20px;
|
3
|
-
$copy-on-dark: #eee;
|
4
|
-
$copy-on-light: #333;
|
5
|
-
$shadow: #ccc;
|
6
|
-
|
7
|
-
@mixin gradient($bg: #eee, $reverse: false) {
|
8
|
-
@include background(linear-gradient(top, $bg, darken($bg, 13.5)));
|
9
|
-
text-shadow: 0 1px 0 lighten($bg, 6.75);
|
10
|
-
|
11
|
-
@if $reverse == true {
|
12
|
-
@include background(linear-gradient(top, darken($bg, 13.5), $bg));
|
13
|
-
}
|
14
|
-
}
|
15
|
-
|
16
|
-
@mixin pretty-button($bg: $accent, $copy: $copy-on-dark) {
|
17
|
-
@include background(linear-gradient(top, $bg, darken($bg, 13.5)));
|
18
|
-
background-size: 200%;
|
19
|
-
background-position: 0 50%;
|
20
|
-
border: 1px solid darken($bg, 13.5);
|
21
|
-
padding: $base / 2 $base;
|
22
|
-
@include border-radius(4px);
|
23
|
-
@include box-shadow(0 1px 1px rgba(0, 0, 0, 0.3), 0 1px 0 rgba(255,255,255, 0.2) inset);
|
24
|
-
cursor: pointer;
|
25
|
-
color: #fff;
|
26
|
-
font-size: inherit;
|
27
|
-
text-decoration: none;
|
28
|
-
@include transition-property(background-position);
|
29
|
-
@include transition-duration(0.2s);
|
30
|
-
|
31
|
-
&:hover,
|
32
|
-
&:focus { background-position: 0 0; }
|
33
|
-
|
34
|
-
&:active {
|
35
|
-
@include gradient($bg: darken($bg, 3.375), $reverse: true);
|
36
|
-
@include box-shadow(4px 4px 6px rgba(0,0,0,0.2) inset, 0 -1px 1px rgba(0,0,0,0.2));
|
37
|
-
border-color: darken($bg, 20.25);
|
38
|
-
text-shadow: none;
|
39
|
-
}
|
40
|
-
}
|
41
|
-
|
@@ -1,137 +0,0 @@
|
|
1
|
-
// Place all the styles related to the manifest controller here.
|
2
|
-
// They will automatically be included in application.css.
|
3
|
-
// You can use Sass (SCSS) here: http://sass-lang.com/
|
4
|
-
|
5
|
-
@import 'compass/reset';
|
6
|
-
@import 'compass/css3';
|
7
|
-
@import 'mixins';
|
8
|
-
|
9
|
-
body {
|
10
|
-
background: #efefef;
|
11
|
-
background-image: image-url('manifest/sketch.png');
|
12
|
-
color: $copy-on-light;
|
13
|
-
font: 100%/1 'Droid Sans', Arial, Verdana, sans-serif;
|
14
|
-
}
|
15
|
-
|
16
|
-
h1 {
|
17
|
-
margin-right: 40px;
|
18
|
-
float: left;
|
19
|
-
font-size: 1.5em;
|
20
|
-
font-weight: 700;
|
21
|
-
line-height: 60px;
|
22
|
-
|
23
|
-
a {
|
24
|
-
color: #333;
|
25
|
-
text-decoration: none;
|
26
|
-
@include text-shadow(0 1px 0 #eee);
|
27
|
-
|
28
|
-
&:hover { color: #666; }
|
29
|
-
}
|
30
|
-
|
31
|
-
&.logged-out-header {
|
32
|
-
margin: 40px 0 20px 0;
|
33
|
-
float: none;
|
34
|
-
font-size: 4em;
|
35
|
-
text-align: center;
|
36
|
-
color: $accent;
|
37
|
-
@include text-shadow(0 3px 0 $accent - 25, 0 8px 8px rgba(0, 0, 0, 0.3));
|
38
|
-
}
|
39
|
-
}
|
40
|
-
|
41
|
-
header {
|
42
|
-
padding: 0 20px;
|
43
|
-
overflow: hidden;
|
44
|
-
position: relative;
|
45
|
-
background: #ddd;
|
46
|
-
@include background(linear-gradient(#ddd, #ddd - 5));
|
47
|
-
border-bottom: 1px solid #bbb;
|
48
|
-
/* @include box-shadow(0 4px 4px rgba(0, 0, 0, 0.2)); */
|
49
|
-
|
50
|
-
li {
|
51
|
-
float: left;
|
52
|
-
|
53
|
-
a {
|
54
|
-
margin: 12px 10px 12px 0;
|
55
|
-
@include pretty-button;
|
56
|
-
display: block;
|
57
|
-
color: white;
|
58
|
-
text-decoration: none;
|
59
|
-
|
60
|
-
&.delete {
|
61
|
-
position: absolute;
|
62
|
-
right: 20px;
|
63
|
-
@include pretty-button(#634 - 30, $copy-on-dark);
|
64
|
-
}
|
65
|
-
}
|
66
|
-
}
|
67
|
-
|
68
|
-
#log-out {
|
69
|
-
margin: 12px 0;
|
70
|
-
position: absolute;
|
71
|
-
right: 20px;
|
72
|
-
}
|
73
|
-
}
|
74
|
-
|
75
|
-
#manifest_content {
|
76
|
-
margin: 40px auto;
|
77
|
-
padding: 40px;
|
78
|
-
width: 80%;
|
79
|
-
max-width: 720px;
|
80
|
-
background: #fefefe;
|
81
|
-
border: 1px solid #ccc;
|
82
|
-
@include box-shadow(0 4px 4px rgba(0, 0, 0, 0.1));
|
83
|
-
|
84
|
-
ul {
|
85
|
-
list-style: disc;
|
86
|
-
}
|
87
|
-
|
88
|
-
li {
|
89
|
-
margin-left: 20px;
|
90
|
-
line-height: 1.428571429;
|
91
|
-
}
|
92
|
-
}
|
93
|
-
|
94
|
-
h2 {
|
95
|
-
margin-bottom: 20px;
|
96
|
-
padding-bottom: 10px;
|
97
|
-
border-bottom: 2px solid $copy-on-light;
|
98
|
-
font-size: 1.5em;
|
99
|
-
font-weight: bold;
|
100
|
-
}
|
101
|
-
|
102
|
-
h3 {
|
103
|
-
margin-top: 20px;
|
104
|
-
margin-bottom: 10px;
|
105
|
-
padding-bottom: 5px;
|
106
|
-
border-bottom: 1px dashed $copy-on-light;
|
107
|
-
font-size: 1.2em;
|
108
|
-
font-weight: bold;
|
109
|
-
line-height: 1.428571429;
|
110
|
-
}
|
111
|
-
|
112
|
-
.errors, #flash_alert, #flash_notice {
|
113
|
-
margin-bottom: 20px;
|
114
|
-
padding: 10px;
|
115
|
-
background: #fdd;
|
116
|
-
border: 1px solid #faa;
|
117
|
-
line-height: 1.428571429;
|
118
|
-
}
|
119
|
-
|
120
|
-
#flash_notice {
|
121
|
-
background: #dfd;
|
122
|
-
border: 1px solid #afa;
|
123
|
-
}
|
124
|
-
|
125
|
-
.model_actions { margin-top: 40px; }
|
126
|
-
|
127
|
-
.model_actions a {
|
128
|
-
@include pretty_button;
|
129
|
-
&.delete { @include pretty-button(#634 + 10, $copy-on-dark); }
|
130
|
-
}
|
131
|
-
|
132
|
-
a { color: $accent; }
|
133
|
-
|
134
|
-
.pretty-button { @include pretty-button; }
|
135
|
-
|
136
|
-
@import 'forms';
|
137
|
-
@import 'tables';
|
data/app/models/user.rb
DELETED
@@ -1,8 +0,0 @@
|
|
1
|
-
class User < ActiveRecord::Base
|
2
|
-
has_secure_password
|
3
|
-
|
4
|
-
attr_accessible :email, :password, :password_confirmation
|
5
|
-
|
6
|
-
validates_uniqueness_of :email
|
7
|
-
validates_format_of :email, :with => /^[a-zA-Z0-9_\.]+((\+)*[a-zA-Z0-9_\.]+)*@([a-zA-Z0-9_\-]+.)+[a-zA-Z0-9_\-]+$/
|
8
|
-
end
|