fae-rails 1.7.1 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -2
- data/Rakefile +0 -3
- data/app/assets/images/fae/tutorial_model_location.png +0 -0
- data/app/assets/javascripts/fae/_deploy.js +198 -0
- data/app/assets/javascripts/fae/_modals.js +94 -0
- data/app/assets/javascripts/fae/_tables.js +11 -25
- data/app/assets/javascripts/fae/application.js +4 -2
- data/app/assets/javascripts/fae/fae_init.js +0 -4
- data/app/assets/javascripts/fae/form/_ajax.js +26 -7
- data/app/assets/javascripts/fae/form/_cancel.js +1 -0
- data/app/assets/javascripts/fae/form/_filtering.js +34 -0
- data/app/assets/javascripts/fae/form/_form.js +1 -0
- data/app/assets/javascripts/fae/form/_form_manager.js +295 -0
- data/app/assets/javascripts/fae/form/_slugger.js.erb +2 -2
- data/app/assets/javascripts/fae/form/_validator.js +24 -14
- data/app/assets/javascripts/fae/form/inputs/_color.js +2 -1
- data/app/assets/javascripts/fae/form/inputs/_select.js +5 -2
- data/app/assets/javascripts/fae/navigation/_language.js +1 -1
- data/app/assets/javascripts/fae/navigation/_navigation.js +9 -21
- data/app/assets/javascripts/fae/navigation/_subnav_highlighter.js +7 -41
- data/app/assets/javascripts/fae/vendor/jqColorPicker.min.js +0 -1
- data/app/assets/stylesheets/fae/base.scss +7 -8
- data/app/assets/stylesheets/fae/globals/imports/_variables.scss +1 -2
- data/app/assets/stylesheets/fae/globals/layout/_base.scss +7 -2
- data/app/assets/stylesheets/fae/globals/layout/_content-header.scss +17 -31
- data/app/assets/stylesheets/fae/globals/navigation/_header.scss +2 -2
- data/app/assets/stylesheets/fae/globals/navigation/_multi-col-subnav.scss +50 -0
- data/app/assets/stylesheets/fae/modules/_buttons.scss +11 -0
- data/app/assets/stylesheets/fae/modules/_deploy.scss +25 -0
- data/app/assets/stylesheets/fae/modules/_modal.scss +25 -0
- data/app/assets/stylesheets/fae/modules/_toggles.scss +39 -23
- data/app/assets/stylesheets/fae/modules/forms/_asset-actions.scss +1 -1
- data/app/assets/stylesheets/fae/modules/forms/_base.scss +1 -1
- data/app/assets/stylesheets/fae/modules/forms/_checkbox.scss +1 -1
- data/app/assets/stylesheets/fae/modules/forms/_date.scss +16 -0
- data/app/assets/stylesheets/fae/modules/forms/_form-manager.scss +82 -0
- data/app/assets/stylesheets/fae/modules/forms/_radio.scss +1 -1
- data/app/assets/stylesheets/fae/modules/forms/_select.scss +7 -6
- data/app/assets/stylesheets/fae/modules/forms/_simple-mde.scss +1 -1
- data/app/assets/stylesheets/fae/modules/forms/_textarea.scss +1 -1
- data/app/assets/stylesheets/fae/modules/tables/_filters.scss +4 -0
- data/app/assets/stylesheets/fae/pages/_home.scss +18 -0
- data/app/assets/stylesheets/fae/pages/_login.scss +4 -0
- data/app/controllers/fae/application_controller.rb +22 -1
- data/app/controllers/fae/base_controller.rb +6 -2
- data/app/controllers/fae/deploy_controller.rb +24 -0
- data/app/controllers/fae/deploy_hooks_controller.rb +71 -0
- data/app/controllers/fae/form_managers_controller.rb +19 -0
- data/app/controllers/fae/options_controller.rb +1 -0
- data/app/controllers/fae/pages_controller.rb +3 -2
- data/app/controllers/fae/static_pages_controller.rb +6 -1
- data/app/controllers/fae/users_controller.rb +19 -1
- data/app/controllers/fae/utilities_controller.rb +18 -6
- data/app/helpers/fae/application_helper.rb +27 -2
- data/app/helpers/fae/form_helper.rb +40 -8
- data/app/helpers/fae/nested_form_helper.rb +2 -2
- data/app/helpers/fae/view_helper.rb +99 -43
- data/app/models/concerns/fae/base_model_concern.rb +10 -7
- data/app/models/concerns/fae/user_concern.rb +10 -1
- data/app/models/fae/change.rb +18 -5
- data/app/models/fae/deploy_hook.rb +12 -0
- data/app/models/fae/file.rb +1 -1
- data/app/models/fae/form_manager.rb +24 -0
- data/app/models/fae/image.rb +1 -1
- data/app/models/fae/option.rb +1 -1
- data/app/models/fae/role.rb +1 -1
- data/app/models/fae/static_page.rb +11 -2
- data/app/models/fae/user.rb +4 -5
- data/app/services/fae/netlify_api.rb +197 -0
- data/app/uploaders/fae/file_uploader.rb +2 -5
- data/app/uploaders/fae/image_uploader.rb +3 -3
- data/app/views/devise/unlocks/new.html.slim +5 -9
- data/app/views/fae/application/_content_form.html.slim +16 -11
- data/app/views/fae/application/_file_uploader.html.slim +11 -3
- data/app/views/fae/application/_global_search_results.html.slim +2 -2
- data/app/views/fae/application/_header.slim +12 -9
- data/app/views/fae/application/_markdown_helper.slim +17 -17
- data/app/views/fae/application/_mobilenav.slim +9 -6
- data/app/views/fae/application/_user_log.html.slim +2 -2
- data/app/views/fae/deploy/index.html.slim +40 -0
- data/app/views/fae/deploy_hooks/_form.html.slim +18 -0
- data/app/views/fae/deploy_hooks/_table.html.slim +28 -0
- data/app/views/fae/deploy_hooks/edit.html.slim +3 -0
- data/app/views/fae/deploy_hooks/new.html.slim +3 -0
- data/app/views/fae/images/_image_uploader.html.slim +15 -6
- data/app/views/fae/options/_form.html.slim +11 -8
- data/app/views/fae/pages/activity_log.html.slim +16 -12
- data/app/views/fae/pages/disabled_environment.html.slim +2 -2
- data/app/views/fae/pages/error404.html.slim +5 -3
- data/app/views/fae/pages/home.html.slim +32 -21
- data/app/views/fae/setup/first_user.html.slim +3 -3
- data/app/views/fae/shared/_form_header.html.slim +37 -33
- data/app/views/fae/shared/_index_header.html.slim +3 -2
- data/app/views/fae/shared/_nested_table.html.slim +6 -6
- data/app/views/fae/shared/_recent_changes.html.slim +6 -6
- data/app/views/fae/shared/_shared_nested_table.html.slim +5 -2
- data/app/views/fae/static_pages/index.html.slim +2 -2
- data/app/views/fae/users/_form.html.slim +8 -12
- data/app/views/fae/users/index.html.slim +7 -7
- data/app/views/layouts/fae/application.html.slim +1 -0
- data/config/deploy.rb +3 -1
- data/config/initializers/devise.rb +6 -6
- data/config/locales/devise.cs.yml +59 -0
- data/config/locales/fae.cs.yml +125 -0
- data/config/locales/fae.en.yml +145 -0
- data/config/locales/fae.zh-CN.yml +109 -0
- data/config/routes.rb +9 -1
- data/db/migrate/20140809222030_add_user_table.rb +2 -2
- data/db/migrate/20140822224029_create_fae_roles.rb +1 -1
- data/db/migrate/20141008180718_create_fae_images_table.rb +1 -1
- data/db/migrate/20141017194616_create_fae_options.rb +1 -1
- data/db/migrate/20141021181327_create_fae_files.rb +1 -1
- data/db/migrate/20141021183047_create_fae_text_areas.rb +1 -1
- data/db/migrate/20141021184311_create_fae_pages.rb +1 -1
- data/db/migrate/20141105214814_create_fae_text_fields.rb +1 -1
- data/db/migrate/20150930224821_create_fae_changes.rb +1 -1
- data/db/migrate/20190925153222_create_fae_form_managers.rb +11 -0
- data/db/migrate/20220118192729_create_fae_publish_hooks.rb +10 -0
- data/db/migrate/20220128133730_rename_publish_hooks.rb +5 -0
- data/db/migrate/20220202153607_add_position_to_deploy_hooks.rb +6 -0
- data/lib/fae/options.rb +4 -2
- data/lib/fae/version.rb +1 -1
- data/lib/generators/fae/base_generator.rb +62 -8
- data/lib/generators/fae/nested_index_scaffold_generator.rb +1 -1
- data/lib/generators/fae/nested_scaffold_generator.rb +16 -2
- data/lib/generators/fae/page_generator.rb +8 -0
- data/lib/generators/fae/scaffold_generator.rb +1 -1
- data/lib/generators/fae/templates/assets/fae.js +1 -1
- data/lib/generators/fae/templates/controllers/nested_scaffold_controller.rb +14 -0
- data/lib/generators/fae/templates/graphql/graphql_page_type.rb +17 -0
- data/lib/generators/fae/templates/graphql/graphql_type.rb +13 -0
- data/lib/generators/fae/templates/initializers/fae.rb +16 -1
- data/lib/generators/fae/templates/views/_form.html.slim +11 -4
- data/lib/generators/fae/templates/views/_form_index_nested.html.slim +15 -1
- data/lib/generators/fae/templates/views/_form_nested.html.slim +19 -2
- data/lib/generators/fae/templates/views/index_nested.html.slim +1 -0
- data/lib/generators/fae/templates/views/static_page_form.html.slim +14 -3
- metadata +70 -47
- data/app/views/fae/shared/_form_buttons.html.slim +0 -11
- data/app/views/fae/shared/_nested_table_advanced.html.slim +0 -18
- data/lib/sub_test_task_patch.rb +0 -129
@@ -1,41 +1,41 @@
|
|
1
1
|
.markdown-hint
|
2
2
|
.markdown-hint-wrapper
|
3
|
-
h3
|
3
|
+
h3 = t('fae.application.markdown_opts')
|
4
4
|
|
5
|
-
h4
|
5
|
+
h4 = t('fae.application.links')
|
6
6
|
p
|
7
|
-
|
7
|
+
= t('fae.application.links_help')
|
8
8
|
br
|
9
9
|
| Internal Link: [link to about](/about)
|
10
10
|
br
|
11
11
|
| External link: [link to about](http://www.google.com/about)
|
12
12
|
|
13
|
-
h4
|
13
|
+
h4 = t('fae.application.formatting')
|
14
14
|
p
|
15
|
-
|
15
|
+
= t('fae.application.formatting_help')
|
16
16
|
br
|
17
|
-
|
17
|
+
= t('fae.application.bold')
|
18
18
|
br
|
19
|
-
|
19
|
+
= t('fae.application.italic')
|
20
20
|
|
21
|
-
h4
|
21
|
+
h4 = t('fae.application.headers')
|
22
22
|
p
|
23
|
-
|
23
|
+
= t('fae.application.headers_help')
|
24
24
|
br
|
25
|
-
|
25
|
+
= t('fae.apllication.headers_example')
|
26
26
|
br
|
27
|
-
|
27
|
+
= t('fae.application.subheaders_example')
|
28
28
|
|
29
|
-
h4
|
29
|
+
h4 = t('fae.application.list')
|
30
30
|
p
|
31
|
-
|
31
|
+
= t('fae.application.list_help')
|
32
32
|
br
|
33
|
-
span
|
33
|
+
span = t('fae.application.bulleted_list')
|
34
34
|
br
|
35
35
|
== ['* bullet', '* bullet 2'].join('<br />')
|
36
36
|
br
|
37
|
-
span
|
37
|
+
span = t('fae.application.numbered_list')
|
38
38
|
== ['1. line item', '2. line item'].join('<br />')
|
39
39
|
|
40
|
-
h4
|
41
|
-
p
|
40
|
+
h4 = t('fae.application.paragraph_break')
|
41
|
+
p = t('fae.application.paragraph_break_help')
|
@@ -31,6 +31,9 @@ nav.nav.mobilenav
|
|
31
31
|
- thirditem[:path] ||= '#'
|
32
32
|
li: a href=thirditem[:path] = thirditem[:text]
|
33
33
|
|
34
|
+
- if current_user.super_admin_or_admin? && netlify_enabled?
|
35
|
+
li: a href=fae.deploy_path = t('fae.navbar.deployments')
|
36
|
+
|
34
37
|
- if current_user.super_admin_or_admin?
|
35
38
|
li.mobilenav-accordion.js-accordion
|
36
39
|
a href="#" Admin
|
@@ -55,12 +58,12 @@ nav.nav.mobilenav
|
|
55
58
|
- if @option.stage_url.present? || @option.live_url.present?
|
56
59
|
li class=view_site_class
|
57
60
|
- if site_urls_are_present
|
58
|
-
a href="#"
|
61
|
+
a href="#" = t('fae.application.view_site')
|
59
62
|
ul.subnav.js-subnav
|
60
|
-
li: span.mobilenav-subheader.js-mobile-back
|
61
|
-
li: a.-viewsite href=@option.stage_url target="_blank"
|
62
|
-
li: a.-viewsite href=@option.live_url target="_blank"
|
63
|
+
li: span.mobilenav-subheader.js-mobile-back = t('fae.application.view_site')
|
64
|
+
li: a.-viewsite href=@option.stage_url target="_blank" = t('fae.application.preview_site')
|
65
|
+
li: a.-viewsite href=@option.live_url target="_blank" = t('fae.application.live_site')
|
63
66
|
- elsif @option.stage_url.present?
|
64
|
-
a.-viewsite href=@option.stage_url target="_blank"
|
67
|
+
a.-viewsite href=@option.stage_url target="_blank" = t('fae.application.preview_site')
|
65
68
|
- elsif @option.live_url.present?
|
66
|
-
a.-viewsite href=@option.live_url target="_blank"
|
69
|
+
a.-viewsite href=@option.live_url target="_blank" = t('fae.application.live_site')
|
@@ -28,9 +28,9 @@
|
|
28
28
|
- if changed.present?
|
29
29
|
tr
|
30
30
|
td = version.created_at
|
31
|
-
td = version.user.present? ? version.user.full_name : content_tag(:em,
|
31
|
+
td = version.user.present? ? version.user.full_name : content_tag(:em, t('fae.application.user_absent'))
|
32
32
|
td = changed.join(', ')
|
33
33
|
|
34
34
|
- else
|
35
35
|
tr
|
36
|
-
td colspan="3"
|
36
|
+
td colspan="3" = t('fae.application.no_logs')
|
@@ -0,0 +1,40 @@
|
|
1
|
+
header.content-header.js-content-header
|
2
|
+
h1 = t('fae.deploy.page.heading')
|
3
|
+
|
4
|
+
== render 'flash_messages'
|
5
|
+
|
6
|
+
main.content
|
7
|
+
- if @deploy_hooks.present?
|
8
|
+
- @deploy_hooks.each do |deploy_hook|
|
9
|
+
button.button.deploy-button.js-run-deploy data-build-hook-type=deploy_hook.environment href="#" = "#{t('fae.deploy.ctas.deploy')} #{deploy_hook.environment.to_s.titleize}"
|
10
|
+
|
11
|
+
section.content
|
12
|
+
p = t('fae.deploy.table.deploying_helper').html_safe
|
13
|
+
|
14
|
+
section.content#js-deploying-section
|
15
|
+
h2.deploying-heading = t('fae.deploy.table.deploying_heading')
|
16
|
+
.js-deploys-list.running
|
17
|
+
table
|
18
|
+
thead
|
19
|
+
tr
|
20
|
+
th = t('fae.deploy.table.title')
|
21
|
+
th = t('fae.deploy.table.deployed')
|
22
|
+
th = t('fae.deploy.table.duration')
|
23
|
+
th = t('fae.deploy.table.context')
|
24
|
+
th = t('fae.deploy.table.error_msg')
|
25
|
+
tbody
|
26
|
+
|
27
|
+
section.content
|
28
|
+
h2 = t('fae.deploy.table.past_heading')
|
29
|
+
.js-deploys-list.past
|
30
|
+
table
|
31
|
+
thead
|
32
|
+
tr
|
33
|
+
th = t('fae.deploy.table.title')
|
34
|
+
th = t('fae.deploy.table.deployed')
|
35
|
+
th = t('fae.deploy.table.duration')
|
36
|
+
th = t('fae.deploy.table.context')
|
37
|
+
th = t('fae.deploy.table.error_msg')
|
38
|
+
tbody
|
39
|
+
|
40
|
+
|
@@ -0,0 +1,18 @@
|
|
1
|
+
ruby:
|
2
|
+
form_options = {
|
3
|
+
html: {
|
4
|
+
multipart: true,
|
5
|
+
novalidate: true,
|
6
|
+
class: 'js-file-form',
|
7
|
+
remote: true,
|
8
|
+
data: {
|
9
|
+
type: "html"
|
10
|
+
}
|
11
|
+
}
|
12
|
+
}
|
13
|
+
= simple_form_for(@deploy_hook, form_options) do |f|
|
14
|
+
= fae_input f, :environment
|
15
|
+
= fae_input f, :url, label: 'URL'
|
16
|
+
|
17
|
+
= f.submit
|
18
|
+
= button_tag 'Cancel', type: 'button', class: 'js-cancel-nested cancel-nested-button'
|
@@ -0,0 +1,28 @@
|
|
1
|
+
section.addedit-form.js-addedit-form
|
2
|
+
a.js-add-link.table-add-link.button.-small href=fae.new_deploy_hook_path = t('fae.deploy_hook.add_deploy_hook')
|
3
|
+
h2 = t('fae.deploy_hook.section_heading')
|
4
|
+
- if t('fae.deploy_hook.section_helper_text').present?
|
5
|
+
h6.table-helper-text = t('fae.deploy_hook.section_helper_text')
|
6
|
+
== render 'fae/application/flash_messages'
|
7
|
+
table.js-sort-row
|
8
|
+
thead
|
9
|
+
tr
|
10
|
+
th.th-sortable-handle
|
11
|
+
th = t('fae.deploy_hooks.environment')
|
12
|
+
th = t('fae.deploy_hooks.url')
|
13
|
+
th.-action
|
14
|
+
tbody
|
15
|
+
- if @deploy_hooks.present?
|
16
|
+
- @deploy_hooks.each do |item|
|
17
|
+
tr id=tr_id(item)
|
18
|
+
td.sortable-handle: i.icon-sort
|
19
|
+
td: a.js-edit-link href=edit_deploy_hook_path(item) #{item.environment}
|
20
|
+
td = item.url
|
21
|
+
td = fae_delete_button item, item, class: 'js-tooltip table-action js-delete-link', remote: true
|
22
|
+
|
23
|
+
- else
|
24
|
+
tr
|
25
|
+
- td_link = link_to 'add some', fae.new_deploy_hook_path, class: 'js-add-link'
|
26
|
+
td colspan="4" No #{t('fae.deploy_hook.section_heading')} yet, #{td_link}.
|
27
|
+
|
28
|
+
.js-addedit-form-wrapper
|
@@ -4,10 +4,10 @@ ruby:
|
|
4
4
|
image_name ||= :image
|
5
5
|
the_image = item.send(image_name)
|
6
6
|
label ||= image_name.to_s.titleize
|
7
|
-
alt_label ||= "#{label}
|
8
|
-
caption_label ||= "#{label}
|
7
|
+
alt_label ||= "#{label} Alt Text"
|
8
|
+
caption_label ||= "#{label} Caption"
|
9
9
|
helper_text ||= ""
|
10
|
-
alt_helper_text ||= '
|
10
|
+
alt_helper_text ||= t('fae.images.alt_helper')
|
11
11
|
caption_helper_text ||= ""
|
12
12
|
show_alt = true if show_alt.nil?
|
13
13
|
show_caption ||= false
|
@@ -15,15 +15,19 @@ ruby:
|
|
15
15
|
attached_as ||= image_name.to_s
|
16
16
|
languages = f.object.class.try(:fae_fields).try(:[], image_name).try(:[], :languages)
|
17
17
|
language ||= nil
|
18
|
+
show_form_manager ||= true
|
18
19
|
|
19
20
|
- if languages.present?
|
20
21
|
- languages.each do |lang|
|
21
|
-
= render 'fae/images/image_uploader', f: f, item: item, image_name: "#{image_name}_#{lang}".to_sym, label: "#{label} (#{lang.to_s})", alt_label: "#{alt_label} (#{lang.to_s})", caption_label: "#{caption_label} (#{lang.to_s})", helper_text: helper_text, alt_helper_text: alt_helper_text, caption_helper_text: caption_helper_text, show_caption: show_caption, required: required, attached_as: attached_as, language: lang
|
22
|
+
= render 'fae/images/image_uploader', f: f, item: item, image_name: "#{image_name}_#{lang}".to_sym, label: "#{label} (#{lang.to_s})", alt_label: "#{alt_label} (#{lang.to_s})", caption_label: "#{caption_label} (#{lang.to_s})", helper_text: helper_text, alt_helper_text: alt_helper_text, caption_helper_text: caption_helper_text, show_caption: show_caption, required: required, attached_as: attached_as, language: lang, show_form_manager: show_form_manager
|
22
23
|
|
23
24
|
- else
|
25
|
+
ruby:
|
26
|
+
form_manager_id = show_form_manager ? "#{item.class.name}_#{attached_as}" : nil
|
27
|
+
form_manager_id += "_#{language}" if language.present?
|
24
28
|
- wrapper_html = language.present? ? { data: { language: language } } : {}
|
25
29
|
= f.simple_fields_for image_name, defaults: { wrapper_html: wrapper_html } do |i|
|
26
|
-
.field.
|
30
|
+
.input.field.image*wrapper_html class="#{image_name}" data-form-manager-id=form_manager_id
|
27
31
|
label class="#{'required' if required}"
|
28
32
|
- if required
|
29
33
|
abbr title="required" *
|
@@ -31,7 +35,8 @@ ruby:
|
|
31
35
|
= " #{label.html_safe}"
|
32
36
|
|
33
37
|
- if helper_text.present?
|
34
|
-
h6.helper_text
|
38
|
+
h6.helper_text
|
39
|
+
span.helper_text_text = helper_text
|
35
40
|
|
36
41
|
- if the_image.asset.present?
|
37
42
|
.asset-actions
|
@@ -52,6 +57,8 @@ ruby:
|
|
52
57
|
options = { label: caption_label.html_safe }
|
53
58
|
options[:helper_text] = caption_helper_text if caption_helper_text.present?
|
54
59
|
options[:wrapper_html] = wrapper_html
|
60
|
+
options[:wrapper_html].merge!({class: "#{form_manager_id}_caption_container"})
|
61
|
+
options[:show_form_manager] = false
|
55
62
|
|
56
63
|
= fae_input i, :caption, options
|
57
64
|
|
@@ -60,6 +67,8 @@ ruby:
|
|
60
67
|
options = { label: alt_label.html_safe }
|
61
68
|
options[:helper_text] = alt_helper_text if alt_helper_text.present?
|
62
69
|
options[:wrapper_html] = wrapper_html
|
70
|
+
options[:wrapper_html].merge!({class: "#{form_manager_id}_alt_container"})
|
71
|
+
options[:show_form_manager] = false
|
63
72
|
|
64
73
|
= fae_input i, :alt, options
|
65
74
|
|
@@ -1,16 +1,19 @@
|
|
1
1
|
= simple_form_for(@option) do |f|
|
2
2
|
header.content-header.js-content-header
|
3
3
|
h1 Root Settings
|
4
|
-
.
|
5
|
-
a.button#js-header-cancel href=fae.root_path(cancelled: true)
|
6
|
-
= f.submit '
|
4
|
+
.content-header-buttons
|
5
|
+
a.button#js-header-cancel href=fae.root_path(cancelled: true) = t('fae.form.cancel')
|
6
|
+
= f.submit t('fae.form.save')
|
7
7
|
|
8
8
|
== render 'flash_messages'
|
9
9
|
|
10
|
-
|
11
|
-
= fae_input f, :title, label: '
|
10
|
+
main.content
|
11
|
+
= fae_input f, :title, label: t('fae.options.project.name')
|
12
12
|
= fae_input f, :time_zone, wrapper_class: 'select'
|
13
|
-
= fae_input f, :live_url, label: '
|
14
|
-
= fae_input f, :stage_url, label: '
|
15
|
-
= fae_image_form f, :logo, helper_text: '
|
13
|
+
= fae_input f, :live_url, label: t('fae.options.live_url'), helper_text: t('fae.options.url_helper')
|
14
|
+
= fae_input f, :stage_url, label: t('fae.options.stage_url'), helper_text: t('fae.options.url_helper')
|
15
|
+
= fae_image_form f, :logo, helper_text: t('fae.options.logo_helper')
|
16
16
|
= fae_image_form f, :favicon
|
17
|
+
|
18
|
+
section.content#deploy_hooks
|
19
|
+
== render "fae/deploy_hooks/table"
|
@@ -1,21 +1,25 @@
|
|
1
|
-
|
1
|
+
header.content-header.js-content-header
|
2
|
+
h1 = t('fae.application.activity_log_heading')
|
2
3
|
|
3
4
|
main.content
|
4
5
|
|
5
|
-
== fae_filter_form title: '
|
6
|
-
== fae_filter_select :
|
7
|
-
==
|
8
|
-
==
|
9
|
-
== fae_filter_select :date, options: ['
|
6
|
+
== fae_filter_form title: t('fae.changes.title'), action: fae.activity_log_filter_path do
|
7
|
+
== fae_filter_select :type, options: [t('fae.changes.created'), t('fae.changes.updated'), t('fae.changes.deleted')], translation_path: 'fae.changes.models'
|
8
|
+
== fae_filter_datepicker :start_date, placeholder: 'MM/DD/YYYY', class: 'test'
|
9
|
+
== fae_filter_datepicker :end_date, placeholder: 'MM/DD/YYYY'
|
10
|
+
== fae_filter_select :date, options: [t('fae.changes.last_hour'), t('fae.changes.last_day'), t('fae.changes.last_week'), t('fae.changes.last_month')], placeholder: t('fae.changes.all_time')
|
11
|
+
br
|
12
|
+
== fae_filter_select :user, options: Fae::User.all.map { |u| [u.full_name, u.id] }, translation_path: 'fae.changes.models'
|
13
|
+
== fae_filter_select :model, options: Fae::Change.unique_changeable_types, translation_path: 'fae.changes.models'
|
10
14
|
|
11
15
|
table.js-results-table
|
12
16
|
thead
|
13
17
|
tr
|
14
|
-
th data-sort="user.first_name"
|
15
|
-
th data-sort="changeable_type"
|
16
|
-
th data-sort="change_type"
|
17
|
-
th
|
18
|
-
th data-sort="updated_at"
|
18
|
+
th data-sort="user.first_name" = t('fae.changes.user')
|
19
|
+
th data-sort="changeable_type" = t('fae.changes.item')
|
20
|
+
th data-sort="change_type" = t('fae.changes.type')
|
21
|
+
th = t('fae.changes.attrs')
|
22
|
+
th data-sort="updated_at" = t('fae.changes.modified')
|
19
23
|
tbody
|
20
24
|
- if @items.present?
|
21
25
|
- @items.each do |change|
|
@@ -27,6 +31,6 @@ main.content
|
|
27
31
|
td = fae_datetime_format(change.updated_at)
|
28
32
|
- else
|
29
33
|
tr
|
30
|
-
td colspan=5
|
34
|
+
td colspan=5 = t('fae.changes.no_changes')
|
31
35
|
|
32
36
|
== fae_paginate @items
|
@@ -1,4 +1,4 @@
|
|
1
1
|
.center
|
2
2
|
.sad_face
|
3
|
-
h1
|
4
|
-
p
|
3
|
+
h1 = t('fae.page.disabled_title')
|
4
|
+
p = t('fae.page.disabled_text')
|
@@ -2,6 +2,8 @@
|
|
2
2
|
.sad_face
|
3
3
|
h1 Oops!
|
4
4
|
p
|
5
|
-
|
6
|
-
|
7
|
-
|
5
|
+
= t('fae.page.error_start')
|
6
|
+
|
|
7
|
+
a href=fae.root_path = t('fae.page.click')
|
8
|
+
|
|
9
|
+
= t('fae.page.error_end')
|
@@ -1,25 +1,36 @@
|
|
1
1
|
header.content-header.js-content-header.-dashboard
|
2
|
-
|
3
|
-
|
4
|
-
|
2
|
+
div
|
3
|
+
i.icon-home>
|
4
|
+
|
|
5
|
+
= t('fae.page.hello')
|
6
|
+
strong< = current_user.full_name
|
5
7
|
|
6
8
|
== render 'flash_messages'
|
7
9
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
-
|
18
|
-
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
10
|
+
- if @models.any?
|
11
|
+
main.content
|
12
|
+
table.js-sort-column
|
13
|
+
thead
|
14
|
+
tr
|
15
|
+
th = t('fae.common.name')
|
16
|
+
th = t('fae.changes.type')
|
17
|
+
th.-action-wide = t('fae.changes.modified')
|
18
|
+
tbody
|
19
|
+
- @list.each do |item|
|
20
|
+
- begin
|
21
|
+
- parent = item.respond_to?(:fae_parent) ? item.fae_parent : nil
|
22
|
+
- edit_path = edit_polymorphic_path([main_app, fae_scope.to_sym, parent, item])
|
23
|
+
- index_path = polymorphic_path([main_app, fae_scope.to_sym, parent, item.class.to_s.pluralize.underscore])
|
24
|
+
tr
|
25
|
+
td: a href=edit_path = item.fae_display_field
|
26
|
+
td: a href=index_path = item.class.to_s
|
27
|
+
td = fae_date_format item.updated_at
|
28
|
+
- rescue
|
29
|
+
- else
|
30
|
+
section.help-section
|
31
|
+
article.content
|
32
|
+
h2 = t('fae.page.welcome')
|
33
|
+
p
|
34
|
+
= t('fae.page.no_objs_start')
|
35
|
+
br
|
36
|
+
a href="https://www.faecms.com/documentation/quickstart-guide" target="_blank" = t('fae.page.no_objs_end')
|
@@ -1,11 +1,11 @@
|
|
1
1
|
.first_user-form
|
2
|
-
p
|
2
|
+
p = t('fae.setup.prompt')
|
3
3
|
|
4
4
|
= simple_form_for(@user, html: { multipart: true, novalidate: true }, url: fae.first_user_path) do |f|
|
5
5
|
= fae_input f, :first_name
|
6
6
|
= fae_input f, :last_name
|
7
7
|
= fae_input f, :email
|
8
|
-
= fae_input f, :password, helper_text: '
|
8
|
+
= fae_input f, :password, helper_text: t('fae.setup.password')
|
9
9
|
= fae_input f, :password_confirmation
|
10
10
|
.login-form-actions
|
11
|
-
=
|
11
|
+
input name="commit" type="submit" value=t('fae.form.save')
|
@@ -1,40 +1,44 @@
|
|
1
1
|
ruby:
|
2
2
|
require_locals ['header'], local_assigns
|
3
|
-
save_button_text
|
4
|
-
cancel_button_text
|
5
|
-
cloneable
|
6
|
-
clone_button_text
|
7
|
-
|
8
|
-
|
9
|
-
header_as_string
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
languages
|
3
|
+
save_button_text ||= t('fae.form.save')
|
4
|
+
cancel_button_text ||= t('fae.form.cancel')
|
5
|
+
cloneable ||= false
|
6
|
+
clone_button_text ||= t('fae.form.clone')
|
7
|
+
launch_manager_text ||= t('fae.form.launch_form_manager')
|
8
|
+
subnav ||= []
|
9
|
+
header_as_string = header.is_a?(String) ? header : header.class.name.split('::').last
|
10
|
+
header_as_string = header_as_string.singularize
|
11
|
+
title ||= "#{params[:action]} #{header_as_string}".titleize
|
12
|
+
breadcrumb = !local_assigns[:breadcrumbs].eql?(false)
|
13
|
+
languages ||= false
|
14
|
+
show_flash_messages = !local_assigns[:show_flash_messages].eql?(false)
|
14
15
|
|
15
|
-
-
|
16
|
-
|
17
|
-
|
18
|
-
|
16
|
+
header.content-header.js-content-header
|
17
|
+
- if breadcrumb
|
18
|
+
== render 'breadcrumb', title: title
|
19
|
+
- else
|
20
|
+
= form_header header
|
19
21
|
|
20
|
-
.content-header-buttons
|
21
|
-
|
22
|
-
|
22
|
+
.content-header-buttons
|
23
|
+
- if languages
|
24
|
+
- selected = current_user.language || ''
|
23
25
|
|
24
|
-
|
25
|
-
|
26
|
+
.content-header-select
|
27
|
+
= select_tag 'fae-languages', options_for_select(Fae.languages.map(&:reverse), selected), id: 'js-language', class: 'small_pulldown', prompt: 'All Languages'
|
26
28
|
|
27
|
-
|
28
|
-
|
29
|
-
a.button data-method="post" href="#{@index_path}?from_existing=#{params[:id]}" = clone_button_text
|
30
|
-
input name="commit" type="submit" value=save_button_text
|
29
|
+
- if Fae.use_form_manager
|
30
|
+
a.button.js-launch-form-manager href='#' = launch_manager_text
|
31
31
|
|
32
|
-
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
-
|
39
|
-
-
|
40
|
-
|
32
|
+
a.button#js-header-cancel href=@index_path = cancel_button_text
|
33
|
+
- if cloneable.present? && params[:id].present?
|
34
|
+
a.button#js-header-clone data-method="post" href="#{@index_path}?from_existing=#{params[:id]}" = clone_button_text
|
35
|
+
input name="commit" type="submit" value=save_button_text
|
36
|
+
|
37
|
+
- if subnav.present?
|
38
|
+
ul.content-header-subnav#js-content-header-subnav
|
39
|
+
- subnav.each do |link, id_selector|
|
40
|
+
- subnav_item = link.is_a?(Array) ? link : [link, link.parameterize(separator: '_')]
|
41
|
+
li: a href="##{subnav_item[1]}" = subnav_item[0]
|
42
|
+
|
43
|
+
- if show_flash_messages
|
44
|
+
== render 'fae/shared/errors'
|
@@ -3,7 +3,8 @@ ruby:
|
|
3
3
|
title ||= @klass_humanized.pluralize.titleize
|
4
4
|
new_button = !local_assigns[:new_button].eql?(false)
|
5
5
|
new_path ||= "new_#{fae_path}_#{@klass_singular}_path"
|
6
|
-
button_text ||=
|
6
|
+
button_text ||= t('fae.common.add', title: title.singularize)
|
7
|
+
export_text ||= t('fae.common.csv_export')
|
7
8
|
csv ||= false
|
8
9
|
breadcrumb = !local_assigns[:breadcrumbs].eql?(false)
|
9
10
|
|
@@ -15,7 +16,7 @@ header.content-header.js-content-header
|
|
15
16
|
|
16
17
|
.content-header-buttons
|
17
18
|
- if csv && @items.present?
|
18
|
-
a.button href="#{@index_path}.csv"
|
19
|
+
a.button href="#{@index_path}.csv" = export_text
|
19
20
|
|
20
21
|
- if new_button
|
21
22
|
- if nested
|
@@ -9,10 +9,9 @@ ruby:
|
|
9
9
|
|
10
10
|
# optional locals
|
11
11
|
assoc_name ||= assoc.to_s # 'restaurant_bars'
|
12
|
-
#
|
13
|
-
|
14
|
-
|
15
|
-
add_button_text ||= "Add #{title.singularize}"
|
12
|
+
title ||= assoc_name.titleize # 'Restaurant Bars'
|
13
|
+
add_button_text ||= t('fae.common.add', title: title.singularize)
|
14
|
+
hide_add_button ||= false
|
16
15
|
ordered ||= false
|
17
16
|
has_thumb ||= false
|
18
17
|
edit_column ||= false
|
@@ -35,7 +34,7 @@ ruby:
|
|
35
34
|
new_path += "item_id=#{parent_item.id}&=item_class=#{parent_item.class.to_s}"
|
36
35
|
end
|
37
36
|
|
38
|
-
options_for_table = { index: index, assoc: assoc, assoc_name: assoc_name, title: title,
|
37
|
+
options_for_table = { index: index, assoc: assoc, assoc_name: assoc_name, title: title, add_button_text: add_button_text, hide_add_button: hide_add_button, ordered: ordered, has_thumb: has_thumb, edit_column: edit_column, cols: cols, assoc_name_singular: assoc_name_singular, new_path: new_path, edit_path: edit_path }
|
39
38
|
options_for_table[:parent_item] = parent_item unless index
|
40
39
|
|
41
40
|
section.addedit-form.js-addedit-form class="#{'content' if index}"
|
@@ -43,7 +42,8 @@ section.addedit-form.js-addedit-form class="#{'content' if index}"
|
|
43
42
|
== render 'fae/shared/shared_nested_table', options_for_table
|
44
43
|
|
45
44
|
- else
|
46
|
-
|
45
|
+
- unless hide_add_button
|
46
|
+
a.js-add-link.table-add-link.button.-small href=new_path = add_button_text
|
47
47
|
h2 = title
|
48
48
|
- if helper_text.present?
|
49
49
|
h6.table-helper-text = helper_text
|
@@ -1,14 +1,14 @@
|
|
1
1
|
- unless params[:action] == 'new'
|
2
2
|
.content#recent_changes
|
3
|
-
h2
|
3
|
+
h2 = t('fae.changes.recent')
|
4
4
|
section.addedit-form.js-addedit-form
|
5
5
|
table
|
6
6
|
thead
|
7
7
|
tr
|
8
|
-
th
|
9
|
-
th
|
10
|
-
th
|
11
|
-
th.-action-wide
|
8
|
+
th = t('fae.changes.user')
|
9
|
+
th = t('fae.changes.type')
|
10
|
+
th = t('fae.changes.attrs')
|
11
|
+
th.-action-wide = t('fea.changes.modified')
|
12
12
|
tbody
|
13
13
|
- if @item.try(:tracked_changes).present?
|
14
14
|
- @item.tracked_changes.each do |change|
|
@@ -19,4 +19,4 @@
|
|
19
19
|
td = fae_datetime_format(change.updated_at)
|
20
20
|
- else
|
21
21
|
tr
|
22
|
-
td colspan="4"
|
22
|
+
td colspan="4" = t('fae.changes.no_changes')
|
@@ -33,14 +33,17 @@ table class=table_class
|
|
33
33
|
= td_columns(options_for_td)
|
34
34
|
- if edit_column
|
35
35
|
td
|
36
|
-
a.js-edit-link.js-tooltip.table-action title=
|
36
|
+
a.js-edit-link.js-tooltip.table-action title=t('fae.common.edit') href=self.send(edit_path, item)
|
37
37
|
i.icon-edit
|
38
38
|
td = fae_delete_button item, "/#{fae_path}/#{assoc_name}/#{item.id.to_s}", class: 'js-tooltip table-action js-delete-link', remote: true
|
39
39
|
|
40
|
-
-
|
40
|
+
- elsif !hide_add_button
|
41
41
|
tr
|
42
42
|
- td_link = link_to 'add some', new_path, class: 'js-add-link'
|
43
43
|
|
44
44
|
td colspan=colspan.to_s No #{title} yet, #{td_link}.
|
45
|
+
- else
|
46
|
+
tr
|
47
|
+
td colspan=colspan.to_s No #{title} yet.
|
45
48
|
|
46
49
|
.js-addedit-form-wrapper
|
@@ -1,10 +1,10 @@
|
|
1
|
-
== render 'fae/shared/index_header', title: '
|
1
|
+
== render 'fae/shared/index_header', title: t('fae.page.title'), breadcrumbs: false, new_button: false
|
2
2
|
|
3
3
|
main.content
|
4
4
|
table.js-sort-column
|
5
5
|
thead
|
6
6
|
tr
|
7
|
-
th
|
7
|
+
th = t('fae.common.name')
|
8
8
|
th.-action-wide Modified
|
9
9
|
tbody
|
10
10
|
- @items.each do |item|
|