fluxbit_view_components 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +10 -0
- data/app/assets/javascripts/fluxbit_view_components/assigner_controller.js +49 -0
- data/app/assets/javascripts/fluxbit_view_components/auto_submit_controller.js +39 -0
- data/app/assets/javascripts/fluxbit_view_components/drawer_controller.js +135 -0
- data/app/assets/javascripts/fluxbit_view_components/index.js +56 -0
- data/app/assets/javascripts/fluxbit_view_components/method_link_controller.js +143 -0
- data/app/assets/javascripts/fluxbit_view_components/modal_controller.js +118 -0
- data/app/assets/javascripts/fluxbit_view_components/password_controller.js +170 -0
- data/app/assets/javascripts/fluxbit_view_components/progress_controller.js +374 -0
- data/app/assets/javascripts/fluxbit_view_components/row_click_controller.js +32 -0
- data/app/assets/javascripts/fluxbit_view_components/select_all_controller.js +122 -0
- data/app/assets/javascripts/fluxbit_view_components/spinner_percent_controller.js +174 -0
- data/app/assets/javascripts/fluxbit_view_components/theme_button_controller.js +90 -0
- data/app/assets/javascripts/fluxbit_view_components.js +1175 -0
- data/app/components/fluxbit/accordion_component.rb +125 -0
- data/app/components/fluxbit/alert_component.rb +8 -8
- data/app/components/fluxbit/avatar_component.rb +11 -12
- data/app/components/fluxbit/avatar_group_component.rb +1 -1
- data/app/components/fluxbit/badge_component.rb +8 -7
- data/app/components/fluxbit/banner_component.rb +139 -0
- data/app/components/fluxbit/bottom_navigation_component.rb +437 -0
- data/app/components/fluxbit/breadcrumb_component.rb +66 -0
- data/app/components/fluxbit/button_component.rb +39 -11
- data/app/components/fluxbit/button_group_component.rb +1 -1
- data/app/components/fluxbit/card_component.rb +26 -23
- data/app/components/fluxbit/carousel_component.rb +154 -0
- data/app/components/fluxbit/component.rb +24 -3
- data/app/components/fluxbit/drawer_component.html.erb +30 -0
- data/app/components/fluxbit/drawer_component.rb +125 -0
- data/app/components/fluxbit/dropdown_component.rb +41 -0
- data/app/components/fluxbit/dropdown_item_component.rb +68 -0
- data/app/components/fluxbit/flex_component.rb +1 -1
- data/app/components/fluxbit/form/component.rb +15 -8
- data/app/components/fluxbit/form/dropzone_component.rb +3 -3
- data/app/components/fluxbit/form/field_component.rb +4 -2
- data/app/components/fluxbit/form/help_text_component.rb +1 -1
- data/app/components/fluxbit/form/label_component.rb +10 -3
- data/app/components/fluxbit/form/password_component.rb +247 -0
- data/app/components/fluxbit/form/radio_group_button_component.rb +126 -0
- data/app/components/fluxbit/form/select_component.rb +108 -11
- data/app/components/fluxbit/form/text_field_component.rb +40 -23
- data/app/components/fluxbit/form/toggle_component.rb +2 -2
- data/app/components/fluxbit/form/upload_image_component.html.erb +3 -3
- data/app/components/fluxbit/form/upload_image_component.rb +12 -1
- data/app/components/fluxbit/gravatar_component.rb +7 -0
- data/app/components/fluxbit/icon_helpers.rb +167 -0
- data/app/components/fluxbit/link_component.rb +42 -0
- data/app/components/fluxbit/modal_component.rb +28 -31
- data/app/components/fluxbit/pagination_component.rb +206 -0
- data/app/components/fluxbit/popover_component.rb +14 -14
- data/app/components/fluxbit/progress_component.rb +196 -0
- data/app/components/fluxbit/skeleton_component.rb +237 -0
- data/app/components/fluxbit/speed_dial_action_component.html.erb +30 -0
- data/app/components/fluxbit/speed_dial_action_component.rb +59 -0
- data/app/components/fluxbit/speed_dial_component.html.erb +33 -0
- data/app/components/fluxbit/speed_dial_component.rb +73 -0
- data/app/components/fluxbit/spinner_component.rb +71 -0
- data/app/components/fluxbit/spinner_percent_component.rb +174 -0
- data/app/components/fluxbit/stepper_component.rb +223 -0
- data/app/components/fluxbit/tab_component.rb +44 -25
- data/app/components/fluxbit/table_component.rb +186 -0
- data/app/components/fluxbit/table_group_component.rb +28 -0
- data/app/components/fluxbit/theme_button_component.rb +64 -0
- data/app/components/fluxbit/timeline_component.rb +63 -0
- data/app/components/fluxbit/timeline_item_component.html.erb +64 -0
- data/app/components/fluxbit/timeline_item_component.rb +78 -0
- data/app/components/fluxbit/tooltip_component.rb +2 -2
- data/app/helpers/fluxbit/components_helper.rb +74 -4
- data/app/helpers/fluxbit/form_builder.rb +64 -15
- data/app/helpers/fluxbit/view_helper.rb +71 -0
- data/config/locales/en.yml +37 -4
- data/config/locales/pt-BR.yml +36 -0
- data/lib/fluxbit/config/accordion_component.rb +73 -0
- data/lib/fluxbit/config/avatar_component.rb +11 -11
- data/lib/fluxbit/config/badge_component.rb +14 -11
- data/lib/fluxbit/config/banner_component.rb +60 -0
- data/lib/fluxbit/config/bottom_navigation_component.rb +74 -0
- data/lib/fluxbit/config/breadcrumb_component.rb +24 -0
- data/lib/fluxbit/config/button_component.rb +6 -4
- data/lib/fluxbit/config/card_component.rb +23 -12
- data/lib/fluxbit/config/carousel_component.rb +33 -0
- data/lib/fluxbit/config/drawer_component.rb +48 -0
- data/lib/fluxbit/config/dropdown_component.rb +29 -0
- data/lib/fluxbit/config/form/check_box_component.rb +1 -1
- data/lib/fluxbit/config/form/dropzone_component.rb +1 -1
- data/lib/fluxbit/config/form/help_text_component.rb +1 -1
- data/lib/fluxbit/config/form/label_component.rb +3 -2
- data/lib/fluxbit/config/form/password_component.rb +19 -0
- data/lib/fluxbit/config/form/radio_group_button_component.rb +24 -0
- data/lib/fluxbit/config/form/text_field_component.rb +11 -11
- data/lib/fluxbit/config/form/toggle_component.rb +5 -5
- data/lib/fluxbit/config/link_component.rb +24 -0
- data/lib/fluxbit/config/modal_component.rb +1 -1
- data/lib/fluxbit/config/pagination_component.rb +31 -0
- data/lib/fluxbit/config/popover_component.rb +1 -1
- data/lib/fluxbit/config/progress_component.rb +63 -0
- data/lib/fluxbit/config/skeleton_component.rb +82 -0
- data/lib/fluxbit/config/speed_dial_component.rb +50 -0
- data/lib/fluxbit/config/spinner_component.rb +30 -0
- data/lib/fluxbit/config/spinner_percent_component.rb +61 -0
- data/lib/fluxbit/config/stepper_component.rb +299 -0
- data/lib/fluxbit/config/tab_component.rb +6 -0
- data/lib/fluxbit/config/table_component.rb +75 -0
- data/lib/fluxbit/config/theme_button_component.rb +19 -0
- data/lib/fluxbit/config/timeline_component.rb +77 -0
- data/lib/fluxbit/view_components/engine.rb +11 -3
- data/lib/fluxbit/view_components/version.rb +1 -1
- data/lib/fluxbit/view_components.rb +20 -0
- data/lib/generators/fluxbit/devise_views_generator.rb +116 -0
- data/lib/generators/fluxbit/pagy_generator.rb +39 -0
- data/lib/generators/fluxbit/scaffold_generator.rb +165 -0
- data/lib/generators/fluxbit/templates/_alert.html.erb.tt +1 -0
- data/lib/generators/fluxbit/templates/_flash.html.erb.tt +15 -0
- data/lib/generators/fluxbit/templates/_form.html.erb.tt +38 -0
- data/lib/generators/fluxbit/templates/_metadata.html.erb.tt +44 -0
- data/lib/generators/fluxbit/templates/controller.rb.tt +406 -0
- data/lib/generators/fluxbit/templates/create.turbo_stream.erb.tt +7 -0
- data/lib/generators/fluxbit/templates/destroy.turbo_stream.erb.tt +3 -0
- data/lib/generators/fluxbit/templates/destroy_all.turbo_stream.erb.tt +9 -0
- data/lib/generators/fluxbit/templates/devise_views/confirmations/new.html.erb +11 -0
- data/lib/generators/fluxbit/templates/devise_views/layouts/devise.html.erb +64 -0
- data/lib/generators/fluxbit/templates/devise_views/mailer/confirmation_instructions.html.erb +5 -0
- data/lib/generators/fluxbit/templates/devise_views/mailer/email_changed.html.erb +7 -0
- data/lib/generators/fluxbit/templates/devise_views/mailer/password_changed.html.erb +3 -0
- data/lib/generators/fluxbit/templates/devise_views/mailer/reset_password_instructions.html.erb +8 -0
- data/lib/generators/fluxbit/templates/devise_views/mailer/unlock_instructions.html.erb +7 -0
- data/lib/generators/fluxbit/templates/devise_views/passwords/edit.html.erb +29 -0
- data/lib/generators/fluxbit/templates/devise_views/passwords/new.html.erb +11 -0
- data/lib/generators/fluxbit/templates/devise_views/registrations/edit.html.erb +43 -0
- data/lib/generators/fluxbit/templates/devise_views/registrations/new.html.erb +34 -0
- data/lib/generators/fluxbit/templates/devise_views/sessions/new.html.erb +15 -0
- data/lib/generators/fluxbit/templates/devise_views/shared/_error_messages.html.erb +14 -0
- data/lib/generators/fluxbit/templates/devise_views/shared/_links.html.erb +25 -0
- data/lib/generators/fluxbit/templates/devise_views/unlocks/new.html.erb +11 -0
- data/lib/generators/fluxbit/templates/edit.html.erb.tt +47 -0
- data/lib/generators/fluxbit/templates/fluxbit_pagy.css +27 -0
- data/lib/generators/fluxbit/templates/i18n.en.yml.tt +121 -0
- data/lib/generators/fluxbit/templates/i18n.pt-BR.yml.tt +121 -0
- data/lib/generators/fluxbit/templates/index.html.erb.tt +254 -0
- data/lib/generators/fluxbit/templates/index.json.jbuilder.tt +33 -0
- data/lib/generators/fluxbit/templates/new.html.erb.tt +47 -0
- data/lib/generators/fluxbit/templates/partial.html.erb.tt +61 -0
- data/lib/generators/fluxbit/templates/policy.rb.tt +36 -0
- data/lib/generators/fluxbit/templates/send_alert_via_drawer.erb.tt +10 -0
- data/lib/generators/fluxbit/templates/show.html.erb.tt +44 -0
- data/lib/generators/fluxbit/templates/show.json.jbuilder.tt +6 -0
- data/lib/generators/fluxbit/templates/update.turbo_stream.erb.tt +10 -0
- data/lib/generators/fluxbit/templates/update_all.turbo_stream.erb.tt +20 -0
- data/lib/install/install.rb +58 -0
- metadata +107 -18
- data/app/helpers/fluxbit/classes_helper.rb +0 -9
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<% content_for(:header) do %>
|
|
2
|
+
<%= fx_heading with_content: "Edit #{resource_name.to_s.humanize}", size: 2, class: "text-center mt-8" %>
|
|
3
|
+
<% end %>
|
|
4
|
+
|
|
5
|
+
<%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }, builder: Fluxbit::FormBuilder) do |f| %>
|
|
6
|
+
<%= render "devise/shared/error_messages", resource: resource %>
|
|
7
|
+
<%= f.fx_email_field :email, autofocus: true, autocomplete: "email", wrapper_html: {class: "mb-6 field"} %>
|
|
8
|
+
|
|
9
|
+
<% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
|
|
10
|
+
<div>Currently waiting confirmation for: <%= resource.unconfirmed_email %></div>
|
|
11
|
+
<% end %>
|
|
12
|
+
|
|
13
|
+
<%= f.fx_password :password, autocomplete: "new-password", wrapper_html: {class: "mb-6 field"},
|
|
14
|
+
help_text: [
|
|
15
|
+
"Leave blank if you don't want to change it",
|
|
16
|
+
@minimum_password_length ? "#{@minimum_password_length} characters minimum" : ""
|
|
17
|
+
]
|
|
18
|
+
%>
|
|
19
|
+
<%= f.fx_password :password_confirmation,
|
|
20
|
+
autocomplete: "new-password",
|
|
21
|
+
min_length: 6,
|
|
22
|
+
require_uppercase: true,
|
|
23
|
+
require_lowercase: true,
|
|
24
|
+
require_numbers: true,
|
|
25
|
+
require_special: true,
|
|
26
|
+
wrapper_html: {class: "mb-6 field"} %>
|
|
27
|
+
<%= f.fx_password :current_password,
|
|
28
|
+
autocomplete: "current-password",
|
|
29
|
+
min_length: 6,
|
|
30
|
+
require_uppercase: true,
|
|
31
|
+
require_lowercase: true,
|
|
32
|
+
require_numbers: true,
|
|
33
|
+
require_special: true,
|
|
34
|
+
wrapper_html: {class: "mb-6 field"},
|
|
35
|
+
help_text: "We need your current password to confirm your changes" %>
|
|
36
|
+
<%= f.fx_submit "Update" %>
|
|
37
|
+
<% end %>
|
|
38
|
+
|
|
39
|
+
<%= fx_heading with_content: "Cancel my account", size: 5, class: "text-center my-6", remove_class: "mb-4" %>
|
|
40
|
+
|
|
41
|
+
<div>Unhappy? <%= button_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?", turbo_confirm: "Are you sure?" }, method: :delete %></div>
|
|
42
|
+
|
|
43
|
+
<%= fx_link_to "Back", :back %>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<% content_for(:header) do %>
|
|
2
|
+
<%= fx_heading with_content: "Create your account", size: 2, class: "text-center mt-8" %>
|
|
3
|
+
<p class="mt-2 text-center text-sm text-gray-600 dark:text-gray-300">
|
|
4
|
+
Have an account already?
|
|
5
|
+
<%= link_to "Log in", new_session_path(resource_name), class: "font-medium text-indigo-600 hover:text-indigo-500" %>
|
|
6
|
+
</p>
|
|
7
|
+
<% end %>
|
|
8
|
+
|
|
9
|
+
<%= form_for(resource, as: resource_name, url: registration_path(resource_name), builder: Fluxbit::FormBuilder) do |f| %>
|
|
10
|
+
<%= render "devise/shared/error_messages", resource: resource %>
|
|
11
|
+
<%= f.fx_email_field :email, autofocus: true, autocomplete: "email", wrapper_html: {class: "mb-6 field"} %>
|
|
12
|
+
<%= f.fx_password :password,
|
|
13
|
+
autocomplete: "new-password",
|
|
14
|
+
show_strength: true,
|
|
15
|
+
min_length: 6,
|
|
16
|
+
require_uppercase: true,
|
|
17
|
+
require_lowercase: true,
|
|
18
|
+
require_numbers: true,
|
|
19
|
+
require_special: true,
|
|
20
|
+
wrapper_html: {class: "mb-6 field"},
|
|
21
|
+
help_text: @minimum_password_length ? "#{@minimum_password_length} #{t('devise.registrations.new.password_help')}" : "" %>
|
|
22
|
+
<%= f.fx_password :password_confirmation,
|
|
23
|
+
autocomplete: "new-password",
|
|
24
|
+
min_length: 6,
|
|
25
|
+
require_uppercase: true,
|
|
26
|
+
require_lowercase: true,
|
|
27
|
+
require_numbers: true,
|
|
28
|
+
require_special: true,
|
|
29
|
+
wrapper_html: {class: "mb-6 field"} %>
|
|
30
|
+
<%= f.fx_submit "Sign up" %>
|
|
31
|
+
|
|
32
|
+
<% end %>
|
|
33
|
+
|
|
34
|
+
<%= render "devise/shared/links" %>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<% content_for(:header) do %>
|
|
2
|
+
<%= fx_heading with_content: "Log in", size: 2, class: "text-center mt-8" %>
|
|
3
|
+
<% end %>
|
|
4
|
+
|
|
5
|
+
<%= form_for(resource, as: resource_name, url: session_path(resource_name), builder: Fluxbit::FormBuilder) do |f| %>
|
|
6
|
+
<%= f.fx_email_field :email, autofocus: true, autocomplete: "email", helper_popover: false, help_text: false, wrapper_html: {class: "mb-6 field"} %>
|
|
7
|
+
<%= f.fx_password :password, autocomplete: "current-password", helper_popover: false, help_text: false, wrapper_html: {class: "mb-6 field"} %>
|
|
8
|
+
|
|
9
|
+
<% if devise_mapping.rememberable? %>
|
|
10
|
+
<%= f.fx_toggle :remember_me, wrapper_html: {class: "mb-6 field"} %>
|
|
11
|
+
<% end %>
|
|
12
|
+
<%= f.fx_submit "Log in" %>
|
|
13
|
+
<% end %>
|
|
14
|
+
|
|
15
|
+
<%= render "devise/shared/links" %>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<% if resource.errors.any? %>
|
|
2
|
+
<%= fx_alert(color: :danger, 'data-turbo-cache' => "false") do %>
|
|
3
|
+
<%= I18n.t("errors.messages.not_saved",
|
|
4
|
+
count: resource.errors.count,
|
|
5
|
+
resource: resource.class.model_name.human.downcase)
|
|
6
|
+
%>
|
|
7
|
+
|
|
8
|
+
<ul>
|
|
9
|
+
<% resource.errors.full_messages.each do |message| %>
|
|
10
|
+
<li><%= message %></li>
|
|
11
|
+
<% end %>
|
|
12
|
+
</ul>
|
|
13
|
+
<% end %>
|
|
14
|
+
<% end %>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<%- if controller_name != 'sessions' %>
|
|
2
|
+
<p><%= fx_link_to "Log in", new_session_path(resource_name) %></p>
|
|
3
|
+
<% end %>
|
|
4
|
+
|
|
5
|
+
<%- if devise_mapping.registerable? && controller_name != 'registrations' %>
|
|
6
|
+
<p><%= fx_link_to "Sign up", new_registration_path(resource_name) %></p>
|
|
7
|
+
<% end %>
|
|
8
|
+
|
|
9
|
+
<%- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %>
|
|
10
|
+
<p><%= fx_link_to "Forgot your password?", new_password_path(resource_name) %></p>
|
|
11
|
+
<% end %>
|
|
12
|
+
|
|
13
|
+
<%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
|
|
14
|
+
<p><%= fx_link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) %></p>
|
|
15
|
+
<% end %>
|
|
16
|
+
|
|
17
|
+
<%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
|
|
18
|
+
<p><%= fx_link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) %></p>
|
|
19
|
+
<% end %>
|
|
20
|
+
|
|
21
|
+
<%- if devise_mapping.omniauthable? %>
|
|
22
|
+
<%- resource_class.omniauth_providers.each do |provider| %>
|
|
23
|
+
<p><%= fx_link_to "Sign in with #{OmniAuth::Utils.camelize(provider)}", omniauth_authorize_path(resource_name, provider), data: { turbo: false } %></p>
|
|
24
|
+
<% end %>
|
|
25
|
+
<% end %>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<% content_for(:header) do %>
|
|
2
|
+
<%= fx_heading with_content: "Resend unlock instructions", size: 2, class: 'text-center' %>
|
|
3
|
+
<% end %>
|
|
4
|
+
|
|
5
|
+
<%= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }, builder: Fluxbit::FormBuilder) do |f| %>
|
|
6
|
+
<%= render "devise/shared/error_messages", resource: resource %>
|
|
7
|
+
<%= f.fx_email_field :email, autofocus: true, autocomplete: "email", wrapper_html: {class: "mb-6 field"} %>
|
|
8
|
+
<%= f.fx_submit "Resend unlock instructions" %>
|
|
9
|
+
<% end %>
|
|
10
|
+
|
|
11
|
+
<%= render "devise/shared/links" %>
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<% singular = file_name.singularize; plural = file_name.pluralize -%>
|
|
2
|
+
<% if options[:ui] == "drawer" -%>
|
|
3
|
+
<% if options[:turbo] -%>
|
|
4
|
+
<%% if turbo_frame_request? %>
|
|
5
|
+
<turbo-frame id="drawer">
|
|
6
|
+
<%%= fx_drawer(id: "edit-drawer", placement: :right, sizing: :xl, data: {controller: "fx-drawer"}) do |drawer| %>
|
|
7
|
+
<%% drawer.with_header { t("<%= plural %>.titles.edit") } %>
|
|
8
|
+
<%%= render "form", <%= singular %>: @<%= singular %> %>
|
|
9
|
+
<%% end %>
|
|
10
|
+
<script>document.dispatchEvent(new CustomEvent("showDrawer:edit-drawer"));</script>
|
|
11
|
+
</turbo-frame>
|
|
12
|
+
<%% else %>
|
|
13
|
+
<%%= fx_heading(class: "m-4", size: 2) { t("<%= plural %>.titles.edit") } %>
|
|
14
|
+
<%%= fx_card(class: "m-4") do |card| %>
|
|
15
|
+
<%% card.with_section do %>
|
|
16
|
+
<%%= render "form", <%= singular %>: @<%= singular %> %>
|
|
17
|
+
<%% end %>
|
|
18
|
+
<%% end %>
|
|
19
|
+
<%% end %>
|
|
20
|
+
<% end -%>
|
|
21
|
+
<% elsif options[:ui] == "modal" -%>
|
|
22
|
+
<% if options[:turbo] -%>
|
|
23
|
+
<%% if turbo_frame_request? %>
|
|
24
|
+
<turbo-frame id="modal">
|
|
25
|
+
<%%= fx_modal(id: "edit-modal", size: :xl, data: {controller: "fx-modal"}) do |modal| %>
|
|
26
|
+
<%% modal.with_header { t("<%= plural %>.titles.edit") } %>
|
|
27
|
+
<%%= render "form", <%= singular %>: @<%= singular %> %>
|
|
28
|
+
<%% end %>
|
|
29
|
+
<script>document.dispatchEvent(new CustomEvent("showModal:edit-modal"));</script>
|
|
30
|
+
</turbo-frame>
|
|
31
|
+
<%% else %>
|
|
32
|
+
<%%= fx_heading(class: "m-4", size: 2) { t("<%= plural %>.titles.edit") } %>
|
|
33
|
+
<%%= fx_card(class: "m-4") do |card| %>
|
|
34
|
+
<%% card.with_section do %>
|
|
35
|
+
<%%= render "form", <%= singular %>: @<%= singular %> %>
|
|
36
|
+
<%% end %>
|
|
37
|
+
<%% end %>
|
|
38
|
+
<%% end %>
|
|
39
|
+
<% end -%>
|
|
40
|
+
<% else -%>
|
|
41
|
+
<%%= fx_heading(class: "m-4", size: 2) { t("<%= plural %>.titles.edit") } %>
|
|
42
|
+
<%%= fx_card(class: "m-4") do |card| %>
|
|
43
|
+
<%% card.with_section do %>
|
|
44
|
+
<%%= render "form", <%= singular %>: @<%= singular %> %>
|
|
45
|
+
<%% end %>
|
|
46
|
+
<%% end %>
|
|
47
|
+
<% end -%>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
.pagy.info {
|
|
2
|
+
@apply text-sm text-slate-600 dark:text-slate-400;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.pagy.nav {
|
|
6
|
+
@apply inline-flex -space-x-px;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.pagy.nav a {
|
|
10
|
+
@apply flex items-center justify-center px-3 h-8 leading-tight text-slate-500 bg-white border border-slate-300 hover:bg-slate-100 hover:text-slate-700 dark:bg-slate-800 dark:border-slate-700 dark:text-slate-400 dark:hover:bg-slate-700 dark:hover:text-white;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.pagy.nav a[aria-label="previous"] {
|
|
14
|
+
@apply ms-0 border-e-0 rounded-s-lg;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.pagy.nav a[aria-label="next"] {
|
|
18
|
+
@apply rounded-e-lg;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.pagy.nav a[aria-disabled="true"] {
|
|
22
|
+
@apply px-3 py-1 text-slate-400 cursor-default;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.pagy.nav a.current {
|
|
26
|
+
@apply text-blue-600 bg-blue-50 hover:bg-blue-100 hover:text-blue-700 dark:bg-slate-700 dark:border-slate-700 dark:text-white;
|
|
27
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
<% singular = file_name.singularize; plural = file_name.pluralize -%>
|
|
2
|
+
en:
|
|
3
|
+
<%= plural %>:
|
|
4
|
+
class_name:
|
|
5
|
+
one: <%= singular.titlecase %>
|
|
6
|
+
other: <%= plural.titlecase %>
|
|
7
|
+
titles:
|
|
8
|
+
index: <%= plural.titlecase %>
|
|
9
|
+
new: New <%= singular.titlecase %>
|
|
10
|
+
edit: Edit <%= singular.titlecase %>
|
|
11
|
+
show: <%= singular.titlecase %> Details
|
|
12
|
+
index_name: Index
|
|
13
|
+
fields:
|
|
14
|
+
id: Record ID
|
|
15
|
+
<% attributes.reject { |attr| attr.type == :password_digest }.each do |attr| -%>
|
|
16
|
+
<%= attr.name %><%= ['references','belongs_to'].include?(attr.type) ? '_id' : '' %>: <%= attr.name.titlecase %>
|
|
17
|
+
<% end -%>
|
|
18
|
+
created_at: Created
|
|
19
|
+
updated_at: Last Updated
|
|
20
|
+
help_text:
|
|
21
|
+
<% attributes.reject { |attr| attr.type == :password_digest }.each do |attr| -%>
|
|
22
|
+
<%= attr.name %><%= ['references','belongs_to'].include?(attr.type) ? '_id' : '' %>: Help for <%= attr.name.titlecase %>
|
|
23
|
+
<% end -%>
|
|
24
|
+
helper_popover:
|
|
25
|
+
<% attributes.reject { |attr| attr.type == :password_digest }.each do |attr| -%>
|
|
26
|
+
<%= attr.name %><%= ['references','belongs_to'].include?(attr.type) ? '_id' : '' %>: Helper Popover for <%= attr.name.titlecase %>
|
|
27
|
+
<% end -%>
|
|
28
|
+
placeholders:
|
|
29
|
+
<% attributes.reject { |attr| attr.type == :password_digest }.each do |attr| -%>
|
|
30
|
+
<%= attr.name %><%= ['references','belongs_to'].include?(attr.type) ? '_id' : '' %>: Placeholder for <%= attr.name.titlecase %>
|
|
31
|
+
<% end -%>
|
|
32
|
+
prompts:
|
|
33
|
+
<% attributes.select { |attr| ['references','belongs_to'].include?(attr.type) }.each do |attr| -%>
|
|
34
|
+
<%= attr.name %>_id: Select a <%= attr.name.titlecase %>
|
|
35
|
+
<% end -%>
|
|
36
|
+
messages:
|
|
37
|
+
not_found: "<%= singular.titlecase %> not found."
|
|
38
|
+
not_selected_for_action: "No <%= plural %> selected for action."
|
|
39
|
+
not_authorized: "You are not authorized to perform this action."
|
|
40
|
+
no_records: "No <%= plural %> found."
|
|
41
|
+
no_records_sub: "Try adjusting your search or filters."
|
|
42
|
+
create_success: "<%= singular.titlecase %> was successfully created."
|
|
43
|
+
update_success: "<%= singular.titlecase %> was successfully updated."
|
|
44
|
+
destroy_success: "<%= singular.titlecase %> was successfully destroyed."
|
|
45
|
+
destroy_failure: "Failed to delete <%= singular %>."
|
|
46
|
+
bulk_update_success:
|
|
47
|
+
one: "The <%= singular %> were successfully updated."
|
|
48
|
+
other: "%{count} <%= plural %> were successfully updated."
|
|
49
|
+
bulk_update_failure: "Failed to update some <%= plural %>. %{errors}"
|
|
50
|
+
bulk_destroy_success:
|
|
51
|
+
one: "The <%= singular %> were successfully deleted."
|
|
52
|
+
other: "%{count} <%= plural %> were successfully deleted."
|
|
53
|
+
bulk_destroy_failure: "Failed to delete some <%= plural %>. %{errors}"
|
|
54
|
+
order_error: "Invalid order parameter."
|
|
55
|
+
confirm_destroy: "Are you sure you want to delete this item?"
|
|
56
|
+
confirm_bulk_destroy: "Are you sure you want to delete <span id=\"mass-deletion-count\" data-fx-select-all-target=\"count\">0</span> item(s)?"
|
|
57
|
+
pagination_info: "Showing <b>%{start}</b> to <b>%{end}</b> of <b>%{total}</b> <%= plural %>"
|
|
58
|
+
errors_message:
|
|
59
|
+
one: "%{count} error prevented this <%= singular %> from being saved:"
|
|
60
|
+
other: "%{count} errors prevented this <%= singular %> from being saved:"
|
|
61
|
+
<% attributes
|
|
62
|
+
.select { |a| %i[boolean].include?(a.type) }
|
|
63
|
+
.each do |attr|
|
|
64
|
+
-%>
|
|
65
|
+
click_to_change<%= attr.name %>: Click to change <%= attr.name %>
|
|
66
|
+
<% end -%>
|
|
67
|
+
actions:
|
|
68
|
+
new: "New <%= singular.titlecase %>"
|
|
69
|
+
actions: "Actions (<span data-fx-select-all-target=\"count\">0</span>)"
|
|
70
|
+
edit: "Edit"
|
|
71
|
+
show: "Show"
|
|
72
|
+
back: "Back"
|
|
73
|
+
save: "Save"
|
|
74
|
+
cancel: "Cancel"
|
|
75
|
+
create: "Create"
|
|
76
|
+
update: "Update"
|
|
77
|
+
destroy: "Destroy"
|
|
78
|
+
export: "Export"
|
|
79
|
+
<% attributes
|
|
80
|
+
.select { |a| %i[boolean].include?(a.type) }
|
|
81
|
+
.each do |attr|
|
|
82
|
+
-%>
|
|
83
|
+
activate_<%= attr.name %>_selected: Activate <%= attr.name %> selected
|
|
84
|
+
deactivate_<%= attr.name %>_selected: Deactivate <%= attr.name %> selected
|
|
85
|
+
<% end -%>
|
|
86
|
+
delete_selected: "Delete Selected"
|
|
87
|
+
remove_filters: "Remove filters"
|
|
88
|
+
bulk_destroy: "Destroy Selected"
|
|
89
|
+
cancel_destroy: "No, cancel"
|
|
90
|
+
confirm_destroy: "Yes, I'm sure"
|
|
91
|
+
per_page: "%{count} per page"
|
|
92
|
+
helpers:
|
|
93
|
+
search: "Search <%= plural %>..."
|
|
94
|
+
sort: "Sort <%= plural %>..."
|
|
95
|
+
export: "Export to CSV"
|
|
96
|
+
filter: "Filter"
|
|
97
|
+
<% attributes
|
|
98
|
+
.select { |a| %i[integer decimal text string].include?(a.type) }
|
|
99
|
+
.each do |attr|
|
|
100
|
+
-%>
|
|
101
|
+
filter_<%= attr.name %>: "Filter by <%= attr.name %>"
|
|
102
|
+
<% end -%>
|
|
103
|
+
click_to_edit: "Click to edit"
|
|
104
|
+
<% attributes
|
|
105
|
+
.select { |a| %i[boolean].include?(a.type) }
|
|
106
|
+
.each do |attr|
|
|
107
|
+
-%>
|
|
108
|
+
click_to_change_<%= attr.name %>: "Click to change <%= attr.name %>"
|
|
109
|
+
<% end -%>
|
|
110
|
+
click_to_destroy_selected: "Click to destroy selected"
|
|
111
|
+
submits_with: "Saving..."
|
|
112
|
+
values:
|
|
113
|
+
no_value: "-"
|
|
114
|
+
<% attributes
|
|
115
|
+
.select { |a| %i[boolean].include?(a.type) }
|
|
116
|
+
.each do |attr|
|
|
117
|
+
-%>
|
|
118
|
+
<%= attr.name %>:
|
|
119
|
+
true: Active
|
|
120
|
+
false: Inactive
|
|
121
|
+
<% end -%>
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
<% singular = file_name.singularize; plural = file_name.pluralize -%>
|
|
2
|
+
pt-BR:
|
|
3
|
+
<%= plural %>:
|
|
4
|
+
class_name:
|
|
5
|
+
one: <%= singular.titlecase %>
|
|
6
|
+
other: <%= plural.titlecase %>
|
|
7
|
+
titles:
|
|
8
|
+
index: <%= plural.titlecase %>
|
|
9
|
+
new: Novo <%= singular.titlecase %>
|
|
10
|
+
edit: Editar <%= singular.titlecase %>
|
|
11
|
+
show: Detalhes de <%= singular.titlecase %>
|
|
12
|
+
index_name: Inicio
|
|
13
|
+
fields:
|
|
14
|
+
id: Identificador
|
|
15
|
+
<% attributes.reject { |attr| attr.type == :password_digest }.each do |attr| -%>
|
|
16
|
+
<%= attr.name %><%= ['references','belongs_to'].include?(attr.type) ? '_id' : '' %>: <%= attr.name.titlecase %>
|
|
17
|
+
<% end -%>
|
|
18
|
+
created_at: Criado em
|
|
19
|
+
updated_at: Última Atualização
|
|
20
|
+
help_text:
|
|
21
|
+
<% attributes.reject { |attr| attr.type == :password_digest }.each do |attr| -%>
|
|
22
|
+
<%= attr.name %><%= ['references','belongs_to'].include?(attr.type) ? '_id' : '' %>: Ajuda para <%= attr.name.titlecase %>
|
|
23
|
+
<% end -%>
|
|
24
|
+
helper_popover:
|
|
25
|
+
<% attributes.reject { |attr| attr.type == :password_digest }.each do |attr| -%>
|
|
26
|
+
<%= attr.name %><%= ['references','belongs_to'].include?(attr.type) ? '_id' : '' %>: Ajuda no popover para <%= attr.name.titlecase %>
|
|
27
|
+
<% end -%>
|
|
28
|
+
placeholders:
|
|
29
|
+
<% attributes.reject { |attr| attr.type == :password_digest }.each do |attr| -%>
|
|
30
|
+
<%= attr.name %><%= ['references','belongs_to'].include?(attr.type) ? '_id' : '' %>: Placeholder para <%= attr.name.titlecase %>
|
|
31
|
+
<% end -%>
|
|
32
|
+
prompts:
|
|
33
|
+
<% attributes.select { |attr| ['references','belongs_to'].include?(attr.type) }.each do |attr| -%>
|
|
34
|
+
<%= attr.name %>_id: Selecione um <%= attr.name.titlecase %>
|
|
35
|
+
<% end -%>
|
|
36
|
+
messages:
|
|
37
|
+
not_found: "<%= singular.titlecase %> não encontrado."
|
|
38
|
+
not_selected_for_action: "Nenhum <%= plural %> selecionado para ação."
|
|
39
|
+
not_authorized: "Você não está autorizado a executar esta ação."
|
|
40
|
+
no_records: "Nenhum <%= plural %> encontrados."
|
|
41
|
+
no_records_sub: "Tente ajustar a sua busca ou filtros."
|
|
42
|
+
create_success: "<%= singular.titlecase %> foi criado com sucesso."
|
|
43
|
+
update_success: "<%= singular.titlecase %> foi atualizado com sucesso."
|
|
44
|
+
destroy_success: "<%= singular.titlecase %> foi apagado com sucesso."
|
|
45
|
+
destroy_failure: "Falha ao tentar apagar um <%= singular %>."
|
|
46
|
+
bulk_update_success:
|
|
47
|
+
one: "O <%= singular %> foi atualizado com sucesso."
|
|
48
|
+
other: "%{count} <%= plural %> foram atualizados com sucesso."
|
|
49
|
+
bulk_update_failure: "Falha ao tentar atualizar alguns <%= plural %>. %{errors}"
|
|
50
|
+
bulk_destroy_success:
|
|
51
|
+
one: "O <%= singular %> foi apagado com sucesso."
|
|
52
|
+
other: "%{count} <%= plural %> foram apagados com sucesso."
|
|
53
|
+
bulk_destroy_failure: "Falha ao tentar apagar alguns <%= plural %>. %{errors}"
|
|
54
|
+
order_error: "Parâmetro de ordenamento inválido."
|
|
55
|
+
confirm_destroy: "Você tem certeza de que quer apagar este item?"
|
|
56
|
+
confirm_bulk_destroy: "Você tem certeza de que quer apagar <span id=\"mass-deletion-count\" data-fx-select-all-target=\"count\">0</span> item(s)?"
|
|
57
|
+
pagination_info: "Mostrando <b>%{start}</b> à <b>%{end}</b> de <b>%{total}</b> <%= plural %>"
|
|
58
|
+
errors_message:
|
|
59
|
+
one: "%{count} erro impediu que este <%= singular %> fosse salvo:"
|
|
60
|
+
other: "%{count} erros impediram que este <%= singular %> fosse salvo:"
|
|
61
|
+
<% attributes
|
|
62
|
+
.select { |a| %i[boolean].include?(a.type) }
|
|
63
|
+
.each do |attr|
|
|
64
|
+
-%>
|
|
65
|
+
click_to_change<%= attr.name %>: Clique para modificar <%= attr.name %>
|
|
66
|
+
<% end -%>
|
|
67
|
+
actions:
|
|
68
|
+
new: "Novo <%= singular.titlecase %>"
|
|
69
|
+
actions: "Ações (<span data-fx-select-all-target=\"count\">0</span>)"
|
|
70
|
+
edit: "Editar"
|
|
71
|
+
show: "Ver"
|
|
72
|
+
back: "Voltar"
|
|
73
|
+
save: "Salvar"
|
|
74
|
+
cancel: "Cancelar"
|
|
75
|
+
create: "Criar"
|
|
76
|
+
update: "Atualizar"
|
|
77
|
+
destroy: "Apagar"
|
|
78
|
+
export: "Exportar"
|
|
79
|
+
<% attributes
|
|
80
|
+
.select { |a| %i[boolean].include?(a.type) }
|
|
81
|
+
.each do |attr|
|
|
82
|
+
-%>
|
|
83
|
+
activate_<%= attr.name %>_selected: Ativar <%= attr.name %> selecionado
|
|
84
|
+
deactivate_<%= attr.name %>_selected: Desativar <%= attr.name %> selecionado
|
|
85
|
+
<% end -%>
|
|
86
|
+
delete_selected: "Apagar selecionado"
|
|
87
|
+
remove_filters: "Remover filtros"
|
|
88
|
+
bulk_destroy: "Apagar selecionados"
|
|
89
|
+
cancel_destroy: "Não, cancelar"
|
|
90
|
+
confirm_destroy: "Sim, Tenho certeza"
|
|
91
|
+
per_page: "%{count} por página"
|
|
92
|
+
helpers:
|
|
93
|
+
search: "Procurar <%= plural %>..."
|
|
94
|
+
sort: "Ordenar <%= plural %>..."
|
|
95
|
+
export: "Exportar para CSV"
|
|
96
|
+
filter: "Filtrar"
|
|
97
|
+
<% attributes
|
|
98
|
+
.select { |a| %i[integer decimal text string].include?(a.type) }
|
|
99
|
+
.each do |attr|
|
|
100
|
+
-%>
|
|
101
|
+
filter_<%= attr.name %>: "Filtrar por <%= attr.name %>"
|
|
102
|
+
<% end -%>
|
|
103
|
+
click_to_edit: "Clique para editar"
|
|
104
|
+
<% attributes
|
|
105
|
+
.select { |a| %i[boolean].include?(a.type) }
|
|
106
|
+
.each do |attr|
|
|
107
|
+
-%>
|
|
108
|
+
click_to_change_<%= attr.name %>: "Clique para mudar <%= attr.name %>"
|
|
109
|
+
<% end -%>
|
|
110
|
+
click_to_destroy_selected: "Clique para apagar selecionados"
|
|
111
|
+
submits_with: "Salvando..."
|
|
112
|
+
values:
|
|
113
|
+
no_value: "-"
|
|
114
|
+
<% attributes
|
|
115
|
+
.select { |a| %i[boolean].include?(a.type) }
|
|
116
|
+
.each do |attr|
|
|
117
|
+
-%>
|
|
118
|
+
<%= attr.name %>:
|
|
119
|
+
true: Ativo
|
|
120
|
+
false: Inativo
|
|
121
|
+
<% end -%>
|