spina 1.1.4 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of spina might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 414bc5f87303a017e42900d1f064457e8649f11088b3b9cfd49bccb8a327e145
4
- data.tar.gz: a922eb6f603cbc71de8fe8e353aba261a4d1ce998ad2e40a100feeda27b0b881
3
+ metadata.gz: 6fa491e01750e620e5a4e3e3b63360fee11594caf3c773810617b5971e07ac3d
4
+ data.tar.gz: 7445c7cab3bfe33ae822a8a99d2956e7bec095d4b3224c79a93d2ebc1ae2d7dd
5
5
  SHA512:
6
- metadata.gz: a877991a1b49ad1811f1557406835a72f80da58b326c17adc923fe2460734cebdceb467ba4b380724cbe686aa61949d20e3b6972b2517f060adf84a8b2a24363
7
- data.tar.gz: 7612cd02fde4d6b3444249ff9477ba102cf7c3f87791ede3b0c0ca2e700a36c7c702f73dbb897e0a22b0a2490d7aa7781d5e3495b5dff86e4fd1983a8b8a0e41
6
+ metadata.gz: 0660aa6e59334da9af788a9cd15e58fde5e54f2d2426508ffc86b03cf8ff2937f7c5ac15713cc02769a0e1499f15083c8745317f15ca1038be17364f17c88e9f
7
+ data.tar.gz: db2025173e5dd6888ed190476fd6c844ec917370597d83f44a919e205e6ca0a92fbea4b30c8698d620c457bb50ecd3e4ae9288fa144c3cf7137052539e9f40c5
@@ -13,7 +13,7 @@ module Spina
13
13
 
14
14
  def new
15
15
  @resource = Resource.find_by(id: params[:resource_id])
16
- @page = Page.new(resource: @resource, parent: Page.find_by(id: params[:parent_id]) || @resource&.parent_page)
16
+ @page = Page.new(resource: @resource, parent: Page.find_by(id: params[:parent_id]))
17
17
  add_index_breadcrumb
18
18
  if current_theme.new_page_templates.any? { |template| template[0] == params[:view_template] }
19
19
  @page.view_template = params[:view_template]
@@ -28,6 +28,9 @@ module Spina
28
28
  scope :live, -> { active.where(draft: false) }
29
29
  scope :in_menu, -> { where(show_in_menu: true) }
30
30
 
31
+ # Copy resource from parent
32
+ before_save :set_resource_from_parent, if: -> { parent.present? }
33
+
31
34
  # Save children to update all materialized_paths
32
35
  after_save :save_children
33
36
  after_save :touch_navigations
@@ -41,7 +44,7 @@ module Spina
41
44
 
42
45
  translates :title, fallbacks: true
43
46
  translates :description, :materialized_path
44
- translates :menu_title, :seo_title, default: -> { title }
47
+ translates :menu_title, :seo_title, :url_title, default: -> { title }
45
48
 
46
49
  def to_s
47
50
  name
@@ -51,8 +54,8 @@ module Spina
51
54
  id
52
55
  end
53
56
 
54
- def url_title
55
- title.try(:parameterize)
57
+ def slug
58
+ url_title&.parameterize
56
59
  end
57
60
 
58
61
  def custom_page?
@@ -97,6 +100,10 @@ module Spina
97
100
 
98
101
  private
99
102
 
103
+ def set_resource_from_parent
104
+ self.resource_id = parent.resource_id
105
+ end
106
+
100
107
  def touch_navigations
101
108
  navigations.update_all(updated_at: Time.zone.now)
102
109
  end
@@ -115,9 +122,9 @@ module Spina
115
122
 
116
123
  def generate_materialized_path
117
124
  if root?
118
- name == 'homepage' ? '' : "#{url_title}"
125
+ name == 'homepage' ? '' : "#{slug}"
119
126
  else
120
- ancestors.collect(&:url_title).append(url_title).join('/')
127
+ ancestors.collect(&:slug).append(slug).join('/')
121
128
  end
122
129
  end
123
130
 
@@ -2,10 +2,6 @@ module Spina
2
2
  class Resource < ApplicationRecord
3
3
  has_many :pages, dependent: :restrict_with_exception
4
4
 
5
- belongs_to :parent_page, class_name: "Spina::Page", optional: true
6
-
7
- after_save :scope_pages_to_parent_page
8
-
9
5
  def pages
10
6
  case order_by
11
7
  when "title"
@@ -14,14 +10,6 @@ module Spina
14
10
  super.order(created_at: :desc)
15
11
  end
16
12
  end
17
-
18
- private
19
-
20
- def scope_pages_to_parent_page
21
- pages.roots.each do |root_page|
22
- root_page.update(parent: parent_page)
23
- end
24
- end
25
-
13
+
26
14
  end
27
15
  end
@@ -34,12 +34,13 @@
34
34
  = f.text_field :link_url, placeholder: Spina::Page.human_attribute_name(:link_url_placeholder)
