slightcms 0.0.11 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. data/.DS_Store +0 -0
  2. data/.document +5 -0
  3. data/.rspec +1 -0
  4. data/Gemfile +12 -0
  5. data/Gemfile.lock +90 -0
  6. data/LICENSE.txt +20 -0
  7. data/README.rdoc +14 -37
  8. data/Rakefile +45 -17
  9. data/VERSION +1 -1
  10. data/{lib/app/controller → app/controllers}/slightcms/pages_controller.rb +8 -8
  11. data/lib/generators/slightcms/install.rb +19 -0
  12. data/lib/generators/templates/README +7 -0
  13. data/lib/slightcms.rb +0 -59
  14. data/slightcms.gemspec +42 -76
  15. data/spec/slightcms_spec.rb +5 -4
  16. data/spec/spec_helper.rb +9 -12
  17. metadata +60 -98
  18. data/.bnsignore +0 -18
  19. data/.gitignore +0 -3
  20. data/History.rdoc +0 -4
  21. data/bin/slightcms +0 -7
  22. data/generators/slightcms_setup/INSTALL +0 -1
  23. data/generators/slightcms_setup/images/arrow_down.png +0 -0
  24. data/generators/slightcms_setup/images/arrow_up.png +0 -0
  25. data/generators/slightcms_setup/images/main-menu-bg-divider.gif +0 -0
  26. data/generators/slightcms_setup/images/main-menu-bg-hover.gif +0 -0
  27. data/generators/slightcms_setup/images/main-menu-bg.gif +0 -0
  28. data/generators/slightcms_setup/images/page.png +0 -0
  29. data/generators/slightcms_setup/images/page_add.png +0 -0
  30. data/generators/slightcms_setup/images/page_delete.png +0 -0
  31. data/generators/slightcms_setup/images/page_edit.png +0 -0
  32. data/generators/slightcms_setup/javascripts/jquery-1.4.min.js +0 -151
  33. data/generators/slightcms_setup/javascripts/slightcms.js +0 -0
  34. data/generators/slightcms_setup/slightcms_setup_generator.rb +0 -29
  35. data/generators/slightcms_setup/stylesheets/960.css +0 -1
  36. data/generators/slightcms_setup/stylesheets/reset.css +0 -1
  37. data/generators/slightcms_setup/stylesheets/slightcms.css +0 -0
  38. data/generators/slightcms_setup/stylesheets/text.css +0 -1
  39. data/generators/slightcms_setup/templates/migrate/slightcms_setup_migration.rb +0 -54
  40. data/lib/app/controller/slightcms/admin/assets_controller.rb +0 -47
  41. data/lib/app/controller/slightcms/admin/layouts_controller.rb +0 -65
  42. data/lib/app/controller/slightcms/admin/pages_controller.rb +0 -80
  43. data/lib/app/models/asset.rb +0 -65
  44. data/lib/app/models/layout.rb +0 -30
  45. data/lib/app/models/page.rb +0 -97
  46. data/lib/app/models/part.rb +0 -21
  47. data/lib/app/views/layouts/slightcms_admin_interface.html.erb +0 -36
  48. data/lib/app/views/slightcms/admin/assets/index.html.erb +0 -12
  49. data/lib/app/views/slightcms/admin/assets/new.html.erb +0 -10
  50. data/lib/app/views/slightcms/admin/layouts/edit.html.erb +0 -10
  51. data/lib/app/views/slightcms/admin/layouts/index.html.erb +0 -13
  52. data/lib/app/views/slightcms/admin/layouts/new.html.erb +0 -12
  53. data/lib/app/views/slightcms/admin/pages/_page_list_item.html.erb +0 -14
  54. data/lib/app/views/slightcms/admin/pages/_page_part_fields.html.erb +0 -4
  55. data/lib/app/views/slightcms/admin/pages/edit.html.erb +0 -19
  56. data/lib/app/views/slightcms/admin/pages/index.html.erb +0 -8
  57. data/lib/app/views/slightcms/admin/pages/new.html.erb +0 -20
  58. data/lib/app/views/slightcms/pages/show.html.erb +0 -1
  59. data/test/test_slightcms.rb +0 -0
