trusty-cms 4.0.2 → 4.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (221) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +3 -3
  3. data/Gemfile.lock +89 -89
  4. data/Rakefile +7 -7
  5. data/app/assets/images/admin/spinner.gif +0 -0
  6. data/app/assets/javascripts/admin.js +3 -0
  7. data/app/assets/javascripts/admin/more-or-less.js +2 -2
  8. data/app/assets/javascripts/admin/tabcontrol.js.erb +1 -2
  9. data/app/assets/javascripts/rad_social/rad_ajax_form.js +3 -0
  10. data/app/assets/javascripts/rad_social/rad_email.js +0 -1
  11. data/app/assets/javascripts/rad_social/rad_email_form.js +2 -7
  12. data/app/assets/stylesheets/admin/_base.scss +22 -6
  13. data/app/assets/stylesheets/admin/_multi_site_main.scss +28 -29
  14. data/app/assets/stylesheets/admin/_reset.scss +5 -4
  15. data/app/assets/stylesheets/admin/_site_chooser.scss +44 -69
  16. data/app/assets/stylesheets/admin/assets.scss +138 -141
  17. data/app/assets/stylesheets/admin/main.scss +10 -12
  18. data/app/assets/stylesheets/admin/modules/_boxes.scss +0 -3
  19. data/app/assets/stylesheets/admin/modules/_buttons.scss +30 -0
  20. data/app/assets/stylesheets/admin/modules/_links.scss +1 -1
  21. data/app/assets/stylesheets/admin/partials/_actions.scss +29 -46
  22. data/app/assets/stylesheets/admin/partials/_avatars.scss +3 -2
  23. data/app/assets/stylesheets/admin/partials/_content.scss +15 -38
  24. data/app/assets/stylesheets/admin/partials/_dateinput.scss +23 -14
  25. data/app/assets/stylesheets/admin/partials/_drawer.scss +78 -0
  26. data/app/assets/stylesheets/admin/partials/_dropdown.scss +9 -12
  27. data/app/assets/stylesheets/admin/partials/_footer.scss +4 -3
  28. data/app/assets/stylesheets/admin/partials/_forms.scss +64 -493
  29. data/app/assets/stylesheets/admin/partials/_header.scss +9 -118
  30. data/app/assets/stylesheets/admin/partials/_layout.scss +26 -2
  31. data/app/assets/stylesheets/admin/partials/_login_form.scss +28 -0
  32. data/app/assets/stylesheets/admin/partials/_messages.scss +10 -5
  33. data/app/assets/stylesheets/admin/partials/_popup.scss +61 -50
  34. data/app/assets/stylesheets/admin/partials/_preferences.scss +37 -0
  35. data/app/assets/stylesheets/admin/partials/_sidebar.scss +55 -0
  36. data/app/assets/stylesheets/admin/partials/_tabcontrol.scss +24 -36
  37. data/app/assets/stylesheets/admin/partials/{_index.scss → _table.scss} +53 -84
  38. data/app/assets/stylesheets/admin/partials/_toolbar.scss +11 -6
  39. data/app/assets/stylesheets/admin/partials/_treetable.scss +1 -71
  40. data/app/assets/stylesheets/admin/partials/_typography.scss +30 -55
  41. data/app/assets/stylesheets/admin/partials/_validations.scss +6 -5
  42. data/app/assets/stylesheets/rad_social/rad_screen.scss +64 -67
  43. data/app/controllers/admin/assets_controller.rb +21 -31
  44. data/app/controllers/admin/configuration_controller.rb +9 -11
  45. data/app/controllers/admin/extensions_controller.rb +3 -3
  46. data/app/controllers/admin/layouts_controller.rb +3 -4
  47. data/app/controllers/admin/page_attachments_controller.rb +5 -5
  48. data/app/controllers/admin/page_fields_controller.rb +3 -4
  49. data/app/controllers/admin/page_parts_controller.rb +4 -5
  50. data/app/controllers/admin/pages_controller.rb +55 -56
  51. data/app/controllers/admin/references_controller.rb +1 -1
  52. data/app/controllers/admin/resource_controller.rb +132 -130
  53. data/app/controllers/admin/sites_controller.rb +4 -4
  54. data/app/controllers/admin/snippets_controller.rb +3 -4
  55. data/app/controllers/admin/users_controller.rb +16 -16
  56. data/app/controllers/application_controller.rb +47 -48
  57. data/app/controllers/site_controller.rb +51 -48
  58. data/app/controllers/social_mailer_controller.rb +12 -22
  59. data/app/helpers/admin/configuration_helper.rb +19 -20
  60. data/app/helpers/admin/layouts_helper.rb +0 -1
  61. data/app/helpers/admin/node_helper.rb +27 -24
  62. data/app/helpers/admin/pages_helper.rb +2 -2
  63. data/app/helpers/admin/preferences_helper.rb +0 -1
  64. data/app/helpers/admin/references_helper.rb +9 -10
  65. data/app/helpers/admin/regions_helper.rb +3 -3
  66. data/app/helpers/application_helper.rb +34 -35
  67. data/app/helpers/rad_social_helper.rb +8 -11
  68. data/app/helpers/scoped_helper.rb +1 -3
  69. data/app/helpers/sites_helper.rb +4 -4
  70. data/app/mailers/devise_mailer.rb +3 -4
  71. data/app/mailers/rad_social_mailer.rb +8 -8
  72. data/app/models/asset.rb +62 -63
  73. data/app/models/asset_type.rb +38 -39
  74. data/app/models/deprecated_tags.rb +3 -4
  75. data/app/models/file_not_found_page.rb +1 -3
  76. data/app/models/haml_filter.rb +1 -1
  77. data/app/models/layout.rb +4 -5
  78. data/app/models/legacy_user.rb +2 -2
  79. data/app/models/menu_renderer.rb +16 -18
  80. data/app/models/page.rb +96 -93
  81. data/app/models/page_attachment.rb +1 -2
  82. data/app/models/page_context.rb +11 -12
  83. data/app/models/page_part.rb +3 -4
  84. data/app/models/rails_page.rb +10 -12
  85. data/app/models/site.rb +22 -21
  86. data/app/models/snippet.rb +6 -8
  87. data/app/models/snippet_finder.rb +3 -3
  88. data/app/models/snippet_tags.rb +4 -4
  89. data/app/models/standard_tags.rb +258 -252
  90. data/app/models/status.rb +8 -8
  91. data/app/models/trusty_cms/config.rb +25 -25
  92. data/app/models/trusty_cms/page_response_cache_director.rb +2 -3
  93. data/app/models/user.rb +15 -14
  94. data/app/models/user_action_observer.rb +3 -3
  95. data/app/users/_choose_site.html.haml +3 -7
  96. data/app/views/admin/assets/_form.html.haml +2 -1
  97. data/app/views/admin/assets/_search.html.haml +2 -1
  98. data/app/views/admin/assets/edit.html.haml +2 -10
  99. data/app/views/admin/assets/index.html.haml +4 -2
  100. data/app/views/admin/assets/new.html.haml +4 -8
  101. data/app/views/admin/assets/remove.html.haml +2 -1
  102. data/app/views/admin/configuration/edit.html.haml +7 -7
  103. data/app/views/admin/configuration/show.html.haml +6 -8
  104. data/app/views/admin/layouts/_choose_site.html.haml +2 -3
  105. data/app/views/admin/layouts/_form.html.haml +13 -12
  106. data/app/views/admin/layouts/_site_chooser.html.haml +2 -2
  107. data/app/views/admin/layouts/index.html.haml +11 -4
  108. data/app/views/admin/layouts/remove.html.haml +6 -5
  109. data/app/views/admin/page_attachments/_attachment.html.haml +2 -2
  110. data/app/views/admin/page_fields/_page_field.html.haml +3 -3
  111. data/app/views/admin/page_parts/_page_part.html.haml +5 -6
  112. data/app/views/admin/pages/_asset_popups.html.haml +15 -16
  113. data/app/views/admin/pages/_assets.html.haml +8 -7
  114. data/app/views/admin/pages/_fields.html.haml +16 -13
  115. data/app/views/admin/pages/_node.html.haml +3 -3
  116. data/app/views/admin/pages/_popups.html.haml +11 -11
  117. data/app/views/admin/pages/edit.html.haml +2 -2
  118. data/app/views/admin/pages/index.html.haml +5 -2
  119. data/app/views/admin/pages/new.html.haml +3 -3
  120. data/app/views/admin/pages/remove.html.haml +4 -3
  121. data/app/views/admin/preferences/edit.html.haml +5 -5
  122. data/app/views/admin/references/filters.haml +1 -1
  123. data/app/views/admin/references/tags.haml +3 -3
  124. data/app/views/admin/removed/_assets_bucket.html.haml +3 -3
  125. data/app/views/admin/removed/_assets_container.html.haml +18 -18
  126. data/app/views/admin/removed/_bucket.html.haml +1 -1
  127. data/app/views/admin/removed/_bucket_asset.html.haml +3 -3
  128. data/app/views/admin/removed/_show_bucket_link.html.haml +1 -1
  129. data/app/views/admin/removed/_upload_to_page.html.haml +5 -5
  130. data/app/views/admin/sites/_form.haml +18 -18
  131. data/app/views/admin/sites/edit.haml +1 -1
  132. data/app/views/admin/sites/index.haml +8 -4
  133. data/app/views/admin/sites/new.haml +1 -1
  134. data/app/views/admin/snippets/_choose_site.html.haml +4 -5
  135. data/app/views/admin/snippets/_form.html.haml +8 -9
  136. data/app/views/admin/snippets/edit.html.haml +1 -1
  137. data/app/views/admin/snippets/index.html.haml +11 -4
  138. data/app/views/admin/snippets/new.html.haml +1 -1
  139. data/app/views/admin/snippets/remove.html.haml +7 -6
  140. data/app/views/admin/users/_avatar.html.haml +2 -2
  141. data/app/views/admin/users/_choose_site.html.haml +3 -7
  142. data/app/views/admin/users/_form.html.haml +18 -21
  143. data/app/views/admin/users/_password_fields.html.haml +6 -6
  144. data/app/views/admin/users/index.html.haml +13 -6
  145. data/app/views/admin/users/remove.html.haml +4 -4
  146. data/app/views/admin/welcome/login.html.haml +8 -8
  147. data/app/views/devise/passwords/edit.html.haml +6 -6
  148. data/app/views/devise/passwords/new.html.haml +3 -3
  149. data/app/views/devise/sessions/new.html.haml +8 -8
  150. data/app/views/devise/shared/_links.html.haml +2 -2
  151. data/app/views/layouts/application.html.haml +24 -19
  152. data/app/views/rad_social_mailer/social_mail_form.html.haml +15 -17
  153. data/app/views/widget/_email_form.html.haml +13 -18
  154. data/app/views/widget/_horizontal_widget.html.haml +5 -5
  155. data/bin/rails +4 -4
  156. data/bin/trusty_cms +3 -5
  157. data/config.ru +1 -1
  158. data/config/application.rb +14 -15
  159. data/config/boot.rb +1 -2
  160. data/config/environment.rb +1 -1
  161. data/config/environments/production.rb +0 -1
  162. data/config/environments/test.rb +1 -2
  163. data/config/initializers/devise.rb +1 -1
  164. data/config/initializers/kraken.rb +2 -2
  165. data/config/initializers/tmp.rb +1 -1
  166. data/config/initializers/trusty_cms_config.rb +48 -48
  167. data/config/locales/en.yml +8 -8
  168. data/config/routes.rb +6 -7
  169. data/lib/active_record_extensions/active_record_extensions.rb +1 -2
  170. data/lib/annotatable.rb +3 -5
  171. data/lib/configuration_extensions/configuration_extensions.rb +1 -1
  172. data/lib/inheritable_class_attributes.rb +13 -9
  173. data/lib/login_system.rb +73 -73
  174. data/lib/method_observer.rb +13 -12
  175. data/lib/ostruct.rb +7 -10
  176. data/lib/simpleton.rb +0 -4
  177. data/lib/string_extensions/string_extensions.rb +3 -3
  178. data/lib/symbol_extensions/symbol_extensions.rb +1 -1
  179. data/lib/tasks/database.rake +28 -28
  180. data/lib/tasks/extensions.rake +18 -18
  181. data/lib/tasks/framework.rake +68 -68
  182. data/lib/tasks/radiant_config.rake +4 -4
  183. data/lib/tasks/snippets_extension_tasks.rake +11 -11
  184. data/lib/tasks/translate.rake +14 -14
  185. data/lib/tasks/upgrade_to_devise.rake +1 -1
  186. data/lib/translation_support.rb +22 -22
  187. data/lib/trusty_cms.rb +2 -2
  188. data/lib/trusty_cms/admin_ui.rb +19 -16
  189. data/lib/trusty_cms/admin_ui/region_partials.rb +4 -3
  190. data/lib/trusty_cms/admin_ui/region_set.rb +4 -5
  191. data/lib/trusty_cms/available_locales.rb +2 -4
  192. data/lib/trusty_cms/config/definition.rb +11 -8
  193. data/lib/trusty_cms/engine.rb +13 -14
  194. data/lib/trusty_cms/extension.rb +14 -16
  195. data/lib/trusty_cms/extension_loader.rb +6 -6
  196. data/lib/trusty_cms/extension_migrator.rb +42 -41
  197. data/lib/trusty_cms/extension_path.rb +20 -19
  198. data/lib/trusty_cms/initializer.rb +5 -8
  199. data/lib/trusty_cms/pagination/controller.rb +7 -10
  200. data/lib/trusty_cms/pagination/link_renderer.rb +2 -2
  201. data/lib/trusty_cms/resource_responses.rb +3 -3
  202. data/lib/trusty_cms/setup.rb +130 -132
  203. data/lib/trusty_cms/taggable.rb +19 -22
  204. data/lib/trusty_cms/task_support.rb +9 -6
  205. data/package.json +10 -2
  206. data/public/dispatch.fcgi +1 -1
  207. data/public/dispatch.rb +2 -2
  208. data/script/extension +1 -1
  209. data/script/rails +2 -2
  210. data/spec/dummy/package.json +1 -1
  211. data/spec/dummy/yarn.lock +3 -3
  212. data/trusty_cms.gemspec +25 -25
  213. data/vendor/extensions/clipped-extension/lib/clipped_admin_ui.rb +1 -1
  214. data/yarn.lock +1992 -4
  215. metadata +54 -43
  216. data/app/assets/javascripts/rad_social/captcha.js +0 -42
  217. data/app/assets/stylesheets/admin/partials/_deprecated.scss +0 -65
  218. data/app/assets/stylesheets/admin/partials/_jquery-ui-structure.scss +0 -258
  219. data/app/assets/stylesheets/admin/partials/_jquery-ui-theme.scss +0 -410
  220. data/app/assets/stylesheets/admin/partials/_jquery-ui.scss +0 -650
  221. data/app/views/admin/assets/refresh.html.haml +0 -14
@@ -1,13 +1,9 @@
1
- - body_classes << "reversed"
2
-
3
1
  #preferences.box
4
2
  - render_region :user do |user|
5
3
  - user.preferences do
6
4
  %h3
7
- .actions
8
- = button_to t("edit_preferences"), edit_admin_user_path(current_user), :method => :get
9
5
  = t('personal_preferences')
10
- = image_tag(gravatar_url(@user.email, :size=>"64px"), :class=>"avatar", :width=>64, :height=>64, :alt=>"")
6
+ = image_tag(gravatar_url(@user.email, :size=>'64px'), :class=>'avatar', :width=>64, :height=>64, :alt=>'')
11
7
  %p.ruled
12
8
  %label
13
9
  = t('name')
@@ -27,14 +23,13 @@
27
23
  = t('language')
28
24
  %span
29
25
  = current_user.locale
26
+ .actions
27
+ = button_to t("edit_preferences"), edit_admin_user_path(current_user), :method => :get
30
28
 
31
29
  #config.box
32
30
  - render_region :trusty_config do |config|
33
31
  - config.site do
34
32
  %h3
35
- - if current_user.admin?
36
- .actions
37
- = button_to t("edit_configuration"), edit_admin_configuration_path, :method => :get
38
33
  Configuration
39
34
  - TrustyCms.config.site_settings.each do |site_setting|
40
35
  %p.ruled
@@ -51,3 +46,6 @@
51
46
  - TrustyCms.config.user_settings.each do |user_setting|
52
47
  %p.ruled
53
48
  = show_config user_setting
49
+ - if current_user.admin?
50
+ .actions
51
+ = button_to t("edit_configuration"), edit_admin_configuration_path, :method => :get
@@ -1,7 +1,6 @@
1
1
  - unless current_user.site
2
- %p{:style => 'float: left; margin-right: 32px'}
3
- %label{:for=>"layout_site_id", :Class => "admin_only"}
4
- Site
2
+ %label{:for=>'layout_site_id', :class => 'admin_only'}
3
+ Site
5
4
  - sites = Site.all.map { |s| [s.name, s.id] }
6
5
  - selection = {:include_blank => Layout.is_shareable?}
7
6
  - selection[:selected] = current_site.id if @layout.new_record? && ! Layout.is_shareable?
@@ -4,30 +4,31 @@
4
4
  .form_area
5
5
  - render_region :form, :locals => {:f => f} do |form|
6
6
  - form.edit_title do
7
- %p.title
7
+ .title
8
8
  = f.label :name, t('name')
9
- = f.text_field :name, :maxlength => 100, :class => "textbox", :required => true
9
+ = f.text_field :name, :maxlength => 100, :class => 'textbox', :required => true
10
10
  - form.edit_extended_metadata do
11
11
  .drawer
12
12
  .drawer_contents#attributes
13
13
  %table.fieldset
14
14
  %tr
15
15
  %th.label= f.label :content_type, t('content_type').html_safe
16
- %td.field= f.text_field :content_type, :maxlength => 40, :class => "textbox"
16
+ %td.field= f.text_field :content_type, :maxlength => 40, :class => 'textbox'
17
17
  = render_region :extended_metadata, :locals => {:f => f}
18
18
  .drawer_handle
19
- %a.toggle{:href=>'#attributes', :rel=>"toggle[attributes]", :class=>"#{(meta_errors? ? 'less' : 'more')}"}= meta_label
19
+ %a.toggle{:href=>'#attributes', :rel=>'toggle[attributes]', :class=>"#{(meta_errors? ? 'less' : 'more')}"}
20
+ = meta_label
21
+ %i.fas.fa-angle-down
20
22
  - form.edit_content do
21
- %p.content
22
- = f.label :content, "Body"
23
- ~ f.text_area :content, :size => "40x20", :style => "width: 100%", :class => "textarea large"
23
+ .textarea_content
24
+ = f.label :content, 'Body'
25
+ ~ f.text_area :content
24
26
  - render_region :form_bottom, :locals => {:f => f} do |form_bottom|
25
27
  - form_bottom.reference_links do
26
- %p
27
- %span.reference_links
28
- Reference:
29
- %span{:id => "tag_reference_link"}
30
- = link_to t('available_tags'), admin_reference_url(:tags), id: 'tag_reference'
28
+ .reference_links
29
+ Reference:
30
+ %span{:id => 'tag_reference_link'}
31
+ = link_to t('available_tags'), admin_reference_url(:tags), id: 'tag_reference'
31
32
  - form_bottom.edit_buttons do
32
33
  .buttons
33
34
  = save_model_button @layout
@@ -1,6 +1,6 @@
1
1
  - if current_user.admin? && defined?(Site) && defined?(controller) && controller.sited_model? && controller.template_name == 'index' && Site.several?
2
- %nav#site_chooser
3
- %ul#nav
2
+ .site_chooser
3
+ %ul.nav
4
4
  %li
5
5
  = "Current Site: #{current_site.name}"
6
6
  %ul.expansion
@@ -10,7 +10,7 @@
10
10
  %th.name
11
11
  = t('layout')
12
12
  - thead.actions_header do
13
- %th.actions{:style=>"width:9em"}
13
+ %th.actions{:style=>'width:9em'}
14
14
  = t('modify')
15
15
  %tbody
16
16
  - if @layouts.any?
@@ -19,10 +19,14 @@
19
19
  - render_region :tbody, :locals => {:layout => layout} do |tbody|
20
20
  - tbody.title_cell do
21
21
  %td.name
22
- = link_to image('layout', :alt => '') + ' ' + layout.name, edit_admin_layout_url(layout)
22
+ = link_to edit_admin_layout_url(layout) do
23
+ %i.far.fa-sticky-note
24
+ = layout.name
23
25
  - tbody.actions_cell do
24
26
  %td.actions
25
- = link_to image('minus') + ' ' + t('remove'), remove_admin_layout_url(layout), :class => "action"
27
+ = link_to remove_admin_layout_url(layout), :class => 'action' do
28
+ %i.fas.fa-minus-circle
29
+ =t('remove')
26
30
  - else
27
31
  %tr
28
32
  %td.empty{:colspan => admin.layout.index.tbody.length}= t('no_layouts')
@@ -32,4 +36,7 @@
32
36
  #actions
33
37
  = pagination_for(@layouts)
34
38
  %ul
35
- %li= link_to image('plus') + " " + t('new_layout'), new_admin_layout_url, :class => 'action_button'
39
+ %li
40
+ = link_to new_admin_layout_url, class: 'action_button' do
41
+ %i.fas.fa-plus-circle
42
+ =t('new_layout')
@@ -1,16 +1,17 @@
1
+ - body_classes << 'reversed'
2
+
1
3
  %h1= t('remove_layout')
2
4
 
3
- %p= t('text.layouts.remove_warning').html_safe
5
+ %h4= t('text.layouts.remove_warning').html_safe
4
6
 
5
- %table.index#layouts
7
+ %table.tablesaw.index#layouts
6
8
  %tbody
7
9
  %tr.node.level_1
8
10
  %td.layout
9
- = image('layout', :alt => '')
10
11
  = h @layout.name
11
12
 
12
- = form_for [:admin, @layout], :html => { :method => 'delete', 'data-onsubmit_status'=>"Removing layout&#8230;" } do
13
+ = form_for [:admin, @layout], :html => { :method => 'delete', 'data-onsubmit_status'=>'Removing layout&#8230;' } do
13
14
  .buttons
14
- %input.button{:type => "submit", :value => t('delete_layout') }/
15
+ %input.button{:type => 'submit', :value => t('delete_layout') }/
15
16
  = t('or')
16
17
  = link_to t('cancel'), admin_layouts_path, class: 'alt'
@@ -2,11 +2,11 @@
2
2
 
3
3
  - page = attachment.page
4
4
  - asset = attachment.asset
5
- - asset_type = asset.image? ? "image" : "link"
5
+ - asset_type = asset.image? ? 'image' : 'link'
6
6
  - css_class = "#{asset_type} asset"
7
7
  - css_class += ' unsaved' if attachment.new_record?
8
8
 
9
- %li{:class => css_class, :id => "attachment_#{asset.uuid}", data: {toggle: "tooltip", placement: "left"}, title: "Asset ID: #{asset.id}"}
9
+ %li{:class => css_class, :id => "attachment_#{asset.uuid}", data: {toggle: 'tooltip', placement: 'left'}, title: "Asset ID: #{asset.id}"}
10
10
  = fields_for :page, @page do |f|
11
11
  = f.fields_for :page_attachments, attachment, :child_index => asset.uuid do |paf|
12
12
  - if attachment.new_record?
@@ -3,11 +3,11 @@
3
3
  %label{:for=>"page_#{page_field.name}"}= page_field.name
4
4
  %td.field
5
5
  = hidden_field_tag "page[fields_attributes][#{page_field_counter}][id]", page_field.id, :id => "page_fields_attributes_#{page_field_counter}_id" unless page_field.new_record?
6
- = hidden_field_tag "page[fields_attributes][#{page_field_counter}][name]", page_field.name, :id => "page_fields_attributes_#{page_field_counter}_name", :class => "page_field_name"
6
+ = hidden_field_tag "page[fields_attributes][#{page_field_counter}][name]", page_field.name, :id => "page_fields_attributes_#{page_field_counter}_name", :class => 'page_field_name'
7
7
  = hidden_field_tag "page[fields_attributes][#{page_field_counter}][_destroy]", page_field._destroy, :class => 'delete_input'
8
- ~ text_field_tag "page[fields_attributes][#{page_field_counter}][content]", page_field.content, :id => "page_fields_attributes_#{page_field_counter}_content", :class => "textbox", :maxlength => 200
8
+ ~ text_field_tag "page[fields_attributes][#{page_field_counter}][content]", page_field.content, :id => "page_fields_attributes_#{page_field_counter}_content", :class => 'textbox', :maxlength => 200
9
9
  %td.actions
10
10
  = link_to '#add_field_popup', :class=>'popup', :alt => t('add_field') do
11
11
  = image 'plus_grey'
12
- = link_to "#remove_field#{page_field_counter}", :class => "remove_field", :alt => "Remove Field" do
12
+ = link_to "#remove_field#{page_field_counter}", :class => 'remove_field', :alt => 'Remove Field' do
13
13
  = image 'minus_grey'
@@ -1,15 +1,14 @@
1
1
  .page{:id => "page_#{page_part.name.to_slug}", 'data-caption'=>h(page_part.name)}
2
2
  .part{:id => "part-#{page_part.name.to_slug}"}
3
3
  = hidden_field_tag "page[parts_attributes][#{page_part_counter}][name]", page_part.name, :id => "part_#{page_part.name.to_slug}_name"
4
- = hidden_field_tag "page[parts_attributes][#{page_part_counter}][id]", page_part.id, :id => "part_#{page_part_counter}_id", :class => "id_input" unless page_part.new_record?
5
- = hidden_field_tag "page[parts_attributes][#{page_part_counter}][_destroy]", page_part._destroy, :class => "delete_input"
6
- %p
7
- %label
8
- = "To use HTML or Radius tags, switch to plain text view by clicking the 'Source' button."
4
+ = hidden_field_tag "page[parts_attributes][#{page_part_counter}][id]", page_part.id, :id => "part_#{page_part_counter}_id", :class => 'id_input' unless page_part.new_record?
5
+ = hidden_field_tag "page[parts_attributes][#{page_part_counter}][_destroy]", page_part._destroy, :class => 'delete_input'
6
+ .content
7
+ %label To use HTML or Radius tags, switch to plain text view by clicking the 'Source' button.
9
8
  %span.reference_links
10
9
  = t('reference')
11
10
  %span{:id => "tag_reference_link_#{page_part.name.to_slug}"}
12
11
  = link_to t('available_tags'), admin_reference_url(:tags), id: 'tag_reference'
13
12
  = render_region :part_controls, :locals => {:page_part => page_part}
14
13
  %div
15
- = cktext_area :page_part, page_part.content || '', :name => "page[parts_attributes][#{page_part_counter}][content]", :value => page_part.content || '', :class => "textarea large", :style => "width: 100%", :id => "part_#{page_part.name.to_slug}_content"
14
+ = cktext_area :page_part, page_part.content || '', :name => "page[parts_attributes][#{page_part_counter}][content]", :value => page_part.content || '', :style => 'width: 100%', :id => "part_#{page_part.name.to_slug}_content"
@@ -1,37 +1,36 @@
1
1
  - render_region :asset_popups do |popups|
2
2
  - popups.upload_asset do
3
- #upload_asset.popup.textured{:style => "display: none; width: 28em"}
4
- #upload_asset_busy.busy{:style => "display: none"}= image('spinner.gif', :alt => "")
3
+ #upload_asset.popup{:style => 'display: none; width: 28em'}
4
+ #upload_asset_busy.busy{:style => 'display: none'}= image('spinner.gif', :alt => '')
5
5
 
6
6
  .popup_title= t('clipped_extension.upload_asset')
7
7
 
8
8
  = form_for([:admin, Asset.new], :html => {:method => 'post', :multipart => true, :class => 'upload_asset'}) do |f|
9
- = hidden_field_tag "for_attachment", 1
10
- = hidden_field_tag "page_id", @page.id
9
+ = hidden_field_tag 'for_attachment', 1
10
+ = hidden_field_tag 'page_id', @page.id
11
11
  #upload-controls
12
12
  %p
13
- = f.label :asset, t("clipped_extension.choose_file")
14
- = f.file_field :asset, :class => 'file', :multiple => true
15
- #upload-status{:style => 'display: none;'}
16
- %img{:src => "/assets/admin/spinner.gif"}
13
+ %label.custom-file-upload
14
+ = t('clipped_extension.choose_file')
15
+ = f.file_field :asset, :class => 'file', :multiple => true
16
+ #upload-status{:style => 'display: none;'}
17
+ %img{:src => '/assets/admin/spinner.gif'}
17
18
  %p
18
- %a#attach-popup{:href=>"#attach_asset", :style => 'color: #666; font-size: .8em'}= t('clipped_extension.attach_existing')
19
+ %a#attach-popup{:href=>'#attach_asset', :style => 'color: #666; font-size: .8em'}= t('clipped_extension.attach_existing')
19
20
 
20
- -#%a.close_popup{:href=>"#"}= 'Upload Complete. Click to Close.'
21
-
22
21
  - popups.attach_asset do
23
- #attach_asset.popup.textured{:style=>"display: none;"}
22
+ #attach_asset.popup{:style=>'display: none;'}
24
23
 
25
24
  .popup_title= t('clipped_extension.find_assets')
26
25
 
27
26
  .toolbar
28
27
  = render :partial => 'admin/assets/search'
29
28
 
30
- #assets_table.assets.viewport{:style=>"height: 320px; width: 610px"}
29
+ #assets_table.assets.viewport
31
30
  - assets = Asset.all.paginate(:per_page => 20, page: params[:p])
32
31
  = render :partial => 'admin/assets/asset_table', :locals => {:assets => assets, :with_pagination => true}
33
32
 
34
- .busy{:style => "display: none"}= image('spinner.gif', :alt => "")
33
+ .busy{:style => 'display: none'}= image('spinner.gif', :alt => '')
35
34
  .buttons
36
- %a.cancel.close_popup{:href=>"#"}= t('close')
37
- %a{:href=>"#upload_asset", :id=> "upload_asset_link", :style => 'color: #666; float: left'}= t('clipped_extension.upload_asset')
35
+ %a.cancel.close_popup{:href=>'#'}= t('close')
36
+ %a{:href=>'#upload_asset', :id=> 'upload_asset_link', :style => 'color: #666; float: left'}= t('clipped_extension.upload_asset')
@@ -1,13 +1,14 @@
1
1
  = stylesheet_link_tag 'admin/assets'
2
2
  = javascript_include_tag 'admin/assets_admin'
3
- #content.fieldset
3
+
4
+ %fieldset.asset_attachment
4
5
  #attachment_list.assets
5
6
  %ul#attachment_fields{:class => @page.page_attachments.empty? ? 'empty' : ''}
6
7
  = render :partial => 'admin/page_attachments/attachment', :collection => @page.page_attachments
7
- %p.note
8
- = link_to "path/to/page.html" '#attach_asset', :class => 'button', :id => 'attach_assets' do
9
- %i.fa.fa-image
10
- = t('clipped_extension.assets')
11
- %span.message
8
+ .attach-assets
9
+ .message
12
10
  - if @page.page_attachments.empty?