35
35
 
36
36
  .well
37
- .horizontal-form-group
38
- .horizontal-form-label
39
- = Spina::Page.human_attribute_name :ancestry
40
- .horizontal-form-content
41
- .select-dropdown.ancestry
42
- = f.select :parent_id, page_ancestry_options(f.object), include_blank: Spina::Page.human_attribute_name(:no_parent)
37
+ - unless @page.resource.present?
38
+ .horizontal-form-group
39
+ .horizontal-form-label
40
+ = Spina::Page.human_attribute_name :ancestry
41
+ .horizontal-form-content
42
+ .select-dropdown.ancestry
43
+ = f.select :parent_id, page_ancestry_options(f.object), include_blank: Spina::Page.human_attribute_name(:no_parent)
43
44
 
44
45
  .horizontal-form-group{style: ('display: none' if @page.custom_page?)}
45
46
  .horizontal-form-label
@@ -49,9 +50,10 @@
49
50
  - options = options_for_select(current_theme.view_templates.map { |template| [template[:title], template[:name], {'data-page-parts' => template[:page_parts]}] }, @page.view_template)
50
51
  = f.select :view_template, options
51
52
 
52
- .horizontal-form-group
53
- .horizontal-form-label
54
- = Spina::Page.human_attribute_name :resource
55
- .horizontal-form-content
56
- .select-dropdown
57
- = f.select :resource_id, Spina::Resource.order(:label).pluck(:label, :id), include_blank: t('spina.website.pages')
53
+ - if @page.root?
54
+ .horizontal-form-group
55
+ .horizontal-form-label
56
+ = Spina::Page.human_attribute_name :resource
57
+ .horizontal-form-content
58
+ .select-dropdown
59
+ = f.select :resource_id, Spina::Resource.order(:label).pluck(:label, :id), include_blank: t('spina.website.pages')
@@ -13,6 +13,13 @@
13
13
  .horizontal-form-content
14
14
  = f.text_field :description, placeholder: Spina::Page.human_attribute_name(:description_placeholder)
15
15
 
16
+ .horizontal-form-group
17
+ .horizontal-form-label
18
+ = Spina::Page.human_attribute_name :url_title
19
+ %small= Spina::Page.human_attribute_name :url_title_description
20
+ .horizontal-form-content
21
+ = f.text_field :url_title, placeholder: Spina::Page.human_attribute_name(:url_title_placeholder), value: f.object.url_title(fallback: false, default: nil)&.parameterize
22
+
16
23
  - unless @page.new_record?
17
24
  .horizontal-form-group
18
25
  .horizontal-form-label
@@ -40,10 +40,3 @@
40
40
  .select-dropdown
41
41
  - options = options_for_select(current_theme.view_templates.map { |template| [template[:title], template[:name]] }, @resource.view_template)
42
42
  = f.select :view_template, options, include_blank: true
43
-
44
- .horizontal-form-group
45
- .horizontal-form-label
46
- = Spina::Resource.human_attribute_name :parent_page
47
- .horizontal-form-content
48
- .select-dropdown
49
- = f.select :parent_page_id, page_ancestry_options(Spina::Page.new), include_blank: Spina::Resource.human_attribute_name(:no_parent)
@@ -9,7 +9,7 @@
9
9
  .well
10
10
  .dd#pages_list
11
11
  %ol.dd-list
12
- - (@resource.parent_page.try(:children) || @resource.pages.roots).each do |page|
12
+ - @resource.pages.roots.each do |page|
13
13
  %li.dd-item{data: {controller: "page-collapse", url: spina.children_admin_page_path(page)}}
14
14
  .dd-item-inner
15
15
  - if page.children.any?
@@ -58,6 +58,9 @@ th:
58
58
  skip_to_first_child_description: ส่งต่อไปยังหน้าแรก
59
59
  title: ชื่อเรื่อง
60
60
  title_placeholder: ชื่อเรื่องของหน้า
61
+ url_title:
62
+ url_title_description:
63
+ url_title_placeholder:
61
64
  view_template: เทมเพลตของเพจ
62
65
  spina/resource:
63
66
  label:
@@ -93,6 +96,7 @@ th:
93
96
  spina:
94
97
  ago: อายุ
95
98
  attachments:
99
+ choose_attachment:
96
100
  insert: แทรกเอกสาร
97
101
  insert_multiple: แทรกเอกสาร
98
102
  cancel: ยกเลิก
@@ -111,14 +115,17 @@ th:
111
115
  success: คุณสามารถใช้รหัสผ่านใหม่ได้
112
116
  unknown_user: ไม่มีผู้ใช้รายนี้
113
117
  images:
118
+ all_images:
114
119
  back:
115
120
  cannot_be_created:
116
121
  choose_image:
117
122
  choose_images:
123
+ confirm_selection:
118
124
  delete:
119
125
  delete_confirmation:
