wheels 0.1.11 → 0.1.12
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +20 -0
- data/README.rdoc +17 -0
- data/Rakefile +22 -22
- data/VERSION +1 -0
- data/app/controllers/access_control_entries_controller.rb +38 -0
- data/app/controllers/app_configs_controller.rb +17 -0
- data/app/controllers/application_controller.rb +39 -0
- data/app/controllers/attachments_controller.rb +16 -0
- data/app/controllers/blogs_controller.rb +39 -0
- data/app/controllers/discussions_controller.rb +10 -0
- data/app/controllers/external_links_controller.rb +5 -0
- data/app/controllers/feedbacks_controller.rb +10 -0
- data/app/controllers/forum_messages_controller.rb +13 -0
- data/app/controllers/forums_controller.rb +2 -0
- data/app/controllers/galleries_controller.rb +60 -0
- data/app/controllers/images_controller.rb +30 -0
- data/app/controllers/menus_controller.rb +2 -0
- data/app/controllers/pages_controller.rb +80 -0
- data/app/controllers/profiles_controller.rb +16 -0
- data/app/controllers/sitemaps_controller.rb +135 -0
- data/app/controllers/users_controller.rb +28 -0
- data/app/helpers/access_control_entries_helper.rb +2 -0
- data/app/helpers/app_configs_helper.rb +2 -0
- data/app/helpers/application_helper.rb +43 -0
- data/app/helpers/blogs_helper.rb +10 -0
- data/app/helpers/discussions_helper.rb +2 -0
- data/app/helpers/external_links_helper.rb +2 -0
- data/app/helpers/feedbacks_helper.rb +2 -0
- data/app/helpers/forums_helper.rb +2 -0
- data/app/helpers/menus_helper.rb +2 -0
- data/app/helpers/pages_helper.rb +192 -0
- data/app/helpers/sitemaps_helper.rb +12 -0
- data/app/mailers/feedback_mailer.rb +10 -0
- data/app/models/ability.rb +43 -0
- data/app/models/access_control_entry.rb +109 -0
- data/app/models/app_config.rb +26 -0
- data/app/models/attachment.rb +10 -0
- data/app/models/blog.rb +10 -0
- data/app/models/discussion.rb +19 -0
- data/app/models/external_link.rb +10 -0
- data/app/models/feedback.rb +11 -0
- data/app/models/forum.rb +4 -0
- data/app/models/forum_message.rb +5 -0
- data/app/models/gallery.rb +5 -0
- data/app/models/image.rb +10 -0
- data/app/models/menu.rb +5 -0
- data/app/models/page.rb +8 -0
- data/app/models/page_revision.rb +2 -0
- data/app/models/profile.rb +12 -0
- data/app/models/role.rb +29 -0
- data/app/models/s3_provider.rb +84 -0
- data/app/models/sitemap.rb +175 -0
- data/app/models/tagging.rb +4 -0
- data/app/models/user.rb +69 -0
- data/app/validators/email_validator.rb +22 -0
- data/app/views/access_control_entries/_form.html.haml +33 -0
- data/app/views/access_control_entries/_index.html.haml +53 -0
- data/app/views/access_control_entries/_show.html.haml +12 -0
- data/app/views/access_control_entries/create.js.haml +3 -0
- data/app/views/access_control_entries/destroy.js.haml +3 -0
- data/app/views/access_control_entries/edit.html.haml +7 -0
- data/app/views/access_control_entries/edit.js.haml +3 -0
- data/app/views/access_control_entries/index.html.haml +2 -0
- data/app/views/access_control_entries/index.js.haml +3 -0
- data/app/views/access_control_entries/new.html.haml +5 -0
- data/app/views/access_control_entries/new.js.haml +3 -0
- data/app/views/access_control_entries/show.html.haml +2 -0
- data/app/views/access_control_entries/show.js.haml +4 -0
- data/app/views/access_control_entries/update.js.haml +3 -0
- data/app/views/app_configs/_form.html.haml +11 -0
- data/app/views/app_configs/_index.html.haml +6 -0
- data/app/views/app_configs/_show.html.haml +3 -0
- data/app/views/app_configs/create.js.haml +3 -0
- data/app/views/app_configs/css.css.haml +2 -0
- data/app/views/app_configs/destroy.js.haml +3 -0
- data/app/views/app_configs/edit.html.haml +2 -0
- data/app/views/app_configs/edit.js.haml +3 -0
- data/app/views/app_configs/index.html.haml +2 -0
- data/app/views/app_configs/index.js.haml +3 -0
- data/app/views/app_configs/new.html.haml +2 -0
- data/app/views/app_configs/new.js.haml +3 -0
- data/app/views/app_configs/show.html.haml +2 -0
- data/app/views/app_configs/show.js.haml +3 -0
- data/app/views/app_configs/update.js.haml +3 -0
- data/app/views/attachments/_form.html.haml +26 -0
- data/app/views/attachments/_index.html.haml +9 -0
- data/app/views/attachments/_show.html.haml +6 -0
- data/app/views/attachments/_uploadify.html.erb +12 -0
- data/app/views/attachments/create.js.haml +3 -0
- data/app/views/attachments/destroy.js.haml +3 -0
- data/app/views/attachments/edit.js.haml +3 -0
- data/app/views/attachments/index.html.haml +2 -0
- data/app/views/attachments/index.js.haml +3 -0
- data/app/views/attachments/new.html.haml +3 -0
- data/app/views/attachments/new.js.haml +3 -0
- data/app/views/attachments/show.html.haml +2 -0
- data/app/views/attachments/show.js.haml +3 -0
- data/app/views/attachments/update.js.haml +3 -0
- data/app/views/blogs/_form.html.haml +22 -0
- data/app/views/blogs/edit.html.haml +8 -0
- data/app/views/blogs/index.html.haml +21 -0
- data/app/views/blogs/index.xml.builder +27 -0
- data/app/views/blogs/new.html.haml +6 -0
- data/app/views/blogs/show.html.haml +25 -0
- data/app/views/discussions/_form.html.haml +16 -0
- data/app/views/discussions/edit.html.haml +7 -0
- data/app/views/discussions/index.html.haml +10 -0
- data/app/views/discussions/new.html.haml +25 -0
- data/app/views/discussions/show.html.haml +16 -0
- data/app/views/external_links/_fields_for.html.haml +2 -0
- data/app/views/external_links/_form.html.haml +18 -0
- data/app/views/external_links/_show.html.haml +7 -0
- data/app/views/external_links/create.js.haml +3 -0
- data/app/views/external_links/destroy.js.haml +3 -0
- data/app/views/external_links/edit.html.haml +7 -0
- data/app/views/external_links/edit.js.haml +3 -0
- data/app/views/external_links/index.html.haml +23 -0
- data/app/views/external_links/index.js.haml +3 -0
- data/app/views/external_links/new.html.haml +5 -0
- data/app/views/external_links/new.js.haml +3 -0
- data/app/views/external_links/show.html.haml +2 -0
- data/app/views/external_links/show.js.haml +3 -0
- data/app/views/external_links/update.js.haml +3 -0
- data/app/views/feedback_mailer/submit_feedback.html.haml +22 -0
- data/app/views/feedbacks/_form.html.haml +38 -0
- data/app/views/feedbacks/index.html.haml +27 -0
- data/app/views/feedbacks/new.html.haml +6 -0
- data/app/views/feedbacks/show.html.haml +19 -0
- data/app/views/forum_messages/_form.html.haml +6 -0
- data/app/views/forum_messages/index.html.haml +11 -0
- data/app/views/forum_messages/new.html.haml +5 -0
- data/app/views/forums/_form.html.haml +13 -0
- data/app/views/forums/edit.html.haml +7 -0
- data/app/views/forums/index.html.haml +23 -0
- data/app/views/forums/new.html.haml +5 -0
- data/app/views/forums/show.html.haml +20 -0
- data/app/views/galleries/_form.html.haml +30 -0
- data/app/views/galleries/_show.html.haml +21 -0
- data/app/views/galleries/edit.html.haml +7 -0
- data/app/views/galleries/index.html.haml +15 -0
- data/app/views/galleries/new.html.haml +5 -0
- data/app/views/galleries/show.html.haml +4 -0
- data/app/views/images/_form.html.haml +10 -0
- data/app/views/images/create.js.haml +3 -0
- data/app/views/images/destroy.js.haml +3 -0
- data/app/views/images/edit.html.haml +7 -0
- data/app/views/images/edit.js.haml +3 -0
- data/app/views/images/index.html.haml +17 -0
- data/app/views/images/index.js.haml +3 -0
- data/app/views/images/new.html.haml +5 -0
- data/app/views/images/new.js.haml +3 -0
- data/app/views/images/show.html.haml +5 -0
- data/app/views/images/show.js.haml +3 -0
- data/app/views/images/update.js.haml +3 -0
- data/app/views/layouts/application.html.haml +60 -0
- data/app/views/layouts/bare.html.haml +2 -0
- data/app/views/layouts/image_dialog.html.haml +18 -0
- data/app/views/loadbehind/_destroy.js.haml +3 -0
- data/app/views/loadbehind/_edit.js.haml +4 -0
- data/app/views/loadbehind/_errors.html.haml +5 -0
- data/app/views/loadbehind/_growl_template.html.haml +65 -0
- data/app/views/loadbehind/_show_box.html.haml +9 -0
- data/app/views/loadbehind/_view.js.haml +4 -0
- data/app/views/loadbehind/growl.js.haml +4 -0
- data/app/views/loadbehind/index.js.haml +4 -0
- data/app/views/menus/_form.html.haml +13 -0
- data/app/views/menus/edit.html.haml +7 -0
- data/app/views/menus/index.html.haml +19 -0
- data/app/views/menus/new.html.haml +5 -0
- data/app/views/menus/show.html.haml +7 -0
- data/app/views/pages/_child_pages_links.html.haml +5 -0
- data/app/views/pages/_control_panel.html.haml +15 -0
- data/app/views/pages/_form.html.haml +27 -0
- data/app/views/pages/_form_fields.html.haml +23 -0
- data/app/views/pages/_show.html.haml +4 -0
- data/app/views/pages/_show_attachment.html.haml +6 -0
- data/app/views/pages/_show_small.html.haml +2 -0
- data/app/views/pages/create.js.haml +3 -0
- data/app/views/pages/destroy.js.haml +3 -0
- data/app/views/pages/edit.html.haml +16 -0
- data/app/views/pages/edit.js.haml +4 -0
- data/app/views/pages/index.html.haml +19 -0
- data/app/views/pages/index.js.haml +3 -0
- data/app/views/pages/new.html.haml +5 -0
- data/app/views/pages/new.js.haml +3 -0
- data/app/views/pages/show.html.haml +18 -0
- data/app/views/pages/show.js.haml +3 -0
- data/app/views/pages/update.js.haml +3 -0
- data/app/views/profiles/_form.html.haml +26 -0
- data/app/views/profiles/edit.html.haml +7 -0
- data/app/views/profiles/index.html.haml +25 -0
- data/app/views/profiles/new.html.haml +5 -0
- data/app/views/profiles/show.html.haml +21 -0
- data/app/views/sitemaps/edit.html.haml +12 -0
- data/app/views/sitemaps/index.html.haml +83 -0
- data/app/views/sitemaps/index.json.erb +23 -0
- data/app/views/sitemaps/new.html.haml +8 -0
- data/app/views/sitemaps/new.js.erb +0 -0
- data/app/views/users/edit.html.haml +45 -0
- data/app/views/users/index.html.haml +19 -0
- data/config/amazon_s3.yml +15 -0
- data/db/migrate/0000_devise_create_users.rb +26 -0
- data/db/migrate/0010_add_fields_to_users.rb +28 -0
- data/db/migrate/0020_create_blogs.rb +16 -0
- data/db/migrate/0030_create_galleries.rb +15 -0
- data/db/migrate/0040_create_images.rb +17 -0
- data/db/migrate/0050_create_profiles.rb +24 -0
- data/db/migrate/0060_insert_admin_user_and_roles.rb +24 -0
- data/db/migrate/0070_create_pages.rb +16 -0
- data/db/migrate/0080_create_forums.rb +13 -0
- data/db/migrate/0090_create_discussions.rb +14 -0
- data/db/migrate/0100_create_forum_messages.rb +15 -0
- data/db/migrate/0110_create_access_control_entries.rb +23 -0
- data/db/migrate/0120_create_attachments.rb +17 -0
- data/db/migrate/0130_create_roles.rb +13 -0
- data/db/migrate/0140_create_feedbacks.rb +20 -0
- data/db/migrate/0150_create_external_links.rb +14 -0
- data/db/migrate/0160_create_sitemaps.rb +17 -0
- data/db/migrate/0170_create_menus.rb +14 -0
- data/db/migrate/0180_acts_as_taggable_on_migration.rb +28 -0
- data/db/migrate/20100912194121_add_stylesheet_to_pages.rb +9 -0
- data/db/migrate/20100913073354_add_position_to_access_control_entries.rb +9 -0
- data/init.rb +2 -0
- data/lib/{core_extensions.rb → generators/core_extensions.rb} +2 -2
- data/lib/generators/templates/haml/app/views/layouts/application.html.haml +0 -0
- data/lib/generators/wheels/wheels_generator.rb +2 -0
- data/lib/generators/wheels_update/wheels_update_generator.rb +1 -1
- data/lib/wheels/routes.rb +13 -2
- data/wheels.gemspec +254 -122
- metadata +268 -124
- data/README +0 -2
- data/lib/generators/wheels/recipes/public.rb +0 -9
- data/lib/generators/wheels_update/core_extensions.3.rb +0 -64
- data/lib/wheels/base.rb +0 -7
- data/test/functional/access_control_entries_controller_test.rb +0 -49
- data/test/functional/app_configs_controller_test.rb +0 -49
- data/test/functional/discussions_controller_test.rb +0 -49
- data/test/functional/external_links_controller_test.rb +0 -49
- data/test/functional/feedback_mailer_test.rb +0 -8
- data/test/functional/feedbacks_controller_test.rb +0 -49
- data/test/functional/forums_controller_test.rb +0 -49
- data/test/functional/layouts_controller_test.rb +0 -49
- data/test/functional/member_pages_controller_test.rb +0 -49
- data/test/functional/members_controller_test.rb +0 -8
- data/test/functional/menus_controller_test.rb +0 -49
- data/test/functional/pages_controller_test.rb +0 -49
- data/test/functional/product_revisions_controller_test.rb +0 -49
- data/test/performance/browsing_test.rb +0 -9
- data/test/test_helper.rb +0 -13
- data/test/unit/access_control_entry_test.rb +0 -8
- data/test/unit/app_config_test.rb +0 -8
- data/test/unit/attachment_test.rb +0 -8
- data/test/unit/discussion_test.rb +0 -8
- data/test/unit/external_link_test.rb +0 -8
- data/test/unit/feedback_test.rb +0 -8
- data/test/unit/forum_message_test.rb +0 -8
- data/test/unit/forum_test.rb +0 -8
- data/test/unit/helpers/access_control_entries_helper_test.rb +0 -4
- data/test/unit/helpers/app_configs_helper_test.rb +0 -4
- data/test/unit/helpers/discussions_helper_test.rb +0 -4
- data/test/unit/helpers/external_links_helper_test.rb +0 -4
- data/test/unit/helpers/feedbacks_helper_test.rb +0 -4
- data/test/unit/helpers/forums_helper_test.rb +0 -4
- data/test/unit/helpers/layouts_helper_test.rb +0 -4
- data/test/unit/helpers/member_pages_helper_test.rb +0 -4
- data/test/unit/helpers/members_helper_test.rb +0 -4
- data/test/unit/helpers/menus_helper_test.rb +0 -4
- data/test/unit/helpers/pages_helper_test.rb +0 -4
- data/test/unit/helpers/product_revisions_helper_test.rb +0 -4
- data/test/unit/layout_test.rb +0 -8
- data/test/unit/member_page_test.rb +0 -8
- data/test/unit/menu_test.rb +0 -8
- data/test/unit/page_revision_test.rb +0 -8
- data/test/unit/page_test.rb +0 -8
- data/test/unit/product_revision_test.rb +0 -8
- data/test/unit/settings_test.rb +0 -8
- data/test/unit/sitemap_test.rb +0 -8
- data/test/unit/user_test.rb +0 -8
- /data/{lib/generators/wheels/templates/haml/app/views/layouts/application.html.haml → app/views/sitemaps/edit.js.erb} +0 -0
- /data/lib/generators/{wheels/recipes → recipes}/cancan.rb +0 -0
- /data/lib/generators/{wheels/recipes → recipes}/cucumber.rb +0 -0
- /data/lib/generators/{wheels/recipes → recipes}/default.rb +0 -0
- /data/lib/generators/{wheels/recipes → recipes}/design.rb +0 -0
- /data/lib/generators/{wheels/recipes → recipes}/devise.rb +0 -0
- /data/lib/generators/{wheels/recipes → recipes}/factory_girl.rb +0 -0
- /data/lib/generators/{wheels/recipes → recipes}/haml.rb +0 -0
- /data/lib/generators/{wheels/recipes → recipes}/jquery.rb +0 -0
- /data/lib/generators/{wheels/recipes → recipes}/mongoid.rb +0 -0
- /data/lib/generators/{wheels/recipes → recipes}/postgresql.rb +0 -0
- /data/lib/generators/{wheels/recipes → recipes}/recipes.rb +0 -0
- /data/lib/generators/{wheels/recipes → recipes}/remarkable.rb +0 -0
- /data/lib/generators/{wheels/recipes → recipes}/rspec.rb +0 -0
- /data/lib/generators/{wheels/recipes → recipes}/wheels.rb +0 -0
- /data/lib/generators/{wheels_update/recipes/wheels.rb → recipes/wheels_update.rb} +0 -0
- /data/lib/generators/{wheels/snippets → snippets}/cucumber/database_config +0 -0
- /data/lib/generators/{wheels/templates → templates}/cancan/ability.rb +0 -0
- /data/lib/generators/{wheels/templates → templates}/database/postgresql.yml +0 -0
- /data/lib/generators/{wheels/templates → templates}/git/gitignore +0 -0
- /data/lib/generators/{wheels/templates → templates}/mongoid/features/step_definitions/mongoid_steps.rb +0 -0
- /data/lib/generators/{wheels/templates → templates}/mongoid/features/support/hooks.rb +0 -0
@@ -0,0 +1,17 @@
|
|
1
|
+
%h1 Listing images
|
2
|
+
|
3
|
+
%table
|
4
|
+
%tr
|
5
|
+
%th
|
6
|
+
%th
|
7
|
+
%th
|
8
|
+
|
9
|
+
- @images.each do |image|
|
10
|
+
%tr
|
11
|
+
%td= link_to 'Show', image
|
12
|
+
%td= link_to 'Edit', edit_image_path(image)
|
13
|
+
%td= link_to 'Destroy', image, :confirm => 'Are you sure?', :method => :delete
|
14
|
+
|
15
|
+
%br
|
16
|
+
|
17
|
+
= link_to 'New image', new_image_path
|
@@ -0,0 +1,60 @@
|
|
1
|
+
!!! 5
|
2
|
+
%html
|
3
|
+
%head
|
4
|
+
%title= "#{AppConfig["title"]}#{"> #{@page.title}" if @page}"
|
5
|
+
= csrf_meta_tag
|
6
|
+
/[if lt IE 9]
|
7
|
+
= javascript_include_tag 'html5'
|
8
|
+
= javascript_include_tag :defaults
|
9
|
+
= javascript_include_tag *%w(menu jquery-ui application)
|
10
|
+
= stylesheet_link_tag *%w(menu ui-lightness/jquery-ui-1.8.4.custom)
|
11
|
+
= stylesheet_link_tag "/css.css?#{DateTime::now.to_s}"
|
12
|
+
= yield(:head)
|
13
|
+
%body
|
14
|
+
#wrapper
|
15
|
+
#header
|
16
|
+
#menu
|
17
|
+
%ul.menu
|
18
|
+
- @menu_items.each do |sitemap_node|
|
19
|
+
!= menu_node sitemap_node.menu_text, sitemap_node.url
|
20
|
+
#sidebar
|
21
|
+
#sidebar_top
|
22
|
+
= yield(:navigation)
|
23
|
+
= yield(:sidebar)
|
24
|
+
#sidebar_bottom
|
25
|
+
\
|
26
|
+
#content
|
27
|
+
- flash.each do |key, value|
|
28
|
+
%p{:class=>key}= value
|
29
|
+
= yield
|
30
|
+
#dialog
|
31
|
+
%p#dialog_html
|
32
|
+
#footer
|
33
|
+
#footer-valid
|
34
|
+
|
35
|
+
%a{:href => "http://validator.w3.org/check/referer"} xhtml
|
36
|
+
|
|
37
|
+
- if user_signed_in?
|
38
|
+
Logged in as #{current_user.email} | #{link_to('Logout', destroy_user_session_path)}
|
39
|
+
|
|
40
|
+
= link_to 'Change Password', '/change_password'
|
41
|
+
- else
|
42
|
+
= link_to('Log in', new_user_session_path)
|
43
|
+
|
44
|
+
#copyright
|
45
|
+
Copyright © 2010 #{link_to "Apycom jQuery Menus", "http://apycom.com/"}
|
46
|
+
- if @sitemap && @sitemap.parent != Sitemap.main_menu
|
47
|
+
= sidebar_content do
|
48
|
+
%ul.sidebar
|
49
|
+
!= menu_node "Back to #{@sitemap.parent.menu_text}", @sitemap.parent.url
|
50
|
+
- if @sitemap && !@sitemap.children.empty?
|
51
|
+
= sidebar_content do
|
52
|
+
%ul.sidebar
|
53
|
+
- @sitemap.children.each do |sitemap_node|
|
54
|
+
!= menu_node sitemap_node.menu_text, sitemap_node.url
|
55
|
+
#styles
|
56
|
+
:javascript
|
57
|
+
function setTitle(title){
|
58
|
+
$('title').html(title);
|
59
|
+
}
|
60
|
+
|
@@ -0,0 +1,18 @@
|
|
1
|
+
!!! 5
|
2
|
+
%html
|
3
|
+
%head
|
4
|
+
= csrf_meta_tag
|
5
|
+
/[if lt IE 9]
|
6
|
+
= javascript_include_tag 'html5'
|
7
|
+
= javascript_include_tag :defaults
|
8
|
+
:javascript
|
9
|
+
$(function(){
|
10
|
+
$('#image_dialog').find('img').click(function(){
|
11
|
+
url = $(this).attr('src');
|
12
|
+
window.opener.CKEDITOR.tools.callFunction( #{params[:CKEditorFuncNum]}, url);
|
13
|
+
window.close();
|
14
|
+
});
|
15
|
+
});
|
16
|
+
%body
|
17
|
+
#image_dialog= yield
|
18
|
+
|
@@ -0,0 +1,65 @@
|
|
1
|
+
:css
|
2
|
+
.growl_box {
|
3
|
+
width: 225px;
|
4
|
+
border: 0px;
|
5
|
+
cellpadding: 0px;
|
6
|
+
cellspacing: 0px;
|
7
|
+
}
|
8
|
+
.growl_top {
|
9
|
+
background-image: url(/images/growl/growl_top.png);
|
10
|
+
width: 225px;
|
11
|
+
height: 49px;
|
12
|
+
background-repeat: no-repeat;
|
13
|
+
color: #fff;
|
14
|
+
}
|
15
|
+
.growl_top_img {
|
16
|
+
max-width: 25px;
|
17
|
+
max-height: 25px;
|
18
|
+
text-align: center;
|
19
|
+
margin-left: 19px;
|
20
|
+
margin-top: 19px;
|
21
|
+
}
|
22
|
+
.growl_title {
|
23
|
+
font-size: 18px;
|
24
|
+
margin: 0pt;
|
25
|
+
margin-left: 5px;
|
26
|
+
margin-bottom: 10px;
|
27
|
+
display: inline;
|
28
|
+
}
|
29
|
+
td.growl_content {
|
30
|
+
background-image: url(/images/growl/growl_repeat.png);
|
31
|
+
width: 225px;
|
32
|
+
background-repeat: repeat-y;
|
33
|
+
color: #ddd;
|
34
|
+
}
|
35
|
+
|
36
|
+
p.growl_content {
|
37
|
+
margin: 20px;
|
38
|
+
}
|
39
|
+
.growl_bottom {
|
40
|
+
background-image: url(/images/growl/growl_bottom.png);
|
41
|
+
background-repeat: no-repeat;
|
42
|
+
width: 225px;
|
43
|
+
height: 27px;
|
44
|
+
vertical-align: top;
|
45
|
+
horizontal-align: right;
|
46
|
+
}
|
47
|
+
a.growl_close {
|
48
|
+
margin-right: 25px;
|
49
|
+
font-size: 10px;
|
50
|
+
color: #fff;
|
51
|
+
text-align: right;
|
52
|
+
}
|
53
|
+
|
54
|
+
%table.growl_box
|
55
|
+
%tr
|
56
|
+
%td.growl_top
|
57
|
+
%img.growl_top_img{:src=>"%image%"}
|
58
|
+
%h1.growl_title %title%
|
59
|
+
%tr
|
60
|
+
%td.growl_content
|
61
|
+
%p.growl_content %message%
|
62
|
+
%tr
|
63
|
+
%td.growl_bottom
|
64
|
+
a.growl_close{:href=>"#", :onclick=>"return false;" :rel=>"close"} Close
|
65
|
+
|
@@ -0,0 +1,13 @@
|
|
1
|
+
= form_for @menu do |f|
|
2
|
+
-if @menu.errors.any?
|
3
|
+
#errorExplanation
|
4
|
+
%h2= "#{pluralize(@menu.errors.count, "error")} prohibited this menu from being saved:"
|
5
|
+
%ul
|
6
|
+
- @menu.errors.full_messages.each do |msg|
|
7
|
+
%li= msg
|
8
|
+
|
9
|
+
.field
|
10
|
+
= f.label :name
|
11
|
+
= f.text_field :name
|
12
|
+
.actions
|
13
|
+
= f.submit 'Save'
|
@@ -0,0 +1,19 @@
|
|
1
|
+
%h1 Listing menus
|
2
|
+
|
3
|
+
%table
|
4
|
+
%tr
|
5
|
+
%th Name
|
6
|
+
%th
|
7
|
+
%th
|
8
|
+
%th
|
9
|
+
|
10
|
+
- @menus.each do |menu|
|
11
|
+
%tr
|
12
|
+
%td= menu.name
|
13
|
+
%td= link_to 'Show', menu
|
14
|
+
%td= link_to 'Edit', edit_menu_path(menu)
|
15
|
+
%td= link_to 'Destroy', menu, :confirm => 'Are you sure?', :method => :delete
|
16
|
+
|
17
|
+
%br
|
18
|
+
|
19
|
+
= link_to 'New menu', new_menu_path
|
@@ -0,0 +1,15 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
= content_for :sidebar do
|
4
|
+
%ul
|
5
|
+
%li.sidebar_title Control Panel
|
6
|
+
%li
|
7
|
+
Upload a file to this page.
|
8
|
+
= render :partial=>'attachments/form'
|
9
|
+
%li
|
10
|
+
Set permissions >>
|
11
|
+
= link_to 'Edit Access', access_control_entries_path(:resource_type=>"Page", :resource_id=>@page.id), |
|
12
|
+
:confirm => "Are you sure? Any unsaved changes on this page should be saved before leaving."
|
13
|
+
%li= link_to 'New Page as child', new_page_path(:page_id=>@page.id), |
|
14
|
+
:confirm => "Are you sure? Any unsaved changes on this page should be saved before leaving."
|
15
|
+
|
@@ -0,0 +1,27 @@
|
|
1
|
+
- include_ckeditor
|
2
|
+
= render :partial => "child_pages_links"
|
3
|
+
|
4
|
+
- if params[:action]=="new"
|
5
|
+
= form_for resource, :remote=>true do |f|
|
6
|
+
= render :partial => "form_fields", :locals=>{:f=>f}
|
7
|
+
- else
|
8
|
+
= form_for form_object, {:url=>form_url, :remote=>true} do |f|
|
9
|
+
= render :partial => "form_fields", :locals=>{:f=>f}
|
10
|
+
|
11
|
+
= content_for :head do
|
12
|
+
= javascript_include_tag 'jquery-validate/jquery.validate.pack'
|
13
|
+
|
14
|
+
:javascript
|
15
|
+
$(function(){
|
16
|
+
jQuery.validator.addMethod("verify_user", function(value, element, params) {
|
17
|
+
//alert($(element).attr('data-verify-user-path'));
|
18
|
+
xhr = $.ajax({
|
19
|
+
async: false,
|
20
|
+
url: $(element).attr('data-verify-user-path')+ '?password='+value
|
21
|
+
});
|
22
|
+
return xhr.responseText=="true";
|
23
|
+
}, "Password is incorrect.");
|
24
|
+
|
25
|
+
$('form').validate();
|
26
|
+
});
|
27
|
+
|
@@ -0,0 +1,23 @@
|
|
1
|
+
-if @page.errors.any?
|
2
|
+
#errorExplanation
|
3
|
+
%h2= "#{pluralize(@page.errors.count, "error")} prohibited this page from being saved:"
|
4
|
+
%ul
|
5
|
+
- @page.errors.full_messages.each do |msg|
|
6
|
+
%li= msg
|
7
|
+
.field
|
8
|
+
= f.label :title
|
9
|
+
= f.text_field :title
|
10
|
+
.field
|
11
|
+
.fieldName "Display Title for this page?"
|
12
|
+
= f.check_box :show_title
|
13
|
+
|
14
|
+
.textarea
|
15
|
+
= f.label :body
|
16
|
+
= f.text_area :body, :class=>'ckeditor_textarea', :cols=>100, :rows=>25
|
17
|
+
= f.label :stylesheet
|
18
|
+
= f.text_area :stylesheet
|
19
|
+
= hidden_field_tag :container, 'content_pane'
|
20
|
+
= hidden_field_tag :ajax_function, 'html'
|
21
|
+
.actions
|
22
|
+
= f.submit 'Save', :disable_with=>"Saving..."
|
23
|
+
|
@@ -0,0 +1,16 @@
|
|
1
|
+
%h1 Editing page
|
2
|
+
|
3
|
+
= render 'form'
|
4
|
+
|
5
|
+
= link_to 'Show', @page
|
6
|
+
\|
|
7
|
+
= link_to 'Back', pages_path
|
8
|
+
|
9
|
+
= content_for :sidebar do
|
10
|
+
%ul#attachments_list
|
11
|
+
%li.sidebar_title Files
|
12
|
+
- @page.attachments.each do |attachment|
|
13
|
+
= render :partial => "attachments/show", :locals=>{:a=>(@attachment=attachment)}
|
14
|
+
|
15
|
+
= render :partial => "control_panel"
|
16
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
= link_to 'New page', new_page_path if can? :create, Page
|
2
|
+
|
3
|
+
= content_for :links do
|
4
|
+
- @pages.each do |page|
|
5
|
+
%li{:id=>page.element_id}
|
6
|
+
= link_to page.title, page
|
7
|
+
- if can? :edit, @page
|
8
|
+
= link_to '| Edit', edit_page_path(page)
|
9
|
+
- if can? :manage, @page
|
10
|
+
= link_to '| Delete', page_path(page), :remote=>true, "data-confirm" => "Are you sure?", :method=>"delete"
|
11
|
+
- if can? :manage, @page
|
12
|
+
= link_to '| Access Ctrl', access_control_entries_path(:resource_type=>"Page", :resource_id=>page.id)
|
13
|
+
|
14
|
+
- @pages.each do |page|
|
15
|
+
%h1= link_to page.title, page
|
16
|
+
= link_to "Edit", edit_page_path(page) if can? :edit, page
|
17
|
+
.page_content!= page.body
|
18
|
+
%hr/
|
19
|
+
|
@@ -0,0 +1,18 @@
|
|
1
|
+
= render :partial => "show"
|
2
|
+
|
3
|
+
- if @sitemap && (@sitemap.parent != Sitemap.main_menu)
|
4
|
+
= nav_content do
|
5
|
+
.sidebar.parent_page= link_to @sitemap.parent.menu_text, @sitemap.parent.url
|
6
|
+
- if @sitemap && !@sitemap.children.empty?
|
7
|
+
= nav_content do
|
8
|
+
.child_pages
|
9
|
+
- @child_pages.each do |child|
|
10
|
+
.sidebar= link_to child.menu_text, child.url
|
11
|
+
|
12
|
+
- unless @page.attachments.empty?
|
13
|
+
= nav_content do
|
14
|
+
%ul#attachments_list
|
15
|
+
%li.sidebar_title Files
|
16
|
+
- @page.attachments.each do |attachment|
|
17
|
+
= render :partial => "attachments/show", :locals=>{:a=>(@attachment=attachment)}
|
18
|
+
|
@@ -0,0 +1,26 @@
|
|
1
|
+
= form_for @profile, :url=>{:action=>"update"}, :html=>{:multipart=>true} do |f|
|
2
|
+
-if @profile.errors.any?
|
3
|
+
#errorExplanation
|
4
|
+
%h2= "#{pluralize(@profile.errors.count, "error")} prohibited this profile from being saved:"
|
5
|
+
%ul
|
6
|
+
- @profile.errors.full_messages.each do |msg|
|
7
|
+
%li= msg
|
8
|
+
|
9
|
+
.field
|
10
|
+
= f.label :first_name
|
11
|
+
= f.text_field :first_name
|
12
|
+
.field
|
13
|
+
= f.label :last_name
|
14
|
+
= f.text_field :last_name
|
15
|
+
.field
|
16
|
+
= f.label :alias
|
17
|
+
= f.text_field :alias
|
18
|
+
.field
|
19
|
+
= f.label :about_me
|
20
|
+
= f.text_area :about_me
|
21
|
+
.field
|
22
|
+
= f.label :image
|
23
|
+
= f.file_field :image
|
24
|
+
.actions
|
25
|
+
= f.submit 'Save'
|
26
|
+
|
@@ -0,0 +1,25 @@
|
|
1
|
+
%h1 Listing profiles
|
2
|
+
|
3
|
+
%table
|
4
|
+
%tr
|
5
|
+
%th First name
|
6
|
+
%th Last name
|
7
|
+
%th Alias
|
8
|
+
%th About me
|
9
|
+
%th
|
10
|
+
%th
|
11
|
+
%th
|
12
|
+
|
13
|
+
- @profiles.each do |profile|
|
14
|
+
%tr
|
15
|
+
%td= profile.first_name
|
16
|
+
%td= profile.last_name
|
17
|
+
%td= profile.alias
|
18
|
+
%td= profile.about_me
|
19
|
+
%td= link_to 'Show', profile
|
20
|
+
%td= link_to 'Edit', edit_profile_path(profile)
|
21
|
+
%td= link_to 'Destroy', profile, :confirm => 'Are you sure?', :method => :delete
|
22
|
+
|
23
|
+
%br
|
24
|
+
|
25
|
+
= link_to 'New profile', new_profile_path
|
@@ -0,0 +1,21 @@
|
|
1
|
+
- if @profile.image_file_name
|
2
|
+
= image_tag @profile.image.url(:thumb)
|
3
|
+
- else
|
4
|
+
- if can? :edit, @profile
|
5
|
+
- link_to 'Upload a photo', user_profile_path(@user)
|
6
|
+
%p
|
7
|
+
%b First name:
|
8
|
+
= @profile.first_name
|
9
|
+
%p
|
10
|
+
%b Last name:
|
11
|
+
= @profile.last_name
|
12
|
+
%p
|
13
|
+
%b Alias:
|
14
|
+
= @profile.alias
|
15
|
+
%p
|
16
|
+
%b About me:
|
17
|
+
= @profile.about_me
|
18
|
+
|
19
|
+
- if current_user.try(:id) == @user.id
|
20
|
+
= link_to 'Edit', edit_user_profile_path(@user)
|
21
|
+
|
@@ -0,0 +1,12 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
|
4
|
+
#sitemap
|
5
|
+
|
6
|
+
|
7
|
+
= content_for :head do
|
8
|
+
= javascript_include_tag %(http://static.jstree.com/v.1.0rc2/jquery.cookie.js)
|
9
|
+
= javascript_include_tag %(http://static.jstree.com/v.1.0rc2/jquery.hotkeys.js)
|
10
|
+
= javascript_include_tag %(http://static.jstree.com/v.1.0rc2/jquery.jstree.js)
|
11
|
+
= javascript_include_tag %(sitemap_jstree)
|
12
|
+
|