constructor-pages 0.2.5 → 0.2.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -17,11 +17,6 @@ module ConstructorPages
17
17
  @user_signed_in = user_signed_in?
18
18
  end
19
19
 
20
- def sitemap
21
- @pages = Page.all
22
- @title = "Карта сайта"
23
- end
24
-
25
20
  def new
26
21
  @page = Page.new
27
22
  @template = Template.first.id
@@ -1,4 +1,7 @@
1
- - page.image_types.where(:field_id => field.id).each do |image|
1
+ - image = page.image_types.where(:field_id => field.id).first
2
+
3
+ - if image
2
4
  = image_tag image.value.thumb("200x200").url
3
- %br/
5
+
6
+ %br/
4
7
  = file_field_tag "fields[#{field.type_value}][#{field.id}]", :class => "span6"
data/config/routes.rb CHANGED
@@ -24,8 +24,6 @@ ConstructorPages::Engine.routes.draw do
24
24
  post 'move/down/:id' => "templates#move_down", :as => :template_move_down
25
25
  end
26
26
  end
27
-
28
- get '/sitemap' => "pages#sitemap", :as => :sitemap
29
27
 
30
28
  root :to => "pages#show"
31
29
  get '*all/search/:what_search' => "pages#search", :format => false
@@ -3,7 +3,7 @@
3
3
  Gem::Specification.new do |s|
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.name = %q{constructor-pages}
6
- s.version = '0.2.5'
6
+ s.version = '0.2.6'
7
7
  s.summary = %q{Pages for ConstructorCms}
8
8
  s.authors = ['Ivan Zotov']
9
9
  s.require_paths = %w(lib)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: constructor-pages
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -134,7 +134,7 @@ files:
134
134
  - app/assets/images/constructor_pages/information.png
135
135
  - app/assets/images/constructor_pages/page_white_edit.png
136
136
  - app/assets/images/constructor_pages/photos.png
137
- - app/assets/javascripts/ajax_pages.js
137
+ - app/assets/javascripts/constructor_pages/ajax_pages.js
138
138
  - app/controllers/constructor_pages/fields_controller.rb
139
139
  - app/controllers/constructor_pages/pages_controller.rb
140
140
  - app/controllers/constructor_pages/templates_controller.rb
@@ -172,7 +172,6 @@ files:
172
172
  - app/views/constructor_pages/pages/index.haml
173
173
  - app/views/constructor_pages/pages/new.haml
174
174
  - app/views/constructor_pages/pages/show.haml
175
- - app/views/constructor_pages/pages/sitemap.haml
176
175
  - app/views/constructor_pages/templates/_form.haml
177
176
  - app/views/constructor_pages/templates/edit.haml
178
177
  - app/views/constructor_pages/templates/index.haml
@@ -1,12 +0,0 @@
1
- - content_for :header do
2
- = @title
3
- .sitemap
4
- %p
5
- %ul
6
- - @pages.each do |page|
7
- - if page.active and page.in_map
8
- %li{:class => "level#{page.level}"}
9
- - if page.link.empty?
10
- = link_to page.name, page.full_url
11
- - else
12
- = link_to page.name, page.link