120
126
  delete_folder:
121
127
  done_organizing:
128
+ insert_image:
122
129
  insert_photo:
123
130
  insert_photos:
124
131
  link:
@@ -159,6 +166,8 @@ th:
159
166
  information: ข้อมูล
160
167
  login: คุณต้องเข้าสู่ระบบก่อน
161
168
  wrong_username_or_password: อีเมลหรือรหัสผ่านไม่ถูกต้อง
169
+ options:
170
+ choose_option:
162
171
  pages:
163
172
  advanced: ขั้นสูง
164
173
  change_order: เปลี่ยนออเดอร์
@@ -58,6 +58,9 @@ bg:
58
58
  skip_to_first_child_description: Пренасочи към първата дъщерна страница
59
59
  title: Заглавие
60
60
  title_placeholder: Заглавие на страницата
61
+ url_title:
62
+ url_title_description:
63
+ url_title_placeholder:
61
64
  view_template: Темплейт на страницата
62
65
  spina/resource:
63
66
  label: Етикет
@@ -93,6 +96,7 @@ bg:
93
96
  spina:
94
97
  ago: преди
95
98
  attachments:
99
+ choose_attachment:
96
100
  insert: Добавете документ
97
101
  insert_multiple: Добавете документи
98
102
  cancel: Спри
@@ -111,14 +115,17 @@ bg:
111
115
  success: Вече може да използвате новата си парола
112
116
  unknown_user: Този потребител не съществува
113
117
  images:
118
+ all_images:
114
119
  back:
115
120
  cannot_be_created:
116
121
  choose_image:
117
122
  choose_images:
123
+ confirm_selection:
118
124
  delete:
119
125
  delete_confirmation:
120
126
  delete_folder:
121
127
  done_organizing:
128
+ insert_image:
122
129
  insert_photo:
123
130
  insert_photos:
124
131
  link:
@@ -159,6 +166,8 @@ bg:
159
166
  information: Информация
160
167
  login: Трябва първо да влезете в системата
161
168
  wrong_username_or_password: Грешен email или парола
169
+ options:
170
+ choose_option:
162
171
  pages:
163
172
  advanced: Разширени
164
173
  change_order: Смяна на подредба
@@ -58,6 +58,9 @@ de:
58
58
  skip_to_first_child_description: Zur ersten Seite
59
59
  title: Titel
60
60
  title_placeholder: Seiten-Titel
61
+ url_title:
62
+ url_title_description:
63
+ url_title_placeholder:
61
64
  view_template: Seiten-Template
62
65
  spina/resource:
63
66
  label:
@@ -93,6 +96,7 @@ de:
93
96
  spina:
94
97
  ago: vor
95
98
  attachments:
99
+ choose_attachment:
96
100
  insert: Dokument einfügen
97
101
  insert_multiple: Dokumente einfügen
98
102
  cancel: Abbrechen
@@ -111,14 +115,17 @@ de:
111
115
  success: Du kannst dein neues Passwort verwenden
112
116
  unknown_user: Dieser Nutzer existiert nicht
113
117
  images:
118
+ all_images:
114
119
  back:
115
120
  cannot_be_created:
116
121
  choose_image:
117
122
  choose_images:
123
+ confirm_selection:
118
124
  delete:
119
125
  delete_confirmation:
120
126
  delete_folder:
121
127
  done_organizing:
128
+ insert_image:
122
129
  insert_photo:
123
130
  insert_photos:
124
131
  link:
@@ -159,6 +166,8 @@ de:
159
166
  information: Information
160
167
  login: Du musst dich zuerst einloggen
161
168
  wrong_username_or_password: Falsche E-Mail oder Passwort
169
+ options:
170
+ choose_option:
162
171
  pages:
163
172
  advanced: Erweitert
164
173
  change_order: Reihenfolge ändern
@@ -58,6 +58,9 @@ en:
58
58
  skip_to_first_child_description: Forward to first child page
59
59
  title: Title
60
60
  title_placeholder: Page title
61
+ url_title: Override slug
62
+ url_title_description: Optional
63
+ url_title_placeholder: Slug
61
64
  view_template: Page template
62
65
  spina/resource:
63
66
  label: Label
@@ -93,6 +96,7 @@ en:
93
96
  spina:
94
97
  ago: ago
95
98
  attachments:
99
+ choose_attachment: Choose attachment
96
100
  insert: Insert document
97
101
  insert_multiple: Insert documents
98
102
  cancel: Cancel
@@ -111,14 +115,17 @@ en:
111
115
  success: You can use your new password
112
116
  unknown_user: This user does not exist
113
117
  images:
118
+ all_images: All images
114
119
  back: Back
115
120
  cannot_be_created: Cannot be created
116
121
  choose_image: Choose image
117
122
  choose_images: Choose images
123
+ confirm_selection: Confirm selection
118
124
  delete: Delete
