polish the content_locale picker + does not display the picker if less than 2 locales
This commit is contained in:
parent
0489bbe4c2
commit
d191d2d783
app
assets/stylesheets/locomotive
cells/locomotive
views/locomotive/shared/actions
doc
@ -29,7 +29,7 @@
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
|
||||
margin-right: 4px;
|
||||
margin-right: 7px;
|
||||
}
|
||||
|
||||
span.text {
|
||||
|
@ -4,7 +4,7 @@ class Locomotive::ContentLocalePickerCell < Cell::Base
|
||||
site = args[:site]
|
||||
locale = args[:locale].to_s
|
||||
|
||||
logger.debug "site.locales = #{site.locales.inspect}"
|
||||
logger.debug "site.locales = #{site.locales.inspect} / #{site.locales.size}"
|
||||
|
||||
if site.locales.empty? || site.locales.size < 2
|
||||
''
|
||||
|
@ -2,11 +2,12 @@
|
||||
.action
|
||||
= link_to content_tag(:em) + content_tag(:span, t('locomotive.content_types.index.new')), new_content_type_url, :class => 'button'
|
||||
|
||||
.action
|
||||
= link_to '#', :id => 'content-locale-picker-link', :class => 'button' do
|
||||
%span.hand
|
||||
|
||||
- if current_site.locales.size > 1
|
||||
.action
|
||||
= link_to '#', :id => 'content-locale-picker-link', :class => 'button' do
|
||||
%span.hand
|
||||
|
||||
|
||||
= image_tag "locomotive/icons/flags/#{current_content_locale}.png", :class => 'flag'
|
||||
= image_tag "locomotive/icons/flags/#{current_content_locale}.png", :class => 'flag'
|
||||
|
||||
%span.text= current_content_locale
|
||||
%span.text= current_content_locale
|
7
doc/TODO
7
doc/TODO
@ -68,8 +68,13 @@ x edit my site
|
||||
- custom_fields: use the appropriate icon to drag select options
|
||||
- i18n
|
||||
x add locales a site responds to
|
||||
- locale switcher
|
||||
x locale switcher
|
||||
- back to default locale (if changed in settings)
|
||||
- front
|
||||
- inline editor
|
||||
- remove inline-editor tag
|
||||
- rack
|
||||
- iframe
|
||||
|
||||
- disallow to click twice on the submit form button (spinner ?)
|
||||
- message to notify people if their browser is too old
|
||||
|
Loading…
Reference in New Issue
Block a user