aerogel-pages 1.4.14 → 1.4.16

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/app/routes/admin-pages.rb +19 -3
  3. data/assets/javascripts/admin-pages/pages-widget.js.coffee +1 -1
  4. data/assets/javascripts/admin-pages/pane-tree.js.coffee +62 -5
  5. data/assets/stylesheets/admin-pages/_page-types-select.css.scss +18 -0
  6. data/assets/stylesheets/controllers/admin-pages-page-types-select.css.scss +2 -0
  7. data/db/model/page.rb +6 -0
  8. data/db/model/page_node.rb +10 -0
  9. data/db/model/page_type.rb +17 -3
  10. data/db/seed/01_page_types.seed +12 -0
  11. data/db/seed/02_root_page_node.seed +8 -0
  12. data/db/seed/{development/03_root_pages.seed → 03_root_pages.seed} +0 -0
  13. data/db/seed/development/01_news_page_node.seed +15 -0
  14. data/db/seed/development/{05_news_pages.seed → 02_news_pages.seed} +2 -1
  15. data/lib/aerogel/pages/version.rb +1 -1
  16. data/locales/actions.en.yml +1 -0
  17. data/locales/actions.ru.yml +2 -1
  18. data/locales/aerogel-pages.en.yml +8 -0
  19. data/locales/aerogel-pages.ru.yml +8 -0
  20. data/views/admin/pages/_page-types-select.html.erb +19 -0
  21. data/views/admin/pages/append_select.html.erb +1 -0
  22. data/views/admin/pages/edit/_breadcrumbs.html.erb +1 -1
  23. data/views/admin/pages/index/_pane_tree.html.erb +20 -1
  24. data/views/admin/pages/insert_select.html.erb +1 -0
  25. data/views/admin/table_builder/smart-tree-table/_table_row.html.erb +2 -5
  26. data/views/layouts/_analytics.html.erb +1 -0
  27. data/views/layouts/application.html.erb +2 -0
  28. metadata +15 -11
  29. data/db/seed/development/01_page_types.seed +0 -8
  30. data/db/seed/development/02_root_page_node.seed +0 -8
  31. data/db/seed/development/04_news_page_node.seed +0 -15
  32. data/db/seed/production/01_page_types.seed +0 -8
  33. data/db/seed/production/02_root_page_node.seed +0 -8
  34. data/db/seed/production/03_root_pages.seed +0 -10
  35. data/views/admin/pages/_page-DISABLED.html.erb +0 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a7fc6805efa9811f6d76a551bf6d7d2c1000f0bc
4
- data.tar.gz: 24021121763b86687a79764e6d2554e12a4a58e2
3
+ metadata.gz: 450d81f92e580383aa75ee553109e1f85e7a46c0
4
+ data.tar.gz: 41bbb28488a461483adc3698ab12dc609dd0deb3
5
5
  SHA512:
6
- metadata.gz: 82155ceec35741890c97862ab65862934fa7890b98ef178a8beff3bfda82995f947b1d1e7d7d91597302c03f3f0d260678335883aca5a70bccfe1fb55c3aa943
7
- data.tar.gz: 9fc7908a47cdfbcd5bd31556f1b17fce9c5fc18b1ceebb6f98d30f14edfaa2060904845a1c6c6aefcc0c3fe944086e92a90f958ebabcf48fd416c78969149255
6
+ metadata.gz: f6fccc898ef0c78530e97bad769203a16ef430f46dc22d54db2e27b5b53a0b9b5ff60abfdfe44f4c3c20d4275a7e75345edd82c002f1519a269877357328a13c
7
+ data.tar.gz: 1ebdf51c152107bbbed8be527ea3df0b1cc56223a785820dd209317fa42ad2b4f270302e4dfa9c0c34464594a242dcacd6a70331938d415c169d43cc1457ac68
@@ -46,9 +46,17 @@ namespace "/admin/pages" do
46
46
  pass
47
47
  end
48
48
 
