radiant-race_results-extension 1.3.1 → 1.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/app/models/race_instance.rb +4 -0
- data/app/views/race_instances/_summary.html.haml +7 -6
- data/app/views/race_instances/show.html.haml +3 -0
- data/app/views/race_instances/splits.html.haml +2 -0
- data/app/views/race_performances/show.html.haml +4 -5
- data/race_results_extension.rb +1 -1
- data/radiant-race_results-extension.gemspec +1 -1
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.3.
|
1
|
+
1.3.2
|
data/app/models/race_instance.rb
CHANGED
@@ -75,6 +75,10 @@ class RaceInstance < ActiveRecord::Base
|
|
75
75
|
race.checkpoints
|
76
76
|
end
|
77
77
|
|
78
|
+
def splits_available?
|
79
|
+
RaceCheckpointTime.in(self).any?
|
80
|
+
end
|
81
|
+
|
78
82
|
def assembled_checkpoint_times
|
79
83
|
checkpoint_times = {}
|
80
84
|
RaceCheckpointTime.in(self).with_context.each do |cpt|
|
@@ -23,9 +23,10 @@
|
|
23
23
|
- else
|
24
24
|
Click on a club or category to see only those results.
|
25
25
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
26
|
+
- if @instance.splits_available?
|
27
|
+
%br
|
28
|
+
View as
|
29
|
+
- if splitting
|
30
|
+
= link_to_unless_current "simple results", results_url
|
31
|
+
- else
|
32
|
+
= link_to_unless_current "splits", splits_url
|
@@ -40,6 +40,9 @@
|
|
40
40
|
- content_for :see_also do
|
41
41
|
.see_also
|
42
42
|
%p
|
43
|
+
- if @instance.splits_available?
|
44
|
+
= link_to "#{@instance.full_name} Split times", race_splits_url(@race, @instance)
|
45
|
+
%br
|
43
46
|
- if others = @race.instances.with_results.select{|i| i != @instance}
|
44
47
|
More
|
45
48
|
= @race.name
|
@@ -95,11 +95,10 @@
|
|
95
95
|
- if @performance.category
|
96
96
|
= link_to "More #{@performance.category.name} results", race_category_url(@race, @instance, @performance.category)
|
97
97
|
%br
|
98
|
-
All
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
= link_to "splits", race_splits_url(@race, @instance)
|
98
|
+
= link_to "All #{@instance.full_name} results", race_instance_url(@race, @instance)
|
99
|
+
- if @instance.splits_available?
|
100
|
+
or
|
101
|
+
= link_to "splits", race_splits_url(@race, @instance)
|
103
102
|
|
104
103
|
= yield :performance
|
105
104
|
= yield :see_also
|
data/race_results_extension.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
# require_dependency 'application_controller'
|
3
3
|
|
4
4
|
class RaceResultsExtension < Radiant::Extension
|
5
|
-
version "1.3.
|
5
|
+
version "1.3.2"
|
6
6
|
description "Makes easy the uploading, analysis and display of race results. Built for fell races but should work for most timed or score events."
|
7
7
|
url "http://spanner.org/radiant/race_results"
|
8
8
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: radiant-race_results-extension
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 31
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 1.3.
|
9
|
+
- 2
|
10
|
+
version: 1.3.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- spanner
|