deluxe_publisher 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.rspec +1 -0
- data/Gemfile +29 -0
- data/LICENSE +20 -0
- data/README.rdoc +127 -0
- data/Rakefile +61 -0
- data/VERSION +1 -0
- data/app/controllers/deluxe_publisher/comments_controller.rb +93 -0
- data/app/controllers/deluxe_publisher/page_types_controller.rb +115 -0
- data/app/controllers/deluxe_publisher/pages_controller.rb +191 -0
- data/app/controllers/deluxe_publisher/presenter_controller.rb +185 -0
- data/app/controllers/deluxe_publisher/redirects_controller.rb +90 -0
- data/app/controllers/deluxe_publisher/sitemap_controller.rb +10 -0
- data/app/helpers/application_helper.rb +2 -0
- data/app/helpers/deluxe_publisher/comments_helper.rb +2 -0
- data/app/helpers/deluxe_publisher/page_types_helper.rb +13 -0
- data/app/helpers/deluxe_publisher/pages_helper.rb +41 -0
- data/app/helpers/deluxe_publisher/presenter_helper.rb +111 -0
- data/app/helpers/deluxe_publisher/redirects_helper.rb +2 -0
- data/app/helpers/deluxe_publisher/sitemap_helper.rb +2 -0
- data/app/models/ckeditor/asset.rb +88 -0
- data/app/models/ckeditor/attachment_file.rb +40 -0
- data/app/models/ckeditor/picture.rb +23 -0
- data/app/models/deluxe_publisher/comment.rb +6 -0
- data/app/models/deluxe_publisher/content.rb +6 -0
- data/app/models/deluxe_publisher/content_descriptor.rb +4 -0
- data/app/models/deluxe_publisher/page.rb +206 -0
- data/app/models/deluxe_publisher/page_type.rb +55 -0
- data/app/models/deluxe_publisher/redirect.rb +6 -0
- data/app/models/deluxe_publisher.rb +5 -0
- data/app/views/deluxe_publisher/comments/_form.html.erb +31 -0
- data/app/views/deluxe_publisher/comments/edit.html.erb +6 -0
- data/app/views/deluxe_publisher/comments/index.html.erb +31 -0
- data/app/views/deluxe_publisher/comments/new.html.erb +6 -0
- data/app/views/deluxe_publisher/comments/show.html.erb +30 -0
- data/app/views/deluxe_publisher/page_types/_content_descriptors.html.erb +15 -0
- data/app/views/deluxe_publisher/page_types/_form.html.erb +59 -0
- data/app/views/deluxe_publisher/page_types/content_areas_change.js.erb +3 -0
- data/app/views/deluxe_publisher/page_types/edit.html.erb +8 -0
- data/app/views/deluxe_publisher/page_types/index.html.erb +29 -0
- data/app/views/deluxe_publisher/page_types/new.html.erb +7 -0
- data/app/views/deluxe_publisher/page_types/show.html.erb +45 -0
- data/app/views/deluxe_publisher/pages/_form.html.erb +39 -0
- data/app/views/deluxe_publisher/pages/_general.html.erb +108 -0
- data/app/views/deluxe_publisher/pages/_page.html.erb +23 -0
- data/app/views/deluxe_publisher/pages/_page_content.html.erb +16 -0
- data/app/views/deluxe_publisher/pages/_page_links.html.erb +9 -0
- data/app/views/deluxe_publisher/pages/_seo.html.erb +27 -0
- data/app/views/deluxe_publisher/pages/edit.html.erb +5 -0
- data/app/views/deluxe_publisher/pages/index.html.erb +11 -0
- data/app/views/deluxe_publisher/pages/new.html.erb +6 -0
- data/app/views/deluxe_publisher/pages/page_type_change.js.erb +3 -0
- data/app/views/deluxe_publisher/pages/show.html.erb +115 -0
- data/app/views/deluxe_publisher/presenter/create_comment.js.erb +3 -0
- data/app/views/deluxe_publisher/presenter/create_comment_failed.js.erb +1 -0
- data/app/views/deluxe_publisher/presenter/new_comment.js.erb +7 -0
- data/app/views/deluxe_publisher/presenter/preview.html.erb +2 -0
- data/app/views/deluxe_publisher/redirects/_form.html.erb +29 -0
- data/app/views/deluxe_publisher/redirects/edit.html.erb +6 -0
- data/app/views/deluxe_publisher/redirects/index.html.erb +27 -0
- data/app/views/deluxe_publisher/redirects/new.html.erb +5 -0
- data/app/views/deluxe_publisher/redirects/show.html.erb +20 -0
- data/app/views/deluxe_publisher/sitemap/index.xml.builder +12 -0
- data/app/views/deluxe_publisher/templates/simple_blog.html.erb +19 -0
- data/app/views/deluxe_publisher/templates/simple_blog.rss.builder +23 -0
- data/app/views/deluxe_publisher/templates/simple_blog_story.html.erb +9 -0
- data/app/views/deluxe_publisher/templates/simple_page.html.erb +4 -0
- data/app/views/layouts/_deluxe_publisher_comment_form.html.erb +29 -0
- data/app/views/layouts/_deluxe_publisher_comments_list.html.erb +8 -0
- data/app/views/layouts/application.html.erb +14 -0
- data/app/views/layouts/deluxe_publisher.html.erb +36 -0
- data/app/views/layouts/deluxe_publisher_blog.html.erb +63 -0
- data/app/views/layouts/deluxe_publisher_simple.html.erb +30 -0
- data/config/routes.rb +49 -0
- data/deluxe_publisher.gemspec +466 -0
- data/lib/deluxe_publisher/deluxe_publisher_authentication.rb +37 -0
- data/lib/deluxe_publisher/engine.rb +5 -0
- data/lib/deluxe_publisher.rb +40 -0
- data/lib/generators/deluxe_publisher/base/USAGE +8 -0
- data/lib/generators/deluxe_publisher/base/base_generator.rb +45 -0
- data/lib/generators/deluxe_publisher/base/templates/images/add.png +0 -0
- data/lib/generators/deluxe_publisher/base/templates/images/btn_addNewPage.gif +0 -0
- data/lib/generators/deluxe_publisher/base/templates/images/btn_cancel.gif +0 -0
- data/lib/generators/deluxe_publisher/base/templates/images/btn_preview.gif +0 -0
- data/lib/generators/deluxe_publisher/base/templates/images/btn_save.gif +0 -0
- data/lib/generators/deluxe_publisher/base/templates/images/bullet.gif +0 -0
- data/lib/generators/deluxe_publisher/base/templates/images/content_bg.jpg +0 -0
- data/lib/generators/deluxe_publisher/base/templates/images/delete.png +0 -0
- data/lib/generators/deluxe_publisher/base/templates/images/edit.png +0 -0
- data/lib/generators/deluxe_publisher/base/templates/images/header_background.jpg +0 -0
- data/lib/generators/deluxe_publisher/base/templates/images/icon_published.gif +0 -0
- data/lib/generators/deluxe_publisher/base/templates/images/icon_unpublished.gif +0 -0
- data/lib/generators/deluxe_publisher/base/templates/images/logo.gif +0 -0
- data/lib/generators/deluxe_publisher/base/templates/images/minus.gif +0 -0
- data/lib/generators/deluxe_publisher/base/templates/images/plus.gif +0 -0
- data/lib/generators/deluxe_publisher/base/templates/images/show.png +0 -0
- data/lib/generators/deluxe_publisher/base/templates/images/tab_bg.gif +0 -0
- data/lib/generators/deluxe_publisher/base/templates/images/tabs_bg.jpg +0 -0
- data/lib/generators/deluxe_publisher/base/templates/initializer.rb +23 -0
- data/lib/generators/deluxe_publisher/base/templates/javascripts/deluxe_presenter.js +25 -0
- data/lib/generators/deluxe_publisher/base/templates/javascripts/deluxe_publisher.js +86 -0
- data/lib/generators/deluxe_publisher/base/templates/javascripts/jquery-rails.js +158 -0
- data/lib/generators/deluxe_publisher/base/templates/layouts/_deluxe_publisher_comment_form.html.erb +29 -0
- data/lib/generators/deluxe_publisher/base/templates/layouts/_deluxe_publisher_comments_list.html.erb +8 -0
- data/lib/generators/deluxe_publisher/base/templates/layouts/deluxe_publisher_blog.html.erb +74 -0
- data/lib/generators/deluxe_publisher/base/templates/layouts/deluxe_publisher_simple.html.erb +47 -0
- data/lib/generators/deluxe_publisher/base/templates/stylesheets/deluxe_presenter.css +458 -0
- data/lib/generators/deluxe_publisher/base/templates/stylesheets/deluxe_publisher.css +202 -0
- data/lib/generators/deluxe_publisher/base/templates/templates/simple_blog.html.erb +19 -0
- data/lib/generators/deluxe_publisher/base/templates/templates/simple_blog.rss.builder +23 -0
- data/lib/generators/deluxe_publisher/base/templates/templates/simple_blog_story.html.erb +12 -0
- data/lib/generators/deluxe_publisher/base/templates/templates/simple_page.html.erb +4 -0
- data/lib/generators/deluxe_publisher/migration/USAGE +0 -0
- data/lib/generators/deluxe_publisher/migration/migration_generator.rb +18 -0
- data/lib/generators/deluxe_publisher/migration/templates/migration.rb +98 -0
- data/lib/generators/deluxe_publisher/sample_site/sample_site_generator.rb +316 -0
- data/spec/controllers/deluxe_publisher/comments_controller_spec.rb +129 -0
- data/spec/controllers/deluxe_publisher/page_types_controller_spec.rb +125 -0
- data/spec/controllers/deluxe_publisher/pages_controller_spec.rb +129 -0
- data/spec/controllers/deluxe_publisher/presenter_controller_spec.rb +19 -0
- data/spec/controllers/deluxe_publisher/redirects_controller_spec.rb +118 -0
- data/spec/deluxe_publisher_spec.rb +7 -0
- data/spec/dummy/Rakefile +7 -0
- data/spec/dummy/app/controllers/application_controller.rb +3 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/views/deluxe_publisher/comments/_form.html.erb +31 -0
- data/spec/dummy/app/views/deluxe_publisher/comments/edit.html.erb +6 -0
- data/spec/dummy/app/views/deluxe_publisher/comments/index.html.erb +31 -0
- data/spec/dummy/app/views/deluxe_publisher/comments/new.html.erb +6 -0
- data/spec/dummy/app/views/deluxe_publisher/comments/show.html.erb +30 -0
- data/spec/dummy/app/views/deluxe_publisher/page_types/_content_descriptors.html.erb +15 -0
- data/spec/dummy/app/views/deluxe_publisher/page_types/_form.html.erb +59 -0
- data/spec/dummy/app/views/deluxe_publisher/page_types/content_areas_change.js.erb +3 -0
- data/spec/dummy/app/views/deluxe_publisher/page_types/edit.html.erb +8 -0
- data/spec/dummy/app/views/deluxe_publisher/page_types/index.html.erb +29 -0
- data/spec/dummy/app/views/deluxe_publisher/page_types/new.html.erb +7 -0
- data/spec/dummy/app/views/deluxe_publisher/page_types/show.html.erb +45 -0
- data/spec/dummy/app/views/deluxe_publisher/pages/_form.html.erb +36 -0
- data/spec/dummy/app/views/deluxe_publisher/pages/_general.html.erb +108 -0
- data/spec/dummy/app/views/deluxe_publisher/pages/_page.html.erb +23 -0
- data/spec/dummy/app/views/deluxe_publisher/pages/_page_content.html.erb +16 -0
- data/spec/dummy/app/views/deluxe_publisher/pages/_page_links.html.erb +9 -0
- data/spec/dummy/app/views/deluxe_publisher/pages/_seo.html.erb +27 -0
- data/spec/dummy/app/views/deluxe_publisher/pages/edit.html.erb +7 -0
- data/spec/dummy/app/views/deluxe_publisher/pages/index.html.erb +10 -0
- data/spec/dummy/app/views/deluxe_publisher/pages/new.html.erb +7 -0
- data/spec/dummy/app/views/deluxe_publisher/pages/page_type_change.js.erb +3 -0
- data/spec/dummy/app/views/deluxe_publisher/pages/show.html.erb +115 -0
- data/spec/dummy/app/views/deluxe_publisher/presenter/create_comment.js.erb +3 -0
- data/spec/dummy/app/views/deluxe_publisher/presenter/create_comment_failed.js.erb +1 -0
- data/spec/dummy/app/views/deluxe_publisher/presenter/new_comment.js.erb +7 -0
- data/spec/dummy/app/views/deluxe_publisher/presenter/preview.html.erb +2 -0
- data/spec/dummy/app/views/deluxe_publisher/templates/simple_blog.html.erb +19 -0
- data/spec/dummy/app/views/deluxe_publisher/templates/simple_blog.rss.builder +23 -0
- data/spec/dummy/app/views/deluxe_publisher/templates/simple_blog_story.html.erb +9 -0
- data/spec/dummy/app/views/deluxe_publisher/templates/simple_page.html.erb +4 -0
- data/spec/dummy/app/views/layouts/_deluxe_publisher_comment_form.html.erb +29 -0
- data/spec/dummy/app/views/layouts/_deluxe_publisher_comments_list.html.erb +8 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/app/views/layouts/deluxe_publisher.html.erb +31 -0
- data/spec/dummy/app/views/layouts/deluxe_publisher_blog.html.erb +63 -0
- data/spec/dummy/app/views/layouts/deluxe_publisher_simple.html.erb +30 -0
- data/spec/dummy/config/application.rb +45 -0
- data/spec/dummy/config/boot.rb +10 -0
- data/spec/dummy/config/database.yml +22 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +26 -0
- data/spec/dummy/config/environments/production.rb +49 -0
- data/spec/dummy/config/environments/test.rb +35 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/deluxe_publisher.rb +23 -0
- data/spec/dummy/config/initializers/inflections.rb +10 -0
- data/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/config/initializers/secret_token.rb +7 -0
- data/spec/dummy/config/initializers/session_store.rb +8 -0
- data/spec/dummy/config/locales/en.yml +5 -0
- data/spec/dummy/config/routes.rb +104 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/db/migrate/20110405190943_create_deluxe_publisher.rb +135 -0
- data/spec/dummy/db/schema.rb +130 -0
- data/spec/dummy/public/404.html +26 -0
- data/spec/dummy/public/422.html +26 -0
- data/spec/dummy/public/500.html +26 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/public/javascripts/application.js +2 -0
- data/spec/dummy/public/javascripts/controls.js +965 -0
- data/spec/dummy/public/javascripts/dragdrop.js +974 -0
- data/spec/dummy/public/javascripts/effects.js +1123 -0
- data/spec/dummy/public/javascripts/prototype.js +6001 -0
- data/spec/dummy/public/javascripts/rails.js +191 -0
- data/spec/dummy/public/stylesheets/.gitkeep +0 -0
- data/spec/dummy/script/rails +6 -0
- data/spec/factories/comment_factory.rb +4 -0
- data/spec/factories/content_descriptor_factory.rb +5 -0
- data/spec/factories/content_factory.rb +24 -0
- data/spec/factories/page_factory.rb +26 -0
- data/spec/factories/page_type_factory.rb +10 -0
- data/spec/factories/redirect_factory.rb +4 -0
- data/spec/helpers/deluxe_publisher/comments_helper_spec.rb +15 -0
- data/spec/helpers/deluxe_publisher/page_types_helper_spec.rb +26 -0
- data/spec/helpers/deluxe_publisher/pages_helper_spec.rb +65 -0
- data/spec/helpers/deluxe_publisher/presenter_helper_spec.rb +19 -0
- data/spec/helpers/deluxe_publisher/redirects_helper_spec.rb +15 -0
- data/spec/integration/navigation_spec.rb +9 -0
- data/spec/models/deluxe_publisher/comment_spec.rb +5 -0
- data/spec/models/deluxe_publisher/content_descriptor_spec.rb +5 -0
- data/spec/models/deluxe_publisher/content_spec.rb +5 -0
- data/spec/models/deluxe_publisher/page_spec.rb +358 -0
- data/spec/models/deluxe_publisher/page_type_spec.rb +62 -0
- data/spec/models/deluxe_publisher/redirect_spec.rb +17 -0
- data/spec/requests/deluxe_publisher/deluxe_publisher_comments_spec.rb +11 -0
- data/spec/requests/deluxe_publisher/deluxe_publisher_page_types_spec.rb +11 -0
- data/spec/requests/deluxe_publisher/deluxe_publisher_redirects_spec.rb +11 -0
- data/spec/requests/deluxe_publisher/pages_spec.rb +11 -0
- data/spec/routing/deluxe_publisher/comments_routing_spec.rb +35 -0
- data/spec/routing/deluxe_publisher/page_types_routing_spec.rb +47 -0
- data/spec/routing/deluxe_publisher/pages_routing_spec.rb +47 -0
- data/spec/routing/deluxe_publisher/presenter_routing_spec.rb +66 -0
- data/spec/routing/deluxe_publisher/redirects_routing_spec.rb +35 -0
- data/spec/spec_helper.rb +234 -0
- data/spec/views/deluxe_publisher/comments/edit.html.erb_spec.rb +24 -0
- data/spec/views/deluxe_publisher/comments/index.html.erb_spec.rb +32 -0
- data/spec/views/deluxe_publisher/comments/new.html.erb_spec.rb +24 -0
- data/spec/views/deluxe_publisher/comments/show.html.erb_spec.rb +24 -0
- data/spec/views/deluxe_publisher/page_types/edit.html.erb_spec.rb +32 -0
- data/spec/views/deluxe_publisher/page_types/index.html.erb_spec.rb +48 -0
- data/spec/views/deluxe_publisher/page_types/new.html.erb_spec.rb +32 -0
- data/spec/views/deluxe_publisher/page_types/show.html.erb_spec.rb +36 -0
- data/spec/views/deluxe_publisher/pages/edit.html.erb_spec.rb +58 -0
- data/spec/views/deluxe_publisher/pages/index.html.erb_spec.rb +100 -0
- data/spec/views/deluxe_publisher/pages/new.html.erb_spec.rb +81 -0
- data/spec/views/deluxe_publisher/pages/show.html.erb_spec.rb +75 -0
- data/spec/views/deluxe_publisher/presenter/present.html.erb_spec.rb +5 -0
- data/spec/views/deluxe_publisher/presenter/preview.html.erb_spec.rb +5 -0
- data/spec/views/deluxe_publisher/redirects/edit.html.erb_spec.rb +22 -0
- data/spec/views/deluxe_publisher/redirects/index.html.erb_spec.rb +28 -0
- data/spec/views/deluxe_publisher/redirects/new.html.erb_spec.rb +22 -0
- data/spec/views/deluxe_publisher/redirects/show.html.erb_spec.rb +21 -0
- metadata +1006 -0
@@ -0,0 +1,108 @@
|
|
1
|
+
<% sort_method = lambda{|p| p.position} %>
|
2
|
+
<fieldset><legend>Titles</legend>
|
3
|
+
<div class="field" id="menu_title_field">
|
4
|
+
<%= f.label :menu_title, "Menu/Navigation" %>
|
5
|
+
<%= f.text_field :menu_title %>
|
6
|
+
</div>
|
7
|
+
<div class="field" id="file_name_field">
|
8
|
+
<%= f.label :file_name,"File Name (for URL)"%>
|
9
|
+
<%= f.text_field :file_name %>
|
10
|
+
</div>
|
11
|
+
<div class="field" id="browser_title_field">
|
12
|
+
<%= f.label :browser_title, "Browser" %>
|
13
|
+
<%= f.text_field :browser_title %>
|
14
|
+
</div>
|
15
|
+
<div class="field" class="page_title_field">
|
16
|
+
<%= f.label :page_title, "Page"%>
|
17
|
+
<%= f.text_field :page_title %>
|
18
|
+
</div>
|
19
|
+
|
20
|
+
</fieldset>
|
21
|
+
|
22
|
+
|
23
|
+
<fieldset><legend>Page Settings</legend>
|
24
|
+
<div class="field">
|
25
|
+
<div class="field">
|
26
|
+
<%= f.label :parent_id %>
|
27
|
+
<% unless @page.child_of_a_blog? %>
|
28
|
+
<%= f.select :parent_id, sorted_nested_set_options(@root_page, sort_method, @page) {|i, level| "#{'-' * level} #{limit_length(i.menu_title, 25, false)}" } %>
|
29
|
+
<% else %>
|
30
|
+
<%= @page.parent.menu_title %>
|
31
|
+
<%= f.hidden_field :parent_id %>
|
32
|
+
<% end %>
|
33
|
+
</div>
|
34
|
+
<% unless @page.child_of_a_blog? %>
|
35
|
+
<div class="field">
|
36
|
+
<%= f.label :position %>
|
37
|
+
<%= f.select :position, page_position_options(@page) %>
|
38
|
+
</div>
|
39
|
+
<% end %>
|
40
|
+
<div class="field">
|
41
|
+
<%= f.label :footer_position %>
|
42
|
+
<%= f.select :footer_position, page_footer_position_options %>
|
43
|
+
</div>
|
44
|
+
</div>
|
45
|
+
<div class="field">
|
46
|
+
<div class="field">
|
47
|
+
<%= f.label :page_type_id %>
|
48
|
+
<%= f.select :page_type_id, (@page.child_of_a_blog? ? story_type_options : page_type_options) %>
|
49
|
+
</div>
|
50
|
+
<% if @page.alias? %>
|
51
|
+
<div class="field">
|
52
|
+
<%= f.label :alias_page_id %>
|
53
|
+
<%= f.select :alias_page_id, sorted_nested_set_options(@root_page, sort_method) {|i, level| "#{'-' * level} #{limit_length(i.menu_title, 25, false)}" } %>
|
54
|
+
</div>
|
55
|
+
<% end %>
|
56
|
+
<% if @page.child_of_a_blog? %>
|
57
|
+
<div class="field">
|
58
|
+
<%= f.label :tag_list, "Tags: (separated by commas)" %>
|
59
|
+
<%= f.text_field :tag_list %>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<div class="field">
|
63
|
+
<div class="check_box_field">
|
64
|
+
<%= f.check_box :allow_comments %>
|
65
|
+
<%= f.label :allow_comments, "Allow Comments"%>
|
66
|
+
</div>
|
67
|
+
</div>
|
68
|
+
<% end %>
|
69
|
+
|
70
|
+
</div>
|
71
|
+
</fieldset>
|
72
|
+
<fieldset><legend>Publish and Navigation</legend>
|
73
|
+
<div class="field">
|
74
|
+
<div class="check_box_field">
|
75
|
+
<%= f.check_box :is_published %>
|
76
|
+
<%= f.label :is_published, "Publish" %>
|
77
|
+
</div>
|
78
|
+
<div class="field">
|
79
|
+
<%= f.label :publish_at %>
|
80
|
+
<%= f.datetime_select :publish_at, :use_short_month => true, :order => [:month, :day, :year] %>
|
81
|
+
</div>
|
82
|
+
</div>
|
83
|
+
<div class="field">
|
84
|
+
<div class="check_box_field">
|
85
|
+
<%= f.check_box :is_shown_in_main_navigation %>
|
86
|
+
<%= f.label :is_shown_in_main_navigation, "Show in Main Navigation"%>
|
87
|
+
</div>
|
88
|
+
<div class="check_box_field">
|
89
|
+
<%= f.check_box :is_shown_in_secondary_navigation %>
|
90
|
+
<%= f.label :is_shown_in_secondary_navigation, "Show In Secondary Navigation" %>
|
91
|
+
</div>
|
92
|
+
</div>
|
93
|
+
|
94
|
+
</fieldset>
|
95
|
+
|
96
|
+
<!-- for future use -->
|
97
|
+
<!--<fieldset><legend>Super Admin Tools</legend>-->
|
98
|
+
<!--<div class="field">-->
|
99
|
+
<!--<%= f.check_box :is_navigation_locked %>-->
|
100
|
+
<!--<%= f.label :is_navigation_locked, "Lock Navigation" %>-->
|
101
|
+
<!--</div>-->
|
102
|
+
|
103
|
+
<!--<div class="field">-->
|
104
|
+
<!--<%= f.check_box :is_content_locked %>-->
|
105
|
+
<!--<%= f.label :is_content_locked, "Lock Content" %>-->
|
106
|
+
<!--</div>-->
|
107
|
+
|
108
|
+
</fieldset>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
|
2
|
+
<li id="page_link_<%= page.id %>" class="page_link">
|
3
|
+
<% unless page.leaf? %>
|
4
|
+
<span class="page_leaf_title <%= page.is_published? ? "published" : "unpublished" %>" title="<%= page.menu_title %>">
|
5
|
+
<%= image_tag "deluxe_publisher/plus.gif" %>
|
6
|
+
<%= image_tag "deluxe_publisher/minus.gif", :style => "display:none" %>
|
7
|
+
<%= raw limit_length(page.menu_title, 25) %>
|
8
|
+
</span>
|
9
|
+
|
10
|
+
<%= render :partial => 'page_links', :locals => {:page => page} %>
|
11
|
+
|
12
|
+
<ul class="page_directory">
|
13
|
+
<%= render :partial => "page", :collection => @pages.select{|i| i.parent_id == page.id}.sort_by{|p| [p.position, p.publish_at]} %>
|
14
|
+
</ul>
|
15
|
+
<% else %>
|
16
|
+
<span class="page_title <%= page.is_published? ? "published" : "unpublished" %>" title="<%= page.menu_title %>">
|
17
|
+
<%= image_tag "deluxe_publisher/bullet.gif" %>
|
18
|
+
<%= raw limit_length(page.menu_title, 25) %>
|
19
|
+
</span>
|
20
|
+
|
21
|
+
<%= render :partial => 'page_links', :locals => {:page => page} %>
|
22
|
+
<% end %>
|
23
|
+
</li>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
|
2
|
+
<%= f.fields_for :contents, @page.all_contents do |pcf| %>
|
3
|
+
<% descriptor = @page.descriptor_for_position(pcf.object.position) %>
|
4
|
+
<% if descriptor.content_type == "string" %>
|
5
|
+
<div class="content_field">
|
6
|
+
<label><%= descriptor.title %></label>
|
7
|
+
<%= pcf.text_field :html %>
|
8
|
+
</div>
|
9
|
+
<% else %>
|
10
|
+
<div class="content_area">
|
11
|
+
<label><%= descriptor.title %></label>
|
12
|
+
<%= pcf.cktext_area :html, :toolbar=>'Full', :width=>'100%', :height=>'200px' %>
|
13
|
+
</div>
|
14
|
+
<% end %>
|
15
|
+
<%= pcf.hidden_field :position %>
|
16
|
+
<% end %>
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<%= link_to image_tag("deluxe_publisher/show.png") + 'Show', page %>
|
2
|
+
<%= link_to image_tag("deluxe_publisher/edit.png") + 'Edit', edit_deluxe_publisher_page_path(page) %>
|
3
|
+
<%= link_to image_tag("deluxe_publisher/add.png") + 'Copy', new_deluxe_publisher_page_path(:copy_id => page.id) %>
|
4
|
+
<%= link_to image_tag("deluxe_publisher/delete.png") + 'Destroy', page, :confirm => 'Are you sure?', :method => :delete %>
|
5
|
+
<% if page.page_type.function_as == "web_page" %>
|
6
|
+
<%= link_to image_tag("deluxe_publisher/add.png") + 'Add Child', new_deluxe_publisher_page_path(:parent_id => page.id) %>
|
7
|
+
<% elsif page.page_type.function_as == "blog_page" %>
|
8
|
+
<%= link_to image_tag("deluxe_publisher/add.png") + 'Add Story', new_deluxe_publisher_page_path(:parent_id => page.id) %>
|
9
|
+
<% end %>
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<fieldset><legend>Meta</legend>
|
2
|
+
<div class="field">
|
3
|
+
|
4
|
+
<%= f.label :meta_keywords, "Keywords" %>
|
5
|
+
<%= f.text_area :meta_keywords %>
|
6
|
+
</div>
|
7
|
+
<div class="field">
|
8
|
+
<%= f.label :meta_description, "Description" %>
|
9
|
+
<%= f.text_area :meta_description %>
|
10
|
+
</div>
|
11
|
+
</fieldset>
|
12
|
+
|
13
|
+
|
14
|
+
<fieldset><legend>XML Site Map</legend>
|
15
|
+
<div class="field">
|
16
|
+
<%= f.check_box :is_included_in_sitemap%>
|
17
|
+
<%= f.label :is_included_in_sitemap, "Include" %>
|
18
|
+
</div>
|
19
|
+
<div class="field">
|
20
|
+
<%= f.label :sitemap_priority, "Priority" %>
|
21
|
+
<%= f.select :sitemap_priority, (1..10).map {|p| p *0.1} %>
|
22
|
+
</div>
|
23
|
+
<div class="field">
|
24
|
+
<%= f.label :sitemap_change_freq, "Change Frequency" %>
|
25
|
+
<%= f.select :sitemap_change_freq, %w(always hourly daily weekly monthly yearly never) %>
|
26
|
+
</div>
|
27
|
+
</fieldset>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
|
2
|
+
<header>
|
3
|
+
<h3> Listing Pages </h3>
|
4
|
+
</header>
|
5
|
+
<article id="pages_index">
|
6
|
+
<p class="legend">( <span class="published"><img src="/images/deluxe_publisher/icon_published.gif" alt=""> Published</span> <span class="unpublished"><img src="/images/deluxe_publisher/icon_unpublished.gif"> Unpublished</span> )</p>
|
7
|
+
<ul id="top" class="root_directory">
|
8
|
+
<%= render :partial => "page", :collection => @pages.select{|i| i.parent_id == @root_page.id}.sort_by{|p| [p.position, p.publish_at]} %>
|
9
|
+
</ul>
|
10
|
+
<%=link_to 'New Page', new_deluxe_publisher_page_path, :class => "btn_addNewPage" %>
|
11
|
+
</article>
|
@@ -0,0 +1,115 @@
|
|
1
|
+
<p id="notice"><%= notice %></p>
|
2
|
+
|
3
|
+
<p>
|
4
|
+
<b>Site:</b>
|
5
|
+
<%= @page.site_id %>
|
6
|
+
</p>
|
7
|
+
|
8
|
+
<p>
|
9
|
+
<b>Parent:</b>
|
10
|
+
<%= @page.parent_id %>
|
11
|
+
</p>
|
12
|
+
|
13
|
+
<p>
|
14
|
+
<b>Alias page:</b>
|
15
|
+
<%= @page.alias_page_id %>
|
16
|
+
</p>
|
17
|
+
|
18
|
+
<p>
|
19
|
+
<b>Page type:</b>
|
20
|
+
<%= @page.page_type_id %>
|
21
|
+
</p>
|
22
|
+
|
23
|
+
<p>
|
24
|
+
<b>Position:</b>
|
25
|
+
<%= @page.position %>
|
26
|
+
</p>
|
27
|
+
|
28
|
+
<p>
|
29
|
+
<b>Footer position:</b>
|
30
|
+
<%= @page.footer_position %>
|
31
|
+
</p>
|
32
|
+
|
33
|
+
<p>
|
34
|
+
<b>Browser title:</b>
|
35
|
+
<%= @page.browser_title %>
|
36
|
+
</p>
|
37
|
+
|
38
|
+
<p>
|
39
|
+
<b>Page title:</b>
|
40
|
+
<%= @page.page_title %>
|
41
|
+
</p>
|
42
|
+
|
43
|
+
<p>
|
44
|
+
<b>Menu title:</b>
|
45
|
+
<%= @page.menu_title %>
|
46
|
+
</p>
|
47
|
+
|
48
|
+
<p>
|
49
|
+
<b>File name:</b>
|
50
|
+
<%= @page.file_name %>
|
51
|
+
</p>
|
52
|
+
|
53
|
+
<p>
|
54
|
+
<b>Path:</b>
|
55
|
+
<%= @page.path %>
|
56
|
+
</p>
|
57
|
+
|
58
|
+
<p>
|
59
|
+
<b>Is shown in main navigation:</b>
|
60
|
+
<%= @page.is_shown_in_main_navigation %>
|
61
|
+
</p>
|
62
|
+
|
63
|
+
<p>
|
64
|
+
<b>Is shown in secondary navigation:</b>
|
65
|
+
<%= @page.is_shown_in_secondary_navigation %>
|
66
|
+
</p>
|
67
|
+
|
68
|
+
<p>
|
69
|
+
<b>Is published:</b>
|
70
|
+
<%= @page.is_published %>
|
71
|
+
</p>
|
72
|
+
|
73
|
+
<p>
|
74
|
+
<b>Publish at:</b>
|
75
|
+
<%= @page.publish_at %>
|
76
|
+
</p>
|
77
|
+
|
78
|
+
<p>
|
79
|
+
<b>Is navigation locked:</b>
|
80
|
+
<%= @page.is_navigation_locked %>
|
81
|
+
</p>
|
82
|
+
|
83
|
+
<p>
|
84
|
+
<b>Is content locked:</b>
|
85
|
+
<%= @page.is_content_locked %>
|
86
|
+
</p>
|
87
|
+
|
88
|
+
<p>
|
89
|
+
<b>Meta keywords:</b>
|
90
|
+
<%= @page.meta_keywords %>
|
91
|
+
</p>
|
92
|
+
|
93
|
+
<p>
|
94
|
+
<b>Meta description:</b>
|
95
|
+
<%= @page.meta_description %>
|
96
|
+
</p>
|
97
|
+
|
98
|
+
<p>
|
99
|
+
<b>Is included in sitemap:</b>
|
100
|
+
<%= @page.is_included_in_sitemap %>
|
101
|
+
</p>
|
102
|
+
|
103
|
+
<p>
|
104
|
+
<b>Sitemap priority:</b>
|
105
|
+
<%= @page.sitemap_priority %>
|
106
|
+
</p>
|
107
|
+
|
108
|
+
<p>
|
109
|
+
<b>Sitemap change freq:</b>
|
110
|
+
<%= @page.sitemap_change_freq %>
|
111
|
+
</p>
|
112
|
+
|
113
|
+
|
114
|
+
<%= link_to 'Edit', edit_deluxe_publisher_page_path(@page) %> |
|
115
|
+
<%= link_to 'Back', deluxe_publisher_pages_path %>
|
@@ -0,0 +1 @@
|
|
1
|
+
alert("Slap Me");
|
@@ -0,0 +1,7 @@
|
|
1
|
+
$("#new_comment").hide();
|
2
|
+
$("#new_comment").html("<%= escape_javascript( render :partial => "layouts/deluxe_publisher_comment_form") %>");
|
3
|
+
$("#new_deluxe_publisher_comment").submit( function() {
|
4
|
+
$.post(this.action+".js", $(this).serialize(), null, "script");
|
5
|
+
return(false);
|
6
|
+
})
|
7
|
+
$("#new_comment").slideDown();
|
@@ -0,0 +1,29 @@
|
|
1
|
+
<%= form_for(@deluxe_publisher_redirect) do |f| %>
|
2
|
+
<% if @deluxe_publisher_redirect.errors.any? %>
|
3
|
+
<div id="error_explanation">
|
4
|
+
<h2><%= pluralize(@deluxe_publisher_redirect.errors.count, "error") %> prohibited this deluxe_publisher_redirect from being saved:</h2>
|
5
|
+
|
6
|
+
<ul>
|
7
|
+
<% @deluxe_publisher_redirect.errors.full_messages.each do |msg| %>
|
8
|
+
<li><%= msg %></li>
|
9
|
+
<% end %>
|
10
|
+
</ul>
|
11
|
+
</div>
|
12
|
+
<% end %>
|
13
|
+
|
14
|
+
<div class="field">
|
15
|
+
<%= f.label :incoming_url %><br />
|
16
|
+
<%= f.text_field :incoming_url %>
|
17
|
+
</div>
|
18
|
+
<div class="field">
|
19
|
+
<%= f.label :direct_to_url %><br />
|
20
|
+
<%= f.text_field :direct_to_url %>
|
21
|
+
</div>
|
22
|
+
<div class="field">
|
23
|
+
<%= f.label :description %><br />
|
24
|
+
<%= f.text_area :description %>
|
25
|
+
</div>
|
26
|
+
<div class="actions">
|
27
|
+
<%= f.submit %>
|
28
|
+
</div>
|
29
|
+
<% end %>
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<h1>Listing deluxe_publisher_redirects</h1>
|
2
|
+
|
3
|
+
<table>
|
4
|
+
<tr>
|
5
|
+
<th>Incoming url</th>
|
6
|
+
<th>Direct to url</th>
|
7
|
+
<th>Description</th>
|
8
|
+
<th></th>
|
9
|
+
<th></th>
|
10
|
+
<th></th>
|
11
|
+
</tr>
|
12
|
+
|
13
|
+
<% @deluxe_publisher_redirects.each do |deluxe_publisher_redirect| %>
|
14
|
+
<tr>
|
15
|
+
<td><%= deluxe_publisher_redirect.incoming_url %></td>
|
16
|
+
<td><%= deluxe_publisher_redirect.direct_to_url %></td>
|
17
|
+
<td><%= deluxe_publisher_redirect.description %></td>
|
18
|
+
<td><%= link_to 'Show', deluxe_publisher_redirect %></td>
|
19
|
+
<td><%= link_to 'Edit', edit_deluxe_publisher_redirect_path(deluxe_publisher_redirect) %></td>
|
20
|
+
<td><%= link_to 'Destroy', deluxe_publisher_redirect, :confirm => 'Are you sure?', :method => :delete %></td>
|
21
|
+
</tr>
|
22
|
+
<% end %>
|
23
|
+
</table>
|
24
|
+
|
25
|
+
<br />
|
26
|
+
|
27
|
+
<%= link_to 'New Redirect', new_deluxe_publisher_redirect_path %>
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<p id="notice"><%= notice %></p>
|
2
|
+
|
3
|
+
<p>
|
4
|
+
<b>Incoming url:</b>
|
5
|
+
<%= @deluxe_publisher_redirect.incoming_url %>
|
6
|
+
</p>
|
7
|
+
|
8
|
+
<p>
|
9
|
+
<b>Direct to url:</b>
|
10
|
+
<%= @deluxe_publisher_redirect.direct_to_url %>
|
11
|
+
</p>
|
12
|
+
|
13
|
+
<p>
|
14
|
+
<b>Description:</b>
|
15
|
+
<%= @deluxe_publisher_redirect.description %>
|
16
|
+
</p>
|
17
|
+
|
18
|
+
|
19
|
+
<%= link_to 'Edit', edit_deluxe_publisher_redirect_path(@deluxe_publisher_redirect) %> |
|
20
|
+
<%= link_to 'Back', deluxe_publisher_redirects_path %>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
xml.instruct! :xml, :version=>"1.0"
|
2
|
+
xml.urlset(:xmlns => "http://www.sitemaps.org/schemas/sitemap/0.9") do
|
3
|
+
|
4
|
+
for page in @pages
|
5
|
+
xml.url do
|
6
|
+
xml.loc(request.protocol + request.host + page.path)
|
7
|
+
xml.lastmod(page.updated_at.strftime("%Y-%m-%d")) unless page.updated_at.nil?
|
8
|
+
xml.changefreq(page.sitemap_change_freq)
|
9
|
+
xml.priority(page.sitemap_priority)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
|
2
|
+
<article>
|
3
|
+
<%= raw @page.contents[0].html %>
|
4
|
+
</article>
|
5
|
+
|
6
|
+
<section class="blog_stories">
|
7
|
+
<% @page.blog_stories(:year => @year, :month => @month, :day => @day, :tag => @tag).each do |story| %>
|
8
|
+
<article class="blog_story">
|
9
|
+
<header>
|
10
|
+
<h3><%= story.page_title %></h3>
|
11
|
+
<h4><%= story.publish_at.strftime("%B %d, %Y") %></h4>
|
12
|
+
</header>
|
13
|
+
<div class="blog_story_teaser">
|
14
|
+
<%=raw story.contents[0].html %>
|
15
|
+
</div>
|
16
|
+
<%= link_to("Full Story", story.path) unless story.contents[1].html.blank? %>
|
17
|
+
</article>
|
18
|
+
<% end %>
|
19
|
+
</section>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
xml.instruct!
|
2
|
+
|
3
|
+
xml.rss "version" => "2.0", "xmlns:dc" => "http://purl.org/dc/elements/1.1/" do
|
4
|
+
xml.channel do
|
5
|
+
|
6
|
+
xml.title @page.browser_title
|
7
|
+
xml.link deluxe_publisher_present_url(:page_path => @page.path[1..-1], :format => "html")
|
8
|
+
xml.pubDate CGI.rfc1123_date @page.children.first.publish_at if @page.children.any?
|
9
|
+
xml.description @page.browser_title
|
10
|
+
|
11
|
+
@page.children.published.find(:all, :order => "publish_at desc").each do |post|
|
12
|
+
xml.item do
|
13
|
+
xml.title post.browser_title
|
14
|
+
xml.link deluxe_publisher_present_url(post.path[1..-1], :format => "html")
|
15
|
+
xml.description post.contents[0].html
|
16
|
+
xml.pubDate CGI.rfc1123_date post.publish_at
|
17
|
+
xml.guid deluxe_publisher_present_url(post.path[1..-1], :format => "html")
|
18
|
+
xml.author ""
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
<%= form_for(@deluxe_publisher_comment, :url => create_comment_path(@page.path_wo_leading_slash)) do |f| %>
|
2
|
+
|
3
|
+
<% if @deluxe_publisher_comment.errors.any? %>
|
4
|
+
<div id="error_explanation">
|
5
|
+
<h2><%= pluralize(@deluxe_publisher_comment.errors.count, "error") %> prohibited this Comment from being saved:</h2>
|
6
|
+
|
7
|
+
<ul>
|
8
|
+
<% @deluxe_publisher_comment.errors.full_messages.each do |msg| %>
|
9
|
+
<li><%= msg %></li>
|
10
|
+
<% end %>
|
11
|
+
</ul>
|
12
|
+
</div>
|
13
|
+
<% end %>
|
14
|
+
|
15
|
+
|
16
|
+
<div class="field">
|
17
|
+
<%= f.label :body, "Comment" %><br />
|
18
|
+
<%= f.text_area :body %>
|
19
|
+
</div>
|
20
|
+
<div class="field">
|
21
|
+
<%= f.label :author, "Name" %><br />
|
22
|
+
<%= f.text_field :author %>
|
23
|
+
</div>
|
24
|
+
|
25
|
+
<div class="actions">
|
26
|
+
<%= f.submit "Comment" %>
|
27
|
+
</div>
|
28
|
+
|
29
|
+
<% end %>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>Publisher</title>
|
5
|
+
<%= stylesheet_link_tag :all %>
|
6
|
+
<%= javascript_include_tag "jquery.min", "jquery-ui.min", "application", "rails" %>
|
7
|
+
<%= csrf_meta_tag %>
|
8
|
+
</head>
|
9
|
+
<body>
|
10
|
+
|
11
|
+
<%= yield %>
|
12
|
+
|
13
|
+
</body>
|
14
|
+
</html>
|
@@ -0,0 +1,36 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
|
5
|
+
<%= stylesheet_link_tag 'deluxe_publisher' %>
|
6
|
+
<%= javascript_include_tag "https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js",
|
7
|
+
"https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.11/jquery-ui.min.js",
|
8
|
+
"ckeditor/ckeditor",
|
9
|
+
"deluxe_publisher",
|
10
|
+
"jquery-rails"
|
11
|
+
%>
|
12
|
+
|
13
|
+
<script>
|
14
|
+
document.createElement("nav");
|
15
|
+
document.createElement("header");
|
16
|
+
document.createElement("footer");
|
17
|
+
document.createElement("section");
|
18
|
+
document.createElement("aside");
|
19
|
+
document.createElement("article");
|
20
|
+
</script>
|
21
|
+
<%= csrf_meta_tag %>
|
22
|
+
<title><%= DeluxePublisher.publisher_title %></title>
|
23
|
+
</head>
|
24
|
+
<body>
|
25
|
+
<header id = "page_header">
|
26
|
+
<h2><a href="http://www.ddmweb.com"><span>Deluxe Digital Media</span></a></h2>
|
27
|
+
<h1><%= DeluxePublisher.publisher_title %></h1>
|
28
|
+
</header>
|
29
|
+
<section id = "content">
|
30
|
+
<%= yield %>
|
31
|
+
</section>
|
32
|
+
<footer>
|
33
|
+
<p> Created by Deluxe Digital Media</p>
|
34
|
+
</footer>
|
35
|
+
</body>
|
36
|
+
</html>
|