49
+ get "/append_select" do
50
+ @page_node = PageNode.find( @selected_page_node.parent_id ) or halt 404
51
+ @allowed_types = @page_node.page_type.allowed_children
52
+ # @page_node.page_type = PageType.where( type: :page ).first
53
+ pass
54
+ end
55
+
49
56
  get "/append" do
50
57
  @page_node = PageNode.new( parent_id: @selected_page_node.parent_id )
51
- @page_node.page_type = PageType.where( type: :page ).first
58
+ page_type = @page_node.allowed_page_types.where( type: params[:page_type] ).first or halt 404
59
+ @page_node.page_type = page_type
52
60
  pass
53
61
  end
54
62
 
@@ -60,9 +68,17 @@ namespace "/admin/pages" do
60
68
  redirect "/admin/pages/#{@lang}-#{@page_node.id}"
61
69
  end
62
70
 
71
+ get "/insert_select" do
72
+ @page_node = @selected_page_node
73
+ @allowed_types = @page_node.page_type.allowed_children
74
+ # @page_node.page_type = PageType.where( type: :page ).first
75
+ pass
76
+ end
77
+
63
78
  get "/insert" do
64
79
  @page_node = PageNode.new( parent_id: @selected_page_node.id )
65
- @page_node.page_type = PageType.where( type: :page ).first
80
+ page_type = @page_node.allowed_page_types.where( type: params[:page_type] ).first or halt 404
81
+ @page_node.page_type = page_type
66
82
  pass
67
83
  end
68
84
 
@@ -101,7 +117,7 @@ namespace "/admin/pages" do
101
117
  post "/edit" do
102
118
  # flash.now[:debug] = "params: #{params.inspect}"
103
119
  @page_node = @selected_page_node
104
- if @page_node.update_attributes params[:page_node].except( :page_type )
120
+ if @page_node.update_attributes params[:page_node].except( :page_type_id )
105
121
  redirect "/admin/pages/#{@lang}-#{@page_node.id}" #, notice: "Page updated"
106
122
  end
107
123
  # flash.now[:error] = t.aerogel.db.errors.failed_to_save( name: h( @page.id ),
@@ -73,7 +73,7 @@ class @PagesWidget
73
73
  @update @current_state
74
74
 
75
75
  update: ( state ) ->
76
- log "calling update(): id=#{state.page_node_id}"
76
+ log "update: id=#{state.page_node_id}"
77
77
  pane_tree.update state
78
78
  pane_preview.update state
79
79
  if state.open_pane == 'left'
@@ -80,6 +80,9 @@ class @PaneTree
80
80
  # Callback to be invoked when page (tree item) is selected
81
81
  #
82
82
  on_tree_item_selected: (id, object, el) =>
83
+ if object?
84
+ allowed_children = @row_allowed_children_types object
85
+ console?.log "** tree item selected: #{object.attr 'type'} -> #{allowed_children.length}:#{allowed_children}"
83
86
  pages_widget.on_page_selected id, object
84
87
 
85
88
  # Callback to be invoked when pages (tree branches/leaves) are reordered
@@ -104,6 +107,14 @@ class @PaneTree
104
107
  ordered_row_list: ->
105
108
  { id: row.id, parent_id: row.parent_id } for row in @tree_table.rows_list()
106
109
 
110
+ # Returns array of allowed children types for the row object
111
+ #
112
+ row_allowed_children_types: (row) ->
113
+ return [] unless row?
114
+ s = row.attr 'allowed-children'
115
+ allowed_children = if s then s.split ',' else []
116
+ allowed_children
117
+
107
118
 
108
119
  # Returns action buttons elements, or elements within buttons specified by +selector+
109
120
  #
@@ -117,7 +128,8 @@ class @PaneTree
117
128
  log "** update_bottom_toolbar: disabling"
118
129
  @bottom_toolbar().hide()
119
130
  return
120
- object = @find_row_by_id state.page_node_id
131
+ row = @find_row_by_id state.page_node_id
132
+ parent_row = if row? then @find_row_by_id row.parent_id else null
121
133
  @bottom_toolbar().show()
122
134
  if @pages_reorder_enabled
123
135
  @bottom_toolbar('.pages-reorder-actions').show()
@@ -126,10 +138,55 @@ class @PaneTree
126
138
  @bottom_toolbar('.pages-reorder-actions').hide()
127
139
  if state.page_node_id?
128
140
  @bottom_toolbar('.page-actions').show()
129
- @bottom_toolbar('.page-append-link').attr 'href', pages_widget.url_to_action 'append'
130
- @bottom_toolbar('.page-insert-link').attr 'href', pages_widget.url_to_action 'insert'
131
- @bottom_toolbar('.page-delete-link').attr 'href', pages_widget.url_to_action 'delete'
132
- @bottom_toolbar(' .page-name').text object.contents
141
+
142
+ if parent_row?
143
+ # nested page selected
144
+ allowed_children = @row_allowed_children_types parent_row
145
+ if allowed_children.length > 1
146
+ # append multiple
147
+ @bottom_toolbar('.page-append-link').hide()
148
+ @bottom_toolbar('.page-append-select-link').show()
149
+ @bottom_toolbar('.page-append-select-link').attr 'href',
150
+ pages_widget.url_to_action "append_select"
151
+ else if allowed_children.length > 0
152
+ # append single
153
+ @bottom_toolbar('.page-append-select-link').hide()
154
+ @bottom_toolbar('.page-append-link').show()
155
+ @bottom_toolbar('.page-append-link').attr 'href',
156
+ pages_widget.url_to_action "append?page_type=#{allowed_children}"
157
+ else
158
+ # no append
159
+ @bottom_toolbar('.page-append-link').hide()
160
+ @bottom_toolbar('.page-append-select-link').hide()
161
+
162
+ @bottom_toolbar('.page-delete-link').show()
163
+ @bottom_toolbar('.page-delete-link').attr 'href', pages_widget.url_to_action 'delete'
164
+ else
165
+ # root selected
166
+ @bottom_toolbar('.page-append-link').hide()
167
+ @bottom_toolbar('.page-append-select-link').hide()
168
+ @bottom_toolbar('.page-delete-link').hide()
169
+
170
+ if row?
171
+ allowed_children = @row_allowed_children_types row
172
+ if allowed_children.length > 1
173
+ # insert multiple
174
+ @bottom_toolbar('.page-insert-link').hide()
175
+ @bottom_toolbar('.page-insert-select-link').show()
176
+ @bottom_toolbar('.page-insert-select-link').attr 'href',
177
+ pages_widget.url_to_action "insert_select"
178
+ else if allowed_children.length > 0
179
+ # insert single
180
+ @bottom_toolbar('.page-insert-select-link').hide()
181
+ @bottom_toolbar('.page-insert-link').show()
182
+ @bottom_toolbar('.page-insert-link').attr 'href',
183
+ pages_widget.url_to_action "insert?page_type=#{allowed_children}"
184
+ else
185
+ # no insert
186
+ @bottom_toolbar('.page-insert-link').hide()
187
+ @bottom_toolbar('.page-insert-select-link').hide()
188
+
189
+ # @bottom_toolbar(' .page-name').text row.contents
133
190
  else
134
191
  @bottom_toolbar('.page-actions').hide()
135
192
  @attached_footer.update_footer()
@@ -0,0 +1,18 @@
1
+ .page-types {
2
+ .page-type {
3
+ display: inline-block;
4
+ text-align: center;
5
+ padding: 5px 15px;
6
+ i {
7
+ font-size: 36px;
8
+ }
9
+ a, a:hover {
10
+ color: black;
11
+ text-decoration: none;
12
+ }
13
+ &:hover {
14
+ background: $item-hover-bg;
15
+ color: $item-hover-fg;
16
+ }
17
+ }
18
+ }
@@ -0,0 +1,2 @@
1
+ @import "admin/global";
2
+ @import "../admin-pages/page-types-select";
@@ -52,6 +52,12 @@ class Page
52
52
  # ( root? ? "/" ) : parts.join("/")