119
125
  delete_confirmation: Are you sure you want to delete this <strong>image</strong>?
120
126
  delete_folder: Delete folder
121
127
  done_organizing: Done organizing
128
+ insert_image: Insert image
122
129
  insert_photo: Insert photo
123
130
  insert_photos: Insert photos
124
131
  link: Link
@@ -159,6 +166,8 @@ en:
159
166
  information: Information
160
167
  login: You have to login first
161
168
  wrong_username_or_password: Wrong email or password
169
+ options:
170
+ choose_option: Choose option
162
171
  pages:
163
172
  advanced: Advanced
164
173
  change_order: Change order
@@ -58,6 +58,9 @@ es:
58
58
  skip_to_first_child_description: Reenviar a la primera página hija
59
59
  title: Título
60
60
  title_placeholder: Título de la página
61
+ url_title:
62
+ url_title_description:
63
+ url_title_placeholder:
61
64
  view_template: Plantilla de página
62
65
  spina/resource:
63
66
  label: Etiqueta
@@ -93,6 +96,7 @@ es:
93
96
  spina:
94
97
  ago: atrás
95
98
  attachments:
99
+ choose_attachment:
96
100
  insert: Insertar documento
97
101
  insert_multiple: Insertar documentos
98
102
  cancel: Cancelar
@@ -111,14 +115,17 @@ es:
111
115
  success: Puede utilizar su nueva contraseña
112
116
  unknown_user: Este usuario no existe
113
117
  images:
118
+ all_images:
114
119
  back: Regresar
115
120
  cannot_be_created: No puede ser creada
116
121
  choose_image: Elegir imagen
117
122
  choose_images: Elegir imágenes
123
+ confirm_selection:
118
124
  delete: Borrar
119
125
  delete_confirmation: Esta seguro que desea borrar esta <strong>imagen</strong>?
120
126
  delete_folder: Borrar carpeta
121
127
  done_organizing:
128
+ insert_image:
122
129
  insert_photo: Insertar foto
123
130
  insert_photos: Insertar fotos
124
131
  link: Enlace
@@ -159,6 +166,8 @@ es:
159
166
  information: Información
160
167
  login: Primero debes ingresar
161
168
  wrong_username_or_password: Email o password incorrecto
169
+ options:
170
+ choose_option:
162
171
  pages:
163
172
  advanced: Avanzado
164
173
  change_order: Cambiar orden
@@ -58,6 +58,9 @@ fr:
58
58
  skip_to_first_child_description: Renvoyer vers la première page enfant
59
59
  title: Titre
60
60
  title_placeholder: Titre de la page
61
+ url_title:
62
+ url_title_description:
63
+ url_title_placeholder:
61
64
  view_template: Modèle de page
62
65
  spina/resource:
63
66
  label:
@@ -93,6 +96,7 @@ fr:
93
96
  spina:
94
97
  ago: Il y a
95
98
  attachments:
99
+ choose_attachment:
96
100
  insert: Insérer un document
97
101
  insert_multiple: Insérer des documents
98
102
  cancel: Annuler
@@ -111,14 +115,17 @@ fr:
111
115
  success: Vous pouvez utiliser votre nouveau mot de passe
112
116
  unknown_user: Cet utilisateur n'existe pas
113
117
  images:
118
+ all_images:
114
119
  back:
115
120
  cannot_be_created:
116
121
  choose_image:
117
122
  choose_images:
123
+ confirm_selection:
118
124
  delete:
119
125
  delete_confirmation:
120
126
  delete_folder:
121
127
  done_organizing:
128
+ insert_image:
122
129
  insert_photo:
123
130
  insert_photos:
124
131
  link:
@@ -159,6 +166,8 @@ fr:
159
166
  information: Information
160
167
  login: Vous devez d'abord vous identifier
161
168
  wrong_username_or_password: Mauvais email ou mot de passe
169
+ options:
170
+ choose_option:
162
171
  pages:
163
172
  advanced: Avancé
164
173
  change_order: Changer l'ordre
@@ -58,6 +58,9 @@ id:
58
58
  skip_to_first_child_description: Maju ke halaman anak pertama
59
59
  title: Judul
60
60
  title_placeholder: Judul halaman
61
+ url_title:
62
+ url_title_description:
63
+ url_title_placeholder:
61
64
  view_template: Template halaman
62
65
  spina/resource:
63
66
  label:
@@ -93,6 +96,7 @@ id:
93
96
  spina:
94
97
  ago: lalu
95
98
  attachments:
99
+ choose_attachment:
96
100
  insert: Masukan dokumen
97
101
  insert_multiple: Masukan dokumen
98
102
  cancel: Batal
@@ -111,14 +115,17 @@ id:
111
115
  success: Anda dapat menggunakan sandi baru anda
112
116
  unknown_user: Pengguna ini tidak ada
113
117
  images:
118
+ all_images:
114
119
  back:
115
120
  cannot_be_created:
116
121
  choose_image:
117
122
  choose_images:
123
+ confirm_selection:
118
124
  delete:
119
125
  delete_confirmation:
120
126
  delete_folder:
121
127
  done_organizing:
128
+ insert_image:
122
129
  insert_photo:
123
130
  insert_photos:
124
131
  link:
@@ -159,6 +166,8 @@ id:
159
166
  information: Informasi
160
167
  login: Anda harus login dahulu
161
168
  wrong_username_or_password: Salah e-mail atau sandi
169
+ options:
170
+ choose_option:
162
171
  pages:
163
172
  advanced: Lanjutan
164
173
  change_order: Ubah urutan
@@ -58,6 +58,9 @@ it:
58
58
  skip_to_first_child_description: Vai alla prima sottopagina
59
59
  title: Titolo
60
60
  title_placeholder: Titolo pagina
61
+ url_title:
62
+ url_title_description:
63
+ url_title_placeholder:
61
64
  view_template: Template pagina
62
65
  spina/resource:
63
66
  label: Etichetta
@@ -93,6 +96,7 @@ it:
93
96
  spina:
94
97
  ago: fa
95
98
  attachments:
99
+ choose_attachment:
96
100
  insert: Inserisci documento
97
101
  insert_multiple: Inserisci documenti
98
102
  cancel: Annulla
@@ -111,14 +115,17 @@ it:
111
115
  success: Puoi usare la tua nuova password
112
116
  unknown_user: Questo utente non esiste
113
117
  images:
118
+ all_images:
114
119
  back: Indietro
115
120
  cannot_be_created: Non può essere creato
116
121
  choose_image: Scegli immagine
117
122
  choose_images: Scegli immagini
123
+ confirm_selection:
118
124
  delete: Cancella
119
125
  delete_confirmation: Sei sicuro di voler cancellare questa <strong> immagine </strong>?
120
126
  delete_folder: Cancella cartella
121
127
  done_organizing: Fine riordinare
128
+ insert_image:
122
129
  insert_photo: Inserisci foto
123
130
  insert_photos: Inserisci foto
124
131
  link: Link
@@ -159,6 +166,8 @@ it:
159
166
  information: Informazioni
160
167
  login: Devi prima effettuare il login
161
168
  wrong_username_or_password: Email o password errata
169
+ options:
170
+ choose_option:
162
171
  pages:
163
172
  advanced: Avanzate
164
173
  change_order: Modifica ordine
@@ -58,6 +58,9 @@ nl:
58
58
  skip_to_first_child_description: Doorsturen naar eerste onderliggende pagina
59
59
  title: Titel
60
60
  title_placeholder: Titel van de pagina
61
+ url_title:
62
+ url_title_description:
63
+ url_title_placeholder:
61
64
  view_template: Pagina template
62
65
  spina/resource:
63
66
  label: Label
@@ -93,6 +96,7 @@ nl:
93
96
  spina:
94
97
  ago: geleden
95
98
  attachments:
99
+ choose_attachment: Kies een bijlage
96
100
  insert: Document toevoegen
97
101
  insert_multiple: Documenten toevoegen
98
102
  cancel: Annuleren
@@ -111,14 +115,17 @@ nl:
111
115
  success: Je kunt je nieuwe wachtwoord gebruiken
112
116
  unknown_user: Die gebruiker bestaat niet
113
117
  images:
118
+ all_images: Alle afbeeldingen
114
119
  back: Terug
115
120
  cannot_be_created: Kan niet worden aangemaakt
116
121
  choose_image: Kies afbeelding
117
122
  choose_images: Kies afbeeldingen
123
+ confirm_selection: Bevestig selectie
118
124
  delete: Verwijderen
119
125
  delete_confirmation: Weet je zeker dat je deze <strong>afbeelding</strong> wilt verwijderen?
120
126
  delete_folder: Verwijder folder
121
127
  done_organizing: Klaar met slepen
128
+ insert_image: Afbeelding invoegen
122
129
  insert_photo: Afbeelding invoegen
123
130
  insert_photos: Afbeeldingen invoegen
124
131
  link: Link
@@ -159,6 +166,8 @@ nl:
159
166
  information: Informatie
160
167
  login: Je zult eerst moeten inloggen
161
168
  wrong_username_or_password: Email of wachtwoord is onjuist
169
+ options:
170
+ choose_option: Kies een optie
162
171
  pages:
163
172
  advanced: Geavanceerd
164
173
  change_order: Volgorde wijzigen
@@ -9,10 +9,10 @@ pl:
9
9
  google_analytics: Google Analytics
10
10
  google_plus: Google+
11
11
  google_site_verification: Google Site Verification
12
- instagram:
12
+ instagram: Instagram
13
13
  kvk_identifier: Chamber of commerce
14
14
  kvk_identifier_description: Chamber of commerce
15
- linkedin:
15
+ linkedin: LinkedIn
16
16
  logo: Logo
