creature 0.0.1 → 0.0.2

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/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.1
1
+ 0.0.2
data/creature.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{creature}
8
- s.version = "0.0.1"
8
+ s.version = "0.0.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Travis"]
12
- s.date = %q{2010-11-30}
12
+ s.date = %q{2010-12-04}
13
13
  s.description = %q{Creature.}
14
14
  s.email = %q{travis@impossiblecreature.com}
15
15
  s.extra_rdoc_files = [
@@ -35,6 +35,7 @@ Gem::Specification.new do |s|
35
35
  "lib/generators/pages/templates/_navigation.html.haml",
36
36
  "lib/generators/pages/templates/_page.html.haml",
37
37
  "lib/generators/pages/templates/_sidebar.html.haml",
38
+ "lib/generators/pages/templates/admin.sass",
38
39
  "lib/generators/pages/templates/admin_pages_controller.rb",
39
40
  "lib/generators/pages/templates/application.html.haml",
40
41
  "lib/generators/pages/templates/application_controller.rb",
@@ -9,8 +9,8 @@ class PagesGenerator < Rails::Generators::Base
9
9
  end
10
10
 
11
11
  def seed_data
12
- # append_file 'db/seeds.rb', "Page.create! :name => 'index', :content => 'i am index. i have no data.'"
13
- # rake 'db:seed'
12
+ append_file 'db/seeds.rb', "Page.create! :name => 'index', :content => 'i am index. i have no data.'"
13
+ rake 'db:seed'
14
14
  end
15
15
 
16
16
  def gems
@@ -25,10 +25,10 @@ class PagesGenerator < Rails::Generators::Base
25
25
  end
26
26
 
27
27
  def add_routes
28
- route "resources :pages, :module => 'admin'"
29
- route "resources :messages, :module => 'admin'"
30
28
  route "root :to => 'page#show#index', :page => 'index'"
31
29
  route "match ':page/' => 'page#show#:page'"
30
+ route "resources :pages, :module => 'admin'"
31
+ route "resources :messages, :module => 'admin'"
32
32
  end
33
33
 
34
34
  def copy_files
@@ -39,20 +39,22 @@ class PagesGenerator < Rails::Generators::Base
39
39
  copy_file 'page_helper.rb', 'app/helpers/page_helper.rb'
40
40
  copy_file 'index.html.haml', 'app/views/page/index.html.haml'
41
41
  copy_file 'page.html.haml', 'app/views/layouts/page.html.haml'
42
+ copy_file 'application.html.haml', 'app/views/layouts/application.html.haml'
42
43
  copy_file 'style.sass', 'public/stylesheets/sass/style.sass'
43
44
  copy_file 'reset.sass', 'public/stylesheets/sass/reset.sass'
45
+ copy_file 'admin.sass', 'public/stylesheets/sass/admin.sass'
44
46
  copy_file 'show.html.haml', 'app/views/page/show.html.haml'
45
47
  copy_file '_page.html.haml', 'app/views/page/_page.html.haml'
46
48
  copy_file '_header.html.haml', 'app/views/page/_header.html.haml'
47
49
  copy_file '_navigation.html.haml', 'app/views/page/_navigation.html.haml'
48
50
  copy_file '_sidebar.html.haml', 'app/views/page/_sidebar.html.haml'
49
- copy_file '_footer.html.haml', 'app/views/page/_footer.html.haml'
50
-
51
+ copy_file '_footer.html.haml', 'app/views/page/_footer.html.haml'
51
52
  copy_file 'edit.html.erb', 'app/views/admin/pages/edit.html.erb'
52
53
  copy_file 'pages_index.html.haml', 'app/views/admin/pages/index.html.haml'
53
54
  copy_file 'new.html.erb', 'app/views/admin/pages/new.html.erb'
54
55
  copy_file 'show.html.erb', 'app/views/admin/pages/show.html.erb'
55
56
  copy_file '_admin_nav.html.haml', 'app/views/layouts/_admin_nav.html.haml'
57
+ copy_file '_form.html.erb', 'app/views/admin/pages/_form.html.erb'
56
58
  end
57
59
 
58
60
  def blast_off
@@ -1,4 +1,4 @@
1
- <%= form_for([:admin, @page]) do |f| %>
1
+ <%= form_for(@page) do |f| %>
2
2
  <fieldset class="inputs">
3
3
  <% if @page.errors.any? %>
4
4
  <div id="error_explanation">
@@ -16,21 +16,8 @@
16
16
 
17
17
  <li class="string required title">
18
18
  <%= f.label :Location %><br />
19
- <%= f.select("section", Page::SECTIONS) %>
20
- / <%= f.text_field :name %>
19
+ <%= f.text_field :name %>
21
20
  </li>
22
- <% if !@page.isroot && !@page.id.nil? %>
23
- <li class="title">
24
- <ul class="check_boxes">
25
- <li class="field">
26
- <%= f.label "Show in navigation?" %>
27
- <%= f.check_box :navigation %>
28
- <p class="inline-hints">check box for item to appear in navigation</p>
29
- <%= f.text_field :navigation_title %>
30
- </li>
31
- </ul>
32
- </li>
33
- <% end %>
34
21
  <li class="string required title">
35
22
  <%= f.label :title %><br />
36
23
  <%= f.text_field :page_title %>
@@ -46,54 +33,14 @@
46
33
  </li>
47
34
  <li class="string required title">
48
35
  <%= f.label :content %><br />
49
- <%= ckeditor_textarea("page", "content", :width => '100%', :height => '200px', :toolbar => 'Easy') %>
36
+ <%= f.text_area :content %>
50
37
  </li>
51
38
  <li class="string required title">
52
39
  </li>
53
- <li class="select required">
54
- <label for="page_type">Page Layout:</label>
55
- <%= f.select("page_type", Page::PAGE_TYPES, {:include_blank => 'None'}) %>
56
- <p class="inline-hints">this will determines which template will be used</p>
57
- </li>
58
- <!-- <li class="title">
59
- <ul class="checks">
60
- <li class="field">
61
- <%= f.label :visible %>
62
- <%= f.check_box :visible %>
63
- <p class="inline-hints">this is ignored, unless we want to turn it on.</p>
64
- </li>
65
- </ul>
66
- </li> -->
67
40
  <hr>
68
41
  <li class="buttons">
69
42
  <%= f.submit %>
70
43
  </li>
71
44
  </ol>
72
-
73
- <div class="sidebar">
74
- <ol>
75
- <li class="select check">
76
- <%= f.check_box :contactform %>
77
- <%= image_tag "contact_form.png", :width => "100" %>
78
- </li>
79
- <li class="title">
80
- <%= link_to_add_fields image_tag("add.png"), f, :imagelinks %>
81
- <%= link_to_add_fields "Add An Image", f, :imagelinks %>
82
- <hr/>
83
- <%= f.fields_for :imagelinks do |builder| %>
84
- <%= render "imagelink_fields", :f => builder %>
85
- <% end %>
86
- </li>
87
- <li class="select required">
88
- <%= f.label :sidebar %><br />
89
- <%= ckeditor_textarea("page", "sidebar_html", :width => '100%', :height => '200px', :toolbar => 'Sidebar') %>
90
- </li>
91
- <li class="select check">
92
- <%= f.check_box :accordion %>
93
- <%= image_tag "accordion.png", :width => "100" %>
94
- </li>
95
- </ol>
96
- </div>
97
-
98
45
  </fieldset>
99
46
  <% end %>
@@ -6,4 +6,4 @@
6
6
 
7
7
  = @page.content
8
8
 
9
- = sidebar @page.sidebar
9
+ / = sidebar @page.sidebar
@@ -0,0 +1,24 @@
1
+ /* Tables */
2
+
3
+ table {
4
+ margin-bottom: 2em;
5
+ width: 100%;
6
+ }
7
+ th {
8
+ border-bottom: 2px solid #ccc;
9
+ font-weight: bold;
10
+ text-align: left;
11
+ }
12
+ td { border-bottom: 1px solid #ddd; }
13
+ caption, th, td {
14
+ padding: 4px 10px 4px 0;
15
+ }
16
+ caption {
17
+ background: #f1f1f1;
18
+ padding: 10px 0;
19
+ margin-bottom: 1em;
20
+ }
21
+
22
+ tr,td,th {
23
+ vertical-align: middle;
24
+ }
@@ -20,7 +20,7 @@
20
20
  / %td= page.section
21
21
  / %td= page.contactform
22
22
  / %td= page.accordion
23
- %td= link_to 'Edit', edit_admin_page_path(page)
24
- %td= link_to 'Destroy', [:admin, page], :confirm => 'Are you sure?', :method => :delete
23
+ %td= link_to 'Edit', edit_page_path(page)
24
+ %td= link_to 'Destroy', [page], :confirm => 'Are you sure?', :method => :delete
25
25
 
26
- = link_to 'New Page', new_admin_page_path
26
+ = link_to 'New Page', new_page_path
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: creature
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
9
+ - 2
10
+ version: 0.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Travis
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-11-30 00:00:00 -06:00
18
+ date: 2010-12-04 00:00:00 -06:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -106,6 +106,7 @@ files:
106
106
  - lib/generators/pages/templates/_navigation.html.haml
107
107
  - lib/generators/pages/templates/_page.html.haml
108
108
  - lib/generators/pages/templates/_sidebar.html.haml
109
+ - lib/generators/pages/templates/admin.sass
109
110
  - lib/generators/pages/templates/admin_pages_controller.rb
110
111
  - lib/generators/pages/templates/application.html.haml
111
112
  - lib/generators/pages/templates/application_controller.rb