@@ -1,21 +0,0 @@
1
- module Slightcms
2
- class Part < ActiveRecord::Base
3
-
4
- # Change default table name
5
- set_table_name "slightcms_page_parts"
6
- # Associations
7
- belongs_to :page, :class_name => "Slightcms::Page"
8
-
9
- # Validations
10
- validates_presence_of :name
11
- validates_uniqueness_of :name, :scope => :page_id
12
- validates_presence_of :content
13
-
14
- protected
15
-
16
- # Render the part's content
17
- def render_content
18
- RedCloth.new(self.content).to_html
19
- end
20
- end
21
- end
@@ -1,36 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
3
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
4
-
5
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
6
- <head>
7
- <title>slightCMS</title>
8
- <link rel="stylesheet" href="slightcms/stylesheets/reset.css" type="text/css" media="screen">
9
- <link rel="stylesheet" href="slightcms/stylesheets/960.css" type="text/css" media="screen">
10
- </head>
11
-
12
- <body>
13
- <div id="wrapper" class="container_12">
14
- <div id="header" class="grid_12">
15
- <h1>slightCMS</h1>
16
- <ul class="main-menu">
17
- <li><%= link_to "Pages", slightcms_pages_path %></li>
18
- <li><%= link_to "Layouts", slightcms_layouts_path %></li>
19
- <li><%= link_to "Assets", slightcms_assets_path %></li>
20
- </ul>
21
- </div>
22
- <div id="content" class="grid_12">
23
- <% if flash[:notice] %>
24
- <div class="flash notice"><%= flash[:notice] %></div>
25
- <% end %>
26
- <% if flash[:error] %>
27
- <div class="flash error"><%= flash[:error] %></div>
28
- <% end %>
29
- <%= yield %>
30
- </div>
31
- <div id="footer" class="grid_12">
32
- &copy; 2010 - Matthias Nitsch
33
- </div>
34
- </div>
35
- </body>
36
- </html>
@@ -1,12 +0,0 @@
1
- <h1>Assets</h1>
2
- <%= link_to "New Asset", new_slightcms_asset_path %>
3
- <ul id="assets">
4
- <% @assets.each do |asset| %>
5
- <li>
6
- <%= asset.name %>
7
- <ul class="item-menu">
8
- <li><%= link_to "Delete", asset, :confirm => "Are you sure?", :method => :delete %></li>
9
- </ul>
10
- </li>
11
- <% end %>
12
- </ul>
@@ -1,10 +0,0 @@
1
- <h1>New Asset</h1>
2
- <% form_for @asset, :html => {:multipart => true} do |form| %>
3
- <%= form.label :name, "Name" %>
4
- <%= form.text_field :name %>
5
- <%= form.label :file, "File" %>
6
- <%= form.file_field :file %>
7
- <%= submit_tag 'Upload Asset' %>
8
- <% end %>
9
-
10
- <%= link_to "Back to assets", slightcms_assets_path %>
@@ -1,10 +0,0 @@
1
- <h1>Edit Layout</h1>
2
- <% form_for @layout do |form| %>
3
- <%= form.label :name, "Name"%>
4
- <%= form.text_field :name %>
5
- <%= form.label :content, "Content" %>
6
- <%= form.text_area :content %>
7
- <%= submit_tag 'Create Layout' %>
8
- <% end %>
9
-
10
- <%= link_to "Back to layouts", slightcms_layouts_path %>
@@ -1,13 +0,0 @@
1
- <h1>Layouts</h1>
2
- <%= link_to "New Layout", new_slightcms_layout_path %>
3
- <ul id="layouts">
4
- <% @layouts.each do |layout| %>
5
- <li>
6
- <%= layout.name %>
7
- <ul class="item-menu">
8
- <li><%= link_to "Edit", edit_slightcms_layout_path(layout) %>
9
- <li><%= link_to "Delete", layout, :confirm => "Are you sure?", :method => :delete %></li>
10
- </ul>
11
- </li>
12
- <% end %>
13
- </ul>
@@ -1,12 +0,0 @@
1
- <h1>New Layout</h1>
2
- <% form_for @layout, :html => {:multipart => true} do |form| %>
3
- <%= form.label :name, "Name"%>
4
- <%= form.text_field :name %>
5
- <%= form.label :content, "Content" %>
6
- <%= form.text_area :content %>
7
- <%= form.label :file, "File" %>
8
- <%= form.file_field :file %>
9
- <%= submit_tag 'Create Layout' %>
10
- <% end %>
11
-
12
- <%= link_to "Back to layouts", slightcms_layouts_path %>
@@ -1,14 +0,0 @@
1
- <li>
2
- <div class="page-name">
3
- <%= page.title %>
4
- <%= link_to "Edit", edit_slightcms_page_path(page) %>
5
- <%= link_to "Delete", page, :confirm => "Are you sure?", :method => :delete %>
6
- </div>
7
- <% if page.children.size > 0 %>
8
- <ul>
9
- <% page.children.each do |page| %>
10
- <%= render :partial => 'page_list_item', :locals => {:page => page } %>
11
- <% end %>
12
- </ul>
13
- <% end %>
14
- </li>
@@ -1,4 +0,0 @@
1
- <%= f.label :name, "Name" %>
2
- <%= f.text_field :name %>
3
- <%= f.label :content, "Content" %>
4
- <%= f.text_area :content %>
@@ -1,19 +0,0 @@
1
- <h1>Edit Page</h1>
2
- <% form_for @page do |form| %>
3
- <%= form.label :title, "Title"%>
4
- <%= form.text_field :title %>
5
- <%= form.label :slug, "Slug" %>
6
- <%= form.text_field :slug %>
7
- <%= form.label :keywords, "Keywords" %>
8
- <%= form.text_field :keywords %>
9
- <%= form.label :description, "Description" %>
10
- <%= form.text_area :description %>
11
- <%= form.label :published, "Published?" %>
12
- <%= form.check_box :published %>
13
- <%= form.fields_for :parts do |builder| %>
14
- <%= render :partial => 'page_part_form', :form => builder %>
15
- <% end %>
16
- <%= submit_tag 'Edit Page' %>
17
- <% end %>
18
-
19
- <%= link_to "Back to pages", slightcms_pages_path %>
@@ -1,8 +0,0 @@
1
- <h1>Pages</h1>
2
- <ul id="page-tree">
3
- <% @pages.each do |page| %>
4
- <% if page.parent_id.nil? %>
5
- <%= render :partial => 'page_list_item', :locals => {:page => page} %>
6
- <% end %>
7
- <% end %>
8
- </ul>
@@ -1,20 +0,0 @@
1
- <h1>New Page</h1>
2
- <% form_for @page do |form| %>
3
- <%= form.error_messages %>
4
- <%= form.label :title, "Title"%>
5
- <%= form.text_field :title %>
6
- <%= form.label :slug, "Slug" %>
7
- <%= form.text_field :slug %>
8
- <%= form.label :keywords, "Keywords" %>
9
- <%= form.text_field :keywords %>
10
- <%= form.label :description, "Description" %>
11
- <%= form.text_area :description %>
12
- <%= form.label :published, "Published?" %>
13
- <%= form.check_box :published %>
14
- <% form.fields_for :parts do |builder| %>
15
- <%= render 'page_part_fields', :f => builder %>
16
- <% end %>
17
- <%= submit_tag 'Create Page' %>
18
- <% end %>
19
-
20
- <%= link_to "Back to pages", slightcms_pages_path %>
@@ -1 +0,0 @@
1
- <%= @page_content %>
File without changes