forgeos_cms 1.9.0
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +2 -0
- data/README.textile +42 -0
- data/app/assets/images/forgeos/admin/favicon.gif +0 -0
- data/app/assets/javascripts/forgeos/admin/functions/forgeos_cms/carousels.js +56 -0
- data/app/assets/javascripts/forgeos/admin/functions/forgeos_cms/menus.js +93 -0
- data/app/assets/javascripts/forgeos/admin/functions/forgeos_cms/overlay.js +86 -0
- data/app/assets/javascripts/forgeos/admin/functions/forgeos_cms/trees.js +8 -0
- data/app/assets/javascripts/forgeos/admin/functions/forgeos_cms/widget_actualities.js +117 -0
- data/app/assets/javascripts/forgeos/admin/inits/forgeos_cms/carousels.js +131 -0
- data/app/assets/javascripts/forgeos/admin/inits/forgeos_cms/menus.js +294 -0
- data/app/assets/javascripts/forgeos/admin/inits/forgeos_cms/overlays.js +71 -0
- data/app/assets/javascripts/forgeos/admin/inits/forgeos_cms/trees.js +94 -0
- data/app/assets/javascripts/forgeos/admin/inits/forgeos_cms/widget_actualities.js +23 -0
- data/app/assets/javascripts/forgeos/admin/inits/forgeos_cms/widget_faq.js +13 -0
- data/app/assets/stylesheets/forgeos/admin/base.css.sass +2 -0
- data/app/assets/stylesheets/forgeos/admin/forgeos_cms/_all.css.sass +1 -0
- data/app/assets/stylesheets/forgeos/admin/forgeos_cms/_blocks.css.sass +220 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/association_page/bubble-quantity-products.png +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/association_page/check-checked.png +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/association_page/check-unchecked.png +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/association_page/context.gif +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/association_page/create.png +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/association_page/dark-blue-minus.png +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/association_page/dark-blue-plus.png +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/association_page/dot.gif +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/association_page/f.png +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/association_page/fminus.gif +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/association_page/fminus_rtl.gif +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/association_page/folder.png +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/association_page/fplus.gif +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/association_page/fplus_rtl.gif +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/association_page/lastli.gif +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/association_page/lastli_rtl.gif +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/association_page/li.gif +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/association_page/remove.png +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/association_page/rename.png +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/association_page/style.css.sass +219 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/association_page/throbber.gif +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/block_category/brown-minus.png +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/block_category/brown-plus.png +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/block_category/bubble-quantity-products.png +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/block_category/context.gif +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/block_category/create.png +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/block_category/dot.gif +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/block_category/f.png +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/block_category/fminus.gif +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/block_category/fminus_rtl.gif +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/block_category/fplus.gif +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/block_category/fplus_rtl.gif +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/block_category/lastli.gif +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/block_category/lastli_rtl.gif +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/block_category/li.gif +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/block_category/remove.png +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/block_category/rename.png +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/block_category/style.css.sass +138 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/block_category/throbber.gif +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/menu-tree/big-drag-and-drop.png +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/menu-tree/bubble-quantity-products.png +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/menu-tree/check-checked.png +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/menu-tree/check-unchecked.png +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/menu-tree/context.gif +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/menu-tree/create.png +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/menu-tree/dark-blue-minus.png +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/menu-tree/dark-blue-plus.png +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/menu-tree/dot.gif +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/menu-tree/drag-drop.png +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/menu-tree/f.png +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/menu-tree/fminus.gif +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/menu-tree/fminus_rtl.gif +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/menu-tree/folder.png +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/menu-tree/fplus.gif +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/menu-tree/fplus_rtl.gif +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/menu-tree/lastli.gif +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/menu-tree/lastli_rtl.gif +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/menu-tree/li.gif +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/menu-tree/remove.png +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/menu-tree/rename.png +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/menu-tree/style.css.sass +186 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/menu-tree/throbber.gif +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/page_category/brown-minus.png +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/page_category/brown-plus.png +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/page_category/bubble-quantity-products.png +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/page_category/context.gif +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/page_category/create.png +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/page_category/dot.gif +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/page_category/f.png +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/page_category/fminus.gif +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/page_category/fminus_rtl.gif +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/page_category/fplus.gif +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/page_category/fplus_rtl.gif +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/page_category/lastli.gif +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/page_category/lastli_rtl.gif +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/page_category/li.gif +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/page_category/remove.png +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/page_category/rename.png +0 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/page_category/style.css.sass +138 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/page_category/throbber.gif +0 -0
- data/app/controllers/actualities_controller.rb +11 -0
- data/app/controllers/admin/actualities_controller.rb +100 -0
- data/app/controllers/admin/base_controller.rb +11 -0
- data/app/controllers/admin/carousels_controller.rb +101 -0
- data/app/controllers/admin/import_controller.rb +20 -0
- data/app/controllers/admin/menus_controller.rb +104 -0
- data/app/controllers/admin/newsletters_controller.rb +110 -0
- data/app/controllers/admin/pages_controller.rb +169 -0
- data/app/controllers/admin/static_content_blocks_controller.rb +174 -0
- data/app/controllers/admin/statistics_controller.rb +29 -0
- data/app/controllers/admin/widget_actualities_controller.rb +101 -0
- data/app/controllers/admin/widget_faqs_controller.rb +71 -0
- data/app/controllers/admin/widgets_controller.rb +83 -0
- data/app/controllers/forgeos/application_controller.rb +21 -0
- data/app/controllers/newsletters_controller.rb +11 -0
- data/app/controllers/pages_controller.rb +24 -0
- data/app/controllers/search_controller.rb +7 -0
- data/app/helpers/application_helper.rb +43 -0
- data/app/helpers/menu_helper.rb +46 -0
- data/app/helpers/routes_helper.rb +19 -0
- data/app/models/actuality.rb +21 -0
- data/app/models/block.rb +65 -0
- data/app/models/block_category.rb +7 -0
- data/app/models/carousel.rb +14 -0
- data/app/models/carousel_item.rb +12 -0
- data/app/models/category_link.rb +2 -0
- data/app/models/comment.rb +6 -0
- data/app/models/external_link.rb +5 -0
- data/app/models/faq.rb +10 -0
- data/app/models/link_page.rb +2 -0
- data/app/models/menu.rb +30 -0
- data/app/models/menu_category.rb +7 -0
- data/app/models/menu_link.rb +57 -0
- data/app/models/newsletter.rb +5 -0
- data/app/models/page.rb +85 -0
- data/app/models/page_category.rb +11 -0
- data/app/models/page_col.rb +14 -0
- data/app/models/page_link.rb +17 -0
- data/app/models/page_sweeper.rb +54 -0
- data/app/models/static_content_block.rb +2 -0
- data/app/models/static_content_category.rb +2 -0
- data/app/models/widget.rb +2 -0
- data/app/models/widget_actuality.rb +19 -0
- data/app/models/widget_category.rb +2 -0
- data/app/models/widget_faq.rb +12 -0
- data/app/views/actualities/rss.rxml +20 -0
- data/app/views/admin/actualities/_form.html.haml +38 -0
- data/app/views/admin/actualities/_tabs.html.haml +5 -0
- data/app/views/admin/actualities/edit.html.haml +3 -0
- data/app/views/admin/actualities/index.html.haml +10 -0
- data/app/views/admin/actualities/index.json.erb +34 -0
- data/app/views/admin/actualities/new.html.haml +3 -0
- data/app/views/admin/blocks/_associated_pages.html.haml +33 -0
- data/app/views/admin/blocks/_tabs.html.haml +8 -0
- data/app/views/admin/carousels/_attachments_popups.html.haml +81 -0
- data/app/views/admin/carousels/_form.html.haml +95 -0
- data/app/views/admin/carousels/_form_item.html.haml +54 -0
- data/app/views/admin/carousels/_item.html.haml +25 -0
- data/app/views/admin/carousels/edit.html.haml +1 -0
- data/app/views/admin/carousels/new.html.haml +1 -0
- data/app/views/admin/carousels/show.html.haml +40 -0
- data/app/views/admin/categories/_block.html.haml +4 -0
- data/app/views/admin/categories/_list_blocks.html.haml +13 -0
- data/app/views/admin/categories/_list_pages.html.haml +13 -0
- data/app/views/admin/categories/_page.html.haml +2 -0
- data/app/views/admin/dashboard/index.html.haml +19 -0
- data/app/views/admin/menu_links/_show.html.haml +8 -0
- data/app/views/admin/menus/_empty_menu_link.html.haml +45 -0
- data/app/views/admin/menus/_form.html.haml +27 -0
- data/app/views/admin/menus/_form_menu_links.html.haml +60 -0
- data/app/views/admin/menus/_lang_switcher.html.haml +2 -0
- data/app/views/admin/menus/_tabs.html.haml +5 -0
- data/app/views/admin/menus/_types_popups.html.haml +21 -0
- data/app/views/admin/menus/edit.html.haml +1 -0
- data/app/views/admin/menus/index.html.haml +13 -0
- data/app/views/admin/menus/index.json.erb +31 -0
- data/app/views/admin/menus/new.html.haml +1 -0
- data/app/views/admin/menus/show.html.haml +22 -0
- data/app/views/admin/newsletters/_form.html.haml +19 -0
- data/app/views/admin/newsletters/_tabs.html.haml +3 -0
- data/app/views/admin/newsletters/edit.html.haml +2 -0
- data/app/views/admin/newsletters/index.html.haml +14 -0
- data/app/views/admin/newsletters/index.json.erb +22 -0
- data/app/views/admin/newsletters/new.html.haml +2 -0
- data/app/views/admin/pages/_block_popup.html.haml +18 -0
- data/app/views/admin/pages/_blocks.html.haml +29 -0
- data/app/views/admin/pages/_codes.html.haml +33 -0
- data/app/views/admin/pages/_form.html.haml +15 -0
- data/app/views/admin/pages/_general.html.haml +64 -0
- data/app/views/admin/pages/_seo.html.haml +31 -0
- data/app/views/admin/pages/_tabs.html.haml +5 -0
- data/app/views/admin/pages/_tabs_show.html.haml +9 -0
- data/app/views/admin/pages/edit.html.haml +1 -0
- data/app/views/admin/pages/index.html.haml +13 -0
- data/app/views/admin/pages/index.json.erb +37 -0
- data/app/views/admin/pages/new.html.haml +2 -0
- data/app/views/admin/pages/show.html.haml +100 -0
- data/app/views/admin/static_content_blocks/_form.html.haml +41 -0
- data/app/views/admin/static_content_blocks/edit.html.haml +1 -0
- data/app/views/admin/static_content_blocks/index.html.haml +16 -0
- data/app/views/admin/static_content_blocks/index.json.erb +28 -0
- data/app/views/admin/static_content_blocks/new.html.haml +1 -0
- data/app/views/admin/static_content_blocks/show.html.haml +23 -0
- data/app/views/admin/statistics/index.html.haml +57 -0
- data/app/views/admin/users/_tabs.html.haml +3 -0
- data/app/views/admin/widget_actualities/_form.html.haml +87 -0
- data/app/views/admin/widget_actualities/_form_item.html.haml +28 -0
- data/app/views/admin/widget_actualities/_item.html.haml +11 -0
- data/app/views/admin/widget_actualities/_tabs.html.haml +8 -0
- data/app/views/admin/widget_actualities/edit.html.haml +2 -0
- data/app/views/admin/widget_actualities/new.html.haml +2 -0
- data/app/views/admin/widget_actualities/show.html.haml +39 -0
- data/app/views/admin/widget_faqs/_form.html.haml +68 -0
- data/app/views/admin/widget_faqs/_tabs.html.haml +8 -0
- data/app/views/admin/widget_faqs/edit.html.haml +2 -0
- data/app/views/admin/widget_faqs/new.html.haml +2 -0
- data/app/views/admin/widgets/_tabs.html.haml +8 -0
- data/app/views/admin/widgets/index.html.haml +28 -0
- data/app/views/admin/widgets/index.json.erb +27 -0
- data/app/views/layouts/admin/_menu.html.haml +0 -0
- data/app/views/layouts/application.html.haml +21 -0
- data/app/views/pages/_linked_pages.html.haml +4 -0
- data/app/views/pages/_page.html.haml +15 -0
- data/app/views/pages/show.html.haml +9 -0
- data/app/views/search/index.html.haml +8 -0
- data/config/locales/activerecord/en.yml +48 -0
- data/config/locales/activerecord/fr.yml +77 -0
- data/config/locales/admin/actuality/en.yml +30 -0
- data/config/locales/admin/actuality/fr.yml +30 -0
- data/config/locales/admin/block/en.yml +38 -0
- data/config/locales/admin/block/fr.yml +38 -0
- data/config/locales/admin/carousel/en.yml +24 -0
- data/config/locales/admin/carousel/fr.yml +24 -0
- data/config/locales/admin/menu/en.yml +33 -0
- data/config/locales/admin/menu/fr.yml +38 -0
- data/config/locales/admin/newsletter/en.yml +30 -0
- data/config/locales/admin/newsletter/fr.yml +30 -0
- data/config/locales/admin/page/en.yml +77 -0
- data/config/locales/admin/page/fr.yml +77 -0
- data/config/locales/admin/section/en.yml +23 -0
- data/config/locales/admin/section/fr.yml +23 -0
- data/config/locales/admin/static_content_block/en.yml +43 -0
- data/config/locales/admin/static_content_block/fr.yml +42 -0
- data/config/locales/admin/widget/en.yml +34 -0
- data/config/locales/admin/widget/fr.yml +34 -0
- data/config/locales/admin/widget_actuality/en.yml +23 -0
- data/config/locales/admin/widget_actuality/fr.yml +23 -0
- data/config/locales/admin/widget_faq/en.yml +22 -0
- data/config/locales/admin/widget_faq/fr.yml +30 -0
- data/config/locales/common/en.yml +208 -0
- data/config/locales/common/fr.yml +209 -0
- data/config/routes.rb +73 -0
- data/db/fixtures/menu_link_translations.yml +5 -0
- data/db/fixtures/menu_links.yml +5 -0
- data/db/fixtures/menus.yml +3 -0
- data/db/fixtures/page_translations.yml +19 -0
- data/db/fixtures/pages.yml +5 -0
- data/db/fixtures/people.yml +11 -0
- data/db/migrate/20091009134405_create_actualities.rb +18 -0
- data/db/migrate/20091009134503_create_blocks.rb +15 -0
- data/db/migrate/20091009134510_create_blocks_pages.rb +13 -0
- data/db/migrate/20091009134518_create_carousel_items.rb +17 -0
- data/db/migrate/20091009134729_create_pages.rb +18 -0
- data/db/migrate/20091009134736_create_pages_links.rb +12 -0
- data/db/migrate/20091027153116_create_menus.rb +14 -0
- data/db/migrate/20091027153659_create_menu_links.rb +19 -0
- data/db/migrate/20091208113459_create_page_translations.rb +9 -0
- data/db/migrate/20091208113460_create_block_translations.rb +9 -0
- data/db/migrate/20091208113461_create_menu_link_translations.rb +9 -0
- data/db/migrate/20091208170256_remove_translations_to_page.rb +10 -0
- data/db/migrate/20091208170257_remove_translations_to_block.rb +9 -0
- data/db/migrate/20091208170258_remove_translations_to_menu_link.rb +9 -0
- data/db/migrate/20100203102853_add_actuality_translations.rb +9 -0
- data/db/migrate/20100203102914_add_carousel_item_translations.rb +9 -0
- data/db/migrate/20100203125804_remove_translated_columns_to_actualities.rb +9 -0
- data/db/migrate/20100203125820_remove_translated_columns_to_carousel_items.rb +10 -0
- data/db/migrate/20100405095844_create_page_cols_table.rb +12 -0
- data/db/migrate/20100405101416_create_blocks_page_cols.rb +13 -0
- data/db/migrate/20100407093551_create_table_translation_for_page_cols.rb +13 -0
- data/db/migrate/20100413134832_add_index_on_menu_links.rb +11 -0
- data/db/migrate/20100501150819_add_code_to_pages.rb +13 -0
- data/db/migrate/20100511161012_create_faqs.rb +13 -0
- data/db/migrate/20100526163534_add_popup_to_menu_link.rb +9 -0
- data/db/migrate/20100929183346_change_answer_type.rb +9 -0
- data/db/migrate/20101015095242_update_actualities.rb +11 -0
- data/db/migrate/20101216155044_create_newsletter.rb +12 -0
- data/db/migrate/20110310092311_add_indexes_to_menu.rb +9 -0
- data/db/migrate/20110408133955_add_summary_to_menu_link_translations.rb +7 -0
- data/lib/forgeos/admin_menu.rb +14 -0
- data/lib/forgeos/cms.rb +8 -0
- data/lib/forgeos/cms/engine.rb +8 -0
- data/lib/forgeos/cms/statistics.rb +16 -0
- data/lib/forgeos_cms.rb +3 -0
- data/lib/tasks/install.rake +9 -0
- data/lib/tasks/upgrade.rake +22 -0
- data/recipes/deploy.rb +14 -0
- metadata +375 -0
Binary file
|
@@ -0,0 +1,138 @@
|
|
1
|
+
.pages-tree
|
2
|
+
padding: 10px
|
3
|
+
|
4
|
+
|
5
|
+
.tree-page_category li
|
6
|
+
width: 95%
|
7
|
+
|
8
|
+
&.open
|
9
|
+
background: url("brown-minus.png") 0px 1px no-repeat
|
10
|
+
|
11
|
+
&.closed
|
12
|
+
background: url("brown-plus.png") 0 1px no-repeat
|
13
|
+
|
14
|
+
|
15
|
+
#jstree-dragged.tree-page_category li li.open
|
16
|
+
background: url("brown-plus.png") 0 1px no-repeat
|
17
|
+
|
18
|
+
|
19
|
+
.tree.tree-page_category .ltr li a
|
20
|
+
padding: 0px 5px 0px 24px
|
21
|
+
color: #75491B
|
22
|
+
font-weight: bold
|
23
|
+
font-size: 0.8em
|
24
|
+
background-position: 0 -272px
|
25
|
+
display: block
|
26
|
+
|
27
|
+
|
28
|
+
.tree-page_category li
|
29
|
+
span
|
30
|
+
padding: 0px 5px 0px 24px
|
31
|
+
color: #75491B
|
32
|
+
font-weight: bold
|
33
|
+
font-size: 0.8em
|
34
|
+
background-position: 0 -272px
|
35
|
+
display: block
|
36
|
+
|
37
|
+
a span
|
38
|
+
height: 13px
|
39
|
+
width: 19px
|
40
|
+
font-size: 0.7em
|
41
|
+
right: 5px
|
42
|
+
position: absolute
|
43
|
+
margin-top: -16px
|
44
|
+
|
45
|
+
|
46
|
+
.tree.tree-page_category .ltr li
|
47
|
+
a
|
48
|
+
&.page
|
49
|
+
padding: 3px 5px 3px 32px
|
50
|
+
background-position: 6px -1200px
|
51
|
+
|
52
|
+
&:hover, &.hover
|
53
|
+
background-color: #FDD794
|
54
|
+
color: #F16028
|
55
|
+
|
56
|
+
&.clicked
|
57
|
+
background-color: #FDD794
|
58
|
+
color: #F16028
|
59
|
+
|
60
|
+
&:hover
|
61
|
+
background-color: #FDD794
|
62
|
+
color: #F16028
|
63
|
+
|
64
|
+
span.clicked
|
65
|
+
background-color: #FDD794
|
66
|
+
color: #F16028
|
67
|
+
|
68
|
+
a.page
|
69
|
+
&:hover span, &.hover span, &.clicked span, &.active span, &.clicked:hover span
|
70
|
+
background-position: 0 -3637px
|
71
|
+
|
72
|
+
&:hover, &.hover, &.clicked, &.active, &.clicked:hover
|
73
|
+
background-color: #81C44E
|
74
|
+
-moz-border-radius: 4px
|
75
|
+
color: #FFF
|
76
|
+
|
77
|
+
span.clicked
|
78
|
+
background-color: #81C44E
|
79
|
+
-moz-border-radius: 4px
|
80
|
+
color: #FFF
|
81
|
+
|
82
|
+
|
83
|
+
.tree-page_category li span.clicked
|
84
|
+
padding: 0px 3px 0px 20px
|
85
|
+
|
86
|
+
|
87
|
+
.tree.tree-page_category .ltr li a.loading
|
88
|
+
background-image: url("throbber.gif")
|
89
|
+
|
90
|
+
|
91
|
+
.tree-page_category-context
|
92
|
+
width: 160px
|
93
|
+
background: #FFF
|
94
|
+
border: 1px solid #AEB0B2
|
95
|
+
position: absolute
|
96
|
+
border-bottom: 0
|
97
|
+
|
98
|
+
a
|
99
|
+
display: block
|
100
|
+
text-decoration: none
|
101
|
+
border-bottom: 1px solid #AEB0B2
|
102
|
+
color: black
|
103
|
+
line-height: 20px
|
104
|
+
padding: 1px 0 1px 25px
|
105
|
+
margin: 0
|
106
|
+
|
107
|
+
&.disabled:hover
|
108
|
+
display: block
|
109
|
+
text-decoration: none
|
110
|
+
border-bottom: 1px solid #AEB0B2
|
111
|
+
color: black
|
112
|
+
line-height: 20px
|
113
|
+
padding: 1px 0 1px 25px
|
114
|
+
margin: 0
|
115
|
+
|
116
|
+
&:hover
|
117
|
+
background-color: #D6EDF4
|
118
|
+
padding: 0 0 0 25px
|
119
|
+
margin: 0
|
120
|
+
color: #2973BD
|
121
|
+
border-bottom: 1px solid #AEB0B2
|
122
|
+
|
123
|
+
&.disabled
|
124
|
+
color: silver
|
125
|
+
opacity: 0.5
|
126
|
+
-ms-filter: 'alpha(opacity=50)'
|
127
|
+
filter: alpha(opacity=50)
|
128
|
+
zoom: 1
|
129
|
+
|
130
|
+
&:hover
|
131
|
+
color: silver
|
132
|
+
opacity: 0.5
|
133
|
+
-ms-filter: 'alpha(opacity=50)'
|
134
|
+
filter: alpha(opacity=50)
|
135
|
+
zoom: 1
|
136
|
+
|
137
|
+
.separator
|
138
|
+
display: none !important
|
@@ -0,0 +1,11 @@
|
|
1
|
+
class ActualitiesController < Forgeos::ApplicationController
|
2
|
+
|
3
|
+
def rss
|
4
|
+
@actualities = Actuality.find_all_by_active(true, :limit => 20, :order => 'created_at DESC')
|
5
|
+
@feed_title = 'Feed title'
|
6
|
+
@feed_description = 'Feed description'
|
7
|
+
@locale = 'fr-fr'
|
8
|
+
response.headers['Content-Type'] = 'application/rss+xml'
|
9
|
+
end
|
10
|
+
|
11
|
+
end
|
@@ -0,0 +1,100 @@
|
|
1
|
+
class Admin::ActualitiesController < Admin::BaseController
|
2
|
+
|
3
|
+
cache_sweeper :page_sweeper, :only => [:create, :update, :destroy]
|
4
|
+
before_filter :get_actuality, :only => [:show, :edit, :update, :destroy, :activate]
|
5
|
+
before_filter :new_actuality, :only => [:new, :create]
|
6
|
+
|
7
|
+
|
8
|
+
def index
|
9
|
+
respond_to do |format|
|
10
|
+
format.html
|
11
|
+
format.json do
|
12
|
+
sort
|
13
|
+
render :layout => false
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
def edit
|
19
|
+
end
|
20
|
+
|
21
|
+
def update
|
22
|
+
if @actuality.update_attributes(params[:actuality])
|
23
|
+
flash[:notice] = t('actuality.update.success').capitalize
|
24
|
+
redirect_to([forgeos_cms, :admin, :actualities])
|
25
|
+
else
|
26
|
+
flash[:error] = t('actuality.update.failed').capitalize
|
27
|
+
render :action => 'edit'
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
|
32
|
+
def new
|
33
|
+
|
34
|
+
end
|
35
|
+
|
36
|
+
def create
|
37
|
+
if @actuality.save
|
38
|
+
flash[:notice] = t('actuality.create.success').capitalize
|
39
|
+
redirect_to([forgeos_cms, :admin, :actualities])
|
40
|
+
else
|
41
|
+
flash[:error] = @actuality.errors.first.inspect
|
42
|
+
render :action => 'new'
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
def activate
|
47
|
+
render :text => @actuality.activate
|
48
|
+
end
|
49
|
+
|
50
|
+
def destroy
|
51
|
+
if @actuality.destroy
|
52
|
+
flash[:notice] = t('actuality.destroy.success').capitalize
|
53
|
+
return redirect_to([forgeos_cms, :admin, :actualities]) if !request.xhr?
|
54
|
+
else
|
55
|
+
flash[:error] = t('actuality.destroy.failed').capitalize
|
56
|
+
end
|
57
|
+
render :nothing => true
|
58
|
+
end
|
59
|
+
|
60
|
+
|
61
|
+
private
|
62
|
+
|
63
|
+
def get_actuality
|
64
|
+
@actuality = Actuality.find_by_id(params[:id])
|
65
|
+
end
|
66
|
+
|
67
|
+
def new_actuality
|
68
|
+
@actuality = Actuality.new(params[:actuality])
|
69
|
+
end
|
70
|
+
|
71
|
+
def sort
|
72
|
+
columns = %w(id title date active)
|
73
|
+
|
74
|
+
per_page = params[:iDisplayLength] ? params[:iDisplayLength].to_i : 10
|
75
|
+
offset = params[:iDisplayStart] ? params[:iDisplayStart].to_i : 0
|
76
|
+
page = (offset / per_page) + 1
|
77
|
+
order = "#{columns[params[:iSortCol_0].to_i]} #{params[:iSortDir_0] ? params[:iSortDir_0].upcase : 'ASC'}"
|
78
|
+
|
79
|
+
conditions = {}
|
80
|
+
includes = []
|
81
|
+
options = {:page => page, :per_page => per_page }
|
82
|
+
|
83
|
+
options[:conditions] = conditions unless conditions.empty?
|
84
|
+
options[:include] = includes unless includes.empty?
|
85
|
+
options[:order] = order unless order.squeeze.blank?
|
86
|
+
|
87
|
+
joins = []
|
88
|
+
joins << :translations
|
89
|
+
|
90
|
+
|
91
|
+
if params[:sSearch] && !params[:sSearch].blank?
|
92
|
+
@actualities = Actuality.search(params[:sSearch],options)
|
93
|
+
else
|
94
|
+
options[:joins] = joins
|
95
|
+
@actualities = Actuality.paginate(:all,options)
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
|
100
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
load File.join(Gem.loaded_specs['forgeos_core'].full_gem_path, 'app', 'controllers', 'admin', 'base_controller.rb')
|
2
|
+
Admin::BaseController.class_eval do
|
3
|
+
before_filter :forgeos_cms_javascripts_files
|
4
|
+
|
5
|
+
private
|
6
|
+
|
7
|
+
def forgeos_cms_javascripts_files
|
8
|
+
@forgeos_js_functions_files += forgeos_javascripts_files('forgeos_cms', 'forgeos/admin/functions')
|
9
|
+
@forgeos_js_inits_files += forgeos_javascripts_files('forgeos_cms', 'forgeos/admin/inits')
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,101 @@
|
|
1
|
+
class Admin::CarouselsController < Admin::BaseController
|
2
|
+
cache_sweeper :page_sweeper, :only => [:create, :update, :destroy]
|
3
|
+
before_filter :get_carousel, :only => [:show, :edit, :update, :destroy, :duplicate]
|
4
|
+
before_filter :new_carousel, :only => [:new, :create]
|
5
|
+
before_filter :get_pages_and_categories, :only => [:index, :show, :new, :create, :edit, :update, :duplicate]
|
6
|
+
|
7
|
+
def index
|
8
|
+
return redirect_to([forgeos_cms, :admin, :widgets])
|
9
|
+
end
|
10
|
+
|
11
|
+
def show; end
|
12
|
+
|
13
|
+
def new; end
|
14
|
+
|
15
|
+
def edit; end
|
16
|
+
|
17
|
+
def duplicate
|
18
|
+
@carousel = @carousel.clone
|
19
|
+
render :action => 'new'
|
20
|
+
end
|
21
|
+
|
22
|
+
def create
|
23
|
+
# check that the linked page exists if page_id is specified
|
24
|
+
if params[:page_id] && !get_page
|
25
|
+
flash[:error] = I18n.t('widget.link.create.failed').capitalize
|
26
|
+
return
|
27
|
+
end
|
28
|
+
|
29
|
+
if @carousel.save
|
30
|
+
flash[:notice] = I18n.t('carousel.create.success').capitalize
|
31
|
+
redirect_to([forgeos_cms, :edit, :admin, @carousel])
|
32
|
+
else
|
33
|
+
flash[:error] = I18n.t('carousel.create.failed').capitalize
|
34
|
+
render :action => "new"
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
def update
|
39
|
+
if updated = @carousel.update_attributes(params[:carousel])
|
40
|
+
flash[:notice] = I18n.t('carousel.update.success').capitalize
|
41
|
+
else
|
42
|
+
flash[:error] = I18n.t('carousel.update.failed').capitalize
|
43
|
+
end
|
44
|
+
|
45
|
+
respond_to do |format|
|
46
|
+
format.html {
|
47
|
+
return render :action => "edit"
|
48
|
+
}
|
49
|
+
|
50
|
+
format.js {
|
51
|
+
return render :nothing => true
|
52
|
+
}
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
def destroy
|
57
|
+
if @carousel.destroy
|
58
|
+
flash[:notice] = I18n.t('carousel.destroy.success').capitalize
|
59
|
+
else
|
60
|
+
flash[:error] = I18n.t('carousel.destroy.failed').capitalize
|
61
|
+
end
|
62
|
+
return redirect_to([forgeos_cms, :admin, :widgets])
|
63
|
+
end
|
64
|
+
|
65
|
+
private
|
66
|
+
|
67
|
+
def get_carousel
|
68
|
+
unless @carousel = Carousel.find_by_id(params[:id])
|
69
|
+
flash[:error] = I18n.t('carousel.not_exist').capitalize
|
70
|
+
return redirect_to([forgeos_cms, :admin, :widgets])
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
def get_page
|
75
|
+
#flash[:error] = I18n.t('page.not_exist').capitalize
|
76
|
+
end
|
77
|
+
|
78
|
+
def get_pages_and_categories
|
79
|
+
@page_categories = PageCategory.find_all_by_parent_id(nil,:joins => :translations, :order => 'name')
|
80
|
+
@pages = Page.all(:include => :categories, :conditions => { :categories_elements => { :category_id => nil }})
|
81
|
+
end
|
82
|
+
|
83
|
+
def new_carousel
|
84
|
+
@carousel = Carousel.new params[:carousel]
|
85
|
+
end
|
86
|
+
|
87
|
+
def link_and_redirect_to_page
|
88
|
+
widget = @carousel.widgets
|
89
|
+
@page.widgets << widget
|
90
|
+
@page.widgets.reset_positions
|
91
|
+
|
92
|
+
if @carousel.save
|
93
|
+
return redirect_to([forgeos_cms, :admin, @page, :widgets])
|
94
|
+
else
|
95
|
+
@carousel.destroy
|
96
|
+
flash[:notice] = nil
|
97
|
+
flash[:error] = @carousel.errors
|
98
|
+
return
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
load File.join(Gem.loaded_specs['forgeos_core'].full_gem_path, 'app', 'controllers', 'admin', 'import_controller.rb')
|
2
|
+
class Admin::ImportController < Admin::BaseController
|
3
|
+
map_fields :create_page, Page.new.attributes.keys
|
4
|
+
map_fields :create_block, Block.new.attributes.keys
|
5
|
+
before_filter :cms_models, :only => :index
|
6
|
+
|
7
|
+
def create_page
|
8
|
+
create_model(Page,'single_key')
|
9
|
+
end
|
10
|
+
|
11
|
+
def create_block
|
12
|
+
create_model(Block,'single_key')
|
13
|
+
end
|
14
|
+
|
15
|
+
private
|
16
|
+
|
17
|
+
def cms_models
|
18
|
+
@models << 'page' << 'block'
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,104 @@
|
|
1
|
+
class Admin::MenusController < Admin::BaseController
|
2
|
+
cache_sweeper :page_sweeper, :only => [:create, :update, :destroy, :link, :activate]
|
3
|
+
before_filter :get_menu, :only => [:show, :edit, :update, :destroy, :duplicate, :activate]
|
4
|
+
before_filter :new_menu, :only => [:new, :create]
|
5
|
+
|
6
|
+
def index
|
7
|
+
respond_to do |format|
|
8
|
+
format.html
|
9
|
+
format.json do
|
10
|
+
sort
|
11
|
+
render :layout => false
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
def show
|
17
|
+
end
|
18
|
+
|
19
|
+
def new
|
20
|
+
end
|
21
|
+
|
22
|
+
def duplicate
|
23
|
+
@menu = @menu.clone
|
24
|
+
render :action => 'new'
|
25
|
+
end
|
26
|
+
|
27
|
+
def create
|
28
|
+
if @menu.save
|
29
|
+
flash[:notice] = t('menu.create.success').capitalize
|
30
|
+
redirect_to([forgeos_cms, :edit, :admin, @menu])
|
31
|
+
else
|
32
|
+
flash[:error] = t('menu.create.failed').capitalize
|
33
|
+
render :action => 'new'
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
def edit
|
38
|
+
end
|
39
|
+
|
40
|
+
def update
|
41
|
+
if @menu.update_attributes(params[:menu])
|
42
|
+
flash[:notice] = t('menu.update.success').capitalize
|
43
|
+
redirect_to([forgeos_cms, :edit, :admin, @menu])
|
44
|
+
else
|
45
|
+
flash[:error] = t('menu.update.failed').capitalize
|
46
|
+
render(:action => 'edit')
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
def destroy
|
51
|
+
if @menu.destroy
|
52
|
+
flash[:notice] = t('menu.destroy.success').capitalize
|
53
|
+
else
|
54
|
+
flash[:error] = t('menu.destroy.failed').capitalize
|
55
|
+
end
|
56
|
+
return redirect_to([forgeos_cms, :admin, :menus])
|
57
|
+
end
|
58
|
+
|
59
|
+
def activate
|
60
|
+
render :text => @menu.activate
|
61
|
+
end
|
62
|
+
|
63
|
+
private
|
64
|
+
|
65
|
+
def get_menu
|
66
|
+
unless @menu = ::Menu.find_by_id(params[:id])
|
67
|
+
flash[:error] = t('menu.not_exist').capitalize
|
68
|
+
return redirect_to([forgeos_cms, :admin, :menus])
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
def new_menu
|
73
|
+
@menu = ::Menu.new(params[:menu])
|
74
|
+
end
|
75
|
+
|
76
|
+
def sort
|
77
|
+
columns = %w(menus.name menus.name active)
|
78
|
+
per_page = params[:iDisplayLength].to_i
|
79
|
+
offset = params[:iDisplayStart].to_i
|
80
|
+
page = (offset / per_page) + 1
|
81
|
+
order_column = params[:iSortCol_0].to_i
|
82
|
+
order = "#{columns[order_column]} #{params[:iSortDir_0].upcase}"
|
83
|
+
|
84
|
+
conditions = {}
|
85
|
+
includes = []
|
86
|
+
options = { :page => page, :per_page => per_page }
|
87
|
+
|
88
|
+
if params[:category_id]
|
89
|
+
conditions[:categories_elements] = { :category_id => params[:category_id] }
|
90
|
+
includes << :menu_categories
|
91
|
+
end
|
92
|
+
|
93
|
+
options[:conditions] = conditions unless conditions.empty?
|
94
|
+
options[:include] = includes unless includes.empty?
|
95
|
+
options[:order] = order unless order.squeeze.blank?
|
96
|
+
|
97
|
+
if params[:sSearch] && !params[:sSearch].blank?
|
98
|
+
options[:star] = true
|
99
|
+
@menus = ::Menu.search(params[:sSearch], options)
|
100
|
+
else
|
101
|
+
@menus = ::Menu.paginate(:all, options)
|
102
|
+
end
|
103
|
+
end
|
104
|
+
end
|