trusty-cms 4.0.2 → 4.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (108) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +4 -4
  3. data/app/assets/images/admin/spinner.gif +0 -0
  4. data/app/assets/javascripts/admin.js +3 -0
  5. data/app/assets/javascripts/admin/more-or-less.js +2 -2
  6. data/app/assets/javascripts/admin/tabcontrol.js.erb +1 -2
  7. data/app/assets/stylesheets/admin/_base.scss +22 -6
  8. data/app/assets/stylesheets/admin/_multi_site_main.scss +28 -29
  9. data/app/assets/stylesheets/admin/_reset.scss +5 -4
  10. data/app/assets/stylesheets/admin/_site_chooser.scss +44 -69
  11. data/app/assets/stylesheets/admin/assets.scss +138 -141
  12. data/app/assets/stylesheets/admin/main.scss +10 -12
  13. data/app/assets/stylesheets/admin/modules/_boxes.scss +0 -3
  14. data/app/assets/stylesheets/admin/modules/_buttons.scss +30 -0
  15. data/app/assets/stylesheets/admin/modules/_links.scss +1 -1
  16. data/app/assets/stylesheets/admin/partials/_actions.scss +29 -46
  17. data/app/assets/stylesheets/admin/partials/_avatars.scss +3 -2
  18. data/app/assets/stylesheets/admin/partials/_content.scss +15 -38
  19. data/app/assets/stylesheets/admin/partials/_dateinput.scss +23 -14
  20. data/app/assets/stylesheets/admin/partials/_drawer.scss +78 -0
  21. data/app/assets/stylesheets/admin/partials/_dropdown.scss +9 -12
  22. data/app/assets/stylesheets/admin/partials/_footer.scss +4 -3
  23. data/app/assets/stylesheets/admin/partials/_forms.scss +64 -493
  24. data/app/assets/stylesheets/admin/partials/_header.scss +9 -118
  25. data/app/assets/stylesheets/admin/partials/_layout.scss +26 -2
  26. data/app/assets/stylesheets/admin/partials/_login_form.scss +28 -0
  27. data/app/assets/stylesheets/admin/partials/_messages.scss +5 -5
  28. data/app/assets/stylesheets/admin/partials/_popup.scss +62 -51
  29. data/app/assets/stylesheets/admin/partials/_preferences.scss +37 -0
  30. data/app/assets/stylesheets/admin/partials/_sidebar.scss +55 -0
  31. data/app/assets/stylesheets/admin/partials/_tabcontrol.scss +24 -36
  32. data/app/assets/stylesheets/admin/partials/{_index.scss → _table.scss} +53 -84
  33. data/app/assets/stylesheets/admin/partials/_toolbar.scss +11 -6
  34. data/app/assets/stylesheets/admin/partials/_treetable.scss +1 -71
  35. data/app/assets/stylesheets/admin/partials/_typography.scss +30 -55
  36. data/app/assets/stylesheets/admin/partials/_validations.scss +6 -5
  37. data/app/assets/stylesheets/rad_social/rad_screen.scss +65 -64
  38. data/app/controllers/admin/pages_controller.rb +2 -2
  39. data/app/helpers/application_helper.rb +2 -2
  40. data/app/models/menu_renderer.rb +3 -3
  41. data/app/users/_choose_site.html.haml +3 -7
  42. data/app/views/admin/assets/_form.html.haml +2 -1
  43. data/app/views/admin/assets/_search.html.haml +2 -1
  44. data/app/views/admin/assets/edit.html.haml +8 -7
  45. data/app/views/admin/assets/index.html.haml +4 -2
  46. data/app/views/admin/assets/new.html.haml +4 -5
  47. data/app/views/admin/assets/remove.html.haml +1 -0
  48. data/app/views/admin/configuration/edit.html.haml +7 -7
  49. data/app/views/admin/configuration/show.html.haml +6 -8
  50. data/app/views/admin/layouts/_choose_site.html.haml +2 -3
  51. data/app/views/admin/layouts/_form.html.haml +13 -12
  52. data/app/views/admin/layouts/_site_chooser.html.haml +2 -2
  53. data/app/views/admin/layouts/index.html.haml +11 -4
  54. data/app/views/admin/layouts/remove.html.haml +2 -2
  55. data/app/views/admin/page_attachments/_attachment.html.haml +2 -2
  56. data/app/views/admin/page_fields/_page_field.html.haml +3 -3
  57. data/app/views/admin/page_parts/_page_part.html.haml +4 -5
  58. data/app/views/admin/pages/_asset_popups.html.haml +15 -16
  59. data/app/views/admin/pages/_assets.html.haml +8 -7
  60. data/app/views/admin/pages/_fields.html.haml +16 -13
  61. data/app/views/admin/pages/_node.html.haml +3 -3
  62. data/app/views/admin/pages/_popups.html.haml +11 -11
  63. data/app/views/admin/pages/edit.html.haml +2 -2
  64. data/app/views/admin/pages/index.html.haml +5 -2
  65. data/app/views/admin/pages/new.html.haml +3 -3
  66. data/app/views/admin/pages/remove.html.haml +2 -2
  67. data/app/views/admin/preferences/edit.html.haml +5 -5
  68. data/app/views/admin/references/filters.haml +1 -1
  69. data/app/views/admin/references/tags.haml +3 -3
  70. data/app/views/admin/removed/_assets_bucket.html.haml +3 -3
  71. data/app/views/admin/removed/_assets_container.html.haml +18 -18
  72. data/app/views/admin/removed/_bucket.html.haml +1 -1
  73. data/app/views/admin/removed/_bucket_asset.html.haml +3 -3
  74. data/app/views/admin/removed/_show_bucket_link.html.haml +1 -1
  75. data/app/views/admin/removed/_upload_to_page.html.haml +5 -5
  76. data/app/views/admin/sites/_form.haml +18 -18
  77. data/app/views/admin/sites/edit.haml +1 -1
  78. data/app/views/admin/sites/index.haml +6 -4
  79. data/app/views/admin/sites/new.haml +1 -1
  80. data/app/views/admin/snippets/_choose_site.html.haml +4 -5
  81. data/app/views/admin/snippets/_form.html.haml +8 -9
  82. data/app/views/admin/snippets/edit.html.haml +1 -1
  83. data/app/views/admin/snippets/index.html.haml +11 -4
  84. data/app/views/admin/snippets/new.html.haml +1 -1
  85. data/app/views/admin/snippets/remove.html.haml +3 -3
  86. data/app/views/admin/users/_avatar.html.haml +2 -2
  87. data/app/views/admin/users/_choose_site.html.haml +3 -7
  88. data/app/views/admin/users/_form.html.haml +18 -21
  89. data/app/views/admin/users/_password_fields.html.haml +6 -6
  90. data/app/views/admin/users/index.html.haml +13 -6
  91. data/app/views/admin/users/remove.html.haml +2 -2
  92. data/app/views/admin/welcome/login.html.haml +8 -8
  93. data/app/views/devise/passwords/edit.html.haml +6 -6
  94. data/app/views/devise/passwords/new.html.haml +3 -3
  95. data/app/views/devise/sessions/new.html.haml +8 -8
  96. data/app/views/devise/shared/_links.html.haml +2 -2
  97. data/app/views/layouts/application.html.haml +24 -19
  98. data/app/views/rad_social_mailer/social_mail_form.html.haml +15 -15
  99. data/app/views/widget/_email_form.html.haml +14 -14
  100. data/app/views/widget/_horizontal_widget.html.haml +5 -5
  101. data/lib/trusty_cms.rb +1 -1
  102. data/package.json +9 -1
  103. data/yarn.lock +1988 -0
  104. metadata +8 -7
  105. data/app/assets/stylesheets/admin/partials/_deprecated.scss +0 -65
  106. data/app/assets/stylesheets/admin/partials/_jquery-ui-structure.scss +0 -258
  107. data/app/assets/stylesheets/admin/partials/_jquery-ui-theme.scss +0 -410
  108. data/app/assets/stylesheets/admin/partials/_jquery-ui.scss +0 -650