53
53
  end
54
54
 
55
+ # Returns page type of the page.
56
+ #
57
+ def page_type
58
+ page_node.page_type
59
+ end
60
+
55
61
  # Returns +true+ if this Page is root.
56
62
  #
57
63
  def root?
@@ -32,6 +32,16 @@ class PageNode
32
32
  pages.where( lang: lang.to_sym ).first
33
33
  end
34
34
 
35
+ # Returns allowed page types (depending on the parent page type).
36
+ #
37
+ def allowed_page_types
38
+ if parent.present?
39
+ parent.page_type.allowed_children
40
+ else
41
+ PageType.where( type: :root ).first
42
+ end
43
+ end
44
+
35
45
  private
36
46
 
37
47
  # Touches parents (if present)
@@ -2,9 +2,8 @@ class PageType
2
2
  include Model
3
3
 
4
4
  field :type, type: Symbol
5
- field :name, type: String
6
5
  field :allowed_parents, type: Array
7
- field :allowed_children, type: Array
6
+ # field :allowed_children, type: Array
8
7
  field :allowed_content_blocks, type: Array
9
8
  field :defaults, type: Hash
10
9
 
@@ -12,4 +11,19 @@ class PageType
12
11
 
13
12
  has_many :page_nodes
14
13
 
15
- end # class PageType
14
+
15
+ def allowed_children
16
+ self.class.where( :allowed_parents.in => [type] )
17
+ end
18
+
19
+ def human_name
20
+ Aerogel::I18n.t "aerogel.pages.page_type.#{type}", default: type.to_s.humanize
21
+ end
22
+
23
+ end # class PageType
24
+
25
+
26
+ # :page -> [nil, :page]
27
+ # :news -> [:page]
28
+ # :news_article -> [:news]
29
+ #
@@ -0,0 +1,12 @@
1
+ model PageType
2
+
3
+ find_by :type
4
+ force :allowed_parents
5
+
6
+ seeds [
7
+ { type: :root, allowed_parents: [] },
8
+ { type: :page, allowed_parents: [:root, :page] },
9
+ { type: :news, allowed_parents: [:root, :page] },
10
+ { type: :news_article, allowed_parents: [:news] }
11
+ ]
12
+
@@ -0,0 +1,8 @@
1
+ root_page_type = PageType.where( type: :root ).first
2
+
3
+ model PageNode
4
+
5
+ find_by :page_type_id
6
+
7
+ seeds [{ page_type_id: root_page_type }]
8
+
@@ -0,0 +1,15 @@
1
+ # Sub pages created here only if root has no children
2
+ #
3
+ page_type_news = PageType.where( type: :news ).first
4
+ page_node_root = PageNode.root
5
+
6
+ model PageNode
7
+
8
+ find_by :parent_id, :page_type_id
9
+
10
+ seeds [
11
+ {
12
+ parent_id: page_node_root.id, page_type_id: page_type_news.id
13
+ }
14
+ ]
15
+
@@ -1,4 +1,5 @@
1
- news_page_node = PageNode.root.children.first
1
+ news_page_type = PageType.where( type: :news ).first
2
+ news_page_node = PageNode.where( page_type_id: news_page_type.id ).first
2
3
 
3
4
  model Page
4
5
 
@@ -1,5 +1,5 @@
1
1
  module Aerogel
2
2
  module Pages
3
- VERSION = "1.4.14"
3
+ VERSION = "1.4.16"
4
4
  end
5
5
  end
@@ -14,3 +14,4 @@ en:
14
14
  reorder_cancel: Cancel
15
15
  reorder_save: Save changes
16
16
  reordered: Pages reordered
17
+ page_type_select: Choose type of the new page
@@ -13,4 +13,5 @@ ru:
13
13
  reorder: Изменить порядок страниц
14
14
  reorder_cancel: Отмена
15
15
  reorder_save: Сохранить изменения
16
- reordered: Порядок страниц изменён
16
+ reordered: Порядок страниц изменён
17
+ page_type_select: Выберите тип новой страницы
@@ -0,0 +1,8 @@
1
+ en:
2
+ aerogel:
3
+ pages:
4
+ page_type:
5
+ root: Root page
6
+ page: Page
7
+ news: News
8
+ news_article: News article
@@ -0,0 +1,8 @@
1
+ ru:
2
+ aerogel:
3
+ pages:
4
+ page_type:
5
+ root: Корневая страница
6
+ page: Страница
7
+ news: Новостной раздел
8
+ news_article: Новость
@@ -0,0 +1,19 @@
1
+ <% assets "controllers/admin-pages-page-types-select" %>
2
+ <% base_url = "/admin/pages/#{@lang}-#{@selected_page_node.id}" %>
3
+ <% page_title t.aerogel.admin.pages.page_type_select %>
4
+
5
+ <div class="page-types">
6
+ <% @allowed_types.each do |page_type| %>
7
+ <div class="page-type" style="pull-left">
8
+ <a href="<%= base_url %>/<%= action %>?page_type=<%= page_type.type %>">
9
+ <%= icon 'fa-file-o' %>
10
+ <br/>
11
+ <%= h page_type.human_name %>
12
+ </a>
13
+ </div>
14
+ <% end %>
15
+ </div>
16
+
17
+ <% form nil, cancel_url: base_url do %>
18
+ <%= button :cancel %>
19
+ <% end %>
@@ -0,0 +1 @@
1
+ <%= partial "admin/pages/page-types-select", locals: { action: 'append' } %>
@@ -8,6 +8,6 @@
8
8
  <% end if @page_node.parent.present? %>
9
9
  <li>
10
10
  <%= icon 'fa-file-text-o' %>
11
- <%= @page_node.page_type.try(:name) %>
11
+ <%= @page_node.page_type.try(:human_name) %>
12
12
  </li>
13
13
  </ol>
@@ -16,7 +16,7 @@
16
16
  admin_pages_title_as_text( p, options[:lang] )
17
17
  end
18
18
  column :type do |p|
19
- p.page_type.try(:name)
19
+ p.page_type.try(:human_name)
20
20
  end
21
21
  end
22
22
  %>
@@ -24,6 +24,7 @@
24
24
  <div class="bottom-toolbar">
25
25
  <div class="container">
26
26
  <div class="btn-group page-actions">
27
+ <!-- append single -->
27
28
  <% link_to "new",
28
29
  class: "btn btn-default btn-sm page-append-link",
29
30
  title: t.aerogel.admin.pages.append do
@@ -31,12 +32,30 @@
31
32
  <%= icon 'fa-plus' %> <%= t.aerogel.admin.pages.append_short %>
32
33
  <% end %>
33
34
 
35
+ <!-- append select multiple -->
36
+ <% link_to_modal "new",
37
+ class: "btn btn-default btn-sm page-append-select-link",
38
+ title: t.aerogel.admin.pages.append do
39
+ %>
40
+ <%= icon 'fa-plus' %> <%= t.aerogel.admin.pages.append_short %> &hellip;
41
+ <% end %>
42
+
43
+ <!-- insert single -->
34
44
  <% link_to "new",
35
45
  class: "btn btn-default btn-sm page-insert-link",
36
46
  title: t.aerogel.admin.pages.insert do
37
47
  %>
38
48
  <%= icon 'fa-arrow-right' %> <%= t.aerogel.admin.pages.insert_short %>
39
49
  <% end %>
50
+
51
+ <!-- insert multiple -->
52
+ <% link_to_modal "new",
53
+ class: "btn btn-default btn-sm page-insert-select-link",
54
+ title: t.aerogel.admin.pages.insert do
55
+ %>
56
+ <%= icon 'fa-arrow-right' %> <%= t.aerogel.admin.pages.insert_short %> &hellip;
57
+ <% end %>
58
+
40
59
  </div>
41
60
 
42
61
  <% link_to_modal "new", class: "btn btn-default btn-sm page-delete-link page-actions" do %>
@@ -0,0 +1 @@
1
+ <%= partial "admin/pages/page-types-select", locals: { action: 'insert' } %>
@@ -1,10 +1,7 @@
1
1
  <tr
2
2
  data-id="<%= table_row.id %>" data-parent-id="<%= table_row.parent_id %>"
3
- data-url-preview="<%= @lang %>-<%= table_row.id %>/preview"
4
- data-url-edit="<%= @lang %>-<%= table_row.id %>/edit"
5
- data-url-delete="<%= @lang %>-<%= table_row.id %>/delete"
6
- data-url-append="<%= @lang %>-<%= table_row.id %>/append"
7
- data-url-insert="<%= @lang %>-<%= table_row.id %>/insert"
3
+ data-type="<%= table_row.page_type.type %>"
4
+ data-allowed-children="<%= table_row.page_type.allowed_children.pluck(:type).join(',') %>"
8
5
  >
9
6
  <% table.columns.each do |col| %>
10
7
  <td <td <%= col.html_params %> >
@@ -0,0 +1 @@
1
+ <!-- views/layouts/_analytics -->
@@ -57,6 +57,8 @@
57
57
  </div>
58
58
  </div>
59
59
 
60
+ <%= partial "layouts/analytics", cacheable: true %>
61
+
60
62
  </body>
61
63
  </html>
62
64
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aerogel-pages
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.14
4
+ version: 1.4.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Kukushkin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-01 00:00:00.000000000 Z
11
+ date: 2014-05-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aerogel-core
@@ -113,12 +113,14 @@ files:
113
113
  - assets/stylesheets/admin-pages-edit/page.css.scss
114
114
  - assets/stylesheets/admin-pages-edit/tabs.css.scss
115
115
  - assets/stylesheets/admin-pages/_admin-pages-alert.css.scss
116
+ - assets/stylesheets/admin-pages/_page-types-select.css.scss
116
117
  - assets/stylesheets/admin-pages/_pages-widget.css.scss
117
118
  - assets/stylesheets/admin-pages/_pane-tree.css.scss
118
119
  - assets/stylesheets/admin-pages/_preview.css.scss
119
120
  - assets/stylesheets/admin-pages/_two-pane-widget.css.scss
120
121
  - assets/stylesheets/aerogel-pages.css.scss
121
122
  - assets/stylesheets/controllers/admin-pages-edit.css.scss
123
+ - assets/stylesheets/controllers/admin-pages-page-types-select.css.scss
122
124
  - assets/stylesheets/controllers/admin-pages.css.scss
123
125
  - assets/stylesheets/pages/_body.css.scss
124
126
  - assets/stylesheets/pages/_footer.css.scss
@@ -140,16 +142,13 @@ files:
140
142
  - db/model/pages/blocks/image.rb
141
143
  - db/model/pages/blocks/pages_list.rb
142
144
  - db/model/pages/blocks/text.rb
145
+ - db/seed/01_page_types.seed
146
+ - db/seed/02_root_page_node.seed
147
+ - db/seed/03_root_pages.seed
143
148
  - db/seed/development/.keep
144
- - db/seed/development/01_page_types.seed
145
- - db/seed/development/02_root_page_node.seed
146
- - db/seed/development/03_root_pages.seed
147
- - db/seed/development/04_news_page_node.seed
148
- - db/seed/development/05_news_pages.seed
149
+ - db/seed/development/01_news_page_node.seed
150
+ - db/seed/development/02_news_pages.seed
149
151
  - db/seed/production/.keep
150
- - db/seed/production/01_page_types.seed
151
- - db/seed/production/02_root_page_node.seed
152
- - db/seed/production/03_root_pages.seed
153
152
  - db/seed/seed.template
154
153
  - lib/aerogel/pages.rb
155
154
  - lib/aerogel/pages/core.rb
@@ -159,6 +158,8 @@ files:
159
158
  - locales/actions.ru.yml
160
159
  - locales/admin.en.yml
161
160
  - locales/admin.ru.yml
161
+ - locales/aerogel-pages.en.yml
162
+ - locales/aerogel-pages.ru.yml
162
163
  - locales/models.en.yml
163
164
  - locales/models.ru.yml
164
165
  - locales/views.en.yml
@@ -166,8 +167,9 @@ files:
166
167
  - public/README.md
167
168
  - rake/README.md
168
169
  - views/admin/pages/_edit_form.html.erb
169
- - views/admin/pages/_page-DISABLED.html.erb
170
+ - views/admin/pages/_page-types-select.html.erb
170
171
  - views/admin/pages/append.html.erb
172
+ - views/admin/pages/append_select.html.erb
171
173
  - views/admin/pages/delete.html.erb
172
174
  - views/admin/pages/edit.html.erb
173
175
  - views/admin/pages/edit/_block.html.erb
@@ -189,6 +191,7 @@ files:
189
191
  - views/admin/pages/index/_pane_tree.html.erb
190
192
  - views/admin/pages/index/_pane_tree_tabs.html.erb
191
193
  - views/admin/pages/insert.html.erb
194
+ - views/admin/pages/insert_select.html.erb
192
195
  - views/admin/pages/preview.html.erb
193
196
  - views/admin/pages/preview/_block.html.erb
194
197
  - views/admin/pages/preview/_breadcrumbs.html.erb
@@ -223,6 +226,7 @@ files:
223
226
  - views/form_builder/admin-pages-edit/field_textarea.erb
224
227
  - views/form_builder/admin-pages-edit/field_title.erb
225
228
  - views/form_builder/admin-pages-edit/fieldset.erb
229
+ - views/layouts/_analytics.html.erb
226
230
  - views/layouts/admin/pages/preview.html.erb
227
231
  - views/layouts/application.html.erb
228
232
  - views/layouts/pages/_breadcrumbs.html.erb
@@ -1,8 +0,0 @@
1
- model PageType
2
-
3
- find_by :type
4
-
5
- seeds [
6
- { type: :page, name: 'Page' }
7
- ]
8
-
@@ -1,8 +0,0 @@
1
- page_type_simple = PageType.where( type: :page ).first
2
-
3
- model PageNode
4
-
5
- find_by :parent_id
6
-
7
- seeds [{ parent_id: nil, page_type: page_type_simple }]
8
-
@@ -1,15 +0,0 @@
1
- # Sub pages created here only if root has no children
2
- #
3
- page_type_simple = PageType.where( type: :page ).first
4
- page_node_root = PageNode.root
5
-
6
- model PageNode
7
-
8
- find_by :parent_id
9
-
10
- seeds [
11
- {
12
- parent_id: page_node_root.id, page_type: page_type_simple
13
- }
14
- ]
15
-
@@ -1,8 +0,0 @@
1
- model PageType
2
-
3
- find_by :type
4
-
5
- seeds [
6
- { type: :page, name: 'Page' }
7
- ]
8
-
@@ -1,8 +0,0 @@
1
- page_type_simple = PageType.where( type: :page ).first
2
-
3
- model PageNode
4
-
5
- find_by :parent_id
6
-
7
- seeds [{ parent_id: nil, page_type: page_type_simple }]
8
-
@@ -1,10 +0,0 @@
1
- root_page_node = PageNode.root
2
-
3
- model Page
4
-
5
- find_by :page_node_id, :lang
6
-
7
- seeds [
8
- { page_node_id: root_page_node.id, lang: :en, link: '', title: 'Home page' },
9
- { page_node_id: root_page_node.id, lang: :ru, link: '', title: 'Главная страница' }
10
- ]
@@ -1,5 +0,0 @@
1
- <tr data-id="<%= page.id %>" data-parent-id="<%= page.parent_id %>">
2
- <td><div class="drag-handle"><%= icon 'fa-arrows-v' %></div></td>
3
- <td></td>
4
- <td><%= page.name %></td>
5
- </tr>