wheels 0.1.10 → 0.1.11
Sign up to get free protection for your applications and to get access to all the features.
- data/README +2 -0
- data/Rakefile +22 -22
- data/lib/{generators/core_extensions.rb → core_extensions.rb} +2 -2
- data/lib/generators/{recipes → wheels/recipes}/cancan.rb +0 -0
- data/lib/generators/{recipes → wheels/recipes}/cucumber.rb +0 -0
- data/lib/generators/{recipes → wheels/recipes}/default.rb +0 -0
- data/lib/generators/{recipes → wheels/recipes}/design.rb +0 -0
- data/lib/generators/{recipes → wheels/recipes}/devise.rb +0 -0
- data/lib/generators/{recipes → wheels/recipes}/factory_girl.rb +0 -0
- data/lib/generators/{recipes → wheels/recipes}/haml.rb +0 -0
- data/lib/generators/{recipes → wheels/recipes}/jquery.rb +0 -0
- data/lib/generators/{recipes → wheels/recipes}/mongoid.rb +0 -0
- data/lib/generators/{recipes → wheels/recipes}/postgresql.rb +0 -0
- data/lib/generators/wheels/recipes/public.rb +9 -0
- data/lib/generators/{recipes → wheels/recipes}/recipes.rb +0 -0
- data/lib/generators/{recipes → wheels/recipes}/remarkable.rb +0 -0
- data/lib/generators/{recipes → wheels/recipes}/rspec.rb +0 -0
- data/lib/generators/{recipes → wheels/recipes}/wheels.rb +0 -0
- data/lib/generators/{snippets → wheels/snippets}/cucumber/database_config +0 -0
- data/lib/generators/{templates → wheels/templates}/cancan/ability.rb +0 -0
- data/lib/generators/{templates → wheels/templates}/database/postgresql.yml +0 -0
- data/lib/generators/{templates → wheels/templates}/git/gitignore +0 -0
- data/lib/generators/{templates → wheels/templates}/haml/app/views/layouts/application.html.haml +0 -0
- data/lib/generators/{templates → wheels/templates}/mongoid/features/step_definitions/mongoid_steps.rb +0 -0
- data/lib/generators/{templates → wheels/templates}/mongoid/features/support/hooks.rb +0 -0
- data/lib/generators/wheels/wheels_generator.rb +0 -2
- data/lib/generators/wheels_update/core_extensions.3.rb +64 -0
- data/lib/generators/{recipes/wheels_update.rb → wheels_update/recipes/wheels.rb} +0 -0
- data/lib/generators/wheels_update/wheels_update_generator.rb +1 -1
- data/lib/wheels/base.rb +7 -0
- data/lib/wheels/routes.rb +2 -13
- data/test/functional/access_control_entries_controller_test.rb +49 -0
- data/test/functional/app_configs_controller_test.rb +49 -0
- data/test/functional/discussions_controller_test.rb +49 -0
- data/test/functional/external_links_controller_test.rb +49 -0
- data/test/functional/feedback_mailer_test.rb +8 -0
- data/test/functional/feedbacks_controller_test.rb +49 -0
- data/test/functional/forums_controller_test.rb +49 -0
- data/test/functional/layouts_controller_test.rb +49 -0
- data/test/functional/member_pages_controller_test.rb +49 -0
- data/test/functional/members_controller_test.rb +8 -0
- data/test/functional/menus_controller_test.rb +49 -0
- data/test/functional/pages_controller_test.rb +49 -0
- data/test/functional/product_revisions_controller_test.rb +49 -0
- data/test/performance/browsing_test.rb +9 -0
- data/test/test_helper.rb +13 -0
- data/test/unit/access_control_entry_test.rb +8 -0
- data/test/unit/app_config_test.rb +8 -0
- data/test/unit/attachment_test.rb +8 -0
- data/test/unit/discussion_test.rb +8 -0
- data/test/unit/external_link_test.rb +8 -0
- data/test/unit/feedback_test.rb +8 -0
- data/test/unit/forum_message_test.rb +8 -0
- data/test/unit/forum_test.rb +8 -0
- data/test/unit/helpers/access_control_entries_helper_test.rb +4 -0
- data/test/unit/helpers/app_configs_helper_test.rb +4 -0
- data/test/unit/helpers/discussions_helper_test.rb +4 -0
- data/test/unit/helpers/external_links_helper_test.rb +4 -0
- data/test/unit/helpers/feedbacks_helper_test.rb +4 -0
- data/test/unit/helpers/forums_helper_test.rb +4 -0
- data/test/unit/helpers/layouts_helper_test.rb +4 -0
- data/test/unit/helpers/member_pages_helper_test.rb +4 -0
- data/test/unit/helpers/members_helper_test.rb +4 -0
- data/test/unit/helpers/menus_helper_test.rb +4 -0
- data/test/unit/helpers/pages_helper_test.rb +4 -0
- data/test/unit/helpers/product_revisions_helper_test.rb +4 -0
- data/test/unit/layout_test.rb +8 -0
- data/test/unit/member_page_test.rb +8 -0
- data/test/unit/menu_test.rb +8 -0
- data/test/unit/page_revision_test.rb +8 -0
- data/test/unit/page_test.rb +8 -0
- data/test/unit/product_revision_test.rb +8 -0
- data/test/unit/settings_test.rb +8 -0
- data/test/unit/sitemap_test.rb +8 -0
- data/test/unit/user_test.rb +8 -0
- data/wheels.gemspec +122 -252
- metadata +124 -266
- data/LICENSE +0 -20
- data/README.rdoc +0 -17
- data/VERSION +0 -1
- data/app/controllers/access_control_entries_controller.rb +0 -20
- data/app/controllers/app_configs_controller.rb +0 -17
- data/app/controllers/application_controller.rb +0 -39
- data/app/controllers/attachments_controller.rb +0 -16
- data/app/controllers/blogs_controller.rb +0 -39
- data/app/controllers/discussions_controller.rb +0 -10
- data/app/controllers/external_links_controller.rb +0 -5
- data/app/controllers/feedbacks_controller.rb +0 -10
- data/app/controllers/forum_messages_controller.rb +0 -13
- data/app/controllers/forums_controller.rb +0 -2
- data/app/controllers/galleries_controller.rb +0 -60
- data/app/controllers/images_controller.rb +0 -30
- data/app/controllers/menus_controller.rb +0 -2
- data/app/controllers/pages_controller.rb +0 -71
- data/app/controllers/profiles_controller.rb +0 -16
- data/app/controllers/sitemaps_controller.rb +0 -135
- data/app/controllers/users_controller.rb +0 -28
- data/app/helpers/access_control_entries_helper.rb +0 -2
- data/app/helpers/app_configs_helper.rb +0 -2
- data/app/helpers/application_helper.rb +0 -36
- data/app/helpers/blogs_helper.rb +0 -10
- data/app/helpers/discussions_helper.rb +0 -2
- data/app/helpers/external_links_helper.rb +0 -2
- data/app/helpers/feedbacks_helper.rb +0 -2
- data/app/helpers/forums_helper.rb +0 -2
- data/app/helpers/menus_helper.rb +0 -2
- data/app/helpers/pages_helper.rb +0 -192
- data/app/helpers/sitemaps_helper.rb +0 -12
- data/app/mailers/feedback_mailer.rb +0 -10
- data/app/models/ability.rb +0 -43
- data/app/models/access_control_entry.rb +0 -100
- data/app/models/app_config.rb +0 -26
- data/app/models/attachment.rb +0 -10
- data/app/models/blog.rb +0 -10
- data/app/models/discussion.rb +0 -19
- data/app/models/external_link.rb +0 -4
- data/app/models/feedback.rb +0 -11
- data/app/models/forum.rb +0 -4
- data/app/models/forum_message.rb +0 -5
- data/app/models/gallery.rb +0 -5
- data/app/models/image.rb +0 -10
- data/app/models/menu.rb +0 -4
- data/app/models/page.rb +0 -7
- data/app/models/page_revision.rb +0 -2
- data/app/models/profile.rb +0 -12
- data/app/models/role.rb +0 -29
- data/app/models/s3_provider.rb +0 -84
- data/app/models/sitemap.rb +0 -171
- data/app/models/tagging.rb +0 -4
- data/app/models/user.rb +0 -69
- data/app/validators/email_validator.rb +0 -22
- data/app/views/access_control_entries/_form.html.haml +0 -33
- data/app/views/access_control_entries/_index.html.haml +0 -46
- data/app/views/access_control_entries/_show.html.haml +0 -12
- data/app/views/access_control_entries/create.js.haml +0 -3
- data/app/views/access_control_entries/destroy.js.haml +0 -3
- data/app/views/access_control_entries/edit.html.haml +0 -7
- data/app/views/access_control_entries/edit.js.haml +0 -3
- data/app/views/access_control_entries/index.html.haml +0 -2
- data/app/views/access_control_entries/index.js.haml +0 -3
- data/app/views/access_control_entries/new.html.haml +0 -5
- data/app/views/access_control_entries/new.js.haml +0 -3
- data/app/views/access_control_entries/show.html.haml +0 -2
- data/app/views/access_control_entries/show.js.haml +0 -4
- data/app/views/access_control_entries/update.js.haml +0 -3
- data/app/views/app_configs/_form.html.haml +0 -11
- data/app/views/app_configs/_index.html.haml +0 -6
- data/app/views/app_configs/_show.html.haml +0 -4
- data/app/views/app_configs/create.js.haml +0 -3
- data/app/views/app_configs/css.css.haml +0 -2
- data/app/views/app_configs/destroy.js.haml +0 -3
- data/app/views/app_configs/edit.html.haml +0 -2
- data/app/views/app_configs/edit.js.haml +0 -3
- data/app/views/app_configs/index.html.haml +0 -2
- data/app/views/app_configs/index.js.haml +0 -3
- data/app/views/app_configs/new.html.haml +0 -2
- data/app/views/app_configs/new.js.haml +0 -3
- data/app/views/app_configs/show.html.haml +0 -2
- data/app/views/app_configs/show.js.haml +0 -3
- data/app/views/app_configs/update.js.haml +0 -3
- data/app/views/attachments/_form.html.haml +0 -26
- data/app/views/attachments/_index.html.haml +0 -9
- data/app/views/attachments/_show.html.haml +0 -6
- data/app/views/attachments/_uploadify.html.erb +0 -12
- data/app/views/attachments/create.js.haml +0 -3
- data/app/views/attachments/destroy.js.haml +0 -3
- data/app/views/attachments/edit.js.haml +0 -3
- data/app/views/attachments/index.html.haml +0 -2
- data/app/views/attachments/index.js.haml +0 -3
- data/app/views/attachments/new.html.haml +0 -3
- data/app/views/attachments/new.js.haml +0 -3
- data/app/views/attachments/show.html.haml +0 -2
- data/app/views/attachments/show.js.haml +0 -3
- data/app/views/attachments/update.js.haml +0 -3
- data/app/views/blogs/_form.html.haml +0 -22
- data/app/views/blogs/edit.html.haml +0 -8
- data/app/views/blogs/index.html.haml +0 -21
- data/app/views/blogs/index.xml.builder +0 -27
- data/app/views/blogs/new.html.haml +0 -6
- data/app/views/blogs/show.html.haml +0 -25
- data/app/views/discussions/_form.html.haml +0 -16
- data/app/views/discussions/edit.html.haml +0 -7
- data/app/views/discussions/index.html.haml +0 -10
- data/app/views/discussions/new.html.haml +0 -25
- data/app/views/discussions/show.html.haml +0 -16
- data/app/views/external_links/_fields_for.html.haml +0 -2
- data/app/views/external_links/_form.html.haml +0 -18
- data/app/views/external_links/_show.html.haml +0 -7
- data/app/views/external_links/create.js.haml +0 -3
- data/app/views/external_links/destroy.js.haml +0 -3
- data/app/views/external_links/edit.html.haml +0 -7
- data/app/views/external_links/edit.js.haml +0 -3
- data/app/views/external_links/index.html.haml +0 -23
- data/app/views/external_links/index.js.haml +0 -3
- data/app/views/external_links/new.html.haml +0 -5
- data/app/views/external_links/new.js.haml +0 -3
- data/app/views/external_links/show.html.haml +0 -2
- data/app/views/external_links/show.js.haml +0 -3
- data/app/views/external_links/update.js.haml +0 -3
- data/app/views/feedback_mailer/submit_feedback.html.haml +0 -22
- data/app/views/feedbacks/_form.html.haml +0 -37
- data/app/views/feedbacks/index.html.haml +0 -27
- data/app/views/feedbacks/new.html.haml +0 -6
- data/app/views/feedbacks/show.html.haml +0 -19
- data/app/views/forum_messages/_form.html.haml +0 -6
- data/app/views/forum_messages/index.html.haml +0 -11
- data/app/views/forum_messages/new.html.haml +0 -5
- data/app/views/forums/_form.html.haml +0 -13
- data/app/views/forums/edit.html.haml +0 -7
- data/app/views/forums/index.html.haml +0 -23
- data/app/views/forums/new.html.haml +0 -5
- data/app/views/forums/show.html.haml +0 -20
- data/app/views/galleries/_form.html.haml +0 -30
- data/app/views/galleries/_show.html.haml +0 -21
- data/app/views/galleries/edit.html.haml +0 -7
- data/app/views/galleries/index.html.haml +0 -15
- data/app/views/galleries/new.html.haml +0 -5
- data/app/views/galleries/show.html.haml +0 -4
- data/app/views/images/_form.html.haml +0 -10
- data/app/views/images/create.js.haml +0 -3
- data/app/views/images/destroy.js.haml +0 -3
- data/app/views/images/edit.html.haml +0 -7
- data/app/views/images/edit.js.haml +0 -3
- data/app/views/images/index.html.haml +0 -17
- data/app/views/images/index.js.haml +0 -3
- data/app/views/images/new.html.haml +0 -5
- data/app/views/images/new.js.haml +0 -3
- data/app/views/images/show.html.haml +0 -5
- data/app/views/images/show.js.haml +0 -3
- data/app/views/images/update.js.haml +0 -3
- data/app/views/layouts/application.html.haml +0 -59
- data/app/views/layouts/bare.html.haml +0 -2
- data/app/views/layouts/image_dialog.html.haml +0 -18
- data/app/views/loadbehind/_destroy.js.haml +0 -3
- data/app/views/loadbehind/_edit.js.haml +0 -4
- data/app/views/loadbehind/_errors.html.haml +0 -5
- data/app/views/loadbehind/_growl_template.html.haml +0 -65
- data/app/views/loadbehind/_show_box.html.haml +0 -9
- data/app/views/loadbehind/_view.js.haml +0 -4
- data/app/views/loadbehind/growl.js.haml +0 -4
- data/app/views/loadbehind/index.js.haml +0 -4
- data/app/views/menus/_form.html.haml +0 -13
- data/app/views/menus/edit.html.haml +0 -7
- data/app/views/menus/index.html.haml +0 -19
- data/app/views/menus/new.html.haml +0 -5
- data/app/views/menus/show.html.haml +0 -7
- data/app/views/pages/_child_pages_links.html.haml +0 -5
- data/app/views/pages/_control_panel.html.haml +0 -15
- data/app/views/pages/_form.html.haml +0 -27
- data/app/views/pages/_form_fields.html.haml +0 -23
- data/app/views/pages/_show.html.haml +0 -4
- data/app/views/pages/_show_attachment.html.haml +0 -6
- data/app/views/pages/_show_small.html.haml +0 -2
- data/app/views/pages/create.js.haml +0 -3
- data/app/views/pages/destroy.js.haml +0 -3
- data/app/views/pages/edit.html.haml +0 -16
- data/app/views/pages/edit.js.haml +0 -4
- data/app/views/pages/index.html.haml +0 -19
- data/app/views/pages/index.js.haml +0 -3
- data/app/views/pages/new.html.haml +0 -5
- data/app/views/pages/new.js.haml +0 -3
- data/app/views/pages/show.html.haml +0 -20
- data/app/views/pages/show.js.haml +0 -3
- data/app/views/pages/update.js.haml +0 -3
- data/app/views/profiles/_form.html.haml +0 -26
- data/app/views/profiles/edit.html.haml +0 -7
- data/app/views/profiles/index.html.haml +0 -25
- data/app/views/profiles/new.html.haml +0 -5
- data/app/views/profiles/show.html.haml +0 -21
- data/app/views/sitemaps/edit.html.haml +0 -12
- data/app/views/sitemaps/edit.js.erb +0 -0
- data/app/views/sitemaps/index.html.haml +0 -83
- data/app/views/sitemaps/index.json.erb +0 -23
- data/app/views/sitemaps/new.html.haml +0 -8
- data/app/views/sitemaps/new.js.erb +0 -0
- data/app/views/users/edit.html.haml +0 -45
- data/app/views/users/index.html.haml +0 -19
- data/config/amazon_s3.yml +0 -15
- data/db/migrate/0000_devise_create_users.rb +0 -26
- data/db/migrate/0010_add_fields_to_users.rb +0 -28
- data/db/migrate/0020_create_blogs.rb +0 -16
- data/db/migrate/0030_create_galleries.rb +0 -15
- data/db/migrate/0040_create_images.rb +0 -17
- data/db/migrate/0050_create_profiles.rb +0 -24
- data/db/migrate/0060_insert_admin_user_and_roles.rb +0 -24
- data/db/migrate/0070_create_pages.rb +0 -16
- data/db/migrate/0080_create_forums.rb +0 -13
- data/db/migrate/0090_create_discussions.rb +0 -14
- data/db/migrate/0100_create_forum_messages.rb +0 -15
- data/db/migrate/0110_create_access_control_entries.rb +0 -23
- data/db/migrate/0120_create_attachments.rb +0 -17
- data/db/migrate/0130_create_roles.rb +0 -13
- data/db/migrate/0140_create_feedbacks.rb +0 -20
- data/db/migrate/0150_create_external_links.rb +0 -14
- data/db/migrate/0160_create_sitemaps.rb +0 -17
- data/db/migrate/0170_create_menus.rb +0 -14
- data/db/migrate/0180_acts_as_taggable_on_migration.rb +0 -28
- data/init.rb +0 -2
@@ -1,46 +0,0 @@
|
|
1
|
-
%h1 Listing Access Control Entries for #{parent.class.name} #{parent.id}
|
2
|
-
|
3
|
-
%ul.listing#ace_listing
|
4
|
-
- @access_control_entries.each do |ace|
|
5
|
-
%li
|
6
|
-
%ul.ace{:id=>ace.element_id}
|
7
|
-
%li= ace.user.email if ace.user
|
8
|
-
%li= ace.role.name if ace.role
|
9
|
-
%li= ace.can ? "Can" : "Cannot"
|
10
|
-
%li= ace.verb
|
11
|
-
%li= ace.resource_type
|
12
|
-
%li= ace.options_str if ace.options_str
|
13
|
-
- if can? :edit, ace
|
14
|
-
%li= link_to "Edit", edit_access_control_entry_path(ace), :remote=>true
|
15
|
-
- if can? :destroy, ace
|
16
|
-
%li= link_to "X", ace, :method=>:delete, :remote=>true, "data-confirm"=>"Are you sure?"
|
17
|
-
|
18
|
-
- if can? :create, AccessControlEntry
|
19
|
-
%h2 Enter a new Access Control Entry
|
20
|
-
= form_for new_ace, :remote=>true do |f|
|
21
|
-
= hidden_field_tag :container, "ace_listing"
|
22
|
-
= hidden_field_tag :ajax_function, "append"
|
23
|
-
%ul.ace_form_fields
|
24
|
-
%li
|
25
|
-
.name Email
|
26
|
-
= f.text_field :user_email, :class=>"email"
|
27
|
-
%li
|
28
|
-
.name Role
|
29
|
-
= f.select :role, Role.collection_entries
|
30
|
-
%li
|
31
|
-
.name Can?
|
32
|
-
= f.check_box :can
|
33
|
-
%li
|
34
|
-
.name verb
|
35
|
-
= f.text_field :verb, :class=>"verb"
|
36
|
-
%li
|
37
|
-
.name Resource
|
38
|
-
= f.select :resource_type, [["Forum", "Forum"], ["Page", "Page"]]
|
39
|
-
= f.hidden_field :resource_id
|
40
|
-
%li
|
41
|
-
.name options
|
42
|
-
= f.text_field :options_str, :class=>"verb"
|
43
|
-
|
44
|
-
%li
|
45
|
-
= f.submit 'Save', :disable_with=>"Saving..."
|
46
|
-
|
@@ -1,12 +0,0 @@
|
|
1
|
-
%ul.ace{:id=>resource.element_id}
|
2
|
-
%li= resource.user.email if resource.user
|
3
|
-
%li= resource.role.name if resource.role
|
4
|
-
%li= resource.can ? "Can" : "Cannot"
|
5
|
-
%li= resource.verb
|
6
|
-
%li= resource.resource_type
|
7
|
-
%li= resource.options_str if resource.options_str
|
8
|
-
- if can? :edit, resource
|
9
|
-
%li= link_to "Edit", edit_access_control_entry_path(resource), :remote=>true
|
10
|
-
- if can? :destroy, resource
|
11
|
-
%li= link_to "X", resource, :method=>:delete, :remote=>true, "data-confirm"=>"Are you sure?"
|
12
|
-
|
@@ -1,11 +0,0 @@
|
|
1
|
-
= form_for resource, :remote=>true do |f|
|
2
|
-
= hidden_field_tag :container, 'content_pane'
|
3
|
-
= hidden_field_tag :ajax_function, 'html'
|
4
|
-
.field
|
5
|
-
.fieldName Name:
|
6
|
-
.fieldValue= f.text_field :name
|
7
|
-
.field
|
8
|
-
.fieldName Value:
|
9
|
-
.fieldValue.text_area= f.text_area :value
|
10
|
-
.field= f.submit "Save", :disable_with=>"Saving..."
|
11
|
-
|
@@ -1,26 +0,0 @@
|
|
1
|
-
-if resource.errors.any?
|
2
|
-
#errorExplanation
|
3
|
-
%h2= "#{pluralize(resource.errors.count, "error")} prohibited this image from being saved:"
|
4
|
-
%ul
|
5
|
-
- resource.errors.full_messages.each do |msg|
|
6
|
-
%li= msg
|
7
|
-
|
8
|
-
= form_for [@page, Attachment.new(:page=>@page)], :remote=>true, :html=>{:multipart=>true, :id=>"upload_form"} do |f|
|
9
|
-
= f.file_field :file, :id=>"file_input"
|
10
|
-
= f.hidden_field :file_file_name, :id=>"file_file_name_input"
|
11
|
-
= f.hidden_field :file_file_size, :id=>"file_file_size_input"
|
12
|
-
= f.hidden_field :file_content_type, :id=>"file_content_type_input"
|
13
|
-
= f.hidden_field :file_updated_at, :id=>"file_updated_at_input"
|
14
|
-
= f.submit "Upload File", :id=>"upload_button"
|
15
|
-
|
16
|
-
= content_for :head do
|
17
|
-
= javascript_include_tag *%w(swfobject jquery.uploadify)
|
18
|
-
:javascript
|
19
|
-
$(function(){
|
20
|
-
$('#upload_button').hide();
|
21
|
-
});
|
22
|
-
|
23
|
-
= uploadify_s3(:file_input_selector => '#file_input', :button_text => 'Add File', |
|
24
|
-
:on_success => %(function(f) {submitFileForm(f.name, f.size, f.type)}), |
|
25
|
-
:on_error => %(function(type, text) {alert("Problem during file upload type: " + type + " text: " + text);}))
|
26
|
-
|
@@ -1,12 +0,0 @@
|
|
1
|
-
$(function(){
|
2
|
-
$('#upload_button').hide();
|
3
|
-
});
|
4
|
-
|
5
|
-
function submitFileForm(fileName, fileSize, updatedAt, contentType) {
|
6
|
-
$('#file_file_name_input').val(fileName);
|
7
|
-
$('#file_file_size_input').val(fileSize);
|
8
|
-
$('#file_update_at').val(updatedAt);
|
9
|
-
$('#file_content_type').val(contentType);
|
10
|
-
$('#upload_form').submit();
|
11
|
-
}
|
12
|
-
|
@@ -1,22 +0,0 @@
|
|
1
|
-
- include_ckeditor
|
2
|
-
|
3
|
-
= form_for [@blog.user, @blog], :html=>{:multipart=>true} do |f|
|
4
|
-
-if @blog.errors.any?
|
5
|
-
#errorExplanation
|
6
|
-
%h2= "#{pluralize(@blog.errors.count, "error")} prohibited this blog from being saved:"
|
7
|
-
%ul
|
8
|
-
- @blog.errors.full_messages.each do |msg|
|
9
|
-
%li= msg
|
10
|
-
|
11
|
-
.field
|
12
|
-
.fieldTitle Title
|
13
|
-
= f.text_field :title
|
14
|
-
.field
|
15
|
-
.fieldTitle Body
|
16
|
-
= f.text_area :body, :class=>'ckeditor_textarea'
|
17
|
-
.field
|
18
|
-
.fieldTitle Tags:
|
19
|
-
.tag_list= f.text_field :tag_list
|
20
|
-
.actions
|
21
|
-
= f.submit 'Save'
|
22
|
-
|
@@ -1,21 +0,0 @@
|
|
1
|
-
%h1= @user.profile.blog_title
|
2
|
-
|
3
|
-
- collection.each do |blog|
|
4
|
-
.entry
|
5
|
-
.entry-title= link_to blog.title, resource_url(blog)
|
6
|
-
|
7
|
-
.date Posted on #{blog.created_at}
|
8
|
-
.blog_body!= blog.body
|
9
|
-
.comments
|
10
|
-
%a{:href => "#"} 3 comments
|
11
|
-
|
12
|
-
|
13
|
-
- if current_user.try(:id) == @user.id
|
14
|
-
= link_to 'New Blog Post', new_user_blog_path(@user)
|
15
|
-
|
16
|
-
= will_paginate collection
|
17
|
-
|
18
|
-
- content_for(:tags) do
|
19
|
-
- for tag in tags
|
20
|
-
%li= link_to tag.name, user_blogs_path(@user, :tag=>tag.name)
|
21
|
-
|
@@ -1,27 +0,0 @@
|
|
1
|
-
xml.instruct!
|
2
|
-
|
3
|
-
xml.feed "xmlns" => "http://www.w3.org/2005/Atom" do
|
4
|
-
|
5
|
-
xml.title "Feed Name"
|
6
|
-
xml.link "rel" => "self", "href" => user_blogs_path(@user, :only_path=>false, :format=>:xml)
|
7
|
-
# xml.link "rel" => "alternate", "href" => url_for(:only_path => false, :controller => 'posts')
|
8
|
-
xml.id user_blogs_path(@user, :only_path => false)
|
9
|
-
xml.updated @blogs.first.updated_at.strftime "%Y-%m-%dT%H:%M:%SZ" if @blogs.any?
|
10
|
-
xml.author { xml.name @blogs.first }
|
11
|
-
|
12
|
-
@blogs.each do |post|
|
13
|
-
xml.entry do
|
14
|
-
xml.title post.title
|
15
|
-
xml.link "rel" => "alternate", "href" => user_blogs_path(@user, post, :only_path => false)
|
16
|
-
xml.id user_blog_path(@user, post, :only_path => false)
|
17
|
-
xml.updated post.updated_at.strftime "%Y-%m-%dT%H:%M:%SZ"
|
18
|
-
xml.author { xml.name post.user.email }
|
19
|
-
xml.summary "Post summary"
|
20
|
-
xml.content "type" => "html" do
|
21
|
-
xml.cdata! post.body
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
end
|
27
|
-
|
@@ -1,25 +0,0 @@
|
|
1
|
-
|
2
|
-
.entry
|
3
|
-
.entry-title= link_to resource.title, resource_url(resource)
|
4
|
-
|
5
|
-
.date Posted on #{resource.created_at}
|
6
|
-
.blog_body!= resource.body
|
7
|
-
.tags!= tag_list resource
|
8
|
-
|
9
|
-
.comments
|
10
|
-
%a{:href => "#"} 3 comments
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
= will_paginate collection
|
15
|
-
|
16
|
-
- content_for(:tags) do
|
17
|
-
- for tag in tags
|
18
|
-
%li= link_to tag.name, user_blogs_path(parent, :tag=>tag.name)
|
19
|
-
|
20
|
-
|
21
|
-
= link_to 'Back', collection_url
|
22
|
-
= link_to '| Edit', edit_resource_url if can? :edit, resource
|
23
|
-
- if current_user.try(:id) == parent.id
|
24
|
-
= link_to '| New Blog Post', new_user_blog_path(parent)
|
25
|
-
|
@@ -1,16 +0,0 @@
|
|
1
|
-
= form_for @discussion do |f|
|
2
|
-
-if @discussion.errors.any?
|
3
|
-
#errorExplanation
|
4
|
-
%h2= "#{pluralize(@discussion.errors.count, "error")} prohibited this discussion from being saved:"
|
5
|
-
%ul
|
6
|
-
- @discussion.errors.full_messages.each do |msg|
|
7
|
-
%li= msg
|
8
|
-
|
9
|
-
.field
|
10
|
-
= f.label :subject
|
11
|
-
= f.text_field :subject
|
12
|
-
.field
|
13
|
-
= f.label :forum_id
|
14
|
-
= f.text_field :forum_id
|
15
|
-
.actions
|
16
|
-
= f.submit 'Save'
|
@@ -1,10 +0,0 @@
|
|
1
|
-
%h1 Listing discussions in forum #{@forum.name}
|
2
|
-
= link_to 'New discussion', new_resource_url if can? :create, Discussion, :forum_id=>@forum.id
|
3
|
-
|
4
|
-
%ul
|
5
|
-
- for discussion in @discussions.sort{|u,v| u.updated_at <=> v.update_at}
|
6
|
-
%li
|
7
|
-
= link_to discussion.subject, url_for([@forum, discussion])
|
8
|
-
- if can? :manage, discussion
|
9
|
-
= link_to "Manage", edit_forum_discussion_path(@forum, discussion)
|
10
|
-
|
@@ -1,25 +0,0 @@
|
|
1
|
-
%h1 New discussion
|
2
|
-
- include_ckeditor
|
3
|
-
= form_for [@forum, @discussion] do |f|
|
4
|
-
-if @discussion.errors.any?
|
5
|
-
#errorExplanation
|
6
|
-
%h2= "#{pluralize(@discussion.errors.count, "error")} prohibited this discussion from being saved:"
|
7
|
-
%ul
|
8
|
-
- @discussion.errors.full_messages.each do |msg|
|
9
|
-
%li= msg
|
10
|
-
|
11
|
-
%ul.form_fields
|
12
|
-
%li.field
|
13
|
-
= f.label :subject
|
14
|
-
= f.text_field :subject
|
15
|
-
= f.hidden_field :forum_id
|
16
|
-
%li.field
|
17
|
-
= f.fields_for :new_message, @new_message do |ff|
|
18
|
-
= ff.hidden_field :author_id
|
19
|
-
%ul.form_fields
|
20
|
-
%li.field= ff.text_area :message, :class=>'ckeditor_textarea'
|
21
|
-
.actions
|
22
|
-
= f.submit 'Create new discussion'
|
23
|
-
|
24
|
-
= link_to 'Back', collection_url
|
25
|
-
|
@@ -1,16 +0,0 @@
|
|
1
|
-
%h2 #{@forum.name} > #{@discussion.subject}
|
2
|
-
|
3
|
-
%ul
|
4
|
-
- for message in @discussion.forum_messages
|
5
|
-
%li
|
6
|
-
.named_box
|
7
|
-
.box_title
|
8
|
-
Posted By #{message.author.email} on #{message.updated_at}
|
9
|
-
.box_content!= message.message
|
10
|
-
|
11
|
-
= content_for :links do
|
12
|
-
%ul
|
13
|
-
- if can? :create, Discussion, :forum_id=>@forum.id
|
14
|
-
%li= link_to "Reply to this discussion", new_forum_discussion_forum_message_path(@forum, @discussion)
|
15
|
-
%li= link_to 'Back to Forum', @forum
|
16
|
-
|
@@ -1,18 +0,0 @@
|
|
1
|
-
= form_for @external_link, :remote=>true do |f|
|
2
|
-
-if @external_link.errors.any?
|
3
|
-
#errorExplanation
|
4
|
-
%h2= "#{pluralize(@external_link.errors.count, "error")} prohibited this external_link from being saved:"
|
5
|
-
%ul
|
6
|
-
- @external_link.errors.full_messages.each do |msg|
|
7
|
-
%li= msg
|
8
|
-
.field
|
9
|
-
= f.label :url
|
10
|
-
= f.text_field :url
|
11
|
-
.field
|
12
|
-
= f.label :link_text
|
13
|
-
= f.text_area :link_text
|
14
|
-
= hidden_field_tag :container, 'content_pane'
|
15
|
-
= hidden_field_tag :ajax_function, 'html'
|
16
|
-
.actions
|
17
|
-
= f.submit 'Save', :disable_with=>"Saving..."
|
18
|
-
|
@@ -1,23 +0,0 @@
|
|
1
|
-
%h1 Listing external_links
|
2
|
-
|
3
|
-
%table
|
4
|
-
%tr
|
5
|
-
%th Page
|
6
|
-
%th Url
|
7
|
-
%th Link text
|
8
|
-
%th
|
9
|
-
%th
|
10
|
-
%th
|
11
|
-
|
12
|
-
- @external_links.each do |external_link|
|
13
|
-
%tr
|
14
|
-
%td= external_link.page_id
|
15
|
-
%td= external_link.url
|
16
|
-
%td= external_link.link_text
|
17
|
-
%td= link_to 'Show', external_link
|
18
|
-
%td= link_to 'Edit', edit_external_link_path(external_link)
|
19
|
-
%td= link_to 'Destroy', external_link, :confirm => 'Are you sure?', :method => :delete
|
20
|
-
|
21
|
-
%br
|
22
|
-
|
23
|
-
= link_to 'New external_link', new_external_link_path
|