comfortable_mexican_sofa 2.0.3 → 2.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/app/assets/javascripts/comfy/admin/cms/application.js.coffee +1 -0
  4. data/app/assets/javascripts/comfy/admin/cms/base.js.coffee +2 -2
  5. data/app/assets/javascripts/comfy/admin/cms/lib/fontawesome.js +5 -0
  6. data/app/assets/javascripts/comfy/admin/cms/uploader.js.coffee +1 -1
  7. data/app/assets/stylesheets/comfy/admin/cms/application.sass +1 -1
  8. data/app/assets/stylesheets/comfy/admin/cms/base.sass +6 -17
  9. data/app/assets/stylesheets/comfy/admin/cms/lib/fontawesome.css +343 -0
  10. data/app/views/comfy/admin/cms/categories/_edit.html.haml +1 -1
  11. data/app/views/comfy/admin/cms/categories/_index.html.haml +18 -19
  12. data/app/views/comfy/admin/cms/categories/_show.html.haml +5 -5
  13. data/app/views/comfy/admin/cms/categories/create.js.erb +3 -3
  14. data/app/views/comfy/admin/cms/categories/edit.js.erb +1 -1
  15. data/app/views/comfy/admin/cms/categories/update.js.erb +2 -2
  16. data/app/views/comfy/admin/cms/files/_file.html.haml +1 -1
  17. data/app/views/comfy/admin/cms/files/index.html.haml +4 -3
  18. data/app/views/comfy/admin/cms/layouts/_index_branch.html.haml +1 -1
  19. data/app/views/comfy/admin/cms/layouts/index.html.haml +1 -1
  20. data/app/views/comfy/admin/cms/pages/_index_branch.html.haml +3 -3
  21. data/app/views/comfy/admin/cms/pages/index.html.haml +4 -3
  22. data/app/views/comfy/admin/cms/revisions/_sidebar.html.haml +1 -1
  23. data/app/views/comfy/admin/cms/revisions/show.html.haml +3 -3
  24. data/app/views/comfy/admin/cms/sites/index.html.haml +1 -1
  25. data/app/views/comfy/admin/cms/snippets/index.html.haml +4 -3
  26. data/app/views/comfy/admin/cms/translations/_sidebar.html.haml +11 -5
  27. data/app/views/layouts/comfy/admin/cms/_left.html.haml +2 -2
  28. data/comfortable_mexican_sofa.gemspec +0 -1
  29. data/config/locales/cs.yml +1 -3
  30. data/config/locales/da.yml +1 -3
  31. data/config/locales/de.yml +1 -3
  32. data/config/locales/en.yml +1 -3
  33. data/config/locales/es.yml +1 -3
  34. data/config/locales/fr.yml +1 -3
  35. data/config/locales/it.yml +1 -3
  36. data/config/locales/ja.yml +1 -3
  37. data/config/locales/nb.yml +1 -3
  38. data/config/locales/nl.yml +1 -3
  39. data/config/locales/pl.yml +1 -3
  40. data/config/locales/pt-BR.yml +1 -3
  41. data/config/locales/ru.yml +1 -3
  42. data/config/locales/sk.yml +1 -3
  43. data/config/locales/sv.yml +1 -3
  44. data/config/locales/tr.yml +1 -3
  45. data/config/locales/uk.yml +1 -3
  46. data/config/locales/zh-CN.yml +1 -3
  47. data/config/locales/zh-TW.yml +1 -3
  48. data/doc/preview.jpg +0 -0
  49. data/lib/comfortable_mexican_sofa/engine.rb +0 -2
  50. data/lib/comfortable_mexican_sofa/version.rb +1 -1
  51. data/lib/generators/comfy/scaffold/templates/views/index.haml.tt +1 -1
  52. data/test/fixtures/generators/scaffold/views/index.haml +1 -1
  53. metadata +4 -16
@@ -4,4 +4,4 @@
4
4
  = form.text_field :label, class: "form-control form-control-sm"
5
5
  .input-group-btn
