Refactor the title locale display

This commit is contained in:
Bernie Chiu 2013-12-31 14:08:42 +08:00 committed by saurabhbhatia
parent 291a16585b
commit db86d5248f
1 changed files with 4 additions and 14 deletions

View File

@ -24,13 +24,8 @@
</div>
</div>
<div class="btn-group" data-toggle="buttons-radio">
<% 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 %>
<a class="btn change-title active" href="${'#'+_title_translations[2]+'_<%= @primary_locale %>'}" data-toggle="tab"><%= I18nVariable.from_locale(@primary_locale) %></a>
<a class="btn change-title" href="${'#'+_title_translations[2]+'_<%= @secondary_locale %>'}" data-toggle="tab"><%= I18nVariable.from_locale(@secondary_locale) %></a>
</div>
</div>
</div>
@ -40,13 +35,8 @@
<div class="controls">
<div class="tab-content textarea-lang">
<div class="btn-group" data-toggle="buttons-radio">
<% 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 %>
<a class="btn active" href="${'#'+_description_translations[2]+'_<%= @primary_locale %>'}" data-toggle="tab"><%= I18nVariable.from_locale(@primary_locale) %></a>
<a class="btn" href="${'#'+_description_translations[2]+'_<%= @secondary_locale %>'}" data-toggle="tab"><%= I18nVariable.from_locale(@secondary_locale) %></a>
</div>
<div class="tab-pane fade active in" id="${_description_translations[2]+'_<%= @primary_locale %>'}">
<textarea class="resizable" id="${_description_translations[0]+'_<%= @primary_locale %>'}" name="${_description_translations[1]+'[<%= @primary_locale %>]'}" rows="3">${_description_translations[3].<%= @primary_locale %>}</textarea>