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; }
|
.col-pad { padding: 0 15px; }
|
||||||
.dismiss { float: right; cursor: pointer; position: relative; top: -12px; left: 7px; }
|
.dismiss { float: right; cursor: pointer; position: relative; top: -12px; left: 7px; }
|
||||||
.link-no-hover:hover { text-decoration: none; }
|
.link-no-hover:hover { text-decoration: none; }
|
||||||
|
.timecontrol-time { width: 65px; margin-right: 20px; text-align: right; display: inline-block; }
|
||||||
|
|
||||||
/* contact form */
|
/* contact form */
|
||||||
#contact_form { display: none; }
|
#contact_form { display: none; }
|
||||||
|
@ -319,7 +319,7 @@ class ApplicationController < ActionController::Base
|
|||||||
elsif params[:offset].present?
|
elsif params[:offset].present?
|
||||||
Time.zone = set_timezone_from_offset(params[:offset])
|
Time.zone = set_timezone_from_offset(params[:offset])
|
||||||
elsif current_user.present?
|
elsif current_user.present?
|
||||||
Time.zone = current_user.time_zone
|
Time.zone = current_user.time_zone_or_utc
|
||||||
else
|
else
|
||||||
Time.zone = 'UTC'
|
Time.zone = 'UTC'
|
||||||
end
|
end
|
||||||
|
@ -23,6 +23,7 @@ class DocsController < ApplicationController
|
|||||||
|
|
||||||
def errors; ; end
|
def errors; ; end
|
||||||
def tweetcontrol; ; end
|
def tweetcontrol; ; end
|
||||||
|
def timecontrol; ; end
|
||||||
def plugins; ; end
|
def plugins; ; end
|
||||||
def importer; ; end
|
def importer; ; end
|
||||||
def charts; ; end
|
def charts; ; end
|
||||||
|
@ -56,6 +56,9 @@ class User < ActiveRecord::Base
|
|||||||
cattr_reader :per_page
|
cattr_reader :per_page
|
||||||
@@per_page = 50
|
@@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
|
# true if the user has used the maximum number of available timecontrols
|
||||||
def max_timecontrols?
|
def max_timecontrols?
|
||||||
self.timecontrols.roots.count >= Timecontrol::MAX_PER_USER
|
self.timecontrols.roots.count >= Timecontrol::MAX_PER_USER
|
||||||
|
@ -45,15 +45,13 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<% if current_admin_user.present? %>
|
<div class="apps">
|
||||||
<div class="apps">
|
<%= link_to timecontrols_path do %>
|
||||||
<%= link_to timecontrols_path do %>
|
<%= image_tag 'timecontrol.png', :size => '104x104' %>
|
||||||
<%= image_tag 'timecontrol.png', :size => '104x104' %>
|
<br>
|
||||||
<br>
|
<%= t(:timecontrol) %>
|
||||||
<%= t(:timecontrol) %>
|
<% end %>
|
||||||
<% end %>
|
</div>
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -10,7 +10,7 @@ To update a Channel feed, send an HTTP GET or POST to<br>
|
|||||||
<br><br>
|
<br><br>
|
||||||
Valid parameters:
|
Valid parameters:
|
||||||
<ul>
|
<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>field1</b> (string) - Field 1 data (optional)</li>
|
||||||
<li><b>field2</b> (string) - Field 2 data (optional)</li>
|
<li><b>field2</b> (string) - Field 2 data (optional)</li>
|
||||||
<li><b>field3</b> (string) - Field 3 data (optional)</li>
|
<li><b>field3</b> (string) - Field 3 data (optional)</li>
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><%= t(:time_zone) %></td>
|
<td><%= t(:time_zone) %></td>
|
||||||
<td><%= @user.time_zone %></td>
|
<td><%= @user.time_zone_or_utc %></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><%= t(:api_key) %></td>
|
<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