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
@@ -1,3 +1,3 @@
1
- .item{class: ('selected' if @selected_photos.include?(photo_multi_picker))}
2
- = check_box_tag 'photo_ids[]', photo_multi_picker.id, @selected_photos.include?(photo_multi_picker)
1
+ .item{class: ('selected' if photo_multi_picker.id.in?(@selected_photo_ids)) }
2
+ = check_box_tag 'photo_ids[]', photo_multi_picker.id, photo_multi_picker.id.in?(@selected_photo_ids)
3
3
  = image_tag photo_multi_picker.file.thumb.url, id: "photo_#{photo_multi_picker.id}"
@@ -7,7 +7,10 @@
7
7
  = f.file_field :file, data: {customfileinput: true}
8
8
 
9
9
  = form_tag spina.insert_photo_admin_photos_path(params[:page_part_id]), remote: true, class: 'gallery-prepend-image' do
10
+ = hidden_field_tag :hidden_field_id, @hidden_field_id
11
+
10
12
  .infinite-scroll
11
13
  = render partial: 'spina/admin/photos/photo_single_picker', collection: @photos
12
14
 
13
- .infinite-pagination= link_to_next_page @photos, 'Next', params: {selected_photo_id: @selected_photo.try(:id)}, remote: true
15
+ .infinite-pagination= link_to_next_page @photos, 'Next', params: params.slice(:selected_photo_id), remote: true
16
+
@@ -1,3 +1,3 @@
1
- .item{class: ('selected' if @selected_photo == photo_single_picker)}
2
- = radio_button_tag :photo_id, photo_single_picker.id, photo_single_picker == @selected_photo
1
+ .item{ class: ('selected' if photo_single_picker.id == @selected_photo_id) }
2
+ = radio_button_tag :photo_id, photo_single_picker.id, photo_single_picker.id == @selected_photo_id
3
3
  = image_tag photo_single_picker.file.thumb.url, id: "photo_#{photo_single_picker.id}"
@@ -7,6 +7,7 @@
7
7
  = f.file_field :file, data: {customfileinput: true}
8
8
 
9
9
  .gallery-prepend-image
10
- .infinite-scroll= render partial: 'spina/admin/photos/photo', collection: @photos
10
+ .infinite-scroll
11
+ = render partial: 'spina/admin/photos/photo', collection: @photos
11
12
 
12
- .infinite-pagination= link_to_next_page @photos, 'Next', remote: true
13
+ .infinite-pagination= link_to_next_page @photos, 'Next', remote: true
@@ -1,10 +1,10 @@
1
- var hidden_input = $("input[name='<%= j params[:page_part_id] %>[page_partable_id]'], input[name='<%= j params[:page_part_id] %>[structure_partable_id]']");
2
- hidden_input.parents('.media_picker').find('.image, .placeholder').remove();
1
+ var hidden_input = $("input[name='<%= j params[:page_part_id] %>[page_partable_id]'], input[name='<%= j params[:page_part_id] %>[structure_partable_id]'], input[data-hidden-field-id='<%= j params[:hidden_field_id] %>']");
2
+ hidden_input.parents('.media_picker').find('.image').remove();
3
+
3
4
  <% if @photo.present? %>
4
- hidden_input.parents('.media_picker').prepend("<div class='placeholder pull-right'><span class='button button-small button-round' data-icon='U'><%= I18n.t('spina.pages.photo_picker') %></span></div><div class='image'><img src='<%= @photo.file.thumb %>' /></div>");
5
+ hidden_input.parents('.media_picker').append("<div class='image'><img src='<%= @photo.file.thumb %>' /></div>");
5
6
  hidden_input.val("<%= @photo.id %>");
6
7
  <% else %>
7
- hidden_input.parents('.media_picker').prepend("<div class='placeholder'><span class='button button-small button-round' data-icon='U'><%= I18n.t('spina.pages.photo_picker') %></span></div>");
8
8
  hidden_input.parents('.media_picker').append("<input type='hidden' type='checkbox' name='<%= j params[:page_part_id] %>[_destroy]' value='1' />")
9
9
  <% end %>
10
10
  $.hideModal();
@@ -1,13 +1,16 @@
1
- var hidden_input = $("input[name='<%= j params[:page_part_id] %>[photo_tokens]']");
1
+ var photo_token_inputs = [
2
+ "input[name='<%= j params[:page_part_id] %>[photo_collection_attributes][photo_tokens]']",
3
+ "input[name='<%= j params[:page_part_id] %>[photo_tokens]']"
4
+ ]
5
+ var hidden_input = $(photo_token_inputs.join(", "))
2
6
 
3
7
  <% if @photos.present? %>
4
8
  var photo_collection = $("<%= j render partial: 'photo_collection', locals: {photos: @photos} %>");
5
9
  hidden_input.parents('.horizontal-form-content').find('.photo-collection').html(photo_collection);
6
- hidden_input.parents('.horizontal-form-content').find('a .placeholder').addClass('pull-right');
7
10
  hidden_input.val("<%= @photos.map(&:id).join(',') %>");
8
11
  <% else %>
9
- hidden_input.parents('.horizontal-form-content').find('a .placeholder').removeClass('pull-right');
10
12
  hidden_input.val("");
13
+ hidden_input.parents('.horizontal-form-content').find('.photo-collection').empty()
11
14
  <% end %>
12
15
 
13
16
  $('.sortable-grid').sortable().bind('sortupdate', function(e) {
@@ -2,5 +2,5 @@
2
2
  $("<%=j render partial: 'spina/admin/photos/photo_multi_picker', collection: @photos %>").appendTo($(".infinite-scroll"));
3
3
 
4
4
  // Update pagination link
5
- $('.infinite-pagination').html("<%= j link_to_next_page @photos, 'Next', params: {selected_photo_ids: @selected_photos.ids}, remote: true %>").infiniteScroll()
5
+ $('.infinite-pagination').html("<%= j link_to_next_page @photos, 'Next', params: params.slice(:selected_photo_ids), remote: true %>").infiniteScroll()
6
6
 
@@ -2,5 +2,5 @@
2
2
  $("<%=j render partial: 'spina/admin/photos/photo_single_picker', collection: @photos %>").appendTo($(".infinite-scroll"));
3
3
 
4
4
  // Update pagination link
5
- $('.infinite-pagination').html("<%= j link_to_next_page @photos, 'Next', params: {selected_photo_id: @selected_photo.try(:id)}, remote: true %>").infiniteScroll()
5
+ $('.infinite-pagination').html("<%= j link_to_next_page @photos, 'Next', params: params.slice(:selected_photo_id), remote: true %>").infiniteScroll()
6
6
 
@@ -0,0 +1 @@
1
+ .breadcrumbs= render_breadcrumbs separator: '<div class="divider"></div>'
@@ -1,16 +1,27 @@
1
1
  %aside#notifications
2
2
  - if flash[:notice]
3
- .notification{data: {icon: 'L'}}
4
- %p
5
- =t 'spina.notifications.information'
6
- %small= flash[:notice]
3
+ .notification.animated.fadeInRight
4
+ = icon('info')
5
+ .notification-message
6
+ = flash[:notice].html_safe
7
+ %small= flash[:notice_small].try(:html_safe)
8
+ = link_to '#', data: {close_notification: true} do
9
+ = icon('cross')
7
10
 
8
- - if content_for?(:notification_alert)
9
- = yield(:notification_alert)
11
+ - if flash[:alert]
12
+ .notification.notification-danger.animated.fadeInRight
13
+ = icon('exclamation')
14
+ .notification-message
15
+ = flash[:alert].html_safe
16
+ %small= flash[:alert_small].try(:html_safe)
17
+ = link_to '#', data: {close_notification: true} do
18
+ = icon('cross')
10
19
 
11
- - else
12
- - if flash[:alert]
13
- .notification.notification-error{data: {icon: 'm'}}
14
- %p
15
- =t 'spina.notifications.alert'
16
- %small= flash[:alert]
20
+ - if flash[:success]
21
+ .notification.notification-success.animated.fadeInRight
22
+ = icon('large-check')
23
+ .notification-message
24
+ = flash[:success].html_safe
25
+ %small= flash[:success_small].try(:html_safe)
26
+ = link_to '#', data: {close_notification: true} do
27
+ = icon('cross')
@@ -1,19 +1,59 @@
1
- %nav#primary
1
+ %nav#primary.transformed
2
2
  %ul
3
3
  %li{class: ('active' if (%w[pages photos attachments] + Spina::Plugin.all.map { |plugin| plugin.namespace if current_theme.plugins.include?(plugin.name) }).include? controller_name)}
4
4
  = link_to spina.admin_pages_path do
5
5
  = icon('home')
6
+ = t('spina.website.title')
7
+ = icon('caret-right')
8
+
9
+ %ul
10
+ %li{class: ('active' if current_admin_path.start_with?('/pages'))}
11
+ = link_to t('spina.website.pages'), spina.admin_pages_path
12
+ %li{class: ('active' if current_admin_path.start_with?('/photos', '/attachments'))}
13
+ = link_to t('spina.website.media_library'), spina.admin_photos_path
14
+ - Spina::Plugin.all.each do |plugin|
15
+ - if current_theme.plugins.include? plugin.name
16
+ - if lookup_context.exists? "spina/admin/hooks/#{ plugin.namespace }/_website_secondary_navigation"
17
+ = render "spina/admin/hooks/#{ plugin.namespace }/website_secondary_navigation", plugin: plugin
18
+ %li
19
+ = link_to '#', class: 'back-to-main-menu' do
20
+ = icon('caret-left')
21
+ =t 'spina.main_menu'
6
22
 
7
23
  - Spina::Plugin.all.each do |plugin|
8
24
  - if current_theme.plugins.include? plugin.name
9
25
  - if lookup_context.exists? "spina/admin/hooks/#{ plugin.namespace }/_primary_navigation"
10
26
  = render "spina/admin/hooks/#{ plugin.namespace }/primary_navigation", plugin: plugin
11
27
 
12
-
13
28
  %li{class: ('active' if %w[accounts users tenants].include? controller_name)}
14
29
  = link_to spina.edit_admin_account_path do
15
30
  = icon('cog')
31
+ = t('spina.preferences.title')
32
+ = icon('caret-right')
33
+
34
+ %ul
35
+ %li{class: ('active' if params[:action] == 'edit' && params[:controller] == 'spina/admin/accounts')}
36
+ = link_to t('spina.preferences.account'), spina.edit_admin_account_path
37
+ %li{class: ('active' if params[:action] == 'style')}
38
+ = link_to t('spina.preferences.style'), spina.style_admin_account_path
39
+ - if can? :manage, Spina::User
40
+ %li{class: ('active' if %w[users].include? controller_name)}
41
+ = link_to t('spina.preferences.users'), spina.admin_users_path
42
+ %li{class: ('active' if params[:action] == 'social')}
43
+ = link_to t('spina.preferences.social_media'), spina.social_admin_account_path
44
+ %li{class: ('active' if params[:action] == 'analytics')}
45
+ = link_to t('spina.preferences.analytics'), spina.analytics_admin_account_path
46
+
47
+ - Spina::Plugin.all.each do |plugin|
48
+ - if current_theme.plugins.include? plugin.name
49
+ - if lookup_context.exists? "spina/admin/hooks/#{ plugin.namespace }/_settings_secondary_navigation"
50
+ = render "spina/admin/hooks/#{ plugin.namespace }/settings_secondary_navigation", plugin: plugin
51
+
52
+ %li
53
+ = link_to '#', class: 'back-to-main-menu' do
54
+ = icon('caret-left')
55
+ =t 'spina.main_menu'
16
56
 
17
57
  %li.bottom
18
- = link_to spina.admin_logout_path, data: {no_turbolink: true} do
58
+ = link_to spina.admin_logout_path, data: {turbolinks: false} do
19
59
  = icon('power-off')
@@ -1,11 +1,8 @@
1
- = link_to spina.photo_select_admin_photos_path(f.object_name, selected_photo_id: (f.object.structure_partable.id if f.object.structure_partable.present?)), remote: true, class: "media_picker" do
1
+ = link_to spina.photo_select_admin_photos_path(f.object_name, selected_photo_id: f.object.structure_partable.try(:id)), remote: true, class: "media_picker" do
2
+ .placeholder.pull-right
3
+ %span.button.button-small.button-round{data: {icon: 'U'}}=t 'spina.pages.photo_picker'
2
4
  - if f.object.structure_partable && f.object.structure_partable.file.present?
3
- .placeholder.pull-right
4
- %span.button.button-small.button-round{data: {icon: 'U'}}=t 'spina.pages.photo_picker'
5
5
  .image
6
6
  = image_tag f.object.structure_partable.file.thumb
7
- - else
8
- .placeholder
9
- %span.button.button-small.button-round{data: {icon: 'U'}}=t 'spina.pages.photo_picker'
10
7
 
11
8
  = f.hidden_field :structure_partable_id
@@ -1,54 +1,58 @@
1
- - if @user.errors.any?
2
- - content_for :notification_alert do
3
- .notification.notification-error{data: {icon: 'm'}}
4
- %p
5
- = Spina::User.human_attribute_name :cannot_be_created
6
- %small
7
- - @user.errors.full_messages.each do |msg|
8
- = msg
9
- %br/
10
-
11
1
  = form_for [spina, :admin, @user] do |f|
12
- .table-container
13
- %table.table.table-form
14
- %tr
15
- %td
2
+ %header#header
3
+ = render partial: 'spina/admin/shared/breadcrumbs'
4
+
5
+ #header_actions
6
+ %button.button.button-primary{type: 'submit'}
7
+ = icon('check')
8
+ =t('spina.users.save')
9
+
10
+ = link_to t('spina.cancel'), spina.admin_users_path, class: 'button'
11
+
12
+ - if @user.errors.any?
13
+ - content_for :notification_alert do
14
+ .notification.notification-error{data: {icon: 'm'}}
15
+ %p
16
+ = Spina::User.human_attribute_name :cannot_be_created
17
+ %small
18
+ - @user.errors.full_messages.each do |msg|
19
+ = msg
20
+ %br/
21
+
22
+ .well
23
+ .horizontal-form
24
+ .horizontal-form-group
25
+ .horizontal-form-label
16
26
  = Spina::User.human_attribute_name :name
17
- %td
27
+ .horizontal-form-content
18
28
  = f.text_field :name, placeholder: Spina::User.human_attribute_name(:name_placeholder), class: 'large'
19
29
 
20
- %tr
21
- %td
30
+ .horizontal-form-group
31
+ .horizontal-form-label
22
32
  = Spina::User.human_attribute_name :email
23
33
  %small= Spina::User.human_attribute_name :email_description
24
- %td
34
+ .horizontal-form-content
25
35
  = f.text_field :email, placeholder: Spina::User.human_attribute_name(:email)
26
36
 
27
- %tr
28
- %td
37
+ .horizontal-form-group
38
+ .horizontal-form-label
29
39
  = Spina::User.human_attribute_name :password
30
40
  %small= Spina::User.human_attribute_name :password_description
31
- %td
41
+ .horizontal-form-content
32
42
  = f.password_field :password, placeholder: Spina::User.human_attribute_name(:password)
33
43
 
34
- %tr
35
- %td
44
+ .horizontal-form-group
45
+ .horizontal-form-label
36
46
  = Spina::User.human_attribute_name :password_confirmation
37
- %td
47
+ .horizontal-form-content
38
48
  = f.password_field :password_confirmation, placeholder: Spina::User.human_attribute_name(:password_confirmation)
39
49
 
40
- %tr
41
- %td
50
+ .horizontal-form-group
51
+ .horizontal-form-label
42
52
  #{Spina::User.human_attribute_name :admin}?
43
53
  %small= Spina::User.human_attribute_name :admin_description
44
- %td
54
+ .horizontal-form-content
45
55
  = f.check_box :admin, data: {switch: 'true'}
46
56
 
47
- %button.button.button-primary{type: 'submit'}
48
- = icon('check')
49
- =t('spina.users.save')
50
-
51
- = link_to t('spina.cancel'), spina.admin_users_path, class: 'button button-link'
52
-
53
57
  - unless @user.new_record? || @user == current_user
54
58
  .pull-right= link_to t('spina.permanently_delete'), spina.admin_user_path(@user), method: :delete, data: {confirm: t('spina.users.delete_confirmation', user: @user)}, class: 'button button-link button-danger'
@@ -1,26 +1,30 @@
1
- .filters
2
- = link_to spina.new_admin_user_path, class: 'button button-primary' do
3
- = icon('plus')
4
- = t('spina.users.new')
1
+ %header#header
2
+ = render partial: 'spina/admin/shared/breadcrumbs'
5
3
 
6
- .table-container
7
- %table.table
8
- %thead
9
- %tr
10
- %th= Spina::User.human_attribute_name :name
11
- %th= Spina::User.human_attribute_name :role
12
- %th= Spina::User.human_attribute_name :last_logged_in
13
- %th
4
+ #header_actions
5
+ = link_to spina.new_admin_user_path, class: 'button button-primary' do
6
+ = icon('plus')
7
+ = t('spina.users.new')
14
8
 
15
- %tbody
16
- - @users.each do |user|
9
+ .well
10
+ .table-container
11
+ %table.table
12
+ %thead
17
13
  %tr
18
- %td= link_to user, spina.edit_admin_user_path(user)
19
- %td= user.admin? ? Spina::User.human_attribute_name(:admin) : Spina::User.human_attribute_name(:user)
20
- %td
21
- - if user.last_logged_in.present?
22
- = time_ago_in_words(user.last_logged_in) + " #{t('spina.ago')}"
23
- %td
24
- = link_to spina.edit_admin_user_path(user), class: 'button button-small' do
25
- = icon('pencil-outline')
26
- = t('spina.edit')
14
+ %th= Spina::User.human_attribute_name :name
15
+ %th= Spina::User.human_attribute_name :role
16
+ %th= Spina::User.human_attribute_name :last_logged_in
17
+ %th
18
+
19
+ %tbody
20
+ - @users.each do |user|
21
+ %tr
22
+ %td= link_to user, spina.edit_admin_user_path(user)
23
+ %td= user.admin? ? Spina::User.human_attribute_name(:admin) : Spina::User.human_attribute_name(:user)
24
+ %td
25
+ - if user.last_logged_in.present?
26
+ = time_ago_in_words(user.last_logged_in) + " #{t('spina.ago')}"
27
+ %td.align-right
28
+ = link_to spina.edit_admin_user_path(user), class: 'button button-small button-link' do
29
+ = icon('pencil-outline')
30
+ = t('spina.edit')
@@ -1 +1 @@
1
- Rails.application.config.assets.precompile += %w(spina/spina.png spina/admin/spina.png)
1
+ Rails.application.config.assets.precompile += %w(spina/spina.png spina/admin/spina.png spina/spina_small.png)
@@ -96,6 +96,10 @@ de:
96
96
  insert: 'Dokument einfügen'
97
97
  insert_multiple: 'Dokumente einfügen'
98
98
 
99
+ media_library:
100
+ photos: Bilder
101
+ attachments: Dokumente
102
+
99
103
  activerecord:
100
104
  models:
101
105
  spina/page:
@@ -13,6 +13,7 @@ en:
13
13
  ago: ago
14
14
  edit_website: Edit your website
15
15
  logout: Logout
16
+ main_menu: Main menu
16
17
 
17
18
  modal:
18
19
  agree: "Yes, I'm sure"
@@ -89,7 +90,7 @@ en:
89
90
  social_media: Social media
90
91
  social_media_description: Facebook and Twitter accounts
91
92
  social_media_save: Save social media
92
- analytics: Analytics and search engines
93
+ analytics: Analytics and search
93
94
  analytics_description: Link your account with for real-time analytics
94
95
  analytics_save: Save preferences
95
96
  domain_name_settings: Domain settings
@@ -99,6 +100,10 @@ en:
99
100
  insert: 'Insert document'
100
101
  insert_multiple: 'Insert documents'
101
102
 
103
+ media_library:
104
+ photos: Images
105
+ attachments: Documents
106
+
102
107
  activerecord:
103
108
  models:
104
109
  spina/page:
@@ -96,6 +96,10 @@ es:
96
96
  insert: 'Insertar documento'
97
97
  insert_multiple: 'Insertar documentos'
98
98
 
99
+ media_library:
100
+ photos: Imágenes
101
+ attachments: Documentos
102
+
99
103
  activerecord:
100
104
  models:
101
105
  spina/page:
@@ -92,6 +92,10 @@ fr:
92
92
  insert: 'Insérer un document'
93
93
  insert_multiple: 'Insérer des documents'
94
94
 
95
+ media_library:
96
+ photos: Images
97
+ attachments: Documents
98
+
95
99
  activerecord:
96
100
  models:
97
101
  spina/page:
@@ -96,6 +96,10 @@ it:
96
96
  insert: 'Inserisci documento'
97
97
  insert_multiple: 'Inserisci documenti'
98
98
 
99
+ media_library:
100
+ photos: Immagini
101
+ attachments: Documenti
102
+
99
103
  activerecord:
100
104
  models:
101
105
  spina/page:
@@ -1,4 +1,7 @@
1
1
  nl:
2
+ languages:
3
+ nl: Nederlands
4
+ en: Engels
2
5
  spina:
3
6
  cancel: Annuleren
4
7
  close: Sluiten
@@ -13,6 +16,7 @@ nl:
13
16
  ago: geleden
14
17
  edit_website: Bewerk je website
15
18
  logout: Uitloggen
19
+ main_menu: Hoofdmenu
16
20
 
17
21
  modal:
18
22
  agree: "Ja, dat weet ik zeker"
@@ -96,6 +100,10 @@ nl:
96
100
  insert: 'Document toevoegen'
97
101
  insert_multiple: 'Documenten toevoegen'
98
102
 
103
+ media_library:
104
+ photos: Afbeeldingen
105
+ attachments: Documenten
106
+
99
107
  activerecord:
100
108
  models:
101
109
  spina/page: