Fix deleting widgets
[shapado:shapado.git] / app / views / widgets / _about_settings.html.haml
1 - langs = current_group.languages.sort
2 - default_lang = langs.delete(current_group.language) || current_group.language
3 - default_lang = "en" if default_lang.blank?
4
5 .field
6   = label :content, t('widgets.settings.content'), :class => "label"
7   = label "settings[content[#{default_lang}]]", language_desc(default_lang), :class => "label"
8   = text_field_tag "settings[content[#{default_lang}]]", ((widget.settings||{})["content"]||{})[default_lang]||current_group.description, :class => "text_field"
9   .lang-fields
10     %ul
11       -langs.each do |lang|
12         %li
13           =link_to lang, "#content-#{lang}", :title => language_desc(lang)
14     -langs.each do |lang|
15       %div{:id => "content-#{lang}"}
16         =text_area_tag "settings[content[#{lang}]]", ((widget.settings||{})["content"]||{})[lang], :class => "text_field"
17
18 = render :partial => "shared/external_widget_settings", :locals => {:widget => widget}