forgeos_cms 1.9.0 → 1.9.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (136) hide show
  1. data/COPYING +339 -0
  2. data/COPYING.LESSER +165 -0
  3. data/README.textile +3 -13
  4. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_page/bubble-quantity-products.png +0 -0
  5. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_page/check-checked.png +0 -0
  6. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_page/check-unchecked.png +0 -0
  7. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_page/context.gif +0 -0
  8. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_page/create.png +0 -0
  9. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_page/dark-blue-minus.png +0 -0
  10. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_page/dark-blue-plus.png +0 -0
  11. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_page/dot.gif +0 -0
  12. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_page/f.png +0 -0
  13. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_page/fminus.gif +0 -0
  14. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_page/fminus_rtl.gif +0 -0
  15. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_page/folder.png +0 -0
  16. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_page/fplus.gif +0 -0
  17. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_page/fplus_rtl.gif +0 -0
  18. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_page/lastli.gif +0 -0
  19. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_page/lastli_rtl.gif +0 -0
  20. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_page/li.gif +0 -0
  21. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_page/remove.png +0 -0
  22. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_page/rename.png +0 -0
  23. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_page/throbber.gif +0 -0
  24. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/block_category/brown-minus.png +0 -0
  25. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/block_category/brown-plus.png +0 -0
  26. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/block_category/bubble-quantity-products.png +0 -0
  27. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/block_category/context.gif +0 -0
  28. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/block_category/create.png +0 -0
  29. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/block_category/dot.gif +0 -0
  30. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/block_category/f.png +0 -0
  31. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/block_category/fminus.gif +0 -0
  32. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/block_category/fminus_rtl.gif +0 -0
  33. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/block_category/fplus.gif +0 -0
  34. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/block_category/fplus_rtl.gif +0 -0
  35. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/block_category/lastli.gif +0 -0
  36. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/block_category/lastli_rtl.gif +0 -0
  37. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/block_category/li.gif +0 -0
  38. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/block_category/remove.png +0 -0
  39. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/block_category/rename.png +0 -0
  40. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/block_category/throbber.gif +0 -0
  41. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/menu-tree/big-drag-and-drop.png +0 -0
  42. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/menu-tree/bubble-quantity-products.png +0 -0
  43. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/menu-tree/check-checked.png +0 -0
  44. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/menu-tree/check-unchecked.png +0 -0
  45. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/menu-tree/context.gif +0 -0
  46. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/menu-tree/create.png +0 -0
  47. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/menu-tree/dark-blue-minus.png +0 -0
  48. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/menu-tree/dark-blue-plus.png +0 -0
  49. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/menu-tree/dot.gif +0 -0
  50. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/menu-tree/drag-drop.png +0 -0
  51. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/menu-tree/f.png +0 -0
  52. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/menu-tree/fminus.gif +0 -0
  53. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/menu-tree/fminus_rtl.gif +0 -0
  54. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/menu-tree/folder.png +0 -0
  55. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/menu-tree/fplus.gif +0 -0
  56. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/menu-tree/fplus_rtl.gif +0 -0
  57. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/menu-tree/lastli.gif +0 -0
  58. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/menu-tree/lastli_rtl.gif +0 -0
  59. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/menu-tree/li.gif +0 -0
  60. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/menu-tree/remove.png +0 -0
  61. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/menu-tree/rename.png +0 -0
  62. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/menu-tree/throbber.gif +0 -0
  63. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/page_category/brown-minus.png +0 -0
  64. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/page_category/brown-plus.png +0 -0
  65. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/page_category/bubble-quantity-products.png +0 -0
  66. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/page_category/context.gif +0 -0
  67. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/page_category/create.png +0 -0
  68. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/page_category/dot.gif +0 -0
  69. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/page_category/f.png +0 -0
  70. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/page_category/fminus.gif +0 -0
  71. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/page_category/fminus_rtl.gif +0 -0
  72. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/page_category/fplus.gif +0 -0
  73. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/page_category/fplus_rtl.gif +0 -0
  74. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/page_category/lastli.gif +0 -0
  75. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/page_category/lastli_rtl.gif +0 -0
  76. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/page_category/li.gif +0 -0
  77. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/page_category/remove.png +0 -0
  78. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/page_category/rename.png +0 -0
  79. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/page_category/throbber.gif +0 -0
  80. data/app/assets/javascripts/forgeos/admin/functions/forgeos_cms/trees.js +1 -1
  81. data/app/assets/javascripts/forgeos/admin/inits/forgeos_cms/menus.js +70 -42
  82. data/app/assets/javascripts/forgeos/admin/inits/forgeos_cms/trees.js +38 -66
  83. data/app/assets/stylesheets/forgeos/admin/forgeos_cms/_blocks.css.sass +0 -6
  84. data/app/assets/stylesheets/forgeos/jstree/themes/association_page/style.css.sass +24 -195
  85. data/app/assets/stylesheets/forgeos/jstree/themes/block_category/style.css.sass +8 -8
  86. data/app/assets/stylesheets/forgeos/jstree/themes/menu-tree/style.css.sass +15 -91
  87. data/app/assets/stylesheets/forgeos/jstree/themes/page_category/style.css.sass +8 -8
  88. data/app/controllers/admin/actualities_controller.rb +1 -1
  89. data/app/controllers/admin/carousels_controller.rb +1 -1
  90. data/app/controllers/admin/menus_controller.rb +1 -1
  91. data/app/controllers/admin/newsletters_controller.rb +1 -1
  92. data/app/controllers/admin/pages_controller.rb +2 -2
  93. data/app/controllers/admin/static_content_blocks_controller.rb +1 -1
  94. data/app/controllers/admin/widgets_controller.rb +1 -1
  95. data/app/controllers/forgeos/application_controller.rb +4 -4
  96. data/app/helpers/admin/base_helper.rb +16 -0
  97. data/app/views/admin/actualities/index.json.erb +8 -9
  98. data/app/views/admin/blocks/_associated_pages.html.haml +20 -21
  99. data/app/views/admin/blocks/_tabs.html.haml +7 -6
  100. data/app/views/admin/carousels/_attachments_popups.html.haml +1 -1
  101. data/app/views/admin/carousels/_form.html.haml +2 -2
  102. data/app/views/admin/carousels/show.html.haml +2 -2
  103. data/app/views/admin/categories/_block.html.haml +1 -1
  104. data/app/views/admin/menus/_empty_menu_link.html.haml +1 -2
  105. data/app/views/admin/menus/_form.html.haml +3 -3
  106. data/app/views/admin/menus/_form_menu_links.html.haml +5 -7
  107. data/app/views/admin/menus/_lang_switcher.html.haml +2 -2
  108. data/app/views/admin/menus/_types_popups.html.haml +10 -9
  109. data/app/views/admin/menus/index.json.erb +7 -9
  110. data/app/views/admin/newsletters/index.json.erb +4 -4
  111. data/app/views/admin/pages/_block_popup.html.haml +6 -5
  112. data/app/views/admin/pages/_blocks.html.haml +1 -1
  113. data/app/views/admin/pages/_form.html.haml +14 -5
  114. data/app/views/admin/pages/_general.html.haml +0 -5
  115. data/app/views/admin/pages/_tabs_show.html.haml +1 -9
  116. data/app/views/admin/pages/index.json.erb +7 -5
  117. data/app/views/admin/pages/new.html.haml +0 -1
  118. data/app/views/admin/pages/show.html.haml +7 -33
  119. data/app/views/admin/static_content_blocks/_form.html.haml +2 -2
  120. data/app/views/admin/static_content_blocks/index.html.haml +1 -1
  121. data/app/views/admin/static_content_blocks/index.json.erb +4 -4
  122. data/app/views/admin/widget_actualities/_form.html.haml +5 -5
  123. data/app/views/admin/widget_actualities/_form_item.html.haml +4 -4
  124. data/app/views/admin/widget_actualities/edit.html.haml +1 -1
  125. data/app/views/admin/widget_actualities/new.html.haml +1 -1
  126. data/app/views/admin/widget_actualities/show.html.haml +4 -4
  127. data/app/views/admin/widget_faqs/_form.html.haml +3 -11
  128. data/app/views/admin/widget_faqs/edit.html.haml +2 -2
  129. data/app/views/admin/widget_faqs/new.html.haml +2 -2
  130. data/app/views/admin/widgets/_tabs.html.haml +4 -3
  131. data/app/views/admin/widgets/index.html.haml +1 -1
  132. data/app/views/admin/widgets/index.json.erb +7 -8
  133. data/config/routes.rb +1 -1
  134. metadata +104 -89
  135. data/app/views/admin/widget_actualities/_tabs.html.haml +0 -8
  136. data/app/views/admin/widget_faqs/_tabs.html.haml +0 -8
