Fix default tab sync with current language setting

This commit is contained in:
Bernie Chiu 2013-12-20 12:43:17 +08:00 committed by saurabhbhatia
parent fad2ea22e2
commit f27784d020
1 changed files with 14 additions and 4 deletions

View File

@ -23,8 +23,13 @@
</div>
</div>
<div class="btn-group" data-toggle="buttons-radio">
<a class="btn change-title active" href="${'#'+_title_translations[2]+'_en'}" data-toggle="tab"><%= I18nVariable.from_locale('en') %></a>
<a class="btn change-title" href="${'#'+_title_translations[2]+'_zh_tw'}" data-toggle="tab"><%= I18nVariable.from_locale('zh_tw') %></a>
<% if I18n.locale == :zh_tw %>
<a class="btn change-title active" href="${'#'+_title_translations[2]+'_zh_tw'}" data-toggle="tab"><%= I18nVariable.from_locale('zh_tw') %></a>
<a class="btn change-title" href="${'#'+_title_translations[2]+'_en'}" data-toggle="tab"><%= I18nVariable.from_locale('en') %></a>
<% else %>
<a class="btn change-title active" href="${'#'+_title_translations[2]+'_en'}" data-toggle="tab"><%= I18nVariable.from_locale('en') %></a>
<a class="btn change-title" href="${'#'+_title_translations[2]+'_zh_tw'}" data-toggle="tab"><%= I18nVariable.from_locale('zh_tw') %></a>
<% end %>
</div>
</div>
</div>
@ -34,8 +39,13 @@
<div class="controls">
<div class="tab-content textarea-lang">
<div class="btn-group" data-toggle="buttons-radio">
<a class="btn active" href="${'#'+_description_translations[2]+'_en'}" data-toggle="tab"><%= I18nVariable.from_locale('en') %></a>
<a class="btn" href="${'#'+_description_translations[2]+'_zh_tw'}" data-toggle="tab"><%= I18nVariable.from_locale('zh_tw') %></a>
<% if I18n.locale == :zh_tw %>
<a class="btn active" href="${'#'+_description_translations[2]+'_zh_tw'}" data-toggle="tab"><%= I18nVariable.from_locale('zh_tw') %></a>
<a class="btn" href="${'#'+_description_translations[2]+'_en'}" data-toggle="tab"><%= I18nVariable.from_locale('en') %></a>
<% else %>
<a class="btn active" href="${'#'+_description_translations[2]+'_en'}" data-toggle="tab"><%= I18nVariable.from_locale('en') %></a>
<a class="btn" href="${'#'+_description_translations[2]+'_zh_tw'}" data-toggle="tab"><%= I18nVariable.from_locale('zh_tw') %></a>
<% end %>
</div>
<div class="tab-pane fade active in" id="${_description_translations[2]+'_en'}">
<textarea class="resizable" id="${_description_translations[0]+'_en'}" name="${_description_translations[1]+'[en]'}" rows="3">${_description_translations[3].en}</textarea>