17
17
  name: Nazwa witryny internetowej
18
18
  phone: Telefon
@@ -22,7 +22,7 @@ pl:
22
22
  twitter: Twitter
23
23
  vat_identifier: VAT
24
24
  vat_identifier_description: VAT
25
- youtube:
25
+ youtube: YouTube
26
26
  spina/attachment:
27
27
  created_at: Utworzono
28
28
  name: Plik
@@ -37,7 +37,7 @@ pl:
37
37
  pages_description: Wybierz stronę, którą chcesz użyć w nawigacji
38
38
  spina/page:
39
39
  ancestry: Strona nadrzędna
40
- created_at:
40
+ created_at: Utworzono w
41
41
  description: Opis w Meta description
42
42
  description_description: Opis pokazywany w wynikach wyszukiwarki
43
43
  description_placeholder: Krótki opis strony
@@ -49,7 +49,7 @@ pl:
49
49
  menu_title: Tytuł nawigacji
50
50
  menu_title_placeholder: pozostaw puste jeśli chcesz użyć tytuł strony
51
51
  no_parent: Brak podrzędnych stron
52
- resource:
52
+ resource: Zasób
53
53
  seo_title: SEO <title>
54
54
  seo_title_placeholder: Tytuł w tagu <title>
55
55
  show_in_menu: Pokaż w nawigazji
@@ -58,12 +58,15 @@ pl:
58
58
  skip_to_first_child_description: Ustaw jako pierwszą w kolejności
59
59
  title: Tytuł
60
60
  title_placeholder: Tytuł strony
61
+ url_title:
62
+ url_title_description:
63
+ url_title_placeholder:
61
64
  view_template: Szablon strony
62
65
  spina/resource:
63
- label:
66
+ label: Etykieta
64
67
  order_by:
65
68
  parent_page:
66
- view_template:
69
+ view_template: Domyślny szablon widoku
67
70
  spina/user:
68
71
  admin: Administrator
69
72
  admin_description: Może tworzyć Użytkowników
@@ -93,6 +96,7 @@ pl:
93
96
  spina:
94
97
  ago: temu
95
98
  attachments:
99
+ choose_attachment:
96
100
  insert: Wstaw dokument
97
101
  insert_multiple: Wstaw dokumenty
98
102
  cancel: Anuluj
@@ -111,14 +115,17 @@ pl:
111
115
  success: Możesz teraz używać nowe hasło
112
116
  unknown_user: Użytkownik nie istnieje
113
117
  images:
114
- back:
115
- cannot_be_created:
116
- choose_image:
117
- choose_images:
118
- delete:
119
- delete_confirmation:
120
- delete_folder:
118
+ all_images: Wszystkie obrazy
119
+ back: Powrót
120
+ cannot_be_created: Nie może być utworzone
121
+ choose_image: Wybierz obraz
122
+ choose_images: Wybierz obrazy
123
+ confirm_selection: Potwierdź wybór
124
+ delete: Usuń
125
+ delete_confirmation: Czy na pewno chcesz usunąć ten <strong>image</strong>?
126
+ delete_folder: Usuń folder
121
127
  done_organizing:
128
+ insert_image: Wstaw obraz
122
129
  insert_photo:
123
130
  insert_photos:
124
131
  link:
@@ -159,6 +166,8 @@ pl:
159
166
  information: Informacja
160
167
  login: Musisz się zalogować
161
168
  wrong_username_or_password: Nieprawidłowy email lub hasło
169
+ options:
170
+ choose_option:
162
171
  pages:
163
172
  advanced: Zaawansowane
164
173
  change_order: Zmień kolejność
@@ -58,6 +58,9 @@ pt-BR:
58
58
  skip_to_first_child_description: Encaminhar para a primeira página filha
59
59
  title: Título
60
60
  title_placeholder: Título da página
61
+ url_title:
62
+ url_title_description:
63
+ url_title_placeholder:
61
64
  view_template: Modelo de página
62
65
  spina/resource:
63
66
  label:
@@ -93,6 +96,7 @@ pt-BR:
93
96
  spina:
94
97
  ago: atrás
95
98
  attachments:
99
+ choose_attachment:
96
100
  insert: Inserir documento
97
101
  insert_multiple: Inserir documentos
98
102
  cancel: Cancelar
@@ -111,14 +115,17 @@ pt-BR:
111
115
  success: Você já pode usar sua nova senha
112
116
  unknown_user: Este usuário não existe
113
117
  images:
118
+ all_images:
114
119
  back:
115
120
  cannot_be_created: 'Imagem não pôde ser processada:'
116
121
  choose_image:
117
122
  choose_images: Escolher imagens
123
+ confirm_selection:
118
124
  delete: Excluir
119
125
  delete_confirmation: Tem certeza que deseja remover esta <strong>imagem</strong>?
120
126
  delete_folder: Excluir pasta
121
127
  done_organizing: Concluir organização
128
+ insert_image:
122
129
  insert_photo: Inserir imagem
123
130
  insert_photos: Inserir imagens
124
131
  link: 'URL da sua imagem:'
@@ -159,6 +166,8 @@ pt-BR:
159
166
  information: Informação
160
167
  login: Você deve estar autenticado
161
168
  wrong_username_or_password: Email ou senha incorreto(s)
169
+ options:
170
+ choose_option:
162
171
  pages:
163
172
  advanced: Avançado
164
173
  change_order: Mudar ordem
@@ -58,6 +58,9 @@ ro:
58
58
  skip_to_first_child_description: Redirecționează către prima pagină copil
59
59
  title: Titlu
60
60
  title_placeholder: Titlul paginii
61
+ url_title:
62
+ url_title_description:
63
+ url_title_placeholder:
61
64
  view_template: Template pagină
62
65
  spina/resource:
63
66
  label:
@@ -93,6 +96,7 @@ ro:
93
96
  spina:
94
97
  ago: acum
95
98
  attachments:
99
+ choose_attachment:
96
100
  insert: Inserează document
97
101
  insert_multiple: Inserează documente
98
102
  cancel: Anulare
@@ -111,14 +115,17 @@ ro:
111
115
  success: Îți poți folosi parola nouă
112
116
  unknown_user: Acest utilizator nu există
113
117
  images:
118
+ all_images:
114
119
  back:
115
120
  cannot_be_created:
116
121
  choose_image:
117
122
  choose_images:
123
+ confirm_selection:
118
124
  delete:
119
125
  delete_confirmation:
120
126
  delete_folder:
121
127
  done_organizing:
128
+ insert_image:
122
129
  insert_photo:
123
130
  insert_photos:
124
131
  link:
@@ -159,6 +166,8 @@ ro:
159
166
  information: Informație
160
167
  login: Trebuie să vă autentificați întâi
161
168
  wrong_username_or_password: Email-ul sau parola sunt greșite
169
+ options:
170
+ choose_option:
162
171
  pages:
163
172
  advanced: Avansat
164
173
  change_order: Schimbă ordinea
@@ -58,6 +58,9 @@ ru:
58
58
  skip_to_first_child_description: Переход на страницу ребенка
59
59
  title: Заголовок
60
60
  title_placeholder: Заголовок страницы
61
+ url_title:
62
+ url_title_description:
63
+ url_title_placeholder:
61
64
  view_template: Шаблон страницы
62
65
  spina/resource:
63
66
  label:
@@ -101,6 +104,7 @@ ru:
101
104
  spina:
102
105
  ago: назад
103
106
  attachments:
107
+ choose_attachment:
104
108
  insert: Вставить документ
105
109
  insert_multiple: Вставить документы
106
110
  cancel: Отмена
@@ -119,14 +123,17 @@ ru:
119
123
  success:
120
124
  unknown_user:
121
125
  images:
126
+ all_images:
122
127
  back:
123
128
  cannot_be_created:
124
129
  choose_image:
125
130
  choose_images:
131
+ confirm_selection:
126
132
  delete:
127
133
  delete_confirmation:
128
134
  delete_folder:
129
135
  done_organizing:
136
+ insert_image:
130
137
  insert_photo:
131
138
  insert_photos:
132
139
  link:
@@ -167,6 +174,8 @@ ru:
167
174
  information: Информация
168
175
  login: Вы должны войти
169
176
  wrong_username_or_password: Неправильная почта или пароль
177
+ options:
178
+ choose_option:
170
179
  pages:
171
180
  advanced: Дополнительно
172
181
  change_order: Изменить порядок
@@ -58,6 +58,9 @@ sv:
58
58
  skip_to_first_child_description: gå till första undersida
59
59
  title: Titel
60
60
  title_placeholder: Sidtitel
61
+ url_title:
62
+ url_title_description:
63
+ url_title_placeholder:
61
64
  view_template: Sidmall
62
65
  spina/resource:
63
66
  label:
@@ -93,6 +96,7 @@ sv:
93
96
  spina:
94
97
  ago: sen
95
98
  attachments:
99
+ choose_attachment:
96
100
  insert: Infoga dokument
97
101
  insert_multiple: Infoga dokument
98
102
  cancel: Avbryt
@@ -111,14 +115,17 @@ sv:
111
115
  success: Du kan använda ditt nya lösenord
112
116
  unknown_user: Denna användare finns inte
113
117
  images:
118
+ all_images:
114
119
  back:
115
120
  cannot_be_created:
116
121
  choose_image:
117
122
  choose_images:
123
+ confirm_selection:
118
124
  delete:
119
125
  delete_confirmation:
120
126
  delete_folder:
121
127
  done_organizing:
128
+ insert_image:
122
129
  insert_photo:
123
130
  insert_photos:
124
131
  link:
@@ -159,6 +166,8 @@ sv:
159
166
  information: Information
160
167
  login: Du måste logga in först
161
168
  wrong_username_or_password: Fel mail eller lösenord
169
+ options:
170
+ choose_option:
162
171
  pages:
163
172
  advanced: Avancerat
164
173
  change_order: Ändra ordning
@@ -58,6 +58,9 @@ tr:
58
58
  skip_to_first_child_description: İlk sıraya yerleştir
59
59
  title: Başlık
60
60
  title_placeholder: Sayfa başlığı
61
+ url_title:
62
+ url_title_description:
63
+ url_title_placeholder:
61
64
  view_template: Sayfa şablonu
62
65
  spina/resource:
63
66
  label:
@@ -93,6 +96,7 @@ tr:
93
96
  spina:
94
97
  ago: önce
95
98
  attachments:
99
+ choose_attachment:
96
100
  insert: Belge ekle
97
101
  insert_multiple: Çoklu belge ekle
98
102
  cancel: İptal
@@ -111,14 +115,17 @@ tr:
111
115
  success:
112
116
  unknown_user:
113
117
  images:
118
+ all_images:
114
119
  back:
115
120
  cannot_be_created:
116
121
  choose_image:
117
122
  choose_images:
123
+ confirm_selection:
118
124
  delete:
119
125
  delete_confirmation:
120
126
  delete_folder:
121
127
  done_organizing:
128
+ insert_image:
122
129
  insert_photo:
123
130
  insert_photos:
124
131
  link:
@@ -159,6 +166,8 @@ tr:
159
166
  information: Bilgi
160
167
  login: Öncelikle giriş yapmalısınız
161
168
  wrong_username_or_password: Hatalı email ya da parola
169
+ options:
170
+ choose_option:
162
171
  pages:
163
172
  advanced: Gelişmiş
164
173
  change_order: Sıralamayı değiştir
@@ -58,6 +58,9 @@ zh-CN:
58
58
  skip_to_first_child_description: 跳转到首个子页面
59
59
  title: 标题
60
60
  title_placeholder: 页面标题
61
+ url_title:
62
+ url_title_description:
63
+ url_title_placeholder:
61
64
  view_template: 页面模板
62
65
  spina/resource:
63
66
  label:
@@ -93,6 +96,7 @@ zh-CN:
93
96
  spina:
94
97
  ago: 以前
95
98
  attachments:
99
+ choose_attachment:
96
100
  insert: 插入文档
97
101
  insert_multiple: 插入多个文档
98
102
  cancel: 取消
@@ -111,14 +115,17 @@ zh-CN:
111
115
  success:
112
116
  unknown_user:
113
117
  images:
118
+ all_images:
114
119
  back:
115
120
  cannot_be_created:
116
121
  choose_image:
117
122
  choose_images:
123
+ confirm_selection:
118
124
  delete:
119
125
  delete_confirmation:
120
126
  delete_folder:
121
127
  done_organizing:
128
+ insert_image:
122
129
  insert_photo:
123
130
  insert_photos:
124
131
  link:
@@ -159,6 +166,8 @@ zh-CN:
159
166
  information: 通知
160
167
  login: 请先登录
161
168
  wrong_username_or_password: 用户名或密码错误
169
+ options:
170
+ choose_option:
162
171
  pages:
163
172
  advanced: 高级
164
173
  change_order: 排序
@@ -4,12 +4,10 @@ class CreateSpinaResources < ActiveRecord::Migration[5.1]
4
4
  t.string :name, null: false, unique: true
5
5
  t.string :label
6
6
  t.string :view_template
7
- t.integer :parent_page_id
8
7
  t.string :order_by
9
8
  t.timestamps
10
9
  end
11
10
  add_column :spina_pages, :resource_id, :integer, null: true
12
11
  add_index :spina_pages, :resource_id
13
- add_index :spina_resources, :parent_page_id
14
12
  end
15
13
  end
@@ -0,0 +1,5 @@
1
+ class AddUrlTitleToSpinaPageTranslations < ActiveRecord::Migration[6.0]
2
+ def change
3
+ add_column :spina_page_translations, :url_title, :string
4
+ end
5
+ end
@@ -1,3 +1,3 @@
1
1
  module Spina
2
- VERSION = "1.1.4"
2
+ VERSION = "1.2.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spina
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.4
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bram Jetten
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-08 00:00:00.000000000 Z
11
+ date: 2020-06-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -536,6 +536,7 @@ files:
536
536
  - config/routes.rb
537
537
  - db/migrate/10_create_spina_image_collections.rb
538
538
  - db/migrate/11_create_spina_resources.rb
539
+ - db/migrate/12_add_url_title_to_spina_page_translations.rb
539
540
  - db/migrate/1_create_spina_tables.rb
540
541
  - db/migrate/2_create_spina_translation_tables.rb
541
542
  - db/migrate/3_create_spina_navigations.rb