refinerycms 0.9.5.30 → 0.9.5.31

Sign up to get free protection for your applications and to get access to all the features.
Files changed (98) hide show
  1. data/.yardopts +15 -5
  2. data/Rakefile +1 -1
  3. data/VERSION +1 -1
  4. data/bin/refinery +9 -9
  5. data/bin/refinery-update-core +8 -5
  6. data/config/environment.rb +1 -1
  7. data/config/routes.rb +1 -0
  8. data/contributors.md +18 -0
  9. data/db/migrate/20100127004649_add_reset_code_to_users.rb +9 -0
  10. data/db/schema.rb +2 -1
  11. data/db/seeds.rb +11 -1
  12. data/{LICENSE → license.md} +3 -3
  13. data/public/javascripts/admin.js +5 -0
  14. data/public/javascripts/refinery/boot_wym.js +1 -1
  15. data/public/stylesheets/refinery/refinery.css +7 -0
  16. data/readme.md +161 -0
  17. data/themes/demolicious.zip +0 -0
  18. data/themes/hemingway.zip +0 -0
  19. data/vendor/plugins/authentication/app/controllers/admin/users_controller.rb +0 -27
  20. data/vendor/plugins/authentication/app/controllers/sessions_controller.rb +3 -0
  21. data/vendor/plugins/authentication/app/controllers/users_controller.rb +36 -21
  22. data/vendor/plugins/authentication/app/models/user.rb +40 -41
  23. data/vendor/plugins/authentication/app/models/user_mailer.rb +5 -12
  24. data/vendor/plugins/authentication/app/views/sessions/new.html.erb +3 -0
  25. data/vendor/plugins/authentication/app/views/user_mailer/reset_notification.html.erb +6 -0
  26. data/vendor/plugins/authentication/app/views/users/forgot.html.erb +13 -0
  27. data/vendor/plugins/authentication/app/views/users/reset.html.erb +18 -0
  28. data/vendor/plugins/authentication/authentication.md +7 -0
  29. data/vendor/plugins/authentication/config/routes.rb +6 -1
  30. data/vendor/plugins/dashboard/dashboard.md +22 -0
  31. data/vendor/plugins/images/images.md +46 -0
  32. data/vendor/plugins/inquiries/app/controllers/inquiries_controller.rb +0 -8
  33. data/vendor/plugins/inquiries/app/views/admin/inquiries/show.html.erb +3 -3
  34. data/vendor/plugins/inquiries/inquiries.md +31 -0
  35. data/vendor/plugins/news/app/controllers/news_items_controller.rb +9 -19
  36. data/vendor/plugins/news/app/views/news_items/index.html.erb +1 -1
  37. data/vendor/plugins/news/app/views/news_items/show.html.erb +13 -18
  38. data/vendor/plugins/news/news.md +20 -0
  39. data/vendor/plugins/pages/app/controllers/pages_controller.rb +2 -12
  40. data/vendor/plugins/pages/app/models/page.rb +5 -5
  41. data/vendor/plugins/pages/app/presenters/page_presenter.rb +3 -0
  42. data/vendor/plugins/pages/pages.md +141 -0
  43. data/vendor/plugins/pages/rails/init.rb +1 -1
  44. data/vendor/plugins/refinery/app/views/admin/_head.html.erb +1 -0
  45. data/vendor/plugins/refinery/app/views/layouts/application.html.erb +2 -15
  46. data/vendor/plugins/refinery/app/views/shared/_head.html.erb +13 -0
  47. data/vendor/plugins/refinery/app/views/shared/_header.html.erb +1 -1
  48. data/vendor/plugins/refinery/app/views/shared/_menu.html.erb +4 -15
  49. data/vendor/plugins/refinery/app/views/shared/_menu_branch.html.erb +20 -25
  50. data/vendor/plugins/refinery/app/views/shared/_submenu.html.erb +5 -4
  51. data/vendor/plugins/refinery/crud.md +197 -0
  52. data/vendor/plugins/refinery/lib/generators/refinery/templates/public_controller.rb +6 -1
  53. data/vendor/plugins/refinery/lib/refinery/application_controller.rb +18 -5
  54. data/vendor/plugins/refinery/lib/refinery/application_helper.rb +31 -28
  55. data/vendor/plugins/refinery/lib/refinery/base_presenter.rb +27 -0
  56. data/vendor/plugins/refinery/lib/refinery/initializer.rb +7 -3
  57. data/vendor/plugins/refinery/lib/tasks/doc.rake +4 -4
  58. data/vendor/plugins/refinery/plugins.md +194 -0
  59. data/vendor/plugins/refinery/rails/init.rb +5 -0
  60. data/vendor/plugins/refinery_settings/settings.md +5 -0
  61. data/vendor/plugins/resources/resources.md +9 -0
  62. data/vendor/plugins/themes/app/controllers/themes_controller.rb +12 -15
  63. data/vendor/plugins/themes/app/models/theme.rb +8 -14
  64. data/vendor/plugins/themes/config/routes.rb +3 -3
  65. data/vendor/plugins/themes/themes.md +133 -0
  66. metadata +29 -38
  67. data/CONTRIBUTORS +0 -11
  68. data/README.rdoc +0 -78
  69. data/themes/demolicious/LICENSE +0 -21
  70. data/themes/demolicious/README +0 -1
  71. data/themes/demolicious/images/footer_background.png +0 -0
  72. data/themes/demolicious/images/header_background.png +0 -0
  73. data/themes/demolicious/preview.png +0 -0
  74. data/themes/demolicious/stylesheets/application.css +0 -94
  75. data/themes/demolicious/stylesheets/formatting.css +0 -36
  76. data/themes/demolicious/stylesheets/home.css +0 -11
  77. data/themes/demolicious/stylesheets/ie6.css +0 -0
  78. data/themes/demolicious/stylesheets/ie7.css +0 -0
  79. data/themes/demolicious/views/layouts/application.html.erb +0 -33
  80. data/themes/demolicious/views/pages/home.html.erb +0 -1
  81. data/themes/demolicious/views/pages/show.html.erb +0 -1
  82. data/themes/hemingway/LICENSE +0 -7
  83. data/themes/hemingway/README +0 -3
  84. data/themes/hemingway/images/archives.gif +0 -0
  85. data/themes/hemingway/images/footer_black.gif +0 -0
  86. data/themes/hemingway/images/kyle-header.jpg +0 -0
  87. data/themes/hemingway/images/readon_black.gif +0 -0
  88. data/themes/hemingway/images/search.gif +0 -0
  89. data/themes/hemingway/images/spinner.gif +0 -0
  90. data/themes/hemingway/images/trackback_pingback.gif +0 -0
  91. data/themes/hemingway/preview.png +0 -0
  92. data/themes/hemingway/stylesheets/application.css +0 -713
  93. data/themes/hemingway/views/layouts/application.html.erb +0 -64
  94. data/themes/hemingway/views/shared/content_page.html.erb +0 -0
  95. data/vendor/plugins/authentication/app/models/user_observer.rb +0 -11
  96. data/vendor/plugins/authentication/app/views/user_mailer/activation.html.erb +0 -3
  97. data/vendor/plugins/authentication/app/views/user_mailer/signup_notification.html.erb +0 -8
  98. data/vendor/plugins/themes/themes.rdoc +0 -131
@@ -1,64 +0,0 @@
1
- <% setup # sets up any meta tags and page title -%>
2
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
- <html xmlns="http://www.w3.org/1999/xhtml">
5
- <head>
6
- <title>
7
- <%= yield :title %> - <%= RefinerySetting.find_or_set(:site_name, "Company Name") %>
8
- </title><%= stylesheet_link_tag 'theme/application' %>
9
- <link rel="shortcut icon" href="/favicon.ico" />
10
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><%= yield :head %>
11
- </head>
12
- <body>
13
- <div id="header">
14
- <div class="inside">
15
- <h2>
16
- <%= link_to RefinerySetting.find_or_set(:site_name, "Company Name"), root_url %>
17
- </h2>
18
- <p class="description">
19
- <%= link_to "Home", root_url %>
20
- </p>
21
- </div>
22
- </div>
23
- <div id='primary'>
24
- <div class='inside clearfix'>
25
- <%= yield %>
26
- </div>
27
- </div>
28
- <div id="ancillary">
29
- <div class="inside">
30
- <div class="block first" style='margin: 0;'>
31
- <h2>Recent Posts</h2>
32
- <% if NewsItem.latest.empty? %>
33
- <p>No news posts yet</p>
34
- <% else %>
35
- <ul>
36
- <% NewsItem.latest.each do |item| %>
37
- <li>
38
- <%= link_to item.title, news_item_url(item) %>
39
- </li>
40
- <% end %>
41
- </ul>
42
- <% end %>
43
- </div>
44
- <div class="block pages">
45
- <h2>
46
- Pages
47
- </h2>
48
- <%= render :partial => 'shared/menu' %>
49
- <div class="clear"></div>
50
- </div>
51
- </div>
52
- <hr class="hide" />
53
- <div id="footer">
54
- <div class="inside">
55
- <p style='clear: both; text-align: center;'>
56
- Copyright &copy; <%= Time.now.year %>
57
- <%= RefinerySetting.find_or_set(:site_name, "Company Name") %>
58
- </p>
59
- </div>
60
- </div>
61
- </div>
62
- <%= render :partial => 'shared/google_analytics' unless local_request? %>
63
- </body>
64
- </html>
@@ -1,11 +0,0 @@
1
- class UserObserver < ActiveRecord::Observer
2
- def after_create(user)
3
- UserMailer.deliver_signup_notification(user)
4
- end
5
-
6
- def after_save(user)
7
-
8
- UserMailer.deliver_activation(user) if user.recently_activated?
9
-
10
- end
11
- end
@@ -1,3 +0,0 @@
1
- <%= @user.login %>, your account has been activated. You may now start adding your plugins:
2
-
3
- <%= @url %>
@@ -1,8 +0,0 @@
1
- Your account has been created.
2
-
3
- Username: <%= @user.login %>
4
- Password: <%= @user.password %>
5
-
6
- Visit this url to activate your account:
7
-
8
- <%= @url %>
@@ -1,131 +0,0 @@
1
- = Themes
2
-
3
- == Introduction
4
-
5
- Themes allow you to wrap up the design of your Refinery site into a single folder that is portable.
6
-
7
- Refinery doesn't force you to learn a special templating language, but rather just uses the regular
8
- ERB views you're used to in Rails. This means creating a theme from your existing site is extremely easy.
9
-
10
- Think of a theme as your +app/views+ directory with a few extra things like images, css and javascript.
11
-
12
- It's worth noting you don't need to use a theme if you don't want to. Placing files in the +app/views+ directory like any other Rails app will work just fine. It's only if you want to wrap your design up into a single location that you would use a theme or allow your client to easily change designs.
13
-
14
- == The structure of a theme
15
-
16
- Themes sit in your Rails app like this
17
-
18
- app/
19
- config/
20
- db/
21
- lib/
22
- public/
23
- themes/
24
- |- mytheme/
25
- |- othertheme/
26
- plugins/
27
- tests/
28
-
29
- So let's take the +"mytheme"+ example theme shown above. This is how the theme is structured:
30
-
31
- mytheme/
32
- |- images
33
- | |- whatever.png
34
- | |- foo.jpg
35
- |- javascripts
36
- | |- whatever.js
37
- |- LICENSE
38
- |- preview.png
39
- |- README
40
- |- stylesheets/
41
- | |- application.css
42
- | |- whatever.css
43
- |- views
44
- |- pages
45
- | |- show.html.erb
46
- | |- index.html.erb
47
- |- layouts
48
- |- application.html.erb
49
-
50
- *Images*
51
-
52
- Usually this would be just what you have in +public/images+ except we move that to the theme instead.
53
-
54
- *Javascripts*
55
-
56
- Same with javascripts, just what you normally have in +public/javascripts+ just in this theme directory instead.
57
-
58
- *Readme*
59
-
60
- The +README+ file is just a description of your theme.
61
-
62
- *Views*
63
-
64
- This is exactly the same as how you lay your views out in app/views/ just instead of putting them in +app/views/+ you put them into +themes/mytheme/views/+
65
-
66
- *Preview* *Image*
67
-
68
- The +preview.png+ image is used when selecting the theme in the backend. It must be a png and ideally is 135x135 pixels.
69
-
70
- == How do I make my own theme?
71
-
72
- Create a folder with the name if your theme inside /themes e.g. /themes/mytheme and follow the directory structure outlined in 'The structure of a theme'.
73
-
74
- == How do I select which theme Refinery should use?
75
-
76
- In the admin area of Refinery go to the "Settings" area, locate the setting called "theme" and edit it.
77
-
78
- Set the value of that setting to the name of your themes folder. For example if your theme is sitting in:
79
-
80
- themes/my_theme
81
-
82
- set it to +"my_theme"+ and hit save.
83
-
84
- == How do I zip my theme to use it on other sites
85
-
86
- If you want to share a theme and install it on another site you have to zip it first.
87
-
88
- It's important to note you don't zip the theme's directory itself just the contents.
89
-
90
- If I had a theme sitting in:
91
-
92
- themes/mytheme/[theme files here]
93
-
94
- The zip file would look like this
95
-
96
- mytheme.zip
97
- |- [theme files here]
98
-
99
- Read 'How do I install someone else's theme?' to take that zip file and install the theme.
100
-
101
- == How do I install someone else's theme?
102
-
103
- If you have the themes plugin added to your admin user, you should see in the admin area of Refinery a "Themes" tab in the main navigation. Click on that, then click "Upload new theme". Upload the theme zip file and then click on the "star" below the preview image for the theme to activate that theme as the one to use right now.
104
-
105
- == How can I convert my current views into a theme?
106
-
107
- This should be fairly straightforward just following the directory structure outlined in 'The structure of a theme'.
108
-
109
- But there is one important difference that need to be addressed to convert your current site into a theme.
110
-
111
- If you have some CSS which refers to an image or URL:
112
-
113
- #footer {
114
- background: url('/images/footer_background.png') repeat-x;
115
- }
116
-
117
- You need to update the URL so it requests /images/themes instead of /images. This tells Refinery we need to actually load this image from the theme and not just the public directory.
118
-
119
- So the result is simply:
120
-
121
- #footer {
122
- background: url('/images/theme/footer_background.png') repeat-x;
123
- }
124
-
125
- This is the same with linking to Javascript and Stylesheets in your view. Say our +application.html.erb+ layout had something like this:
126
-
127
- <%= stylesheet_link_tag 'application' %>
128
-
129
- You just need to change that to:
130
-
131
- <%= stylesheet_link_tag 'theme/application' %>