13
- = t('clipped_extension.no_attached_assets')
11
+ = t('clipped_extension.no_attached_assets')
12
+ = link_to 'path/to/page.html' '#attach_asset', :class => 'button', :id => 'attach_assets' do
13
+ %i.far.fa-image
14
+ = t('clipped_extension.assets')
@@ -7,23 +7,25 @@
7
7
  - render_region :form, :locals => {:f => fields} do |form|
8
8
  - form.edit_title do
9
9
  %p.title
10
- %label{:for=>"page_title"}= t('page_title')
11
- = fields.text_field :title, :class => 'textbox', :maxlength => 255, :required => true
10
+ %label{:for=>'page_title'}= t('page_title')
11
+ = fields.text_field :title, :class => 'textbox', :required => true
12
12
  - form.edit_extended_metadata do
13
13
  .drawer
14
14
  .drawer_contents#attributes
15
15
  %table.fieldset
16
- = render :partial => "meta_row", :collection => @meta, :locals => {:f => fields}
16
+ = render :partial => 'meta_row', :collection => @meta, :locals => {:f => fields}
17
17
  = render :partial => 'admin/page_fields/page_field', :collection => @page.fields
18
18
  = render_region :extended_metadata, :locals => {:f => fields}
19
19
  .drawer_handle
20
- %a.toggle{:href=>'#attributes', :rel=>"toggle[attributes]", :class=>"#{(meta_errors? ? 'less' : 'more')}"}= meta_label
20
+ %a.toggle{:href=>'#attributes', :rel=>'toggle[attributes]', :class=>"#{(meta_errors? ? 'less' : 'more')}"}
21
+ = meta_label
22
+ %i.fas.fa-angle-down
21
23
  - form.edit_page_parts do
22
24
  #tab_control
23
25
  #tabs.tabs
24
26
  #tab_toolbar
25
27
  %a.popup{:href=> '#add_part_popup', :title=>t('add_part')}
26
- = image('add_tab', :alt=>t('add_part'), :title=>"")
28
+ %i.fas.fa-plus-circle
27
29
  #pages.pages
28
30
  = render :partial => 'admin/page_parts/page_part', :collection => @page.parts
29
31
  = render_region :parts_bottom, :locals => {:f => fields}
@@ -31,35 +33,36 @@
31
33
  .set
32
34
  - render_region :layout, :locals => {:f => fields} do |layout|
33
35
  - layout.edit_layout do
34
- %p
36
+ .layout
35
37
  = fields.label :layout_id, t('layout')
36
38
  = fields.select :layout_id, [[t('select.inherit') , '']] + Layout.all.map { |s| [s.name, s.id] }
37
39
  - layout.edit_type do
38
- %p
40
+ .page-type
39
41
  = fields.label :class_name, t('page_type')
40
42
  = fields.select :class_name, [[t('select.normal'), '']] + Page.descendants.map { |p| [p.display_name, p.name] }.sort_by { |p| p.first }
41
43
  - layout.edit_status do
42
- %p
44
+ .status
43
45
  = fields.label :status_id, t('status')
44
46
  = fields.select :status_id, status_to_display
45
47
  - layout.edit_published_at do
46
- %p#published_at{:class => (@page.published? ? nil : 'hidden')}
47
- = fields.label :published_at, t('published_on')
48
- = fields.text_field :published_at, :class=> "date", :type=>"date", :value => (@page.published_at? ? I18n.localize(@page.published_at.to_date, :format =>:default) : nil)
48
+ .published-date
49
+ #published_at{:class => (@page.published? ? nil : 'hidden')}
50
+ = fields.label :published_at, t('published_on')
51
+ = fields.text_field :published_at, :class=> 'date', :type=>'date', :value => (@page.published_at? ? I18n.localize(@page.published_at.to_date, :format =>:default) : nil)
49
52
  = render_region :layout_row, :locals => {:f => fields}
50
53
 
51
54
  - render_region :form_bottom, :locals => {:f => fields} do |form_bottom|
52
55
  - form_bottom.edit_buttons do
53
56
  - @buttons_partials.each do |partial|
54
57
  = render :partial => partial, :locals => {:f => fields}
55
- .buttons{:style=>"clear: left"}
58
+ .page-actions
56
59
  = save_model_button(@page)
57
60
  = save_model_and_continue_editing_button(@page)
58
61
  = submit_tag(t('preview', :default => 'Preview'), :class => 'button', :id => 'show-preview')
59
62
  = t('or')
60
63
  = link_to t('cancel'), admin_pages_url, class: 'alt'
61
64
  #preview_panel.fullcover.grey_out{:style => 'display: none;'}
62
- %iframe{:id => 'page-preview', :class => 'fullcover', :name => 'page-preview', :src => ActionController::Base.relative_url_root.to_s + '/loading-iframe.html', :frameborder => 0, :scrolling => "auto"}
65
+ %iframe{:id => 'page-preview', :class => 'fullcover', :name => 'page-preview', :src => ActionController::Base.relative_url_root.to_s + '/loading-iframe.html', :frameborder => 0, :scrolling => 'auto'}
63
66
  .preview_tools
64
67
  =submit_tag(t('buttons.save_changes'), :class => 'big save_changes')
65
68
  =submit_tag(t('buttons.save_and_continue'), :class => 'big save_and_continue', :name => 'continue')
@@ -1,13 +1,13 @@
1
- %tr.page{:class =>"branch", :data => { :tt_branch => branch.to_s, :tt_id => page.id, :tt_parent_id => parent_index, :tt_page_id => page.id}, :id => "page_#{page.id}"}
1
+ %tr.page{:class =>'branch', :data => { :tt_branch => branch.to_s, :tt_id => page.id, :tt_parent_id => parent_index, :tt_page_id => page.id}, :id => "page_#{page.id}"}
2
2
  - render_region :node, :locals => {:page => page, :level => level, :simple => simple} do |node|
3
3
  - node.title_column do
4
4
  %td.name
5
5
  %span.w1
6
6
  - if simple
7
- = icon
8
7
  = node_title
9
8
  - else
10
- = (link_to("#{icon} #{node_title}".html_safe, edit_admin_page_path(page), :title => page.path)).html_safe
9
+ %i.far.fa-file
10
+ = (link_to("#{node_title}".html_safe, edit_admin_page_path(page), :title => page.path)).html_safe
11
11
  = page_type
12
12
  = spinner
13
13
  - node.status_column do
@@ -3,30 +3,30 @@
3
3
  .outer
4
4
  .content
5
5
 
6
- #add_part_popup.popup{:style => "display: none"}
7
- #add_part_busy.busy{:style => "display: none"}= image('spinner.gif', :alt => "")
6
+ #add_part_popup.popup{:style => 'display: none'}
7
+ #add_part_busy.busy{:style => 'display: none'}= image('spinner.gif', :alt => '')
8
8
  .popup_title= t('add_part')
9
9
  = form_for [:admin, PagePart.new] do |f|
10
10
  %p
11
11
  %label{:for => 'part_name_field'}= t('name')
12
- = f.text_field :name, :id => 'part_name_field', :maxlength => 100, :style => "width: 15em", :class => "textbox big"
12
+ = f.text_field :name, :id => 'part_name_field', :maxlength => 100, :style => 'width: 15em', :class => 'textbox big'
13
13
  = hidden_field_tag 'index', 0, :id => 'page_part_index_field'
14
14
  .buttons
15
- = submit_tag t('add_part'), :id => 'add_part_button', :class => "button"
15
+ = submit_tag t('add_part'), :id => 'add_part_button', :class => 'button'
16
16
  = t('or')
17
- = link_to "Cancel", '#', onclick: "Popup.close(); return false", class: "cancel"
18
- #add_field_popup.popup{:style=>"display: none"}
19
- #add_field_busy.busy{:style=>"display: none"}= image('spinner.gif', :alt => "")
17
+ = link_to 'Cancel', '#', onclick: 'Popup.close(); return false', class: 'cancel'
18
+ #add_field_popup.popup{:style=>'display: none'}
19
+ #add_field_busy.busy{:style=>'display: none'}= image('spinner.gif', :alt => '')
20
20
  .popup_title= t('add_field')
21
- = form_for [:admin, PageField.new], :html => { :onsubmit => "event.stop(); addField(this)" } do |f|
21
+ = form_for [:admin, PageField.new], :html => { :onsubmit => 'event.stop(); addField(this)' } do |f|
22
22
  %p
23
- %label{:for=>"page_field_name"}= t('name')
24
- = f.text_field :name, :maxlength=>100, :class=>'textbox big', :style=>"width: 15em"
23
+ %label{:for=>'page_field_name'}= t('name')
24
+ = f.text_field :name, :maxlength=>100, :class=>'textbox big', :style=>'width: 15em'
25
25
  = hidden_field_tag 'index', 2, :id=>'page_field_index_field'
26
26
  = hidden_field_tag 'page_field_counter', @page.fields.size
27
27
  = f.hidden_field :page_id, value: @page.id
28
28
  .buttons
29
29
  = submit_tag t('add_field'), :class=>'button', :id=>'add_page_field_button'
30
30
  = t('or')
31
- = link_to "Cancel", '#', onclick: "Popup.close(); return false", class: "cancel"
31
+ = link_to 'Cancel', '#', onclick: 'Popup.close(); return false', class: 'cancel'
32
32
  = render_region :popups
@@ -5,6 +5,6 @@
5
5
  %h1= ''
6
6
  - main.edit_form do
7
7
  = form_for @page, :as => :page, :url => admin_page_path(@page), :html => {:method => :put, :multipart => true, :id => 'edit_page', 'data-onsubmit_status'=>t('saving_changes')} do |fields|
8
- = render :partial => "fields", :object => fields
8
+ = render :partial => 'fields', :object => fields
9
9
  - main.edit_popups do
10
- = render :partial => "popups"
10
+ = render :partial => 'popups'
@@ -2,7 +2,7 @@
2
2
 
3
3
  .outset
4
4
  = render_region :top
5
- %table.index#pages{:summary=>t('page_hierarchy')}
5
+ %table.index.tablesaw#pages{:summary=>t('page_hierarchy')}
6
6
  %thead
7
7
  %tr
8
8
  - render_region :sitemap_head do |sitemap_head|
@@ -23,4 +23,7 @@
23
23
  - unless @homepage
24
24
  #actions
25
25
  %ul
26
- %li= link_to image('plus') + ' ' + t("new_homepage"), new_admin_page_path, :class => 'action_button'
26
+ %li
27
+ = link_to new_admin_page_path, :class => 'action_button' do
28
+ %i.fas.fa-plus-circle
29
+ = t("new_homepage")