@@ -2,32 +2,31 @@
2
2
  - level = 0
3
3
  - categories.each do |category|
4
4
  %li
5
- = link_to category.name, '#', :class=>'big-icons folder'
5
+ = link_to category.name, '#'
6
6
  - unless category.children.empty?
7
7
  %ul
8
8
  - category.children.each do |child|
9
9
  = render :partial => 'admin/blocks/associated_pages', :locals => { :categories => [child], :level => (level + 1), :block => block, :element_id => element_id }
10
10
  - category.pages.each do |_page|
11
- %li.folder
12
- = _page.title
11
+ %li{ :type => 'folder'}
12
+ = link_to _page.title, '#'
13
13
  %ul
14
- - _page.page_cols.each_with_index do |page, index|
15
- %li.page{:id => "page_col_#{page.id}", :class => block.page_cols.include?(page) ? 'clicked' : nil}
16
- = link_to '#', :class => "small-icons page #{block.page_cols.include?(page) ? 'clicked' : nil}" do
17
- #{_page.title} [#{index}]
18
- %span
19
- - if block.page_cols.include?(page)
20
- = hidden_field_tag "#{element_id}[page_col_ids][]", page.id
14
+ - _page.page_cols.each_with_index do |page_col, index|
15
+ - checked = block.page_cols.include?(page_col)
16
+ %li{:id => "page_col_#{page_col.id}", :class => checked ? 'jstree-checked' : 'jstree-unchecked' }
17
+ = link_to t("page_col_#{index}"), '#'
18
+ - if checked
19
+ = hidden_field_tag "#{element_id}[page_col_ids][]", page_col.id
21
20
 
22
21
  - unless !defined?(pages) or pages.empty?
23
- - pages.each do |_page|
24
- %li.big-icons.folder
25
- = _page.title
26
- %ul
27
- - _page.page_cols.each_with_index do |page, index|
28
- %li.page{:id => "page_col_#{page.id}", :class => block.page_cols.include?(page) ? 'clicked' : nil}
29
- = link_to '#', :class => "small-icons page #{block.page_cols.include?(page) ? 'clicked' : nil}" do
30
- = t("page_col_#{index}").capitalize
31
- %span
32
- - if block.page_cols.include?(page)
33
- = hidden_field_tag "#{element_id}[page_col_ids][]", page.id
22
+ - pages.each do |page|
23
+ %li
24
+ = link_to page.title, '#'
25
+ - unless page.page_cols.empty?
26
+ %ul
27
+ - page.page_cols.each_with_index do |page_col, index|
28
+ - checked = block.page_cols.include?(page_col)
29
+ %li{:id => "page_col_#{page_col.id}", :class => checked ? 'jstree-checked' : 'jstree-unchecked' }
30
+ = link_to t("page_col_#{index}").capitalize, '#'
31
+ - if checked
32
+ = hidden_field_tag "#{element_id}[page_col_ids][]", page_col.id
@@ -1,8 +1,9 @@
1
1
  %ul.ui-tabs-nav.ui-helper-reset.ui-helper-clearfix.ui-widget-header.ui-corner-all
2
- %li.ui-state-default.ui-corner-top= link_to I18n.t('page', :count => 2).capitalize, forgeos_cms.admin_pages_path
2
+ %li.ui-state-default.ui-corner-top= link_to I18n.t('page', :count => 2).capitalize, [forgeos_cms, :admin, :pages]
3
3
  %li.ui-state-default.ui-corner-top.ui-tabs-selected.ui-state-active= link_to I18n.t('block', :count => 2).capitalize, '#content'
4
- %li.ui-state-default.ui-corner-top= link_to I18n.t('navigation').capitalize, forgeos_cms.admin_menus_path
5
- %li.ui-state-default.ui-corner-top= link_to I18n.t('actuality', :count => 2).capitalize, forgeos_cms.admin_actualities_path
6
- #blocks-header.backgrounds
7
- = link_to I18n.t('static_content_block', :count => 1).capitalize, '#', :class => 'selected'
8
- = link_to I18n.t('widget', :count => 2).capitalize, forgeos_cms.admin_widgets_path
4
+ %li.ui-state-default.ui-corner-top= link_to I18n.t('navigation').capitalize, [forgeos_cms, :admin, :menus]
5
+ %li.ui-state-default.ui-corner-top= link_to I18n.t('actuality', :count => 2).capitalize, [forgeos_cms, :admin, :actualities]
6
+ #sub-links
7
+ %ul
8
+ %li= link_to I18n.t('static_content_block', :count => 1).capitalize, '#', :class => 'selected'
9
+ %li= link_to I18n.t('widget', :count => 2).capitalize, [forgeos_cms, :admin, :widgets]
@@ -24,7 +24,7 @@
24
24
  .sidebar-content
25
25
  %h2{ :class => 'small-icons picture'}
26
26
  = link_to_function I18n.t('media.picture.all').capitalize, "select_all_elements_without_category('picture-attachment-tree')"
27
- #picture-attachment-tree.init-tree.a-tree
27
+ #picture-attachment-tree
28
28
  .media-hoverlay-content.thumbnails
29
29
  .table#thumbnail-table.datatable.media.selectable_rows
30
30
  .media-hoverlay-content.table.hidden
@@ -28,7 +28,7 @@
28
28
  %a.small-icons.step-title{ :href => "#" }
29
29
  = "#{I18n.t('widget.link.create.action').capitalize} :"
30
30
  = hidden_field_tag 'carousel[page_col_ids][]'
31
- #association-carousel-page-tree.inner-step.init-tree
31
+ #association-carousel-page-tree.inner-step
32
32
  %ul
33
33
  = render :partial => 'admin/blocks/associated_pages', :locals => { :categories => page_categories, :pages => pages, :block => carousel, :element_id => 'carousel' }
34
34
  .clear
@@ -36,7 +36,7 @@
36
36
  %a.small-icons.step-title{ :href => "#" }
37
37
  = "#{I18n.t('folder.associated_to').capitalize} :"
38
38
  = hidden_field_tag 'carousel[category_ids][]'
39
- #association-carousel-tree.inner-step.init-tree
39
+ #association-carousel-tree.inner-step
40
40
  %ul
41
41
  = render :partial => 'admin/categories/associated_elements', :locals => { :association_id => 'category_ids', :element => carousel, :category_ids => carousel.category_ids, :categories => WidgetCategory.find_all_by_parent_id(nil) }
42
42
  .clear
@@ -25,14 +25,14 @@
25
25
  #carousel_show_create.step.open
26
26
  %a.small-icons.step-title{ :href => "#" }
27
27
  = "#{I18n.t('widget.link.create.action').capitalize} :"
28
- .view-tree.inner-step.init-tree
28
+ .view-tree.inner-step
29
29
  %ul
30
30
  = render :partial => 'admin/blocks/associated_pages', :locals => { :categories => @page_categories, :pages => @pages, :block => @carousel, :element_id => 'carousel' }
31
31
  .clear
32
32
  .step
33
33
  %a.small-icons.step-title{ :href => "#" }
34
34
  = "#{I18n.t('folder.associated_to').capitalize} :"
35
- .view-tree.inner-step.init-tree
35
+ .view-tree.inner-step
36
36
  %ul
37
37
  = render :partial => 'admin/categories/associated_elements', :locals => { :association_id => 'category_ids', :element => @carousel, :category_ids => @carousel.category_ids, :categories => WidgetCategory.find_all_by_parent_id(nil) }
38
38
  .clear
@@ -1,4 +1,4 @@
1
1
  - link_class = 'small-icons block'
2
2
  - link_class += ' active' if page.page_cols.map(&:blocks).flatten.uniq.include?(block)
3
3
  %li{ :rel => 'file', :id => "block_#{block.id}" }
4
- = link_to block.title.to_s + '<span class="small-icons"></span>', '#', :class => link_class, :title => block.class.human_name.capitalize
4
+ = link_to block.title.to_s + '<span class="small-icons"></span>', '#', :class => link_class, :title => block.class.model_name.human.capitalize
@@ -25,8 +25,7 @@
25
25
  %span.linked-to
26
26
  %span.link= link_to t('menu.link.change'), '#', :class => 'change-type'
27
27
  %label= "#{t('menu.visibility').capitalize} :"
