updates from production: fix user.time_zone, precompile assets
This commit is contained in:
parent
85056c9d17
commit
cc7114f37e
@ -27,6 +27,7 @@ body { padding-top: 70px; }
|
||||
.col-pad { padding: 0 15px; }
|
||||
.dismiss { float: right; cursor: pointer; position: relative; top: -12px; left: 7px; }
|
||||
.link-no-hover:hover { text-decoration: none; }
|
||||
.timecontrol-time { width: 65px; margin-right: 20px; text-align: right; display: inline-block; }
|
||||
|
||||
/* contact form */
|
||||
#contact_form { display: none; }
|
||||
|
@ -319,7 +319,7 @@ class ApplicationController < ActionController::Base
|
||||
elsif params[:offset].present?
|
||||
Time.zone = set_timezone_from_offset(params[:offset])
|
||||
elsif current_user.present?
|
||||
Time.zone = current_user.time_zone
|
||||
Time.zone = current_user.time_zone_or_utc
|
||||
else
|
||||
Time.zone = 'UTC'
|
||||
end
|
||||
|
@ -23,6 +23,7 @@ class DocsController < ApplicationController
|
||||
|
||||
def errors; ; end
|
||||
def tweetcontrol; ; end
|
||||
def timecontrol; ; end
|
||||
def plugins; ; end
|
||||
def importer; ; end
|
||||
def charts; ; end
|
||||
|
@ -56,6 +56,9 @@ class User < ActiveRecord::Base
|
||||
cattr_reader :per_page
|
||||
@@per_page = 50
|
||||
|
||||
# get the user's time zone or UTC time
|
||||
def time_zone_or_utc; time_zone || 'UTC'; end
|
||||
|
||||
# true if the user has used the maximum number of available timecontrols
|
||||
def max_timecontrols?
|
||||
self.timecontrols.roots.count >= Timecontrol::MAX_PER_USER
|
||||
|
@ -45,15 +45,13 @@
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<% if current_admin_user.present? %>
|
||||
<div class="apps">
|
||||
<%= link_to timecontrols_path do %>
|
||||
<%= image_tag 'timecontrol.png', :size => '104x104' %>
|
||||
<br>
|
||||
<%= t(:timecontrol) %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="apps">
|
||||
<%= link_to timecontrols_path do %>
|
||||
<%= image_tag 'timecontrol.png', :size => '104x104' %>
|
||||
<br>
|
||||
<%= t(:timecontrol) %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -10,7 +10,7 @@ To update a Channel feed, send an HTTP GET or POST to<br>
|
||||
<br><br>
|
||||
Valid parameters:
|
||||
<ul>
|
||||
<li><b>api_key</b> (string) - Write API Key for this specific Channel (required). The Write API Key can optionally be sent via an X-THINGSPEAKAPIKEY HTTP header.</li>
|
||||
<li><b>api_key</b> (string) - Write API Key for this specific Channel (required). The Write API Key can optionally be sent via a <%= HTTP_HEADER_API_KEY_NAME %> HTTP header.</li>
|
||||
<li><b>field1</b> (string) - Field 1 data (optional)</li>
|
||||
<li><b>field2</b> (string) - Field 2 data (optional)</li>
|
||||
<li><b>field3</b> (string) - Field 3 data (optional)</li>
|
||||
|
@ -16,7 +16,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td><%= t(:time_zone) %></td>
|
||||
<td><%= @user.time_zone %></td>
|
||||
<td><%= @user.time_zone_or_utc %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><%= t(:api_key) %></td>
|
||||
|
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user