6
6
  %button.btn.btn-primary.btn-sm
7
- = t('.save')
7
+ %i.fas.fa-fw.fa-check
@@ -1,29 +1,28 @@
1
- .categories-widget
2
- %span.btn.btn-sm
3
- %strong= t('.label')
1
+ .box.categories-widget
4
2
 
5
- %span.categories.read
6
-
7
- %button.toggle-cat-edit.btn.btn-secondary.btn-sm
3
+ .read
4
+ .categories
5
+ .category
6
+ - active_class = params[:categories].blank?? "active" : nil
7
+ = link_to t('.all'), {categories: nil}, class: "btn btn-sm btn-light btn-block #{active_class}"
8
+ - @site.categories.of_type(type).each do |category|
9
+ = render "comfy/admin/cms/categories/show", category: category, read: true
10
+ %button.toggle-cat-edit.btn.btn-secondary.btn-sm.btn-block
8
11
  = t(".edit")
9
12
 
10
- .category
11
- - active_class = params[:categories].blank?? "btn-dark" : "btn-light"
12
- = link_to t('.all'), {categories: nil}, class: "btn btn-sm #{active_class}"
13
- - @site.categories.of_type(type).each do |category|
14
- = render "comfy/admin/cms/categories/show", category: category, read: true
15
-
16
- %span.categories.editable
17
- - @site.categories.of_type(type).each do |category|
18
- = render "comfy/admin/cms/categories/show", category: category
13
+ .editable
14
+ .categories
15
+ - @site.categories.of_type(type).each do |category|
16
+ = render "comfy/admin/cms/categories/show", category: category
19
17
 
20
18
  - url = comfy_admin_cms_site_categories_path(@site)
21
- = form_for :category, url: url, remote: true, html: {id: "new_category"} do |form|
19
+ = form_for :category, url: url, remote: true, html: {id: "new-category"} do |form|
22
20
  = form.hidden_field :categorized_type, value: type
23
21
  .input-group
24
22
  = form.text_field :label, placeholder: t('.add_placeholder'), class: 'form-control form-control-sm'
25
23
  .input-group-btn
26
24
  %button#cat-add-button.btn.btn-primary.btn-sm
27
- = t(".add")
28
- %button.toggle-cat-edit.btn.btn-light.btn-sm
29
- = t(".done")
25
+ %i.fas.fa-fw.fa-plus
26
+
27
+ %button.toggle-cat-edit.btn.btn-light.btn-sm.btn-block
28
+ = t(".done")
@@ -4,11 +4,11 @@
4
4
 
5
5
  .category{id: dom_id(category)}
6
6
  - if read
7
- - active_class = active ? "btn-dark" : "btn-light"
7
+ - active_class = active ? "active" : nil
8
8
  - categories = active ? categories.reject{|c| c == category.label} : categories << category.label
9
- = link_to category.label, {categories: categories}, class: "btn btn-sm #{active_class}"
9
+ = link_to category.label, {categories: categories}, class: "btn btn-sm btn-light btn-block text-left text-truncate #{active_class}"
10
10
  - else
11
- .btn-group
12
- = link_to category.label, edit_comfy_admin_cms_site_category_path(@site, category), remote: true, class: "btn btn-sm btn-light"
11
+ .btn-group.d-flex
12
+ = link_to category.label, edit_comfy_admin_cms_site_category_path(@site, category), remote: true, class: "btn btn-sm btn-light w-100 text-left text-truncate"
13
13
  = link_to comfy_admin_cms_site_category_path(@site, category), method: :delete, remote: true, data: {confirm: t('.are_you_sure')}, class: 'btn btn-sm btn-danger' do
14
- = fa_icon "times"
14
+ %i.fas.fa-fw.fa-times
@@ -1,7 +1,7 @@
1
- $('.categories-widget .categories.editable form#new_category').before(
1
+ $('.categories-widget .editable .categories').append(
2
2
  '<%= escape_javascript(render "show", category: @category) %>'
3
3
  );
4
- $('.categories-widget .categories.read').append(
4
+ $('.categories-widget .read .categories').append(
5
5
  '<%= escape_javascript(render "show", category: @category, read: true) %>'
6
6
  );
7
- $('.categories-widget .categories.editable form#new_category input#category_label').val('');
7
+ $('.categories-widget .editable form#new-category input#category_label').val('');
@@ -1,3 +1,3 @@
1
- $('.categories.editable .category#<%= dom_id(@category) %>').replaceWith(
1
+ $('.editable .category#<%= dom_id(@category) %>').replaceWith(
2
2
  '<%= escape_javascript(render "edit", category: @category ) %>'
3
3
  );
@@ -1,6 +1,6 @@
1
- $('.categories.editable form#<%= dom_id(@category) %>').replaceWith(
1
+ $('.editable form#<%= dom_id(@category) %>').replaceWith(
2
2
  '<%= escape_javascript(render "show", category: @category ) %>'
3
3
  );
4
- $('.categories.read .category#<%= dom_id(@category) %>').replaceWith(
4
+ $('.read .category#<%= dom_id(@category) %>').replaceWith(
5
5
  '<%= escape_javascript(render "show", category: @category, read: true) %>'
6
6
  );
@@ -4,7 +4,7 @@
4
4
  .item-controls.d-none.d-lg-block
5
5
  - if !params[:categories].present? && @site.files.count > 1
6
6
  .dragger
7
- = fa_icon("bars")
7
+ %i.fas.fa-bars
8
8
  .item-content
9
9
  .item-title
10
10
  - if file.attachment.image?
@@ -1,14 +1,15 @@
1
+ - content_for :right_column do
2
+ = render "comfy/admin/cms/categories/index", type: "Comfy::Cms::File"
3
+
1
4
  #cms-uploader
2
5
  #cms-uploader-drag-drop-target
3
6
 
4
7
  .page-header
5
- = link_to t('.new_link'), new_comfy_admin_cms_site_file_path(@site), class: "btn btn-secondary pull-right", id: "cms-uploader-browse"
8
+ = link_to t('.new_link'), new_comfy_admin_cms_site_file_path(@site), class: "btn btn-secondary float-right", id: "cms-uploader-browse"
6
9
  %h2= t('.title')
7
10
 
8
11
  = comfy_admin_partial "comfy/admin/cms/partials/files_before"
9
12
 
10
- = render "comfy/admin/cms/categories/index", type: "Comfy::Cms::File"
11
-
12
13
  = comfy_paginate @files
13
14
 
14
15
  %ul.list.sortable.cms-uploader-filelist
@@ -7,7 +7,7 @@
7
7
  .item-controls.d-none.d-md-block
8
8
  - if has_siblings
9
9
  .dragger
10
- = fa_icon("bars")
10
+ %i.fas.fa-bars
11
11
 
12
12
  .item-content
13
13
  .item-title
@@ -1,5 +1,5 @@
1
1
  .page-header
2
- = link_to t('.new_link'), new_comfy_admin_cms_site_layout_path(@site), class: "btn btn-secondary pull-right"
2
+ = link_to t('.new_link'), new_comfy_admin_cms_site_layout_path(@site), class: "btn btn-secondary float-right"
3
3
  %h2= t('.title')
4
4
 
5
5
  = comfy_admin_partial "comfy/admin/cms/partials/layouts_before"
@@ -14,14 +14,14 @@
14
14
  .item-controls
15
15
  - if has_siblings
16
16
  .dragger.d-none.d-md-block
17
- = fa_icon("bars")
17
+ %i.fas.fa-bars
18
18
 
19
19
  - if has_children && !page.root?
20
20
  - status = branch_open ? "open" : ""
21
21
  - url = toggle_branch_comfy_admin_cms_site_page_path(@site, page)
22
22
  = link_to url, remote: true, title: t(".toggle"), class: "toggle #{status}" do
23
- = fa_icon("plus-square", class: "expand")
24
- = fa_icon("minus-square", class: "collapse")
23
+ %i.fas.fa-plus-square.expand
24
+ %i.fas.fa-minus-square.collapse
25
25
 
26
26
  .item-content
27
27
  .item-title
@@ -1,11 +1,12 @@
1
+ - content_for :right_column do
2
+ = render "comfy/admin/cms/categories/index", type: "Comfy::Cms::Page"
3
+
1
4
  .page-header
2
- = link_to t('.new_link'), new_comfy_admin_cms_site_page_path(@site), class: "btn btn-secondary pull-right"
5
+ = link_to t('.new_link'), new_comfy_admin_cms_site_page_path(@site), class: "btn btn-secondary float-right"
3
6
  %h2= t('.title')
4
7
 
5
8
  = comfy_admin_partial "comfy/admin/cms/partials/pages_beforea"
6
9
 
7
- = render "comfy/admin/cms/categories/index", type: "Comfy::Cms::Page"
8
-
9
10
  %ul.list.sortable
10
11
  = render partial: "index_branch", collection: @pages
11
12
 
@@ -1,2 +1,2 @@
1
1
  .box.revisions
2
- = link_to t('.revision', count: record.revisions.count), link, class: "btn btn-info d-block"
2
+ = link_to t('.revision', count: record.revisions.count), link, class: "btn btn-sm btn-info d-block"
@@ -1,7 +1,7 @@
1
1
  - content_for :right_column do
2
2
  .box.revisions
3
3
  - @record.revisions.order(created_at: :desc).each do |revision|
4
- = active_link_to l(revision.created_at, format: :short), {id: revision.id}, class: "btn btn-sm btn-outline-light d-block text-primary mb-1"
4
+ = active_link_to l(revision.created_at, format: :short), { id: revision.id }, class: "btn btn-sm btn-light d-block text-primary mb-1"
5
5
 
6
6
  .page-header
7
7
  %h2
@@ -30,7 +30,7 @@
30
30
  .current.d-none= content
31
31
  .content
32
32
 
33
- = comfy_form_for @revision, url: {action: :revert} do |form|
33
+ = comfy_form_for @revision, url: { action: :revert } do |form|
34
34
  = form.form_actions do
35
- = form.submit t('.update'), class: "btn btn-primary"
35
+ = form.submit t(".update"), class: "btn btn-primary"
36
36
  = link_to t(".cancel"), record_path, class: "btn btn-link"
@@ -1,5 +1,5 @@
1
1
  .page-header
2
- = link_to t('.new_link'), new_comfy_admin_cms_site_path, class: "btn btn-secondary pull-right"
2
+ = link_to t('.new_link'), new_comfy_admin_cms_site_path, class: "btn btn-secondary float-right"
3
3
  %h2= t('.title')
4
4
 
5
5
  = comfy_admin_partial "comfy/admin/cms/partials/sites_before"
@@ -1,11 +1,12 @@
1
+ - content_for :right_column do
2
+ = render "comfy/admin/cms/categories/index", type: "Comfy::Cms::Snippet"
3
+
1
4
  .page-header
2
- = link_to t('.new_link'), new_comfy_admin_cms_site_snippet_path(@site), class: "btn btn-secondary pull-right"
5
+ = link_to t('.new_link'), new_comfy_admin_cms_site_snippet_path(@site), class: "btn btn-secondary float-right"
3
6
  %h2= t('.title')
4
7
 
5
8
  = comfy_admin_partial "comfy/admin/cms/partials/snippets_before"
6
9
 
7
- = render "comfy/admin/cms/categories/index", type: "Comfy::Cms::Snippet"
8
-
9
10
  %ul.list.sortable
10
11
  - @snippets.each do |snippet|
11
12
  %li{id: dom_id(snippet)}
@@ -1,13 +1,19 @@
1
1
  .box.translations
2
+
3
+ = active_link_to edit_comfy_admin_cms_site_page_path(@site, @page), class: "btn btn-block btn-sm btn-light text-left text-truncate mb-1" do
4
+ = content_tag(:span, @site.locale, class: "badge badge-light text-uppercase")
5
+ = @page.label
6
+
2
7
  - @page.translations.each do |translation|
3
8
  .btn-group.btn-group-sm.d-flex.mb-1
4
9
  - url = edit_comfy_admin_cms_site_page_translation_path(@site, @page, translation)
5
- - badge = content_tag(:span, translation.locale, class: "badge badge-primary")
6
- - name = "#{badge} #{translation.label}".html_safe
7
10
  - published_css_class = translation.is_published? ? "published" : "draft"
8
- = link_to name, url, class: "#{published_css_class} translation btn btn-outline-light w-100"
11
+ = active_link_to url, class: "#{published_css_class} translation btn text-left text-truncate btn-light w-100" do
12
+ = content_tag(:span, translation.locale, class: "badge badge-light text-uppercase")
13
+ = translation.label
9
14
 
10
15
  - url = comfy_admin_cms_site_page_translation_path(@site, @page, translation)
11
- = link_to t(".delete"), url, method: :delete, data: {confirm: t(".confirm")}, class: "btn btn-danger"
16
+ = link_to url, method: :delete, data: {confirm: t(".confirm")}, class: "btn btn-danger" do
17
+ %i.fas.fa-fw.fa-times
12
18
 
13
- = link_to t(".new"), new_comfy_admin_cms_site_page_translation_path(@site, @page), class: "btn btn-secondary d-block mb-1"
19
+ = link_to t(".new"), new_comfy_admin_cms_site_page_translation_path(@site, @page), class: "btn btn-sm btn-secondary d-block mb-1"
@@ -2,7 +2,7 @@
2
2
 
3
3
  %nav.navbar.navbar-expand-lg
4
4
  %button.navbar-toggler{type: "button", data: {toggle:"collapse", target: "#leftnav"}, aria: {controls: "navbarSupportedContent", expanded: "false", label: "Toggle navigation"}}
5
- = fa_icon "bars"
5
+ %i.fas.fa-bars
6
6
 
7
7
  #leftnav.navbar-collapse.collapse
8
8
 
@@ -24,7 +24,7 @@
24
24
  %li.nav-item
25
25
  - unless is_active_link?(comfy_admin_cms_site_files_path(@site))
26
26
  %a.cms-files-open-modal{href: '#', title: "Open library"}
27
- = fa_icon "bars"
27
+ %i.fas.fa-bars
28
28
  = active_link_to comfy_admin_cms_site_files_path(@site), class: "nav-link" do
29
29
  = t('comfy.admin.cms.base.files')
30
30
 
@@ -22,7 +22,6 @@ Gem::Specification.new do |s|
22
22
  s.add_dependency "codemirror-rails", ">= 5.16.0"
23
23
  s.add_dependency "coffee-rails", ">= 4.2.0"
24
24
  s.add_dependency "comfy_bootstrap_form", ">= 4.0.0.beta1"
25
- s.add_dependency "font-awesome-rails", ">= 4.7.0"
26
25
  s.add_dependency "haml-rails", ">= 1.0.0"
27
26
  s.add_dependency "jquery-rails", ">= 4.3.1"
28
27
  s.add_dependency "jquery-ui-rails", ">= 6.0.1"
@@ -171,7 +171,6 @@ cs:
171
171
  cancel: Return to Page
172
172
  sidebar:
173
173
  new: New Translation
174
- delete: Delete
175
174
  confirm: Are you sure?
176
175
 
177
176
  snippets:
@@ -251,10 +250,9 @@ cs:
251
250
 
252
251
  categories:
253
252
  index:
254
- label: Kategorie
255
253
  edit: Upravit
256
254
  done: Hotovo
257
- all: Všechny
255
+ all: Všechny Kategorie
258
256
  add: Přidat
259
257
  add_placeholder: Přidat kategorii
260
258
  show:
@@ -171,7 +171,6 @@ da:
171
171
  cancel: Return to Page
172
172
  sidebar:
173
173
  new: New Translation
174
- delete: Delete
175
174
  confirm: Are you sure?
176
175
 
177
176
  snippets:
@@ -251,10 +250,9 @@ da:
251
250
 
252
251
  categories:
253
252
  index:
254
- label: Kategorier
255
253
  edit: Rediger
256
254
  done: Udført
257
- all: Alle
255
+ all: Alle Kategorier
258
256
  add: Tilføj
259
257
  add_placeholder: Tilføj kategori
260
258
  show:
@@ -171,7 +171,6 @@ de:
171
171
  cancel: Return to Page
172
172
  sidebar:
173
173
  new: New Translation
174
- delete: Delete
175
174
  confirm: Are you sure?
176
175
 
177
176
  snippets:
@@ -251,10 +250,9 @@ de:
251
250
 
252
251
  categories:
253
252
  index:
254
- label: Kategorien
255
253
  edit: Bearbeiten
256
254
  done: Erledigt
257
- all: Alle
255
+ all: Alle Kategorien
258
256
  add: Hinzuzufügen
259
257
  add_placeholder: Kategorie hinzuzufügen
260
258
  show:
@@ -171,7 +171,6 @@ en:
171
171
  cancel: Return to Page
172
172
  sidebar:
173
173
  new: New Translation
174
- delete: Delete
175
174
  confirm: Are you sure?
176
175
 
177
176
  snippets:
@@ -251,10 +250,9 @@ en:
251
250
 
252
251
  categories:
253
252
  index:
254
- label: Categories
255
253
  edit: Edit
256
254
  done: Done
257
- all: All
255
+ all: All Categories
258
256
  add: Add
259
257
  add_placeholder: Add Category
260
258
  show:
@@ -171,7 +171,6 @@ es:
171
171
  cancel: Return to Page
172
172
  sidebar:
173
173
  new: New Translation
174
- delete: Delete
175
174
  confirm: Are you sure?
176
175
 
177
176
  snippets:
@@ -251,10 +250,9 @@ es:
251
250
 
252
251
  categories:
253
252
  index:
254
- label: Categorias
255
253
  edit: Editar
256
254
  done: Listo
257
- all: Todos
255
+ all: Todos Categorias
258
256
  add: Agregar
259
257
  add_placeholder: Añadir Categoría
260
258
  show:
@@ -171,7 +171,6 @@ fr:
171
171
  cancel: Return to Page
172
172
  sidebar:
173
173
  new: New Translation
174
- delete: Delete
175
174
  confirm: Are you sure?
176
175
 
177
176
  snippets:
@@ -251,10 +250,9 @@ fr:
251
250
 
252
251
  categories:
253
252
  index:
254
- label: Catégories
255
253
  edit: Modifier les catégories
256
254
  done: Terminé
257
- all: Tout
255
+ all: Tout Catégories
258
256
  add: Ajouter
259
257
  add_placeholder: Ajouter la Catégorie
260
258
  show:
@@ -171,7 +171,6 @@ it:
171
171
  cancel: Return to Page
172
172
  sidebar:
173
173
  new: New Translation
174
- delete: Delete
175
174
  confirm: Are you sure?
176
175
 
177
176
  snippets:
@@ -251,10 +250,9 @@ it:
251
250
 
252
251
  categories:
253
252
  index:
254
- label: Categorie
255
253
  edit: Modifica
256
254
  done: Fatto
257
- all: Tutte
255
+ all: Tutte Categorie
258
256
  add: Aggiungi
259
257
  add_placeholder: Aggiungi categoria
260
258
  show:
@@ -171,7 +171,6 @@ ja:
171
171
  cancel: Return to Page
172
172
  sidebar:
173
173
  new: New Translation
174
- delete: Delete
175
174
  confirm: Are you sure?
176
175
 
177
176
  snippets:
@@ -251,10 +250,9 @@ ja:
251
250
 
252
251
  categories:
253
252
  index:
254
- label: カテゴリー
255
253
  edit: 編集
256
254
  done: 完了
257
- all: すべて
255
+ all: すべて カテゴリー
258
256
  add: 追加
259
257
  add_placeholder: カテゴリを追加
260
258
  show: