kms 0.7.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/kms/application/controllers/assets_controller.coffee.erb +1 -1
  3. data/app/assets/javascripts/kms/application/controllers/pages_controller.coffee.erb +3 -3
  4. data/app/assets/javascripts/kms/application/module.coffee +1 -1
  5. data/app/assets/javascripts/templates/settings.html.slim +5 -5
  6. data/app/assets/stylesheets/kms/custom.css.scss +3 -3
  7. data/app/controllers/kms/application_controller.rb +1 -1
  8. data/app/controllers/kms/public/pages_controller.rb +2 -4
  9. data/app/models/concerns/kms/compile_templates.rb +4 -0
  10. data/app/models/kms/page.rb +0 -3
  11. data/app/models/kms/template.rb +0 -3
  12. data/app/views/devise/passwords/edit.html.erb +22 -0
  13. data/app/views/devise/passwords/new.html.erb +15 -0
  14. data/config/locales/en.yml +18 -16
  15. data/config/locales/ru.yml +19 -17
  16. data/db/migrate/20141027065341_create_pages.rb +1 -1
  17. data/db/migrate/20141027083603_create_templates.rb +1 -1
  18. data/db/migrate/20141027083633_add_template_id_to_pages.rb +1 -1
  19. data/db/migrate/20141029145253_create_assets.rb +1 -1
  20. data/db/migrate/20141031125758_add_ancestry_to_pages.rb +1 -1
  21. data/db/migrate/20141031140308_devise_create_users.rb +1 -1
  22. data/db/migrate/20141119084306_add_fullpath_to_pages.rb +1 -1
  23. data/db/migrate/20141121112652_add_role_to_users.rb +1 -1
  24. data/db/migrate/20141127073902_add_templatable_fields_to_pages.rb +1 -1
  25. data/db/migrate/20141209132901_add_hidden_to_page.rb +1 -1
  26. data/db/migrate/20150209120632_add_position_to_kms_pages.rb +1 -1
  27. data/db/migrate/20160129100437_create_kms_snippets.rb +1 -1
  28. data/db/migrate/20160712094512_create_kms_settings.rb +1 -1
  29. data/lib/kms/engine.rb +1 -0
  30. data/lib/kms/version.rb +1 -1
  31. data/spec/internal/log/test.log +420 -0
  32. data/vendor/assets/bower.json +3 -1
  33. data/vendor/assets/bower_components/angular-cookies/LICENSE.md +21 -0
  34. data/vendor/assets/bower_components/angular-cookies/README.md +2 -11
  35. data/vendor/assets/bower_components/angular-cookies/angular-cookies.js +259 -143
  36. data/vendor/assets/bower_components/angular-cookies/angular-cookies.min.js +5 -4
  37. data/vendor/assets/bower_components/angular-cookies/angular-cookies.min.js.map +3 -3
  38. data/vendor/assets/bower_components/angular-cookies/bower.json +3 -2
  39. data/vendor/assets/bower_components/angular-cookies/index.js +2 -0
  40. data/vendor/assets/bower_components/angular-cookies/package.json +10 -3
  41. data/vendor/assets/bower_components/angular-sanitize/LICENSE.md +21 -0
  42. data/vendor/assets/bower_components/angular-sanitize/README.md +2 -11
  43. data/vendor/assets/bower_components/angular-sanitize/angular-sanitize.js +69 -64
  44. data/vendor/assets/bower_components/angular-sanitize/angular-sanitize.min.js +12 -12
  45. data/vendor/assets/bower_components/angular-sanitize/angular-sanitize.min.js.map +2 -2
  46. data/vendor/assets/bower_components/angular-sanitize/bower.json +3 -2
  47. data/vendor/assets/bower_components/angular-sanitize/index.js +2 -0
  48. data/vendor/assets/bower_components/angular-sanitize/package.json +10 -3
  49. data/vendor/assets/bower_components/angular/LICENSE.md +21 -0
  50. data/vendor/assets/bower_components/angular/README.md +2 -5
  51. data/vendor/assets/bower_components/angular/angular-csp.css +8 -0
  52. data/vendor/assets/bower_components/angular/angular.js +11011 -6910
  53. data/vendor/assets/bower_components/angular/angular.min.js +297 -244
  54. data/vendor/assets/bower_components/angular/angular.min.js.gzip +0 -0
  55. data/vendor/assets/bower_components/angular/angular.min.js.map +3 -3
  56. data/vendor/assets/bower_components/angular/bower.json +2 -1
  57. data/vendor/assets/bower_components/angular/index.js +2 -0
  58. data/vendor/assets/bower_components/angular/package.json +2 -2
  59. metadata +11 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2b29d6d6a21d5d406c54173448dde0d22f79dd7f
4
- data.tar.gz: 0849ee6b4745180394d85e21755545530efaa494
3
+ metadata.gz: f3376e353187d1fcbd9033b374380f744467c2e3
4
+ data.tar.gz: ac386e50234dfa6e1c5830f1193412a4c8e8957b
5
5
  SHA512:
6
- metadata.gz: 14de95ca65c0c43d2cf79173e30a1fa54149c40d01d560a752c9b613a557c7cacaf150fc9715af9e84247b92fc44471940cf5b4885e83663fff88fc4bbc321f8
7
- data.tar.gz: 9669c4f34b6546c3764c43cdf8c07659afb7c904ecdfc162d7cf547dd2e7b52944bca099453490efea59f61549e696c5723f1976f18927eb77e3402805056198
6
+ metadata.gz: c9108885e35beeaea1ed0f8bd2b4b86da47814736ae204c194385e9b2a0aff4436406ce0c06a7f01c48e6855086959e51d2dffe207e98fb2a68bdf441ea564e5
7
+ data.tar.gz: bc3e1331a225a5bfe633dfd04d8fa2a4ebb180bc17b57ce5138a7b7aacd528c8d9530a565163d64501b5b429d916187cf9d2c9cf01c2a7c07da17faa38f9c9ff
@@ -43,7 +43,7 @@ AssetsController = ($scope, $state, $cookieStore, $cookies, Restangular, $stateP
43
43
  $scope.assets[content_type] = _.without($scope.assets[content_type], asset)
44
44
 
45
45
  $scope.setHeaders = ->
46
- 'X-XSRF-TOKEN': $cookies["XSRF-TOKEN"] # call func for getting a cookie
46
+ 'X-XSRF-TOKEN': $cookies.get("XSRF-TOKEN") # call func for getting a cookie
47
47
 
48
48
  $scope.getMode = (asset)->
49
49
  if /javascript/.test(asset.content_type)
@@ -35,6 +35,9 @@ PagesController = ($scope, $state, $cookieStore, Restangular, $stateParams, Aler
35
35
  if $stateParams.id
36
36
  $scope.store.get($stateParams.id).then (page)->
37
37
  $scope.page = page
38
+ unless $scope.page.parent_id
39
+ index_page = _.select($scope.pages, (p) -> p.slug == 'index')[0]
40
+ $scope.page.parent_id = (if index_page then index_page.id else null)
38
41
  else
39
42
  $scope.page = {}
40
43
 
@@ -59,9 +62,6 @@ PagesController = ($scope, $state, $cookieStore, Restangular, $stateParams, Aler
59
62
  $scope.pages = $scope.exceptCurrentPage($scope.pages)
60
63
  $scope.parentPages = $scope.exceptCurrentPage($scope.parentPages)
61
64
  $scope.page.slug = "index" if $scope.pages.length == 0
62
- unless $scope.page.parent_id
63
- index_page = _.select($scope.pages, (p) -> p.slug == 'index')[0]
64
- $scope.page.parent_id = (if index_page then index_page.id else null)
65
65
 
66
66
 
67
67
  $scope.create = ->
@@ -20,6 +20,6 @@ angular.module('KMS').config ['$httpProvider', '$locationProvider', 'Restangular
20
20
  ]
21
21
  .run ['$http', '$cookies', 'editableOptions', '$rootScope', '$state', ($http, $cookies, editableOptions, $rootScope, $state) ->
22
22
  $rootScope.$state = $state
23
- $http.defaults.headers.common['X-XSRF-TOKEN'] = $cookies['XSRF-TOKEN']
23
+ $http.defaults.headers.common['X-XSRF-TOKEN'] = $cookies.get('XSRF-TOKEN')
24
24
  editableOptions.theme = 'bs3'
25
25
  ]
@@ -6,15 +6,15 @@
6
6
  a href="##{engine_class.engine_name}" = engine_class.engine_name.humanize
7
7
  div class="tab-content"
8
8
  - if Kms::SettingsService.templates.present?
9
- form role="form" ng-submit="update()"
10
- - Kms::SettingsService.templates.each_with_index do |(engine_class, templates), index|
11
- div role="tabpanel" class="tab-pane" ng-class="{active: isActiveTab(#{index})}" id=engine_class.engine_name
9
+ - Kms::SettingsService.templates.each_with_index do |(engine_class, templates), index|
10
+ div role="tabpanel" class="tab-pane" ng-class="{active: isActiveTab(#{index})}" id=engine_class.engine_name
11
+ form role="form" ng-submit="update()"
12
12
  .widget
13
13
  .widget-body.no-padding
14
14
  - templates.each do |template|
15
15
  .message
16
16
  ng-include src="'#{template}'"
17
- .btn-group
18
- button.btn.btn-default type="submit" = I18n.t(:update_settings)
17
+ .btn-group
18
+ button.btn.btn-default type="submit" = I18n.t(:update_settings)
19
19
  - else
20
20
  = I18n.t(:no_settings)
@@ -79,7 +79,7 @@ table td {
79
79
  background: #fff;
80
80
  color: #333333;
81
81
  }
82
- .nav-tabs li a {
83
- cursor: pointer;
84
- }
82
+ }
83
+ .nav-tabs li a {
84
+ cursor: pointer;
85
85
  }
@@ -5,7 +5,7 @@ module Kms
5
5
  # For APIs, you may want to use :null_session instead.
6
6
  protect_from_forgery with: :exception
7
7
 
8
- after_filter :set_csrf_cookie_for_ng
8
+ after_action :set_csrf_cookie_for_ng
9
9
 
10
10
  def set_csrf_cookie_for_ng
11
11
  cookies['XSRF-TOKEN'] = form_authenticity_token if protect_against_forgery?
@@ -1,16 +1,14 @@
1
1
  module Kms
2
2
  class Public::PagesController < ActionController::Base
3
3
 
4
- before_filter :eval_externals
4
+ before_action :eval_externals
5
5
 
6
6
  def show
7
7
  page_result = Kms.template_manager.render(@page.register_id, @externals)
8
- # apply typograph to page content
9
- #page_result = EvilFront::Russian.typograph_html(page_result)
10
8
  result = Kms.template_manager.render(@template.register_id, @externals.
11
9
  merge(_inner_template: page_result))
12
10
 
13
- render text: result, layout: false
11
+ render html: result.html_safe
14
12
  end
15
13
 
16
14
  protected
@@ -9,6 +9,10 @@ module Kms
9
9
  after_commit :compile_templates, on: [:create, :update]
10
10
  end
11
11
 
12
+ def register_id
13
+ [self.class.name.parameterize(separator: "_"), id.to_s].join('_')
14
+ end
15
+
12
16
  protected
13
17
 
14
18
  def compiled_templates
@@ -54,8 +54,5 @@ module Kms
54
54
  templatable_type.constantize.find_by_slug!(slug)
55
55
  end
56
56
 
57
- def register_id
58
- "#{self.class.name.parameterize("_")}_#{id}"
59
- end
60
57
  end
61
58
  end
@@ -4,8 +4,5 @@ module Kms
4
4
 
5
5
  validates :name, presence: true
6
6
 
7
- def register_id
8
- "#{self.class.name.parameterize("_")}_#{id}"
9
- end
10
7
  end
11
8
  end
@@ -0,0 +1,22 @@
1
+ <div class="wrapper">
2
+
3
+ <%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { class: 'form-signin', method: :put }) do |f| %>
4
+ <h2 class="form-signin-heading">KMS</h2>
5
+ <h4>Change your password</h4>
6
+ <%= devise_error_messages! %>
7
+ <%= f.hidden_field :reset_password_token %>
8
+
9
+ <% if @minimum_password_length %>
10
+ <em>(<%= @minimum_password_length %> characters minimum)</em><br />
11
+ <% end %>
12
+ <%= f.password_field :password, autofocus: true, autocomplete: "off", class: 'form-control', placeholder: 'Password' %>
13
+
14
+ <%= f.password_field :password_confirmation, autocomplete: "off", class: 'form-control', placeholder: 'Password confirmation' %>
15
+
16
+ <%= f.submit "Change my password", class: "btn btn-lg btn-primary btn-block" %>
17
+
18
+ <br>
19
+ <%= render "devise/shared/links" %>
20
+ <% end %>
21
+
22
+ </div>
@@ -0,0 +1,15 @@
1
+ <div class="wrapper">
2
+ <%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { class: 'form-signin', method: :post }) do |f| %>
3
+ <h2 class="form-signin-heading">KMS</h2>
4
+ <%= devise_error_messages! %>
5
+
6
+ <h4>Forgot your password?</h4>
7
+ <%= f.email_field :email, autofocus: true, class: 'form-control', placeholder: 'Email' %>
8
+ <br>
9
+ <%= f.submit "Send reset password instructions", class: "btn btn-lg btn-primary btn-block" %>
10
+ <br>
11
+ <%= render "devise/shared/links" %>
12
+
13
+ <% end %>
14
+
15
+ </div>
@@ -50,29 +50,31 @@ en:
50
50
  tags_title: "Tags"
51
51
  filters_title: "Filters"
52
52
  variables_title: "Variables"
53
+ endpoints_title: "Endpoints"
53
54
  property: "Property of"
55
+ parameter: "Parameter for"
54
56
  description: "Description"
55
57
  specification: "Detailed Liquor specification"
56
58
  tags:
57
59
  declare:
58
- main_description: "Tag declare could be used for variables declaration and initial value setup in this form:&nbsp;"
60
+ main_description: "Tag declare could be used for variables declaration and initial value setup in this form:"
59
61
  additional_description: "Difference between declare and assign tag - with declare you can create variables with the same names but in different scopes."
60
62
  assign:
61
- main_description: "Tag assign could be used for variables declaration and its initial value setup in this form:&nbsp;"
63
+ main_description: "Tag assign could be used for variables declaration and its initial value setup in this form:"
62
64
  if:
63
- main_description: "Tag if is a standard conditional statement and has this form:&nbsp;"
65
+ main_description: "Tag if is a standard conditional statement and has this form:"
64
66
  unless:
65
- main_description: 'Tag unless executes its "body" if conditional expression results in false or null:&nbsp;'
67
+ main_description: 'Tag unless executes its "body" if conditional expression results in false or null:'
66
68
  for:
67
69
  main_description: "Tag for is a standard cycle statement and has this form:&nbsp;"
