spina 0.9.0 → 0.10.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.

Files changed (99) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +6 -2
  3. data/app/assets/javascripts/spina/admin/account.js.coffee +1 -1
  4. data/app/assets/javascripts/spina/admin/pages.js.coffee.erb +1 -1
  5. data/app/assets/javascripts/spina/admin/spina.infinite_scroll.coffee +6 -2
  6. data/app/assets/javascripts/spina/admin/spina.scaffold.coffee +2 -2
  7. data/app/assets/javascripts/spina/admin/{spina.trix.js.coffee → spina.trix.js.coffee.erb} +1 -1
  8. data/app/assets/stylesheets/spina/admin/application.sass +3 -0
  9. data/app/controllers/spina/admin/accounts_controller.rb +0 -2
  10. data/app/controllers/spina/admin/admin_controller.rb +0 -2
  11. data/app/controllers/spina/admin/attachments_controller.rb +5 -3
  12. data/app/controllers/spina/admin/pages_controller.rb +1 -2
  13. data/app/controllers/spina/admin/photos_controller.rb +9 -6
  14. data/app/controllers/spina/admin/users_controller.rb +0 -2
  15. data/app/controllers/spina/pages_controller.rb +17 -6
  16. data/app/helpers/spina/admin/pages_helper.rb +15 -0
  17. data/app/models/spina/account.rb +8 -7
  18. data/app/models/spina/application_record.rb +5 -0
  19. data/app/models/spina/attachment.rb +6 -1
  20. data/app/models/spina/attachment_collection.rb +1 -1
  21. data/app/models/spina/color.rb +1 -1
  22. data/app/models/spina/layout_part.rb +1 -1
  23. data/app/models/spina/line.rb +1 -1
  24. data/app/models/spina/page.rb +10 -2
  25. data/app/models/spina/page_part.rb +1 -1
  26. data/app/models/spina/photo.rb +2 -2
  27. data/app/models/spina/photo_collection.rb +1 -1
  28. data/app/models/spina/photo_collections_photo.rb +1 -1
  29. data/app/models/spina/rewrite_rule.rb +1 -1
  30. data/app/models/spina/structure.rb +1 -1
  31. data/app/models/spina/structure_item.rb +9 -4
  32. data/app/models/spina/structure_part.rb +1 -1
  33. data/app/models/spina/text.rb +1 -1
  34. data/app/models/spina/user.rb +1 -1
  35. data/app/presenters/spina/pages/breadcrumb.rb +102 -0
  36. data/app/presenters/spina/pages/menu_presenter.rb +16 -5
  37. data/app/views/layouts/spina/admin/admin.html.haml +31 -0
  38. data/app/views/layouts/spina/admin/media_library.html.haml +11 -9
  39. data/app/views/spina/admin/accounts/_form.html.haml +29 -23
  40. data/app/views/spina/admin/accounts/analytics.html.haml +19 -15
  41. data/app/views/spina/admin/accounts/social.html.haml +19 -15
  42. data/app/views/spina/admin/accounts/style.html.haml +19 -15
  43. data/app/views/spina/admin/attachments/_select.html.haml +1 -1
  44. data/app/views/spina/admin/attachments/_select_collection.html.haml +1 -1
  45. data/app/views/spina/admin/attachments/insert.js.coffee +5 -0
  46. data/app/views/spina/admin/attachments/insert_collection.js.coffee +7 -0
  47. data/app/views/spina/admin/page_partables/attachment_collections/_form.html.haml +8 -9
  48. data/app/views/spina/admin/page_partables/attachments/_form.html.haml +7 -8
  49. data/app/views/spina/admin/page_partables/photo_collections/_form.html.haml +2 -2
  50. data/app/views/spina/admin/page_partables/photos/_form.html.haml +6 -10
  51. data/app/views/spina/admin/pages/_form.html.haml +25 -6
  52. data/app/views/spina/admin/pages/_form_advanced.html.haml +45 -45
  53. data/app/views/spina/admin/pages/_form_page_content.html.haml +1 -1
  54. data/app/views/spina/admin/pages/_form_page_seo.html.haml +1 -1
  55. data/app/views/spina/admin/pages/edit.html.haml +0 -19
  56. data/app/views/spina/admin/pages/index.html.haml +36 -29
  57. data/app/views/spina/admin/pages/new.html.haml +0 -10
  58. data/app/views/spina/admin/photos/_photo_collection_select.html.haml +4 -4
  59. data/app/views/spina/admin/photos/_photo_multi_picker.html.haml +2 -2
  60. data/app/views/spina/admin/photos/_photo_select.html.haml +4 -1
  61. data/app/views/spina/admin/photos/_photo_single_picker.html.haml +2 -2
  62. data/app/views/spina/admin/photos/index.html.haml +3 -2
  63. data/app/views/spina/admin/photos/insert_photo.js.erb +4 -4
  64. data/app/views/spina/admin/photos/insert_photo_collection.js.erb +6 -3
  65. data/app/views/spina/admin/photos/multi_picker_infinite_scroll.js.erb +1 -1
  66. data/app/views/spina/admin/photos/single_picker_infinite_scroll.js.erb +1 -1
  67. data/app/views/spina/admin/shared/_breadcrumbs.html.haml +1 -0
  68. data/app/views/spina/admin/shared/_notifications.html.haml +23 -12
  69. data/app/views/spina/admin/shared/_primary_navigation.html.haml +43 -3
  70. data/app/views/spina/admin/structure_partables/photos/_form.html.haml +3 -6
  71. data/app/views/spina/admin/users/_form.html.haml +37 -33
  72. data/app/views/spina/admin/users/index.html.haml +27 -23
  73. data/config/initializers/assets.rb +1 -1
  74. data/config/locales/de.yml +4 -0
  75. data/config/locales/en.yml +6 -1
  76. data/config/locales/es.yml +4 -0
  77. data/config/locales/fr.yml +4 -0
  78. data/config/locales/it.yml +4 -0
  79. data/config/locales/nl.yml +8 -0
  80. data/config/locales/pt-BR.yml +4 -0
  81. data/config/locales/ru.yml +16 -4
  82. data/config/locales/tr.yml +4 -0
  83. data/config/locales/zh-CN.yml +4 -0
  84. data/config/routes.rb +3 -3
  85. data/lib/generators/spina/install_generator.rb +31 -11
  86. data/lib/generators/spina/templates/app/views/default/pages/homepage.html.haml +1 -1
  87. data/lib/generators/spina/templates/app/views/default/pages/show.html.haml +1 -1
  88. data/lib/generators/spina/templates/app/views/demo/pages/homepage.html.haml +1 -1
  89. data/lib/generators/spina/templates/app/views/demo/pages/show.html.haml +1 -1
  90. data/lib/generators/spina/templates/config/initializers/spina.rb +1 -0
  91. data/lib/spina.rb +2 -1
  92. data/lib/spina/version.rb +1 -1
  93. data/lib/tasks/spina_tasks.rake +9 -1
  94. metadata +33 -18
  95. data/app/views/layouts/spina/admin/application.html.haml +0 -40
  96. data/app/views/layouts/spina/admin/settings.html.haml +0 -45
  97. data/app/views/layouts/spina/admin/website.html.haml +0 -26
  98. data/app/views/spina/admin/attachments/insert.js.erb +0 -5
  99. data/app/views/spina/admin/attachments/insert_collection.js.erb +0 -7
