merbiful-release 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +4 -1
- data/lib/merbiful-release.rb~ +28 -1
- data/lib/merbiful-release/admin.rb +25 -0
- data/lib/merbiful-release/admin.rb~ +275 -3
- data/lib/merbiful-release/body.rb~ +27 -6
- data/lib/merbiful-release/css.rb~ +20 -5
- data/lib/merbiful-release/erubis.rb~ +4 -2
- data/lib/merbiful-release/filters.rb~ +22 -0
- data/lib/merbiful-release/haml.rb~ +13 -1
- data/lib/merbiful-release/images.rb~ +14 -0
- data/lib/merbiful-release/js.rb~ +25 -11
- data/lib/merbiful-release/layout.rb~ +46 -18
- data/lib/merbiful-release/page.rb~ +76 -24
- data/lib/merbiful-release/string.rb~ +16 -0
- data/templates/admin.css~ +13 -2
- data/templates/admin_layout.html.haml +4 -0
- data/templates/admin_layout.html.haml~ +7 -5
- data/templates/css.html.haml~ +10 -7
- data/templates/images.html.haml~ +17 -0
- data/templates/js.html.haml~ +22 -22
- data/templates/layouts.html.haml~ +26 -0
- data/templates/page_form.html.haml~ +41 -1
- metadata +139 -35
- data/lib/merbiful-release/controller.rb~ +0 -12
- data/lib/merbiful-release/eruby.rb~ +0 -11
- data/lib/merbiful-release/merbiful.rb~ +0 -8
- data/lib/merbiful-release/relative_time.rb~ +0 -78
- data/lib/merbiful-release/routes.rb~ +0 -4
- data/lib/merbiful-release/version.rb~ +0 -45
- data/templates/admin_layout.html.rhtml~ +0 -10
- data/templates/index.html.haml~ +0 -2
- data/templates/pages.html.haml~ +0 -3
@@ -1,45 +0,0 @@
|
|
1
|
-
|
2
|
-
module Merbiful
|
3
|
-
|
4
|
-
class Page
|
5
|
-
|
6
|
-
class NoSuchFilterError < RuntimeError
|
7
|
-
end
|
8
|
-
|
9
|
-
include DataMapper::Resource
|
10
|
-
include DataMapper::Validate
|
11
|
-
include Merbiful::Body
|
12
|
-
|
13
|
-
validates_is_unique :version, :scope => [:path]
|
14
|
-
|
15
|
-
property :id, Serial
|
16
|
-
property :version, Integer, :index => true
|
17
|
-
property :body, DataMapper::Types::Text
|
18
|
-
property :filter, DataMapper::Types::Text
|
19
|
-
property :path, DataMapper::Types::Text, :index => true
|
20
|
-
property :position, Integer
|
21
|
-
property :created_at, DateTime
|
22
|
-
property :updated_at, DateTime
|
23
|
-
property :title, DataMapper::Types::Text
|
24
|
-
property :keywords, DataMapper::Types::Text
|
25
|
-
property :parent_path, DataMapper::Types::Text
|
26
|
-
property :layout_id, Integer
|
27
|
-
|
28
|
-
before :save do
|
29
|
-
if self.position.nil?
|
30
|
-
last_position = self.class.first(:parent_path => self.parent_path, :path.not => self.path)
|
31
|
-
if last_position.nil?
|
32
|
-
self.position = 0
|
33
|
-
else
|
34
|
-
self.position = last_position.position + 1
|
35
|
-
end
|
36
|
-
end
|
37
|
-
if self.path.nil?
|
38
|
-
self.path = "/"
|
39
|
-
end
|
40
|
-
|
41
|
-
end
|
42
|
-
|
43
|
-
end
|
44
|
-
|
45
|
-
end
|
@@ -1,10 +0,0 @@
|
|
1
|
-
%html
|
2
|
-
%link{:href => url(:merbiful_admin_css), :rel => 'Stylesheet', :type => 'text/css'}
|
3
|
-
%body
|
4
|
-
%h1= link_to("Merbiful Release Administration Interface", url(:merbiful_admin_index))
|
5
|
-
%ul.menu
|
6
|
-
%li= link_to("Pages", url(:merbiful_admin, :action => "pages"))
|
7
|
-
%li= link_to("Layouts", url(:merbiful_admin, :action => "layouts"))
|
8
|
-
%li= link_to("Css", url(:merbiful_admin, :action => "css"))
|
9
|
-
%li= link_to("Js", url(:merbiful_admin, :action => "js"))
|
10
|
-
= catch_content :for_layout
|
data/templates/index.html.haml~
DELETED
data/templates/pages.html.haml~
DELETED