68
70
  capture:
69
- main_description: "Tag capture runs code and saves result in var. If var already contained value, capture changes it:&nbsp;"
71
+ main_description: "Tag capture runs code and saves result in var. If var already contained value, capture changes it:"
70
72
  content_for:
71
- main_description: "Tag content_for runs code and saves result in some handle:&nbsp;"
73
+ main_description: "Tag content_for runs code and saves result in some handle:"
72
74
  yield:
73
- main_description: "Tag yield has 3 forms. In the simples case (without arguments) it inserts content of internal template (Page content in terms of this CMS). If string with handle was setup with {% content_for %}, then yield returns this string. If no string with handle, yield returns result of if_none block execution, if such block was specified, or just empty string:&nbsp;"
75
+ main_description: "Tag yield has 3 forms. In the simples case (without arguments) it inserts content of internal template (Page content in terms of this CMS). If string with handle was setup with {% content_for %}, then yield returns this string. If no string with handle, yield returns result of if_none block execution, if such block was specified, or just empty string:"
74
76
  include:
75
- main_description: 'Tag include includes content of Snippet into template. The only argument of include - Snippet ID (field "Slug/ID" that you need to setup on Snippet creation in "Snippets"):&nbsp;'
77
+ main_description: 'Tag include includes content of Snippet into template. The only argument of include - Snippet ID (field "Slug/ID" that you need to setup on Snippet creation in "Snippets"):'
76
78
  variables:
77
79
  var_loop:
78
80
  main_description: 'Variable giving access to current state of cycle/iteration. Can be used only in "for" cycle. var_loop - common name, for accessing actual cycle variable you need to concatenate cycle variable name and "_loop". Example:'
@@ -80,7 +82,7 @@ en:
80
82
  length: "Iterations count (collection size)"
81
83
  index: "Current iteration index - index of element"
82
84
  page:
83
- main_description: 'Variable "page" can be accessed in any template and references to current page:&nbsp;'
85
+ main_description: 'Variable "page" can be accessed in any template and references to current page:'
84
86
  properties:
85
87
  slug: 'Value of "Slug" field'
86
88
  fullpath: 'Page fullpath'
@@ -93,7 +95,7 @@ en:
93
95
  index:
94
96
  main_description: 'Variable "index" accessible in templates and references to root page (with "index" slug). Object properties are the same as for "page" variable.'
95
97
  request:
96
- main_description: 'Variable "request" gives an access to some properties of current request:&nbsp;'
98
+ main_description: 'Variable "request" gives an access to some properties of current request:'
97
99
  properties:
98
100
  path: 'Returns request relative path'
99
101
  url: 'Returns request URL'
@@ -114,17 +116,17 @@ en:
114
116
  link: 'Link to page, containing query'
115
117
  filters:
116
118
  asset_path:
117
- main_description: 'Filter "asset_path" allows to get a relative path to any file from "Assets" section by filename:&nbsp;'
119
+ main_description: 'Filter "asset_path" allows to get a relative path to any file from "Assets" section by filename:'
118
120
  asset_tag:
119
- main_description: 'Filter "asset_tag" allows to include javascript and css files, uploaded to "Assets" section:&nbsp;'
121
+ main_description: 'Filter "asset_tag" allows to include javascript and css files, uploaded to "Assets" section:'
120
122
  resize:
121
- main_description: 'This function/filter helps to change image size on-the-fly. For this filter you need to use absolute URL of image and "format" argument. Returns also URL. To get absolute URL (having only relative - any asset from "Assets") you should use "request.base_url":&nbsp;'
123
+ main_description: 'This function/filter helps to change image size on-the-fly. For this filter you need to use absolute URL of image and "format" argument. Returns also URL. To get absolute URL (having only relative - any asset from "Assets") you should use "request.base_url":'
122
124
  add_watermark:
123
- main_description: 'It allows to add watermark to image. You need image URL and 3 arguments: "image" - watermark image (watermark), "dissolve" - transparency and "position" - position. Returns also URL:&nbsp;'
125
+ main_description: 'It allows to add watermark to image. You need image URL and 3 arguments: "image" - watermark image (watermark), "dissolve" - transparency and "position" - position. Returns also URL:'
124
126
  ends_with:
125
- main_description: 'Allows to check if string ends with some pattern:&nbsp;'
127
+ main_description: 'Allows to check if string ends with some pattern:'
126
128
  currency:
127
- main_description: 'Formats currency values. Possible options: precision, delimiter, separator, format, unit:&nbsp;'
129
+ main_description: 'Formats currency values. Possible options: precision, delimiter, separator, format, unit:'
128
130
  activerecord:
129
131
  models:
130
132
  kms/template:
@@ -50,29 +50,31 @@ ru:
50
50
  tags_title: "Тэги"
51
51
  filters_title: "Фильтры"
52
52
  variables_title: "Переменные"
53
+ endpoints_title: "Запросы"
53
54
  property: "Свойство"
55
+ parameter: "Параметр для"
54
56
  description: "Описание"
55
57
  specification: "Подробная спецификация Liquor"
56
58
  tags:
57
59
  declare:
58
- main_description: "Тэг declare может быть использован для объявления и задания значений переменным в следующей форме:&nbsp;"
60
+ main_description: "Тэг declare может быть использован для объявления и задания значений переменным в следующей форме:"
59
61
  additional_description: "Отличие от assign в том, что с declare можно создавать переменные с одинаковыми именами, но в разных областях видимости."
60
62
  assign:
61
- main_description: "Тэг assign может быть использован для объявления и задания значений переменным в следующей форме:&nbsp;"
63
+ main_description: "Тэг assign может быть использован для объявления и задания значений переменным в следующей форме:"
62
64
  if:
63
- main_description: "Тэг if является стандартным условным оператором и имеет следующую форму:&nbsp;"
65
+ main_description: "Тэг if является стандартным условным оператором и имеет следующую форму:"
64
66
  unless:
65
- main_description: 'Тэг unless выполняет "тело" условия, если результат выражения - false или null:&nbsp;'
67
+ main_description: 'Тэг unless выполняет "тело" условия, если результат выражения - false или null:'
66
68
  for:
67
- main_description: "Тэг for является стандартным циклическим оператором и имеет следующую форму:&nbsp;"
69
+ main_description: "Тэг for является стандартным циклическим оператором и имеет следующую форму:"
68
70
  capture:
69
- main_description: "Тэг capture выполняет code и сохраняет результат в var. Если var уже имела значение, capture изменяет его:&nbsp;"
71
+ main_description: "Тэг capture выполняет code и сохраняет результат в var. Если var уже имела значение, capture изменяет его:"
70
72
  content_for:
71
- main_description: "Тэг content_for выполняет code и сохраняет результат в handle:&nbsp;"
73
+ main_description: "Тэг content_for выполняет code и сохраняет результат в handle:"
72
74
  yield:
73
- main_description: "Тэг yield имеет 3 формы написания. В самом простом случае (без аргументов) тэг вставляет содержимое внутреннего шаблона (в данной CMS это страница). Если строка с handle была задана с помощью {% content_for %}, тогда yield возвращает эту строку. Если не было задано строки с этим handle, yield либо возвращает результат выполнения блока if_none, если он задан, или пустую строку:&nbsp;"
75
+ main_description: "Тэг yield имеет 3 формы написания. В самом простом случае (без аргументов) тэг вставляет содержимое внутреннего шаблона (в данной CMS это страница). Если строка с handle была задана с помощью {% content_for %}, тогда yield возвращает эту строку. Если не было задано строки с этим handle, yield либо возвращает результат выполнения блока if_none, если он задан, или пустую строку:"
74
76
  include:
75
- main_description: 'Тэг include включает в шаблон содержимое Сниппета. Единственный аргумент include - это идентификатор Сниппета (поле "Идентификатор", указанное при создании сниппета в разделе "Сниппеты"):&nbsp;'
77
+ main_description: 'Тэг include включает в шаблон содержимое Сниппета. Единственный аргумент include - это идентификатор Сниппета (поле "Идентификатор", указанное при создании сниппета в разделе "Сниппеты"):'
76
78
  variables:
77
79
  var_loop:
78
80
  main_description: 'Переменная, предоставляющая доступ к текущему состоянию цикла. Может быть использована только внутри цикла for. var_loop - обобщённое имя, для получения настоящего имени переменной нужно сконкатенировать название переменной цикла и "_loop". Например:'
@@ -80,7 +82,7 @@ ru:
80
82
  length: "Количество итераций (размер коллекции)"
81
83
  index: "Номер текущей итерации - индекс элемента"
82
84
  page:
83
- main_description: 'Переменная page доступна в шаблонах и является ссылкой на текущую отображаемую страницу:&nbsp;'
85
+ main_description: 'Переменная page доступна в шаблонах и является ссылкой на текущую отображаемую страницу:'
84
86
  properties:
85
87
  slug: 'Значение поля "Ссылка" страницы'
86
88
  fullpath: 'Полный путь страницы'
@@ -93,7 +95,7 @@ ru:
93
95
  index:
94
96
  main_description: 'Переменная index доступна в шаблонах и является ссылкой на корневую страницу сайта (со ссылкой index). Свойства объекта такие же, как у переменной page.'
95
97
  request:
96
- main_description: 'Переменная request предоставляет доступ к некоторым параметрам текущего запроса:&nbsp;'
98
+ main_description: 'Переменная request предоставляет доступ к некоторым параметрам текущего запроса:'
97
99
  properties:
98
100
  path: 'Возвращает относительный путь запроса'
99
101
  url: 'Возвращает URL запроса'
@@ -114,17 +116,17 @@ ru:
114
116
  link: 'Ссылка на страницу, содержащую искомый запрос'
115
117
  filters:
116
118
  asset_path:
117
- main_description: 'Фильтр asset_path позволяет получить путь к файлу из раздела "Файлы" по имени файла:&nbsp;'
119
+ main_description: 'Фильтр asset_path позволяет получить путь к файлу из раздела "Файлы" по имени файла:'
118
120
  asset_tag:
119
- main_description: 'Фильтр asset_tag позволяет подключать javascript и css файлы, загруженные в раздел "Файлы":&nbsp;'
121
+ main_description: 'Фильтр asset_tag позволяет подключать javascript и css файлы, загруженные в раздел "Файлы":'
120
122
  resize:
121
- main_description: 'Функция выполняет изменение размеров изображения. Для функции необходим абсолютный URL изображения и аргумент "format", на выходе также URL. Для получения абсолютного URL следует использовать request.base_url:&nbsp;'
123
+ main_description: 'Функция выполняет изменение размеров изображения. Для функции необходим абсолютный URL изображения и аргумент "format", на выходе также URL. Для получения абсолютного URL следует использовать request.base_url:'
122
124
  add_watermark:
123
- main_description: 'Функция выполняет добавление watermark к изображению. Для функции необходим URL изображения и 3 аргумента "image" - изображение для наложения (watermark), "dissolve" - прозрачность и "position" - позиция, на выходе также URL:&nbsp;'
125
+ main_description: 'Функция выполняет добавление watermark к изображению. Для функции необходим URL изображения и 3 аргумента "image" - изображение для наложения (watermark), "dissolve" - прозрачность и "position" - позиция, на выходе также URL:'
124
126
  ends_with:
125
- main_description: 'Позволяет проверить, оканчивается строка определённым паттерном или нет:&nbsp;'
127
+ main_description: 'Позволяет проверить, оканчивается строка определённым паттерном или нет:'
126
128
  currency:
127
- main_description: 'Форматирование полей, хранящих денежные значения. Возможные опции - precision, delimiter, separator, format, unit:&nbsp;'
129
+ main_description: 'Форматирование полей, хранящих денежные значения. Возможные опции - precision, delimiter, separator, format, unit:'
128
130
  activerecord:
129
131
  models:
130
132
  kms/template:
@@ -1,4 +1,4 @@
1
- class CreatePages < ActiveRecord::Migration
1
+ class CreatePages < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table :kms_pages do |t|
4
4
  t.string :title
@@ -1,4 +1,4 @@
1
- class CreateTemplates < ActiveRecord::Migration
1
+ class CreateTemplates < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table :kms_templates do |t|
4
4
  t.string :name
@@ -1,4 +1,4 @@
1
- class AddTemplateIdToPages < ActiveRecord::Migration
1
+ class AddTemplateIdToPages < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  add_column :kms_pages, :template_id, :integer
4
4
  add_foreign_key :kms_pages, :kms_templates if respond_to?(:add_foreign_key)
@@ -1,4 +1,4 @@
1
- class CreateAssets < ActiveRecord::Migration
1
+ class CreateAssets < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table :kms_assets do |t|
4
4
  t.string :file
@@ -1,4 +1,4 @@
1
- class AddAncestryToPages < ActiveRecord::Migration
1
+ class AddAncestryToPages < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  add_column :kms_pages, :ancestry, :string
4
4
  add_index :kms_pages, :ancestry
@@ -1,4 +1,4 @@
1
- class DeviseCreateUsers < ActiveRecord::Migration
1
+ class DeviseCreateUsers < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table(:kms_users) do |t|
4
4
  ## Database authenticatable
@@ -1,4 +1,4 @@
1
- class AddFullpathToPages < ActiveRecord::Migration
1
+ class AddFullpathToPages < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  add_column :kms_pages, :fullpath, :string
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddRoleToUsers < ActiveRecord::Migration
1
+ class AddRoleToUsers < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  add_column :kms_users, :role, :string
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddTemplatableFieldsToPages < ActiveRecord::Migration
1
+ class AddTemplatableFieldsToPages < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  add_column :kms_pages, :templatable, :boolean, default: false
4
4
  add_column :kms_pages, :templatable_type, :string
@@ -1,4 +1,4 @@
1
- class AddHiddenToPage < ActiveRecord::Migration
1
+ class AddHiddenToPage < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  add_column :kms_pages, :hidden, :boolean, default: false
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddPositionToKmsPages < ActiveRecord::Migration
1
+ class AddPositionToKmsPages < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  add_column :kms_pages, :position, :integer, default: 0, null: false
4
4
  end
@@ -1,4 +1,4 @@
1
- class CreateKmsSnippets < ActiveRecord::Migration
1
+ class CreateKmsSnippets < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table :kms_snippets do |t|
4
4
  t.string :name
@@ -1,4 +1,4 @@
1
- class CreateKmsSettings < ActiveRecord::Migration
1
+ class CreateKmsSettings < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table :kms_settings do |t|
4
4
  t.json :values