Skip to content

Commit

Permalink
Update _sidebar.html.erb for tab display (#2134)
Browse files Browse the repository at this point in the history
* Update _sidebar.html.erb

* Update I18n_test.rb
  • Loading branch information
jywarren authored Jan 26, 2018
1 parent 6f9c63b commit 130d6f8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 37 deletions.
27 changes: 4 additions & 23 deletions app/views/dashboard/_sidebar.html.erb
Original file line number Diff line number Diff line change
@@ -1,24 +1,5 @@
<br />
<br />

<ul class="nav nav-tabs">
<li class="active">
<a class="wikis-tab" href="#wiki" data-toggle="tab">
<span class="visible-xs"><i class="fa fa-book"></i></span>
<span class="hidden-xs"><%= t('dashboard._sidebar.wiki') %></span>
</a>
</li>
<li>
<a class="lists-tab" href="#lists" data-toggle="tab">
<span class="visible-xs"><i class="fa fa-comment"></i></span>
<span class="hidden-xs"><%= t('dashboard._sidebar.discussion_list') %></span>
</a>
</li>
</ul>

<div class="tab-content">

<div class="tab-pane active" id="wiki">
<%= render partial: "dashboard/wiki", locals: { wikis: @wikis } %>
</div>

</div>
<div id="wiki">
<%= render partial: "dashboard/wiki", locals: { wikis: @wikis } %>
</div>
14 changes: 0 additions & 14 deletions test/integration/I18n_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -147,20 +147,6 @@ class I18nTest < ActionDispatch::IntegrationTest
end
end

test 'should choose i18n for dashboard/_sidebar' do
available_testing_locales.each do |lang|
get '/change_locale/' + lang.to_s
follow_redirect!
post '/user_sessions', user_session: {
username: users(:jeff).username,
password: 'secretive'
}
follow_redirect!
get '/dashboard'
assert_select 'span', I18n.t('dashboard._sidebar.wiki')
end
end

test 'should choose i18n for dashboard/_wiki' do
available_testing_locales.each do |lang|
get '/change_locale/' + lang.to_s
Expand Down

0 comments on commit 130d6f8

Please sign in to comment.