best_boy 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,10 @@
1
+ ## 0.2.1
2
+ * added some styling gimmicks (active navigation highlighting, wording)
3
+ * moved google charts javascript to ssl for better backend integration
4
+ * changed year view to scope first year of each owner type separately
5
+ * initial list view includes now every owner type
6
+ * list view shows owner type and event source if given
7
+
1
8
  ## 0.2.0
2
9
  * added charts
3
10
  * added event_source to best_boy_events for better logging. see update section in README for update instructions
@@ -117,7 +117,7 @@ module BestBoy
117
117
  end
118
118
 
119
119
  def available_years
120
- @available_years = (BestBoyEvent.order("best_boy_events.created_at ASC").first.created_at.to_date.year..Time.zone.now.year).map{ |year| year.to_s } rescue [Time.zone.now.year]
120
+ @available_years = (BestBoyEvent.where("best_boy_events.owner_type = ?", current_owner_type).order("best_boy_events.created_at ASC").first.created_at.to_date.year..Time.zone.now.year).map{ |year| year.to_s } rescue [Time.zone.now.year]
121
121
  end
122
122
 
123
123
  def available_owner_types
@@ -126,7 +126,8 @@ module BestBoy
126
126
 
127
127
  def collection
128
128
  @best_boy_events ||= (
129
- scope = BestBoyEvent.where("best_boy_events.owner_type = ?", current_owner_type)
129
+ scope = BestBoyEvent
130
+ scope = scope.where("best_boy_events.owner_type = ?", params[:owner_type]) if params[:owner_type].present?
130
131
  scope = scope.where("best_boy_events.event = ?", current_event) if current_event.present?
131
132
  scope = scope.per_day(current_date) if current_date.present?
132
133
  scope = scope.order("best_boy_events.created_at DESC, best_boy_events.event ASC")
@@ -1,5 +1,5 @@
1
1
  <% content_for :javascripts do %>
2
- <script src='http://www.google.com/jsapi'></script>
2
+ <script src='https://www.google.com/jsapi'></script>
3
3
  <% end %>
4
4
 
5
5
 
@@ -26,14 +26,18 @@
26
26
  <table class="table table-striped table-bordered">
27
27
  <thead>
28
28
  <tr>
29
+ <th>Owner Type</th>
29
30
  <th>Event</th>
31
+ <th>Event source</th>
30
32
  <th>created_at</th>
31
33
  </tr>
32
34
  </thead>
33
35
  <tbody>
34
36
  <% collection.each do |best_boy_event| %>
35
37
  <tr>
38
+ <td><%= best_boy_event.owner_type %></td>
36
39
  <td><%= best_boy_event.event %></td>
40
+ <td><%= best_boy_event.event_source %></td>
37
41
  <td><%= best_boy_event.created_at %></td>
38
42
  </tr>
39
43
  <% end %>
@@ -37,12 +37,12 @@
37
37
  <div class="container">
38
38
  <%= link_to "BBAC", best_boy_admin_path, :class => "brand" %>
39
39
  <ul class="nav">
40
- <li><%= link_to "Statistics", best_boy_admin_stats_path %></li>
41
- <li><%= link_to "List & Logs", best_boy_admin_lists_path %></li>
42
- <li><%= link_to "Charts", best_boy_admin_charts_path %></li>
40
+ <li class="<%= action_name == 'stats' ? 'active' : nil %>"><%= link_to "Statistics", best_boy_admin_stats_path %></li>
41
+ <li class="<%= action_name == 'lists' ? 'active' : nil %>"><%= link_to "List & Logs", best_boy_admin_lists_path %></li>
42
+ <li class="<%= action_name == 'charts' ? 'active' : nil %>"><%= link_to "Charts", best_boy_admin_charts_path %></li>
43
43
  </ul>
44
44
  <% if BestBoy.custom_redirect.present? %>
45
- <p class="navbar-text pull-right"><%= link_to("back", Rails.application.routes.recognize_path(BestBoy.custom_redirect)) %></p>
45
+ <p class="navbar-text pull-right"><%= link_to("back to application", Rails.application.routes.recognize_path(BestBoy.custom_redirect)) %></p>
46
46
  <% end %>
47
47
  </div>
48
48
  </div>
Binary file
@@ -1,3 +1,3 @@
1
1
  module BestBoy
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: best_boy
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.2.0
5
+ version: 0.2.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Christoph Seydel
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2012-06-27 00:00:00 +02:00
13
+ date: 2012-06-28 00:00:00 +02:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency