2014-02-17 18:05:39 +01:00
|
|
|
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
|
|
|
|
<div class="container">
|
|
|
|
<div class="navbar-header">
|
|
|
|
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
|
|
|
<span class="sr-only">Toggle navigation</span>
|
|
|
|
<span class="icon-bar"></span>
|
|
|
|
<span class="icon-bar"></span>
|
|
|
|
<span class="icon-bar"></span>
|
|
|
|
</button>
|
|
|
|
<%= link_to root_path do %>
|
|
|
|
<%= image_tag 'thingspeak_logo.png', :size => '190x50', :style => 'padding: 0 8px;' %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
<div class="navbar-collapse collapse">
|
|
|
|
<ul class="nav navbar-nav">
|
|
|
|
|
|
|
|
<% if current_user %>
|
|
|
|
|
|
|
|
<li class="<%= "active " if @menu == 'channels' %>dropdown">
|
|
|
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><%=t(:channels)%> <b class="caret"></b></a>
|
|
|
|
<ul class="dropdown-menu">
|
|
|
|
<li><%= link_to t(:channels_my), channels_path %></li>
|
|
|
|
<li><%= link_to t(:watched_channels), watched_channels_path %></li>
|
|
|
|
<li><%= link_to t(:channels_public), public_channels_path %></li>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
<li <%= "class=active" if @menu == 'plugins' %>><%= link_to t(:plugins), plugins_path %></li>
|
|
|
|
<li class="<%= "active " if @menu == 'account' %>dropdown">
|
|
|
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><%=t(:account)%> <b class="caret"></b></a>
|
|
|
|
<ul class="dropdown-menu">
|
|
|
|
<li><%= link_to t(:myaccount), account_path %></li>
|
|
|
|
<li><%= link_to t(:account_edit), edit_account_path %></li>
|
|
|
|
<li><%= link_to t(:public_profile), user_profile_path(current_user.login) %></li>
|
|
|
|
<li><%= link_to t(:profile_edit), edit_profile_path %></li>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<% else %>
|
|
|
|
<li <%= "class=active" if @menu == 'channels' %>><%= link_to t(:channels), public_channels_path %></li>
|
|
|
|
<li <%= "class=active" if @menu == 'features' %>><%= link_to t(:features), features_pages_path %></li>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
</ul>
|
|
|
|
<ul class="nav navbar-nav navbar-right">
|
|
|
|
|
|
|
|
<li class="dropdown">
|
|
|
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><%=t(:support)%> <b class="caret"></b></a>
|
|
|
|
<ul class="dropdown-menu">
|
|
|
|
<li><a href="http://community.thingspeak.com/documentation/"><%= t(:documentation) %></a></li>
|
|
|
|
<li><a href="http://community.thingspeak.com/tutorials/"><%= t(:tutorials) %></a></li>
|
|
|
|
<li><a href="http://community.thingspeak.com/forum/"><%= t(:forum) %></a></li>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li><a href="http://community.thingspeak.com/"><%= t(:blog)%></a></li>
|
|
|
|
|
|
|
|
<% if current_user %>
|
|
|
|
<li><%= link_to t(:signout), logout_path %></li>
|
|
|
|
<% else %>
|
|
|
|
<li><%= link_to t(:signin), login_path %></li>
|
|
|
|
<li><%= link_to t(:signup), new_account_path %></li>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
</ul>
|
|
|
|
</div><!--/.nav-collapse -->
|
|
|
|
</div>
|
2011-03-27 22:56:15 +02:00
|
|
|
</div>
|
|
|
|
|