ソースを参照

Fix timezone, non-participant observer

Maarten van den Berg 7 年 前
コミット
b63e1cfa83
共有2 個のファイルを変更した19 個の追加8 個の削除を含む
  1. 17 8
      app/views/groups/show.html.haml
  2. 2 0
      config/application.rb

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

46
                     = a.public_name
46
                     = a.public_name
47
                     = render partial: "activities/state_counts", locals: {counts: a.state_counts}
47
                     = render partial: "activities/state_counts", locals: {counts: a.state_counts}
48
                 %td
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
 .row
51
 .row
52
   .col-md-12
52
   .col-md-12
59
           %tbody
59
           %tbody
60
             - @upcoming.each do |a|
60
             - @upcoming.each do |a|
61
               - p = @upcoming_ps[a.id]
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
     # Application configuration should go into files in config/initializers
12
     # Application configuration should go into files in config/initializers
13
     # -- all .rb files in that directory are automatically loaded.
13
     # -- all .rb files in that directory are automatically loaded.
14
     default_url_options[:host] = ENV['AARDBEI_HOSTNAME']
14
     default_url_options[:host] = ENV['AARDBEI_HOSTNAME']
15
+
16
+    config.time_zone = 'Amsterdam'
15
   end
17
   end
16
 end
18
 end