Refactorings
- Cleanup Translatable module (`translation_params` method too large) - Move globalize_helpers partial to admin folder - Use any class for method translation_params - Helpers in `GlobalizeHelpers` make sure all are in use and see if they can be more legible - Review js name clases and methods see if they can be more legible - Refactor milestone views into partials with nice spacing between attributes
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<div>
|
||||
<%= render "budgets/investments/milestones/globalize_locales" %>
|
||||
<%= render "globalize_locales" %>
|
||||
</div>
|
||||
|
||||
<%= form_for [:admin, @investment.budget, @investment, @milestone] do |f| %>
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
<% I18n.available_locales.each do |locale| %>
|
||||
<span>
|
||||
<%= link_to name_for_locale(locale), "#",
|
||||
style: css_to_display_translation?(@milestone, locale),
|
||||
class: "js-globalize-locale-link #{highlight_current?(locale)}",
|
||||
data: { locale: neutral_locale(locale) },
|
||||
remote: true %>
|
||||
<%= link_to t("admin.milestones.form.remove_language"), "#",
|
||||
id: "delete-#{neutral_locale(locale)}",
|
||||
style: show_delete?(locale),
|
||||
class: 'float-right delete-language',
|
||||
data: { locale: neutral_locale(locale) } %>
|
||||
</span>
|
||||
<% end %>
|
||||
|
||||
<%= select_tag :translation_locale,
|
||||
options_for_locale_select,
|
||||
prompt: t("admin.milestones.form.add_language"),
|
||||
class: "js-globalize-locale" %>
|
||||
Reference in New Issue
Block a user