28
- .select-status
29
- = select_tag "menu[menu_links_attributes][#{name}][active]", options_for_select([[t('menu.show').capitalize, 1], [t('menu.hide').capitalize, 0]], :selected => 1)
28
+ = select_tag "menu[menu_links_attributes][#{name}][active]", options_for_select([[t('menu.show').capitalize, 1], [t('menu.hide').capitalize, 0]], :selected => 1)
30
29
 
31
30
  = label_tag "menu[menu_links_attributes][#{name}][popup]", t('helpers.label.menu_link.popup')
32
31
  = check_box_tag "menu[menu_links_attributes][#{name}][popup]"
@@ -8,7 +8,7 @@
8
8
 
9
9
  .inner-content
10
10
  #menu-tree.padding-wrap
11
- %ul.init-tree
11
+ %ul
12
12
  = render :partial => 'form_menu_links', :locals => { :menu_links => @menu.menu_links, :form => f, :has_parent => false }
13
13
  = link_to t('menu.link.add').capitalize, '#', :class => 'small-icons add-link button-menu-link'
14
14
 
@@ -16,8 +16,8 @@
16
16
  .step
17
17
  = link_to content_tag(:span, t('menu.link.add').capitalize, :class => 'small-icons add-menu-link'), '#', :class => 'backgrounds button button-menu-link'
18
18
 
19
- .step
20
- - unless menu.new_record?
19
+ - unless menu.new_record?
20
+ .step
21
21
  = link_to t('menu.duplicate').capitalize, forgeos_cms.duplicate_admin_menu_path(menu), :class => 'small-icons duplicate'
22
22
  = link_to t('menu.destroy.action').capitalize, [forgeos_cms, :admin, menu], :confirm => t('menu.destroy.confirm').capitalize, :method => :delete, :class => 'small-icons delete'
23
23
  .clear
@@ -1,14 +1,13 @@
1
1
  - links = has_parent ? :children : :menu_links
2
2
 
3
- - form.fields_for links, :omit_hidden_fields => true do |menu_link_form|
3
+ = form.fields_for links, :omit_hidden_fields => true do |menu_link_form|
4
4
  - menu_link = menu_link_form.object
5
5
  - link_class = menu_link.class.to_s.underscore.split('_').first
6
6
  - link_class = 'external' if link_class.eql?('menu')
7
7
 
8
8
  %li{ :class => menu_link.children.empty? ? 'file' : 'folder' }
9
- - link_to menu_link.url, :class => 'tree-link' do
10
- %span.small-icons.name{ :class => link_class }
11
- = menu_link.title
9
+ = link_to menu_link.url, :class => 'tree-link' do
10
+ %span.small-icons.name{ :class => link_class }= menu_link.title
12
11
  %span.small-icons.status{ :class => menu_link.active ? 'see-on' : 'see-off' }
13
12
 
14
13
  .menu_link
@@ -32,13 +31,13 @@
32
31
  - if target
33
32
  = link_to target.name, [forgeos_cms, :admin, target]
34
33
  - else
35
- = link_to menu_link.url
34
+ = link_to menu_link.url, menu_link.url
36
35
  %span.linked-to= target ? target.name : ''
37
36
  %span.link
38
37
  = link_to t('menu.link.change'), '#', :class => 'change-type'
39
38
 
40
39
  = menu_link_form.label :active
41
- .select-status= menu_link_form.select :active, [[t('menu.show').capitalize, 1], [t('menu.hide').capitalize, 0]], :selected => menu_link.active ? 1 : 0
40
+ = menu_link_form.select :active, [[t('menu.show').capitalize, 1], [t('menu.hide').capitalize, 0]], :selected => menu_link.active ? 1 : 0
42
41
 
43
42
  = menu_link_form.label :popup
44
43
  = menu_link_form.check_box :popup
@@ -57,4 +56,3 @@
57
56
  - unless menu_link.children.nil? or menu_link.children.blank?
58
57
  %ul
59
58
  = render :partial => 'form_menu_links', :locals => { :form => menu_link_form, :has_parent => true }
60
-
@@ -1,2 +1,2 @@
1
- - form_tag '/admin/dashboard/change_lang', :autocomplete => 'off', :id => 'lang-switcher' do
2
- %div= select_tag :lang, options_for_select([['Français',:fr],['Anglais',:en]],session[:lang] || I18n.locale), :onchange => 'jQuery(this.form).submit()'
1
+ = form_tag '/admin/dashboard/change_lang', :autocomplete => 'off', :id => 'lang-switcher' do
2
+ %div= select_tag :lang, options_for_select([['Français',:fr],['Anglais',:en]],session[:lang] || I18n.locale), :onchange => 'jQuery(this.form).trigger("submit")'
@@ -1,8 +1,9 @@
1
1
  #menuLinkTypeDialog.media-hoverlay
2
- #inner-lightbox.backgrounds
3
- = link_to_function ExternalLink.model_name.human, "toggleSelectedOverlay('#inner-lightbox.backgrounds .external'); toggle_menu_types_overlays('external-link')", :class => "small-icons external selected"
4
- = link_to_function PageLink.model_name.human, "toggleSelectedOverlay('#inner-lightbox.backgrounds .page'); update_current_dataTable_source('#table-files','#{escape_javascript(forgeos_cms.admin_pages_path(:mode => 'menu_link',:format => :json))}'); toggle_menu_types_overlays('target-link');", :class => "small-icons page"
5
- = link_to_function CategoryLink.model_name.human, "toggleSelectedOverlay('#inner-lightbox.backgrounds .category'); update_current_dataTable_source('#table-files','#{escape_javascript(forgeos_cms.admin_page_categories_path(:mode => 'menu_link', :format => :json))}'); toggle_menu_types_overlays('target-link')", :class => "small-icons category"
2
+ #inner-lightbox
3
+ %ul
4
+ %li= link_to_function ExternalLink.model_name.human, "toggleSelectedOverlay('#inner-lightbox .external'); toggle_menu_types_overlays('external-link')", :class => "small-icons external selected"
5
+ %li= link_to_function PageLink.model_name.human, "toggleSelectedOverlay('#inner-lightbox .page'); update_current_dataTable_source('#table-menu_links','#{escape_javascript(forgeos_cms.admin_pages_path(:mode => 'menu_link',:format => :json))}'); toggle_menu_types_overlays('target-link');", :class => "small-icons page"
6
+ %li= link_to_function CategoryLink.model_name.human, "toggleSelectedOverlay('#inner-lightbox .category'); update_current_dataTable_source('#table-menu_links','#{escape_javascript(forgeos_cms.admin_page_categories_path(:mode => 'menu_link', :format => :json))}'); toggle_menu_types_overlays('target-link')", :class => "small-icons category"
6
7
 
7
8
  .media-hoverlay-header
8
9
  #search.right.files
@@ -10,12 +11,12 @@
10
11
  .backgrounds.search-form-files
11
12
 
12
13
  .media-hoverlay-content
13
- #target-link{:style => 'display: none'}
14
- %table#table-files.datatable.media.selectable_rows
15
- %tr
16
- %td
17
14
  #external-link
18
15
  %label= "#{t(:url).capitalize} :"
19
16
  = text_field_tag "url", '', :id => "overlay-url"
17
+ #target-link{:style => 'display: none'}
18
+ %table#table-menu_links.datatable.media.selectable_rows
19
+ %tr
20
+ %td
20
21
 
21
- = dataTables_tag :id => 'table-files', :url => forgeos_cms.admin_pages_path(:format => :json, :mode => 'menu_link'), :columns => ["{'sClass':'th-checkbox-container', 'bSortable': false }","{ 'sTitle': '#{t(:name)}'}","{'bVisible': false}", "{'bVisible': false}"], :autostart => false
22
+ = dataTables_tag :id => 'table-menu_links', :url => forgeos_cms.admin_pages_path(:format => :json, :mode => 'menu_link'), :columns => ["{'sClass':'th-checkbox-container', 'bSortable': false }","{ 'sTitle': '#{t(:name)}'}","{'bVisible': false}", "{'bVisible': false}"]
@@ -5,25 +5,23 @@
5
5
  link_id = menu.id
6
6
  klass = menu.active? ? 'see-on' : 'see-off'
7
7
  [
8
- content_tag(:div, content_tag(:div, content_tag(:span, "&nbsp;", :class => "small-icons menu-ico"), :class=>"image"), :id => link_id),
8
+ content_tag(:div, content_tag(:div, tag(:span, :class => "small-icons menu-ico"), :class=>"image"), :id => link_id),
9
9
  content_tag(:div, link_to(menu.name, [forgeos_cms, :edit, :admin, menu]), :class => 'menu-name'),
10
- link_to('', :url => forgeos_cms.activate_admin_menu_path(menu),
10
+ link_to('', [forgeos_cms, :activate, :admin, menu],
11
11
  :remote => true,
12
12
  :complete => "toggleActivate('#show_#{link_id}')",
13
- :html => {
14
- :class => "small-icons #{klass}",
15
- :id => "show_#{link_id}"
16
- }),
13
+ :class => "small-icons #{klass}",
14
+ :id => "show_#{link_id}"
15
+ ),
17
16
  link_to('', [forgeos_cms, :duplicate, :admin, menu], :class => 'small-icons duplicate-link') +
18
17
  link_to('', [forgeos_cms, :edit, :admin, menu], :class => 'small-icons edit-link') +
19
- link_to('', :url => [forgeos_cms, :admin, menu],
18
+ link_to('', [forgeos_cms, :admin, menu],
20
19
  :remote => true,
21
20
  :method => :delete,
22
21
  :confirm => t('menu.destroy.confirm').capitalize,
23
22
  :success => "removedataTablesRow('#destroy_#{link_id}')",
24
- :html => {
25
23
  :class => 'small-icons destroy-link', :id => "destroy_#{link_id}"
26
- })
24
+ )
27
25
  ]
28
26
  end
29
27
  }
@@ -7,14 +7,14 @@
7
7
  content_tag(:div, link_to(newsletter.email, [forgeos_cms, :edit, :admin, newsletter])),
8
8
  content_tag(:div, newsletter.created_at.to_s),
9
9
  link_to('', [forgeos_cms, :edit, :admin, newsletter], :class => 'small-icons edit-link') +
10
- link_to('', :url => [forgeos_cms, :admin, newsletter],
10
+ link_to('', [forgeos_cms, :admin, newsletter],
11
11
  :remote => true,
12
12
  :method => :delete,
13
13
  :confirm => t('menu.destroy.confirm').capitalize,
14
14
  :success => "removedataTablesRow('#destroy_#{link_id}')",
15
- :html => {
16
- :class => 'small-icons destroy-link', :id => "destroy_#{link_id}"
17
- })
15
+ :class => 'small-icons destroy-link',
16
+ :id => "destroy_#{link_id}"
17
+ )
18
18
  ]
19
19
  end
20
20
  }
@@ -1,18 +1,19 @@
1
1
  .lightbox-container
2
- #inner-lightbox.backgrounds
3
- = link_to I18n.t('static_content_block', :count => 1).capitalize, '#', :class => 'static-tab selected'
4
- = link_to I18n.t('widget', :count => 2).capitalize, '#', :class => 'widget-tab'
2
+ #sub-links
3
+ %ul
4
+ %li= link_to I18n.t('static_content_block', :count => 1).capitalize, '#', :class => 'static-tab selected'
5
+ %li= link_to I18n.t('widget', :count => 2).capitalize, '#', :class => 'widget-tab'
5
6
  #blocks
6
7
  .blocks-tree
7
8
  - unless @static_blocks.blank?
8
9
  %ul
9
10
  = render :partial => 'admin/categories/list_blocks', :locals => { :page => page, :categories => @static_block_categories, :blocks => @static_blocks }
10
11
  .clear
11
- = link_to I18n.t('page.block.add').capitalize, forgeos_cms.new_admin_page_block_path(page), :class => 'small-icons add-link'
12
+ = link_to I18n.t('page.block.add').capitalize, '#', :class => 'small-icons add-link'
12
13
  #widgets.hidden
13
14
  .blocks-tree
14
15
  - unless @widgets.blank?
15
16
  %ul
16
17
  = render :partial => 'admin/categories/list_blocks', :locals => { :page => page, :categories => @widget_categories, :blocks => @widgets }
17
18
  .clear
18
- = link_to I18n.t('page.widget.add').capitalize, forgeos_cms.new_admin_page_block_path(page), :class => 'small-icons add-link'
19
+ = link_to I18n.t('page.widget.add').capitalize, '#', :class => 'small-icons add-link'
@@ -18,7 +18,7 @@
18
18
  %span.handler
19
19
  %span.inner
20
20
  %span
21
- = block.class.human_name.capitalize
21
+ = block.class.model_name.human.capitalize
22
22
  %span.block-name
23
23
  = block.title.capitalize unless block.title.nil?
24
24
 
@@ -1,15 +1,24 @@
1
1
  = render :partial => 'admin/menus/lang_switcher'
2
+ = render :partial => 'tabs'
2
3
  = form_for [forgeos_cms, :admin, page], :html => { :id => 'wrap' } do |f|
3
- = render :partial => 'tabs_show'
4
- #content.grid_16.alpha.omega
5
- #general{:style => 'padding: 0'}
4
+ #blocks-header.ui-tabs.ui-widget.ui-widget-content.ui-corner-all
5
+ %ul.ui-tabs-nav.ui-helper-reset.ui-helper-clearfix.ui-widget-header.ui-corner-all
6
+ %li.ui-state-default.ui-corner-top.ui-tabs-selected.ui-state-active= link_to t(:general), '#general', :class => 'selected'
7
+ %li.ui-state-default.ui-corner-top= link_to t(:block,:count => 2), '#blocks'
8
+ %li.ui-state-default.ui-corner-top= link_to t(:seo), '#seo'
9
+ %li.ui-state-default.ui-corner-top= link_to t(:codes), '#codes'
10
+ .backgrounds.big-header
11
+ = f.text_field :title, :class => 'field_name big_orange_input'
12
+ .interact-links
13
+ = Forgeos_save_buttons [forgeos_cms, :admin, :pages]
14
+ #general
6
15
  = render :partial => 'general', :locals => {:f => f, :page => page }
7
16
  .clear
8
- #blocks{:style => 'padding: 0'}
17
+ #blocks
9
18
  = render :partial => 'blocks', :locals => { :f => f, :page => page }
10
19
  #seo{:style => 'padding: 0'}
11
20
  = render :partial => 'seo', :locals => { :f => f, :page => page }
12
21
  #codes
13
22
  = render :partial => 'codes', :locals => { :f => f, :page => page }
14
23
  .clear
15
- = render :partial => 'block_popup', :locals => { :page => page }
24
+ = render :partial => 'block_popup', :locals => { :page => page }
@@ -1,10 +1,5 @@
1
1
  .grid_12.alpha
2
2
  .inner-content
3
- = f.label :title, t(:title, :scope => [:page])
4
- .clear
5
- = f.text_field :title, :class => 'field_name big_orange_input'
6
- .clear
7
-
8
3
  - i = 0
9
4
  = f.fields_for :page_cols do |page_col|
10
5
  = page_col.label :content, t("page_col_#{i}")
@@ -1,9 +1 @@
1
- = render :partial => 'tabs'
2
- #blocks-header.backgrounds.big-header.settings.ui-tabs.ui-widget.ui-widget-content.ui-corner-all
3
- %ul.ui-tabs-nav.ui-helper-reset.ui-helper-clearfix.ui-widget-header.ui-corner-all
4
- %li.ui-state-default.ui-corner-top.ui-tabs-selected.ui-state-active= link_to t(:general), '#general', :class => 'selected'
5
- %li.ui-state-default.ui-corner-top= link_to t(:block,:count => 2), '#blocks'
6
- %li.ui-state-default.ui-corner-top= link_to t(:seo), '#seo'
7
- %li.ui-state-default.ui-corner-top= link_to t(:codes), '#codes'
8
- = Forgeos_save_buttons forgeos_cms.admin_pages_path
9
- .clear
1
+
@@ -23,11 +23,13 @@
23
23
  select_tag(:status, options_for_select(status, page.active ? 'published' : 'draft'), :class => 'customize published', :onchange => "jQuery.ajax({url: '#{forgeos_cms.activate_admin_page_path(page)}', data: { active: this.value }});"),
24
24
  link_to('', [forgeos_cms, :duplicate, :admin, page], :class => 'small-icons duplicate-link') +
25
25
  link_to('', [forgeos_cms, :edit, :admin, page], :class => 'small-icons edit-link') +
26
- link_to('', "jQuery.ajax(url: '#{url_for([forgeos_cms, :admin, page])}',\
27
- method: 'delete',
28
- confirm: '#{I18n.t('page.destroy.confirm').capitalize}',
29
- success: removedataTablesRow('#destroy_#{link_id}')});",
30
- :class => 'small-icons destroy-link', :id => "destroy_#{link_id}"
26
+ link_to('', [forgeos_cms, :admin, page],
27
+ :remote => true,
28
+ :method => 'delete',
29
+ :confirm => I18n.t('page.destroy.confirm').capitalize,
30
+ :success => "removedataTablesRow('#destroy_#{link_id}')});",
31
+ :class => 'small-icons destroy-link',
32
+ :id => "destroy_#{link_id}"
31
33
  )
32
34
  ]
33
35
  end
@@ -1,2 +1 @@
1
1
  = render :partial => 'form', :locals => { :page => @page }
2
- = observe_field('page_title', :frequency => 1, :loading => "$('#page_url').addClass('loading')", :success => "$('#page_url').val(request); $('#page_url').removeClass('loading')", :url => forgeos_cms.url_admin_pages_path, :with => "'url=' + value", :datatype => 'text')
@@ -12,10 +12,9 @@
12
12
  .grid_12.alpha
13
13
  .inner-content
14
14
  %h2.permalink
15
- - permalink = "#{request.protocol}#{request.host_with_port}/#{@page.url}"
16
15
  = t(:permalink, :count => 1).capitalize
17
16
  \:
18
- = permalink
17
+ = forgeos_cms.page_url(@page.url)
19
18
  .fieldset
20
19
  %h2= t :content
21
20
  .page-content
@@ -26,7 +25,7 @@
26
25
  - @page.blocks.each do |block|
27
26
  %div.block-container
28
27
  %span.block-type
29
- = block.class.human_name.capitalize
28
+ = block.class.model_name.human.capitalize
30
29
  %span.block-name
31
30
  = block.title
32
31
  #right-sidebar.grid_4.omega
@@ -38,41 +37,19 @@
38
37
  %p
39
38
  - unless @page.new_record? or !@page.active or @page.published_at.nil?
40
39
  = t('page.published_on').capitalize
41
- %span.last-date
42
- = @page.published_at.to_date
43
- %br
44
- -# by
45
- -# %em
46
- -# Quentin Tousart
40
+ %span.last-date= @page.published_at.to_date
47
41
  .step
48
- -# = link_to t('page.preview'), '#', :class => 'small-icons preview'
49
42
  = content_tag :span, t('page.preview'), :class => 'small-icons preview disabled'
50
43
  = link_to t('page.duplicate').capitalize, [forgeos_cms, :duplicate, :admin, @page], :class => 'small-icons duplicate'
51
44
  = link_to t('page.delete'), [forgeos_cms, :admin, @page], :confirm => t('page.destroy.confirm').capitalize, :method => :delete, :class => 'small-icons delete'
52
45
  .step.disabled
53
46
  = link_to t('page.modification_history').capitalize, '#', :class => 'small-icons step-title'
54
47
  .inner-step
55
- %p
56
- Modified on
57
- %span.last-date
58
- 12/11/2009
59
- %br
60
- by
61
- %em
62
- Quentin Tousart
63
- %p
64
- Created on 11/11/2009
65
- %br
66
- by
67
- %em
68
- Quentin Tousart
69
48
  #pages_show_tags.step.open
70
49
  = link_to t('tag', :count => 2).capitalize, '#', :class => 'small-icons step-title'
71
50
  .inner-step.tags
72
51
  - @page.tags_on(:tags).each do |tag|
73
- -#%a{ :href => "#" }
74
- %label
75
- = tag.name
52
+ %label= tag.name
76
53
  #pages_show_meta.step.open
77
54
  = link_to t('page.meta_description').capitalize, '#', :class => 'small-icons step-title'
78
55
  .inner-step.meta
@@ -91,10 +68,7 @@
91
68
  = t(:keyword, :count => 2).capitalize
92
69
  \:
93
70
  = @page.meta_info.keywords if @page.meta_info
94
- /
95
- .step.disabled
96
- = link_to t(:graphic_template, :count => 1).capitalize, '#', :class => 'small-icons step-title'
97
- .inner-step.glossy
98
- = select_tag :template, options_for_select([['Template 1',0],['Template 2',1]])
99
- .clear
71
+ .step.disabled
72
+ = link_to t(:graphic_template, :count => 1).capitalize, '#', :class => 'small-icons step-title'
73
+ .inner-step.glossy
100
74
  .clear
@@ -26,7 +26,7 @@
26
26
  %a.small-icons.step-title{ :href => "#" }
27
27
  = "#{I18n.t('static_content_block.link.create.action').capitalize} :"
28
28
  = hidden_field_tag 'static_content_block[page_col_ids][]'
29
- #association-static-content-page-tree.inner-step.init-tree
29
+ #association-static-content-page-tree.inner-step
30
30
  %ul
31
31
  = render :partial => 'admin/blocks/associated_pages', :locals => { :categories => @page_categories, :pages => @pages, :block => static_content_block, :element_id => 'static_content_block' }
32
32
  .clear
@@ -34,7 +34,7 @@
34
34
  %a.small-icons.step-title{ :href => "#" }
35
35
  = "#{I18n.t('folder.associated_to').capitalize} :"
36
36
  = hidden_field_tag 'static_content_block[category_ids][]'
37
- #association-static-content-tree.inner-step.init-tree
37
+ #association-static-content-tree.inner-step
38
38
  %ul
39
39
  = render :partial => 'admin/categories/associated_elements', :locals => { :association_id => 'category_ids', :element => static_content_block, :category_ids => static_content_block.category_ids, :categories => StaticContentCategory.find_all_by_parent_id(nil) }
40
40
  .clear
@@ -11,6 +11,6 @@
11
11
 
