update with changes from Production branch
This commit is contained in:
20
app/views/layouts/_footer.html.erb
Normal file
20
app/views/layouts/_footer.html.erb
Normal file
@ -0,0 +1,20 @@
|
||||
<div id="footer">
|
||||
<div class="container">
|
||||
<p class="text-muted">
|
||||
|
||||
<span class="pull-left">
|
||||
<a href="http://www.thingspeak.com/" title="Open Source Internet of Things">ThingSpeak.com</a> |
|
||||
<a href="http://community.thingspeak.com/" title="The ThingSpeak Blog covering the web of things">Blog</a> |
|
||||
<a href="http://community.thingspeak.com/forum/" title="Open discussion forum for ThingSpeak">Forum</a> |
|
||||
<a href="http://community.thingspeak.com/documentation/" title="ThingSpeak Documentation">Documentation</a> |
|
||||
<a href="http://community.thingspeak.com/tutorials/" title="Tutorials on how to use ThingSpeak web services">Tutorials</a> |
|
||||
<a href="http://feeds.feedburner.com/internetofthings" title="Internet of Things RSS Feed" target="_blank">RSS Feed</a>
|
||||
</span>
|
||||
<span class="hidden-phone pull-right">
|
||||
©<%= Time.now.year %> <a href="https://thingspeak.com" title="Open Source Internet of Things">ThingSpeak</a> - Powered by <a href="http://www.iobridge.com" target="_blank">ioBridge</a>
|
||||
</span>
|
||||
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
12
app/views/layouts/_ga.html.erb
Normal file
12
app/views/layouts/_ga.html.erb
Normal file
@ -0,0 +1,12 @@
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-20107670-1']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
|
@ -1,12 +1,68 @@
|
||||
<div id="options">
|
||||
<% if current_user %>
|
||||
<span class="action"> <%= link_to t(:signout), logout_path, :method => 'delete' %></span>
|
||||
<% else %>
|
||||
<span class="action">
|
||||
<%= link_to t(:signup), new_user_path %>
|
||||
</span>
|
||||
<span class="action"> <%= link_to t(:signin), login_path %></span>
|
||||
<% end %>
|
||||
<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>
|
||||
</div>
|
||||
|
||||
<div id="logo"><%= link_to t(:application_name), root_path %></div>
|
||||
|
@ -1,16 +1,34 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title><%= @title.nil? ? (@menu.nil? ? t(:application_name) : @menu.capitalize + ' - ' + t(:application_name)) : @title + ' - ' + t(:application_name) %></title>
|
||||
<%= stylesheet_link_tag "application" %>
|
||||
<%= javascript_include_tag "application" %>
|
||||
<%= csrf_meta_tag %>
|
||||
</head>
|
||||
<body>
|
||||
<div id="wrapper">
|
||||
<div id="header"><div class="fixedwidth"><%= render 'layouts/header' %></div></div>
|
||||
<div id="menuwrap" class="fixedwidth"><%= render 'layouts/menu' %></div>
|
||||
<div id="content" class="fixedwidth"><%= yield %></div>
|
||||
</div>
|
||||
</body>
|
||||
<head>
|
||||
<title><%= @title.nil? ? (@menu.nil? ? 'ThingSpeak' : @menu.capitalize + ' - ThingSpeak') : @title + ' - ThingSpeak' %></title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<%= stylesheet_link_tag 'application' %>
|
||||
|
||||
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
|
||||
<script type='text/javascript' src="//netdna.bootstrapcdn.com/bootstrap/3.1.0/js/bootstrap.min.js"></script>
|
||||
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jqueryui/1.9.1/jquery-ui.min.js"></script>
|
||||
<%= javascript_include_tag 'application' %>
|
||||
|
||||
<%= csrf_meta_tag %>
|
||||
<% if Rails.env == 'production' %>
|
||||
<%= render 'layouts/ga' %>
|
||||
<% end %>
|
||||
|
||||
<%= yield :head %>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="wrap">
|
||||
<%= render 'layouts/header' %>
|
||||
<div class="container">
|
||||
<%= yield %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= render 'layouts/footer' %>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
Reference in New Issue
Block a user