Browse Source

Fix timezone, non-participant observer

Maarten van den Berg 7 years ago
parent
commit
b63e1cfa83
2 changed files with 19 additions and 8 deletions
  1. 17 8
      app/views/groups/show.html.haml
  2. 2 0
      config/application.rb

+ 17 - 8
app/views/groups/show.html.haml

@@ -46,7 +46,7 @@
46 46
                     = a.public_name
47 47
                     = render partial: "activities/state_counts", locals: {counts: a.state_counts}
48 48
                 %td
49
-                  = distance_of_time_in_words_to_now(a.start.to_date)
49
+                  = distance_of_time_in_words_to_now(a.start)
50 50
 
51 51
 .row
52 52
   .col-md-12
@@ -59,10 +59,19 @@
59 59
           %tbody
60 60
             - @upcoming.each do |a|
61 61
               - p = @upcoming_ps[a.id]
62
-              %tr{class: p.row_class, data: {activity_id: e.id, person_id: current_person.id}}
63
-                %td
64
-                  = e.public_name
65
-                %td
66
-                  = render partial: "activities/presence_buttons", locals: {activity: e, person: current_person, state: p.attending}
67
-                %td
68
-                  = editable p, :notes, url: presence_group_activity_path(e.group, e, person_id: current_person.id), title: "Notes", value: p.notes, emptytext: 'Notes'
62
+              - if p
63
+                %tr{class: p.row_class, data: {activity_id: a.id, person_id: current_person.id}}
64
+                  %td
65
+                    = link_to group_activity_path(a.group, a) do
66
+                      = a.public_name
67
+                  %td
68
+                    = render partial: "activities/presence_buttons", locals: {activity: a, person: current_person, state: p.attending}
69
+                  %td
70
+                    = editable p, :notes, url: presence_group_activity_path(a.group, a, person_id: current_person.id), title: "Notes", value: p.notes, emptytext: 'Notes'
71
+              - else
72
+                %tr
73
+                  %td
74
+                    = link_to group_activity_path(a.group, a) do
75
+                      = a.public_name
76
+                  %td
77
+                  %td

+ 2 - 0
config/application.rb

@@ -12,5 +12,7 @@ module Aardbei
12 12
     # Application configuration should go into files in config/initializers
13 13
     # -- all .rb files in that directory are automatically loaded.
14 14
     default_url_options[:host] = ENV['AARDBEI_HOSTNAME']
15
+
16
+    config.time_zone = 'Amsterdam'
15 17
   end
16 18
 end