@@ -96,6 +96,10 @@ pt-BR:
96
96
  insert: 'Inserir documento'
97
97
  insert_multiple: 'Inserir documentos'
98
98
 
99
+ media_library:
100
+ photos: Imagens
101
+ attachments: Documentos
102
+
99
103
  activerecord:
100
104
  models:
101
105
  spina/page:
@@ -96,20 +96,32 @@ ru:
96
96
  insert: 'Вставить документ'
97
97
  insert_multiple: 'Вставить документы'
98
98
 
99
+ media_library:
100
+ photos: Изображения
101
+ attachments: Документы
102
+
99
103
  activerecord:
100
104
  models:
101
105
  spina/page:
102
106
  one: Страница
103
- other: Страницы
107
+ few: Страницы
108
+ many: Страниц
109
+ other: Страниц
104
110
  spina/user:
105
111
  one: Пользователь
106
- other: Пользователи
112
+ few: Пользователея
113
+ many: Пользователей
114
+ other: Пользователей
107
115
  spina/photo:
108
116
  one: Изображение
109
- other: Изображения
117
+ few: Изображения
118
+ many: Изображений
119
+ other: Изображений
110
120
  spina/attachment:
111
121
  one: Документ
112
- other: Документы
122
+ few: Документа
123
+ many: Документов
124
+ other: Документов
113
125
 