12
12
  = dataTables_tag :url => forgeos_cms.admin_blocks_path(:format => :json), :columns => ["{'sClass': 'image_product_td', 'bSearchable':false,'bSortable':false}","{'sTitle':'#{I18n.t 'static_content_block.name'}'}","{'sTitle':'#{I18n.t :linked_to}','bSearchable':false}","{'sClass':'actions-td','bSearchable':false,'bSortable':false}"]
13
13
  .lightbox-container
14
- .pages-tree.init-tree
14
+ .pages-tree
15
15
  %ul
16
16
  = render :partial => 'admin/categories/list_pages', :locals => { :categories => @page_categories, :pages => @pages }
@@ -13,14 +13,14 @@
13
13
 
14
14
  link_to('', forgeos_cms.duplicate_admin_static_content_block_path(block), :class => 'small-icons duplicate-link') +
15
15
  link_to('', [forgeos_cms, :edit, :admin, block], :class => 'small-icons edit-link') +
16
- link_to('', :url => [forgeos_cms, :admin, block],
16
+ link_to('', [forgeos_cms, :admin, block],
17
17
  :remote => true,
18
18
  :method => :delete,
19
19
  :confirm => I18n.t('static_content_block.destroy.confirm').capitalize,
20
20
  :success => "removedataTablesRow('#destroy_#{link_id}')",
21
- :html => {
22
- :class => 'small-icons destroy-link', :id => "destroy_#{link_id}"
23
- })
21
+ :class => 'small-icons destroy-link',
22
+ :id => "destroy_#{link_id}"
23
+ )
24
24
  ]
25
25
  end
26
26
  }
@@ -25,7 +25,7 @@
25
25
  %a.small-icons.step-title{ :href => "#" }
26
26
  = "#{t('widget.link.create.action').capitalize} :"
27
27
  = hidden_field_tag 'widget_actuality[page_col_ids][]'
28
- #association-widget-actuality-page-tree.inner-step.init-tree
28
+ #association-widget-actuality-page-tree.inner-step
29
29
  %ul
30
30
  = render :partial => 'admin/blocks/associated_pages', :locals => { :categories => page_categories, :pages => pages, :block => widget_actuality, :element_id => 'widget_actuality' }
31
31
  .clear
@@ -33,7 +33,7 @@
33
33
  %a.small-icons.step-title{ :href => "#" }
34
34
  = "#{t('folder.associated_to').capitalize} :"
35
35
  = hidden_field_tag 'widget_actuality[category_ids][]'
36
- #association-widget-actuality-tree.inner-step.init-tree
36
+ #association-widget-actuality-tree.inner-step
37
37
  %ul
38
38
  = render :partial => 'admin/categories/associated_elements', :locals => { :association_id => 'category_ids', :element => widget_actuality, :category_ids => widget_actuality.category_ids, :categories => WidgetCategory.find_all_by_parent_id(nil) }
39
39
  .clear
@@ -80,8 +80,8 @@
80
80
  = text_field_tag "widget_actuality[items_attributes][#{id}][title]", '', :style => 'display: none;'
81
81
  = text_area_tag "widget_actuality[items_attributes][#{id}][content]", '', :class => 'mceEditor', :style => 'display: none;'
82
82
  .widget-actions
83
- = link_to_function '','duplicate_actuality("item_'+id+'")', '', :class => 'small-icons duplicate-link duplicate-actuality'
84
- = link_to_function '','edit_actuality($(this))', '', :class => 'small-icons edit-link edit-actuality'
85
- = link_to_function '', "remove_actuality($(this));", :class => 'small-icons destroy-link'
83
+ = link_to_function '', 'duplicate_actuality("item_'+id+'")', :class => 'small-icons duplicate-link duplicate-actuality'
84
+ = link_to_function '', 'edit_actuality(jQuery(this))', :class => 'small-icons edit-link edit-actuality'
85
+ = link_to_function '', 'remove_actuality(jQuery(this));', :class => 'small-icons destroy-link'
86
86
  .clear
87
87
 
@@ -1,4 +1,4 @@
1
- - form.fields_for :items do |item_form|
1
+ = form.fields_for :items do |item_form|
2
2
  - item = item_form.object
3
3
  - link_id = item.id.to_s
4
4
 
@@ -22,7 +22,7 @@
22
22
  = item_form.text_area :content
23
23
 
24
24
  .widget-actions
25
- = link_to_function '',"duplicate_actuality('item_#{link_id}')", '', :class => 'small-icons duplicate-link duplicate-actuality'
26
- = link_to_function '','edit_actuality($(this))', '', :class => 'small-icons edit-link edit-actuality'
27
- = link_to_function '', "remove_actuality($(this));", :class => 'small-icons destroy-link'
25
+ = link_to_function '',"duplicate_actuality('item_#{link_id}')", :class => 'small-icons duplicate-link duplicate-actuality'
26
+ = link_to_function '','edit_actuality(jQuery(this))', :class => 'small-icons edit-link edit-actuality'
27
+ = link_to_function '', "remove_actuality(jQuery(this));", :class => 'small-icons destroy-link'
28
28
  .clear
@@ -1,2 +1,2 @@
1
- = render :partial => 'tabs'
1
+ = render :partial => 'admin/widgets/tabs'
2
2
  = render :partial => 'form', :locals => { :widget_actuality => @widget_actuality, :page_id => params[:page_id], :page_categories => @page_categories, :pages => @pages }
@@ -1,2 +1,2 @@
1
- = render :partial => 'tabs'
1
+ = render :partial => 'admin/widgets/tabs'
2
2
  = render :partial => 'form', :locals => { :widget_actuality => @widget_actuality, :page_id => params[:page_id], :page_categories => @page_categories, :pages => @pages }