@@ -83,10 +83,10 @@ module ApplicationHelper
83
83
  name = updated_by ? updated_by.name : nil
84
84
  time = (model.updated_at || model.created_at)
85
85
  if name or time
86
- html = %{<p class="updated_line">#{t('timestamp.last_updated')} }
86
+ html = %{<div class="updated_line">#{t('timestamp.last_updated')} }
87
87
  html << %{#{t('timestamp.by')} <strong>#{name}</strong> } if name
88
88
  html << %{#{t('timestamp.at')} #{timestamp(time)}} if time
89
- html << %{</p>}
89
+ html << %{</div>}
90
90
  html.html_safe
91
91
  end
92
92
  end
@@ -68,7 +68,7 @@ module MenuRenderer
68
68
  end
69
69
 
70
70
  def remove_link
71
- view.link_to view.image('minus') + ' ' + I18n.t('remove'), view.remove_admin_page_url(self), :class => "action"
71
+ view.link_to( '<i class="fas fa-minus-circle"></i> '.html_safe + I18n.t('remove'), view.remove_admin_page_url(self), :class => "action")
72
72
  end
73
73
 
74
74
  def remove_option
@@ -84,11 +84,11 @@ module MenuRenderer
84
84
  end
85
85
 
86
86
  def add_child_link
87
- view.link_to((view.image('plus') + ' Add Child'), view.new_admin_page_child_path(self, :page_class => default_child.name), :class => "action")
87
+ view.link_to( '<i class="fas fa-plus-circle"></i> Add Child'.html_safe, view.new_admin_page_child_path(self, :page_class => default_child.name), :class => "action")
88
88
  end
89
89
 
90
90
  def add_child_link_with_menu_hook
91
- view.link_to((view.image('plus') + ' Add Child'), "#allowed_children_#{id}", :class => "action dropdown")
91
+ view.link_to('<i class="fas fa-plus-circle"></i> Add Child'.html_safe, "#allowed_children_#{id}", :class => "action dropdown")
92
92
  end
93
93
 
94
94
  def add_child_menu
@@ -1,8 +1,4 @@
1
1
  - unless current_user.site
2
- %tr
3
- %th.label
4
- %label{:for=>"user_admin"} Can edit site
5
- %td.field{:style => 'text-align: left;'}
6
- = select :user, :site_id, [['<any>', '']] + Site.all.map { |s| [s.name, s.id] }
7
- %td.help
8
- A user with no site is able to act (to whatever extent their status allows) on any site.
2
+ %label{:for=>"user_admin"} Can edit site
3
+ = select :user, :site_id, [['<any>', '']] + Site.all.map { |s| [s.name, s.id] }
4
+ .caption A user with no site is able to act (to whatever extent their status allows) on any site.
@@ -1,7 +1,7 @@
1
1
  = render_region :form_top
2
2
  - render_region :form do |form|
3
3
  - form.edit_title do
4
- %fieldset.title
4
+ .title
5
5
  - form.edit_metadata do
6
6
  .drawer
7
7
  .drawer_contents#attributes
@@ -16,3 +16,4 @@
16
16
  .drawer_handle
17
17
  %a.toggle.more{:href=>'#attributes', :rel=>"toggle[attributes]"}
18
18
  = t('more')
19
+ %i.fas.fa-angle-down
@@ -9,7 +9,8 @@
9
9
  - AssetType.all.each do |type|
10
10
  - unless type.name == :other
11
11
  = link_to t("asset_types.#{type.plural}"), admin_assets_url(:filter => type.name), :rel => type.name.to_s, :class => params[:filter] == type.name.to_s ? "selective pressed" : "selective"
12
- .right
12
+ .asset_search
13
+ %i.fas.fa-search
13
14
  %input{:type=>"search", :id => 'filesearchforminput', :class=>"search", :name=>"search", :value=>h(params[:search]), :placeholder=>"Search", :results=>0, :size=>30}
14
15
 
15
16
  #type_boxes{:style => "display: none"}
@@ -21,9 +21,9 @@
21
21
  = updated_stamp @asset
22
22
 
23
23
  %fieldset.upload
24
- %label.upload
24
+ %label.custom-file-upload.upload
25
25
  = t("clipped_extension.replace_file")
26
- = f.file_field :asset, :class => "", :style => "width: 100%"
26
+ = f.file_field :asset, :class => "", :style => "width: 100%"
27
27
 
28
28
  .buttons
29
29
  = save_model_button(@asset)
@@ -33,8 +33,9 @@
33
33
 
34
34
  - main.edit_regenerate do
35
35
  - if current_user.admin? or current_user.designer?
36
- %fieldset= t("clipped_extension.regenerate_thumbnails")
37
-
38
- - form_tag refresh_admin_asset_path(@asset), :method => :put do
39
- %p.asset_buttons
40
- %input.button{ :type => "submit", :value => t("clipped_extension.regenerate") }
36
+ %fieldset
37
+ = form_tag refresh_admin_asset_path(@asset), :method => :put do
38
+ %label= t("clipped_extension.regenerate_thumbnails")
39
+ %br
40
+ .asset_buttons
41
+ %input.button{ :type => "submit", :value => t("clipped_extension.regenerate") }
@@ -1,5 +1,6 @@
1
1
  = stylesheet_link_tag 'admin/assets'
2
2
  = javascript_include_tag 'admin/assets_admin'
3
+ - body_classes << 'reversed'
3
4
 
4
5
  - content_for :toolbar do
5
6
  = render 'search'
@@ -11,5 +12,6 @@
11
12
 
12
13
  - render_region :bottom do |bottom|
13
14
  #actions
14
- %ul
15
- %li= link_to((image('upload') + ' ' + t('clipped_extension.upload_asset')), new_admin_asset_path)
15
+ = link_to new_admin_asset_path, class: 'button' do
16
+ %i.fas.fa-upload
17
+ = t('clipped_extension.upload_asset')
@@ -1,5 +1,5 @@
1
1
  = stylesheet_link_tag 'admin/assets'
2
- = render_region :top
2
+ = render_region :top
3
3
 
4
4
  - render_region :main do |main|
5
5
  - main.edit_header do
@@ -7,12 +7,11 @@
7
7
 
8
8
  - main.edit_form do
9
9
  - form_for :asset, :url => admin_assets_path, :html => { :method => "post", :multipart => true } do |f|
10
-
11
10
  = render :partial => "form", :locals => { :f => f }
12
-
13
11
  %fieldset
14
- %label= t("clipped_extension.choose_file")
15
- = f.file_field :asset, :style => "width: 100%", :multiple => true
12
+ %label.custom-file-upload
13
+ = t("clipped_extension.choose_file")
14
+ = f.file_field :asset, :style => "width: 100%", :multiple => true
16
15
 
17
16
  .buttons
18
17
  = save_model_button(@asset)
@@ -1,3 +1,4 @@
1
+ - body_classes << "reversed"
1
2
  = stylesheet_link_tag 'admin/assets'
2
3
 
3
4
  %h1= t("clipped_extension.remove_asset")
@@ -1,4 +1,4 @@
1
- - body_classes << "reversed"
1
+ - body_classes << 'reversed'
2
2
  - @selected = :general
3
3
 
4
4
  - render_region :main do |main|
@@ -6,26 +6,26 @@
6
6
  %h1 Configuration
7
7
 
8
8
  - main.edit_form do
9
- = form_for :trusty_config, :url => admin_configuration_path, :html => {"data-onsubmit_status"=>"Saving changes&#8230;", :method => :put} do |f|
9
+ = form_for :trusty_config, :url => admin_configuration_path, :html => {'data-onsubmit_status'=>'Saving changes&#8230;', :method => :put} do |f|
10
10
  = render_region :form_top
11
11
  - render_region :form do |form|
12
12
  - form.edit_site do
13
13
  %fieldset
14
- %h3 Site
14
+ %h4 Site
15
15
  - TrustyCms.config.site_settings.each do |site_setting|
16
16
  %p
17
17
  = edit_config site_setting
18
18
 
19
19
  - form.edit_defaults do
20
20
  %fieldset
21
- %h3 Defaults
21
+ %h4 Defaults
22
22
  - TrustyCms.config.default_settings.each do |default_setting|
23
23
  %p
24
24
  = edit_config default_setting
25
25
 
26
26
  - form.edit_users do
27
27
  %fieldset
28
- %h3 Passwords
28
+ %h4 Passwords
29
29
  - TrustyCms.config.user_settings.each do |user_setting|
30
30
  %p
31
31
  = edit_config user_setting
@@ -33,6 +33,6 @@
33
33
  - render_region :form_bottom do |form_bottom|
34
34
  - form_bottom.edit_buttons do
35
35
  .buttons
36
- %input.button{:type=>"submit", :value=>"Save Changes"}/
36
+ %input.button{:type=>'submit', :value=>'Save Changes'}/
37
37
  or
38
- = link_to "Cancel", admin_configuration_path, class: 'alt'
38
+ = link_to 'Cancel', admin_configuration_path, class: 'alt'
@@ -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')
@@ -9,8 +9,8 @@
9
9
  = image('layout', :alt => '')
10
10
  = h @layout.name
11
11
 
12
- = form_for [:admin, @layout], :html => { :method => 'delete', 'data-onsubmit_status'=>"Removing layout&#8230;" } do
12
+ = form_for [:admin, @layout], :html => { :method => 'delete', 'data-onsubmit_status'=>'Removing layout&#8230;' } do
13
13
  .buttons
14
- %input.button{:type => "submit", :value => t('delete_layout') }/
14
+ %input.button{:type => 'submit', :value => t('delete_layout') }/
15
15
  = t('or')
16
16
  = 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"
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
6
  %p
7
- %label
8
- = "To use HTML or Radius tags, switch to plain text view by clicking the 'Source' button."
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')