114
126
  attributes:
115
127
  spina/account:
@@ -96,6 +96,10 @@ tr:
96
96
  insert: 'Belge ekle'
97
97
  insert_multiple: 'Çoklu belge ekle'
98
98
 
99
+ media_library:
100
+ photos: Resimler
101
+ attachments: Belgeler
102
+
99
103
  activerecord:
100
104
  models:
101
105
  spina/page:
@@ -110,6 +110,10 @@ zh-CN:
110
110
  insert: '插入文档'
111
111
  insert_multiple: '插入多个文档'
112
112
 
113
+ media_library:
114
+ photos: 所有图片
115
+ attachments: 所有文档
116
+
113
117
  activerecord:
114
118
  models:
115
119
  spina/page:
data/config/routes.rb CHANGED
@@ -20,7 +20,7 @@ Spina::Engine.routes.draw do
20
20
  get "logout" => "sessions#destroy"
21
21
 
22
22
  # Media library
23
- get 'media_library' => 'photos#index', as: "media_library"
23
+ get 'media_library' => 'photos#media_library', as: "media_library"
24
24
 
25
25
  resources :pages do
26
26
  post :sort, on: :collection
@@ -62,7 +62,7 @@ Spina::Engine.routes.draw do
62
62
  resource :sitemap
63
63
 
64
64
  # Robots.txt
65
- get '/robots', to: 'pages#robots', format: :txt
65
+ get '/robots', to: 'pages#robots', constraints: { format: 'txt' }
66
66
 
67
67
  # Frontend
68
68
  root to: "pages#homepage"
@@ -71,7 +71,7 @@ Spina::Engine.routes.draw do
71
71
  get '/:locale/*id' => 'pages#show', constraints: {locale: /#{Spina.config.locales.join('|')}/ }
72
72
  get '/:locale/' => 'pages#homepage', constraints: {locale: /#{Spina.config.locales.join('|')}/ }
73
73
  get '/*id' => 'pages#show', as: "page", controller: 'pages', constraints: lambda { |request|
74
- !(Rails.env.development? && request.env['PATH_INFO'].starts_with?('/rails/'))
74
+ !(Rails.env.development? && request.env['PATH_INFO'].starts_with?('/rails/') || request.env['PATH_INFO'].starts_with?('/attachments/'))
75
75
  }
76
76
 
77
77
  end
@@ -1,6 +1,5 @@
1
1
  module Spina
2
2
  class InstallGenerator < Rails::Generators::Base
3
-
4
3
  source_root File.expand_path("../templates", __FILE__)
5
4
 
6
5
  def create_initializer_file
@@ -30,7 +29,8 @@ module Spina
30
29
 
31
30
  def create_account
32
31
  return if Account.exists? && !no?('An account already exists. Skip? [Yn]')
33
- name = ask('What would you like to name your website?')
32
+ name = Account.first.try(:name) || 'MySite'
33
+ name = ask("What would you like to name your website? [#{name}]").presence || name
34
34
  account = Account.first_or_create.update_attribute(:name, name)
35
35
  end
36
36
 
@@ -47,18 +47,24 @@ module Spina
47
47
  end
48
48
 
49
49
  def copy_template_files
50
- return if Rails.env.production?
51
50
  theme = Account.first.theme
52
- template "config/initializers/themes/#{theme}.rb"
53
- directory "app/assets/stylesheets/#{theme}"
54
- directory "app/views/#{theme}"
55
- directory "app/views/layouts/#{theme}"
51
+ if theme.in? ['default', 'demo']
52
+ template "config/initializers/themes/#{theme}.rb"
53
+ directory "app/assets/stylesheets/#{theme}"
54
+ directory "app/views/#{theme}"
55
+ directory "app/views/layouts/#{theme}"
56
+ end
57
+ Spina::THEMES.clear
58
+ Dir[Rails.root.join('config', 'initializers', 'themes', '*.rb')].each { |file| load file }
56
59
  end
57
60
 
58
61
  def create_user
59
62
  return if User.exists? && !no?('A user already exists. Skip? [Yn]')
60
- email = ask('Please enter an email address for your first user:')
61
- password = ask('Create a temporary password:', echo: false)
63
+ email = 'admin@domain.com'
64
+ email = ask("Please enter an email address for your first user: [#{email}]").presence || email
65
+ password = 'password'
66
+ password = ask("Create a temporary password: [#{password}]").presence || password
67
+ @temporary_password = password
62
68
  User.create name: 'admin', email: email, password: password, admin: true
63
69
  end
64
70
 
@@ -69,7 +75,6 @@ module Spina
69
75
  def seed_demo_content
70
76
  theme_name = Account.first.theme
71
77
  if theme_name == 'demo' && !no?('Seed example content? [Yn]')
72
-
73
78
  current_theme = ::Spina::Theme.find_by_name(theme_name)
74
79
  if (page = Spina::Page.find_by(name: 'demo'))
75
80
  page.page_parts.clear
@@ -89,10 +94,25 @@ module Spina
89
94
  end
90
95
  end
91
96
 
97
+ def feedback
98
+ puts
99
+ puts ' Your Spina site has been succesfully installed! '
100
+ puts
101
+ puts ' Restart your server and visit http://localhost:3000 in your browser!'
102
+ puts " The admin backend is located at http://localhost:3000/#{Spina.config.backend_path}."
103
+ puts
104
+ puts " Site name : #{Account.first.name}"
105
+ puts " Active theme : #{Account.first.theme}"
106
+ puts " User email : #{User.first.email}"
107
+ puts " User password : #{@temporary_password}"
108
+ puts
109
+ end
110
+
92
111
  private
93
112
 
94
113
  def themes
95
- Rails.env.production? ? Spina::Theme.all.map(&:name) : ['default', 'demo']
114
+ themes = Spina::Theme.all.map(&:name)
115
+ themes | ['default', 'demo']
96
116
  end
97
117
 
98
118
  end
@@ -1,2 +1,2 @@
1
1
  %h1= @page.title
2
- = @page.content(:content).try(:html_safe)
2
+ = @page.content(:text).try(:html_safe)
@@ -1,3 +1,3 @@
1
1
  %h1= @page.title
2
- = @page.content(:content).try(:html_safe)
2
+ = @page.content(:text).try(:html_safe)
3
3
 
@@ -1,2 +1,2 @@
1
1
  %h1= @page.title
2
- = @page.content(:content).try(:html_safe)
2
+ = @page.content(:text).try(:html_safe)
@@ -1,3 +1,3 @@
1
1
  %h1= @page.title
2
- = @page.content(:content).try(:html_safe)
2
+ = @page.content(:text).try(:html_safe)
3
3
 
@@ -1,6 +1,7 @@
1
1
  Spina.configure do |config|
2
2
  # Set locales
3
3
  config.locales = [:en]
4
+ # Run `rake spina:update_translations` after you add any new locale.
4
5
 
5
6
  # Important Note
6
7
  # ==============
data/lib/spina.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  require 'spina/engine'
2
+ require 'spina/plugin'
2
3
  require 'spina/railtie'
3
- require 'spina/template'
4
+ require 'spina/theme'
4
5
 
5
6
  module Spina
6
7
 
data/lib/spina/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Spina
2
- VERSION = "0.9.0"
2
+ VERSION = "0.10.0"
3
3
  end
@@ -5,4 +5,12 @@ namespace :spina do
5
5
  Spina::Account.first.save
6
6
  end
7
7
 
8
- end
8
+ desc "Update translations after adding locales"
9
+ task update_translations: :environment do
10
+ Spina.locales.each do |locale|
11
+ I18n.locale = locale
12
+ Spina::Page.find_each(&:save!)
13
+ end
14
+ end
15
+
16
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spina
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bram Jetten
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-04-18 00:00:00.000000000 Z
12
+ date: 2016-08-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - ">="
19
19
  - !ruby/object:Gem::Version
20
- version: '4.0'
20
+ version: '5.0'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - ">="
26
26
  - !ruby/object:Gem::Version
27
- version: '4.0'
27
+ version: '5.0'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: bcrypt
30
30
  requirement: !ruby/object:Gem::Requirement
@@ -138,7 +138,7 @@ dependencies:
138
138
  - !ruby/object:Gem::Version
139
139
  version: '0'
140
140
  - !ruby/object:Gem::Dependency
141
- name: cancan
141
+ name: cancancan
142
142
  requirement: !ruby/object:Gem::Requirement
143
143
  requirements:
144
144
  - - ">="
@@ -209,6 +209,20 @@ dependencies:
209
209
  version: '0'
210
210
  - !ruby/object:Gem::Dependency
211
211
  name: turbolinks
212
+ requirement: !ruby/object:Gem::Requirement
213
+ requirements:
214
+ - - "~>"
215
+ - !ruby/object:Gem::Version
216
+ version: '5'
217
+ type: :runtime
218
+ prerelease: false
219
+ version_requirements: !ruby/object:Gem::Requirement
220
+ requirements:
221
+ - - "~>"
222
+ - !ruby/object:Gem::Version
223
+ version: '5'
224
+ - !ruby/object:Gem::Dependency
225
+ name: kaminari
212
226
  requirement: !ruby/object:Gem::Requirement
213
227
  requirements:
214
228
  - - ">="
@@ -222,7 +236,7 @@ dependencies:
222
236
  - !ruby/object:Gem::Version
223
237
  version: '0'
224
238
  - !ruby/object:Gem::Dependency
225
- name: kaminari
239
+ name: globalize
226
240
  requirement: !ruby/object:Gem::Requirement
227
241
  requirements:
228
242
  - - ">="
@@ -236,19 +250,19 @@ dependencies:
236
250
  - !ruby/object:Gem::Version
237
251
  version: '0'
238
252
  - !ruby/object:Gem::Dependency
239
- name: globalize
253
+ name: activemodel-serializers-xml
240
254
  requirement: !ruby/object:Gem::Requirement
241
255
  requirements:
242
- - - "~>"
256
+ - - ">="
243
257
  - !ruby/object:Gem::Version
244
- version: 5.0.0
258
+ version: '0'
245
259
  type: :runtime
246
260
  prerelease: false
247
261
  version_requirements: !ruby/object:Gem::Requirement
248
262
  requirements:
249
- - - "~>"
263
+ - - ">="
250
264
  - !ruby/object:Gem::Version
251
- version: 5.0.0
265
+ version: '0'
252
266
  - !ruby/object:Gem::Dependency
253
267
  name: rack-rewrite
254
268
  requirement: !ruby/object:Gem::Requirement
@@ -281,7 +295,7 @@ files:
281
295
  - app/assets/javascripts/spina/admin/pages.js.coffee.erb
282
296
  - app/assets/javascripts/spina/admin/spina.infinite_scroll.coffee
283
297
  - app/assets/javascripts/spina/admin/spina.scaffold.coffee
284
- - app/assets/javascripts/spina/admin/spina.trix.js.coffee
298
+ - app/assets/javascripts/spina/admin/spina.trix.js.coffee.erb
285
299
  - app/assets/javascripts/spina/application.js
286
300
  - app/assets/stylesheets/spina/_mixins.scss
287
301
  - app/assets/stylesheets/spina/_normalize.scss
@@ -305,6 +319,7 @@ files:
305
319
  - app/models/concerns/spina/partable.rb
306
320
  - app/models/spina/ability.rb
307
321
  - app/models/spina/account.rb
322
+ - app/models/spina/application_record.rb
308
323
  - app/models/spina/attachment.rb
309
324
  - app/models/spina/attachment_collection.rb
310
325
  - app/models/spina/color.rb
@@ -321,15 +336,14 @@ files:
321
336
  - app/models/spina/structure_part.rb
322
337
  - app/models/spina/text.rb
323
338
  - app/models/spina/user.rb
339
+ - app/presenters/spina/pages/breadcrumb.rb
324
340
  - app/presenters/spina/pages/menu_presenter.rb
325
341
  - app/uploaders/spina/default_store_uploader.rb
326
342
  - app/uploaders/spina/file_uploader.rb
327
343
  - app/uploaders/spina/logo_uploader.rb
328
344
  - app/uploaders/spina/photo_uploader.rb
329
- - app/views/layouts/spina/admin/application.html.haml
345
+ - app/views/layouts/spina/admin/admin.html.haml
330
346
  - app/views/layouts/spina/admin/media_library.html.haml
331
- - app/views/layouts/spina/admin/settings.html.haml
332
- - app/views/layouts/spina/admin/website.html.haml
333
347
  - app/views/layouts/spina/email.html.erb
334
348
  - app/views/layouts/spina/login.html.haml
335
349
  - app/views/spina/admin/accounts/_form.html.haml
@@ -344,8 +358,8 @@ files:
344
358
  - app/views/spina/admin/attachments/_select_collection.html.haml
345
359
  - app/views/spina/admin/attachments/create.js.erb
346
360
  - app/views/spina/admin/attachments/index.html.haml
347
- - app/views/spina/admin/attachments/insert.js.erb
348
- - app/views/spina/admin/attachments/insert_collection.js.erb
361
+ - app/views/spina/admin/attachments/insert.js.coffee
362
+ - app/views/spina/admin/attachments/insert_collection.js.coffee
349
363
  - app/views/spina/admin/attachments/select.js.erb
350
364
  - app/views/spina/admin/attachments/select_collection.js.erb
351
365
  - app/views/spina/admin/layout_partables/colors/_form.html.haml
@@ -394,6 +408,7 @@ files:
394
408
  - app/views/spina/admin/photos/wysihtml5_insert.js.coffee
395
409
  - app/views/spina/admin/photos/wysihtml5_select.js.erb
396
410
  - app/views/spina/admin/sessions/new.html.haml
411
+ - app/views/spina/admin/shared/_breadcrumbs.html.haml
397
412
  - app/views/spina/admin/shared/_notifications.html.haml
398
413
  - app/views/spina/admin/shared/_primary_navigation.html.haml
399
414
  - app/views/spina/admin/shared/_rich_text_field.html.haml
@@ -472,7 +487,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
472
487
  version: '0'
473
488
  requirements: []
474
489
  rubyforge_project:
475
- rubygems_version: 2.4.5.1
490
+ rubygems_version: 2.5.1
476
491
  signing_key:
477
492
  specification_version: 4
478
493
  summary: Spina
@@ -1,40 +0,0 @@
1
- %html{lang: I18n.locale}
2
- %head
3
- %meta{charset: 'utf-8'}
4
- %meta{name: 'viewport', content: 'initial-scale=1.0, user-scalable=no'}
5
- = csrf_meta_tags
6
-
7
- %title Spina
8
-
9
- / Stylesheet
10
- = stylesheet_link_tag 'spina/admin/application'
11
-
12
- /[if lt IE 9]
13
- = javascript_include_tag '//html5shiv.googlecode.com/svn/trunk/html5.js'
14
-
15
- / JavaScript
16
- = javascript_include_tag 'spina/admin/application'
17
- = yield(:plugin_stylesheets)
18
-
19
- %body
20
- = render 'spina/admin/shared/primary_navigation'
21
- = yield(:secondary_navigation)
22
-
23
- %section#main
24
- %header#main_content_header
25
- = yield(:permanent_notice)
26
- .pull-right
27
- = link_to '/', class: 'button button-hollow button-round button-small preview-website', data: {:"no-turbolink" => true} do
28
- = icon('eye')
29
- = t('spina.preview_website')
30
-
31
- = yield(:header_actions) if content_for?(:header_actions)
32
- .breadcrumbs= render_breadcrumbs separator: '<div class="divider"></div>'
33
- = yield(:tertiary_navigation)
34
-
35
- = render 'spina/admin/shared/notifications'
36
-
37
- = content_for?(:application) ? yield(:application) : yield
38
-
39
- = link_to 'http://www.spinacms.com', class: 'spina-logo', target: :blank do
40
- = image_tag('spina/spina.png')
@@ -1,45 +0,0 @@
1
- - content_for :secondary_navigation do
2
- %nav#secondary
3
- %h1= t('spina.preferences.title')
4
-
5
- %ul
6
- %li{class: ('active' if params[:action] == 'edit' && params[:controller] == 'spina/admin/accounts')}
7
- = link_to spina.edit_admin_account_path do
8
- = icon('cog-outline')
9
- = t('spina.preferences.account')
10
- %small= t('spina.preferences.account_description')
11
-
12
- %li{class: ('active' if params[:action] == 'style')}
13
- = link_to spina.style_admin_account_path do
14
- = icon('brush')
15
- = t('spina.preferences.style')
16
- %small= t('spina.preferences.style_description')
17
-
18
- - if can? :manage, Spina::User
19
- %li{class: ('active' if %w[users].include? controller_name)}
20
- = link_to spina.admin_users_path do
21
- = icon('users-outline')
22
- = t('spina.preferences.users')
23
- %small= t('spina.preferences.users_description')
24
-
25
- %li{class: ('active' if params[:action] == 'social')}
26
- = link_to spina.social_admin_account_path do
27
- = icon('social-outline')
28
- = t('spina.preferences.social_media')
29
- %small= t('spina.preferences.social_media_description')
30
-
31
- %li{class: ('active' if params[:action] == 'analytics')}
32
- = link_to spina.analytics_admin_account_path do
33
- = icon('chart-outline')
34
- = t('spina.preferences.analytics')
35
- %small= t('spina.preferences.analytics_description')
36
-
37
- - Spina::Plugin.all.each do |plugin|
38
- - if current_theme.plugins.include? plugin.name
39
- - if lookup_context.exists? "spina/admin/hooks/#{ plugin.namespace }/_settings_secondary_navigation"
40
- = render "spina/admin/hooks/#{ plugin.namespace }/settings_secondary_navigation", plugin: plugin
41
-
42
- - content_for(:application) do
43
- = content_for?(:settings) ? yield(:settings) : yield
44
-
45
- = render template: 'layouts/spina/admin/application'