Adding analytics, adjusting door log issues
This commit is contained in:
parent
75da7ffb6a
commit
d61289abaf
|
@ -34,7 +34,7 @@ class CardsController < ApplicationController
|
||||||
def show
|
def show
|
||||||
if can? :read, DoorLog then
|
if can? :read, DoorLog then
|
||||||
card_num_R = @card.card_number.to_i(16)%32767
|
card_num_R = @card.card_number.to_i(16)%32767
|
||||||
@door_logs = DoorLog.where('key = ? AND data = ?', "R", card_num_R).order("created_at DESC")
|
@door_logs = DoorLog.where('key = ? AND data = ?', "G", card_num_R).order("created_at DESC")
|
||||||
end
|
end
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html # show.html.erb
|
format.html # show.html.erb
|
||||||
|
|
|
@ -72,7 +72,7 @@ Guide to log keys and data:
|
||||||
end %>
|
end %>
|
||||||
<% @cardnum = (door_log.data.to_i+(@divided_tmp*32767)).to_s(16) %>
|
<% @cardnum = (door_log.data.to_i+(@divided_tmp*32767)).to_s(16) %>
|
||||||
<%= "Card: "+@cardnum %>
|
<%= "Card: "+@cardnum %>
|
||||||
<% @card = Card.find(:first,:conditions=>['card_number LIKE ?', @cardnum]) %>
|
<% @card = Card.find(:first,:conditions=>['lower(card_number) = ?', @cardnum.downcase]) %>
|
||||||
<%= "("+@card.user.name+")" unless @card.nil? %>
|
<%= "("+@card.user.name+")" unless @card.nil? %>
|
||||||
</td>
|
</td>
|
||||||
<% else
|
<% else
|
||||||
|
|
|
@ -30,5 +30,6 @@
|
||||||
<p class="alert"><%= raw(alert) %></p>
|
<p class="alert"><%= raw(alert) %></p>
|
||||||
<%= yield %>
|
<%= yield %>
|
||||||
</div>
|
</div>
|
||||||
|
<%= raw Setting.analytics_code if Setting.present? %>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<script src="http://code.jquery.com/jquery-migrate-1.2.1.js"></script>
|
||||||
<script type="text/javascript" src="/wymeditor/wymeditor/jquery.wymeditor.min.js"></script>
|
<script type="text/javascript" src="/wymeditor/wymeditor/jquery.wymeditor.min.js"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(function(){
|
$(function(){
|
||||||
|
|
|
@ -2,7 +2,8 @@
|
||||||
:welcome_title => "Welcome to the Hackerspace Members Site",
|
:welcome_title => "Welcome to the Hackerspace Members Site",
|
||||||
:welcome_body => "<p>We are a member-driven community workshop where you can learn, make cool stuff, meet other cool people, and make your city a better place to live!</p><p>You don't have to be a member to come visit, but if you're interested in volunteering or being a member, feel free to sign up here! For more information, <a href=\"/more_info\">Click Here</a>.</p>",
|
:welcome_body => "<p>We are a member-driven community workshop where you can learn, make cool stuff, meet other cool people, and make your city a better place to live!</p><p>You don't have to be a member to come visit, but if you're interested in volunteering or being a member, feel free to sign up here! For more information, <a href=\"/more_info\">Click Here</a>.</p>",
|
||||||
:more_info_page => "No info here yet, bug a member about filling this part out!",
|
:more_info_page => "No info here yet, bug a member about filling this part out!",
|
||||||
:member_resources_inset => "No info here yet, bug a member about filling this part out!"
|
:member_resources_inset => "No info here yet, bug a member about filling this part out!",
|
||||||
|
:analytics_code => "<!-- insert analytics code here -->"
|
||||||
}
|
}
|
||||||
|
|
||||||
if ActiveRecord::Base.connection.tables.include?('settings') and !defined?(::Rake)
|
if ActiveRecord::Base.connection.tables.include?('settings') and !defined?(::Rake)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user