Browse Source

Split mobile participant row to partial, fontawesome update

Maarten van den Berg 6 years ago
parent
commit
b65e2b91e6

+ 15 - 0
app/views/activities/_mobile_participant_row.html.haml

1
+- p = participant
2
+- all_buttons = show_all_buttons
3
+%tr.participant-row{data: {person_id: p.person.id, activity_id: @activity.id, subgroup_id: p.subgroup_id}}
4
+  %td
5
+    = p.person.full_name
6
+    - if p.is_organizer
7
+      %i.far.fa-star
8
+
9
+  %td
10
+    - if p.person.id == current_person.id || all_buttons
11
+      = render partial: "activities/presence_buttons", locals: {activity: @activity, person: p.person, state: p.attending}
12
+
13
+  %tr.participant-row{data: {person_id: p.person_id, activity_id: @activity.id, subgroup_id: p.subgroup_id}}
14
+    %td{colspan: "2"}
15
+      = editable p, :notes, url: presence_group_activity_path(@activity.group, @activity, person_id: p.person_id), title: t('activities.participant.notes'), value: p.notes, emptytext: "--"

+ 4 - 4
app/views/activities/_presence_buttons.haml

1
 .btn-group.btn-group-xs{role: "group"}
1
 .btn-group.btn-group-xs{role: "group"}
2
   %button.btn.btn-success.btn-present.btn-presence{data: {person_id: person.id, activity_id: activity.id, group_id: activity.group.id, new_state: "present"}}
2
   %button.btn.btn-success.btn-present.btn-presence{data: {person_id: person.id, activity_id: activity.id, group_id: activity.group.id, new_state: "present"}}
3
     - if !state
3
     - if !state
4
-      %i.fa.fa-check
4
+      %i.fas.fa-check
5
     - else
5
     - else
6
-      %i.fa.fa-check-circle
6
+      %i.fas.fa-check-circle
7
 
7
 
8
   %button.btn.btn-danger.btn-absent.btn-presence{data: {person_id: person.id, activity_id: activity.id, group_id: activity.group.id, new_state: "absent"}}
8
   %button.btn.btn-danger.btn-absent.btn-presence{data: {person_id: person.id, activity_id: activity.id, group_id: activity.group.id, new_state: "absent"}}
9
     - if state == false
9
     - if state == false
10
-      %i.fa.fa-times-circle
10
+      %i.fas.fa-times-circle
11
     - else
11
     - else
12
-      %i.fa.fa-times
12
+      %i.fas.fa-times

+ 4 - 4
app/views/activities/_wide_presence_buttons.haml

2
   .btn-group
2
   .btn-group
3
     %button.btn.btn-success.btn-present.btn-presence{data: {wide: 1, person_id: person.id, activity_id: activity.id, group_id: activity.group.id, new_state: "present"}}
3
     %button.btn.btn-success.btn-present.btn-presence{data: {wide: 1, person_id: person.id, activity_id: activity.id, group_id: activity.group.id, new_state: "present"}}
4
       - if !state
4
       - if !state
5
-        %i.fa.fa-check
5
+        %i.fas.fa-check
6
       - else
6
       - else
7
-        %i.fa.fa-check-circle
7
+        %i.fas.fa-check-circle
8
       = t 'activities.state.present'
8
       = t 'activities.state.present'
9
 
9
 
10
   .btn-group
10
   .btn-group
11
     %button.btn.btn-danger.btn-absent.btn-presence{data: {wide: 1, person_id: person.id, activity_id: activity.id, group_id: activity.group.id, new_state: "absent"}}
11
     %button.btn.btn-danger.btn-absent.btn-presence{data: {wide: 1, person_id: person.id, activity_id: activity.id, group_id: activity.group.id, new_state: "absent"}}
12
       - if state == false
12
       - if state == false
13
-        %i.fa.fa-times-circle
13
+        %i.fas.fa-times-circle
14
       - else
14
       - else
15
-        %i.fa.fa-times
15
+        %i.fas.fa-times
16
       = t 'activities.state.absent'
16
       = t 'activities.state.absent'

+ 7 - 7
app/views/activities/edit.html.haml

61
             = f.check_box :is_assignable
61
             = f.check_box :is_assignable
62
             = t 'activerecord.attributes.subgroup.is_assignable'
62
             = t 'activerecord.attributes.subgroup.is_assignable'
63
             (
63
             (
64
-            %i.fa.fa-random
64
+            %i.fas.fa-random
65
             )
65
             )
66
 
66
 
67
       = f.submit t('activities.subgroups.create'), class: 'btn btn-success'
67
       = f.submit t('activities.subgroups.create'), class: 'btn btn-success'
77
             = t 'activerecord.attributes.subgroup.name'
77
             = t 'activerecord.attributes.subgroup.name'
78
 
78
 
79
           %th
79
           %th
80
-            %i.fa.fa-random
80
+            %i.fas.fa-random
81
 
81
 
82
           %th
82
           %th
83
-            %i.fa.fa-cogs
83
+            %i.fas.fa-cogs
84
         - @subgroups.each do |sg|
84
         - @subgroups.each do |sg|
85
           %tr
85
           %tr
86
             %td
86
             %td
90
             %td
90
             %td
91
               = link_to group_activity_update_subgroup_path(@group, @activity, sg.id, 'subgroup[is_assignable]' => !sg.is_assignable), method: :patch, class: 'btn btn-default btn-xs' do
91
               = link_to group_activity_update_subgroup_path(@group, @activity, sg.id, 'subgroup[is_assignable]' => !sg.is_assignable), method: :patch, class: 'btn btn-default btn-xs' do
92
                 - if sg.is_assignable
92
                 - if sg.is_assignable
93
-                  %i.fa.fa-check
93
+                  %i.fas.fa-check
94
                 - else
94
                 - else
95
-                  %i.fa.fa-times
95
+                  %i.fas.fa-times
96
 
96
 
97
             %td
97
             %td
98
               = link_to group_activity_destroy_subgroup_path(@group, @activity, sg.id), method: :delete, class: 'btn btn-danger btn-xs', data: {confirm: I18n.t(:areyousure)} do
98
               = link_to group_activity_destroy_subgroup_path(@group, @activity, sg.id), method: :delete, class: 'btn btn-danger btn-xs', data: {confirm: I18n.t(:areyousure)} do
99
-                %i.fa.fa-trash
99
+                %i.fas.fa-trash
100
 
100
 
101
       = link_to(group_activity_edit_subgroups_path(@group, @activity), class: 'btn btn-default') do
101
       = link_to(group_activity_edit_subgroups_path(@group, @activity), class: 'btn btn-default') do
102
-        %i.fa.fa-edit
102
+        %i.fas.fa-edit
103
         = t 'activities.subgroups.edit'
103
         = t 'activities.subgroups.edit'
104
 
104
 
105
 
105
 

+ 4 - 4
app/views/activities/index.html.haml

8
 .btn-group.pull-right
8
 .btn-group.pull-right
9
   - if params[:past]
9
   - if params[:past]
10
     = link_to group_activities_path(@group), class: 'btn btn-default' do
10
     = link_to group_activities_path(@group), class: 'btn btn-default' do
11
-      %i.fa.fa-history
11
+      %i.fas.fa-history
12
       = t 'activities.upcoming'
12
       = t 'activities.upcoming'
13
   - else
13
   - else
14
     = link_to group_activities_path(@group, past: true), class: 'btn btn-default' do
14
     = link_to group_activities_path(@group, past: true), class: 'btn btn-default' do
15
-      %i.fa.fa-history
15
+      %i.fas.fa-history
16
       = t 'activities.past'
16
       = t 'activities.past'
17
   - if isleader
17
   - if isleader
18
     = link_to new_group_activity_path(@group), class: 'btn btn-default' do
18
     = link_to new_group_activity_path(@group), class: 'btn btn-default' do
19
-      %i.fa.fa-plus
19
+      %i.fas.fa-plus
20
       = t 'activities.new'
20
       = t 'activities.new'
21
 
21
 
22
 %table.table
22
 %table.table
49
         - if isleader
49
         - if isleader
50
           %td
50
           %td
51
             = link_to edit_group_activity_path(@group, a) do
51
             = link_to edit_group_activity_path(@group, a) do
52
-              %i.fa.fa-pencil
52
+              %i.fas.fa-pencil-alt
53
 
53
 
54
 = will_paginate @activities
54
 = will_paginate @activities

+ 14 - 51
app/views/activities/show.html.haml

5
       .panel-heading
5
       .panel-heading
6
         .btn-group.pull-right
6
         .btn-group.pull-right
7
           %button.btn.btn-default.dropdown-toggle.btn-xs{data: {toggle: 'dropdown'}, 'aria-haspopup': true, 'aria-expanded': false}
7
           %button.btn.btn-default.dropdown-toggle.btn-xs{data: {toggle: 'dropdown'}, 'aria-haspopup': true, 'aria-expanded': false}
8
-            %i.fa.fa-cogs
8
+            %i.fas.fa-cogs
9
             %span.caret
9
             %span.caret
10
           %ul.dropdown-menu
10
           %ul.dropdown-menu
11
             %li
11
             %li
12
               %a.copy-reactions{data: {activity: @activity.id, absent: true}}
12
               %a.copy-reactions{data: {activity: @activity.id, absent: true}}
13
-                %i.fa.fa-files-o
13
+                %i.fas.fa-copy
14
                 = t 'activities.participant.copy_absent'
14
                 = t 'activities.participant.copy_absent'
15
               %a.copy-reactions{data: {activity: @activity.id, present: true, absent: true, unknown: true}}
15
               %a.copy-reactions{data: {activity: @activity.id, present: true, absent: true, unknown: true}}
16
-                %i.fa.fa-files-o
16
+                %i.fas.fa-copy
17
                 = t 'activities.participant.copy_responses'
17
                 = t 'activities.participant.copy_responses'
18
             - if all_buttons
18
             - if all_buttons
19
               %li.divider{role: 'separator'}
19
               %li.divider{role: 'separator'}
20
               %li
20
               %li
21
                 = link_to edit_group_activity_path(@group, @activity) do
21
                 = link_to edit_group_activity_path(@group, @activity) do
22
-                  %i.fa.fa-pencil
22
+                  %i.fas.fa-pencil
23
                   = t :edit
23
                   = t :edit
24
         = @activity.name
24
         = @activity.name
25
 
25
 
115
         %td
115
         %td
116
           = p.person.full_name
116
           = p.person.full_name
117
           - if p.is_organizer
117
           - if p.is_organizer
118
-            %i.fa.fa-star-o
118
+            %i.fas.fa-star-o
119
 
119
 
120
         %td
120
         %td
121
           = editable p, :notes, url: presence_group_activity_path(@activity.group, @activity, person_id: p.person_id), title: t('activities.participant.notes'), value: p.notes, emptytext: "--"
121
           = editable p, :notes, url: presence_group_activity_path(@activity.group, @activity, person_id: p.person_id), title: t('activities.participant.notes'), value: p.notes, emptytext: "--"
137
       %a{role: 'button', href: '#present-collapse', data: {toggle: 'collapse'}, 'aria-expanded': 'false'}
137
       %a{role: 'button', href: '#present-collapse', data: {toggle: 'collapse'}, 'aria-expanded': 'false'}
138
 
138
 
139
         %span.sv-show-collapsed
139
         %span.sv-show-collapsed
140
-          %i.fa.fa-angle-down
140
+          %i.fas.fa-angle-down
141
 
141
 
142
         %span.sv-show-expanded
142
         %span.sv-show-expanded
143
-          %i.fa.fa-angle-up
143
+          %i.fas.fa-angle-up
144
 
144
 
145
         = t 'activities.state.present'
145
         = t 'activities.state.present'
146
         %span.badge.state-count.present-count
146
         %span.badge.state-count.present-count
149
     %table.table.collapse#present-collapse
149
     %table.table.collapse#present-collapse
150
       %tbody
150
       %tbody
151
         - @participants.where(attending: true).each do |p|
151
         - @participants.where(attending: true).each do |p|
152
-          %tr.participant-row{data: {person_id: p.person.id, activity_id: @activity.id, subgroup_id: p.subgroup_id}}
153
-            %td
154
-              = p.person.full_name
155
-              - if p.is_organizer
156
-                %i.fa.fa-star-o
157
-
158
-            %td
159
-              - if p.person.id == current_person.id || all_buttons
160
-                = render partial: "activities/presence_buttons", locals: {activity: @activity, person: p.person, state: p.attending}
161
-
162
-          %tr.participant-row{data: {person_id: p.person_id, activity_id: @activity.id, subgroup_id: p.subgroup_id}}
163
-            %td{colspan: "2"}
164
-              = editable p, :notes, url: presence_group_activity_path(@activity.group, @activity, person_id: p.person_id), title: t('activities.participant.notes'), value: p.notes, emptytext: "--"
165
-
152
+          = render partial: "mobile_participant_row", locals: {participant: p, show_all_buttons: all_buttons}
166
 
153
 
167
   .panel.panel-default
154
   .panel.panel-default
168
     .panel-heading
155
     .panel-heading
169
       %a{role: 'button', href: '#unknown-collapse', data: {toggle: 'collapse'}, 'aria-expanded': 'false'}
156
       %a{role: 'button', href: '#unknown-collapse', data: {toggle: 'collapse'}, 'aria-expanded': 'false'}
170
 
157
 
171
         %span.sv-show-collapsed
158
         %span.sv-show-collapsed
172
-          %i.fa.fa-angle-down
159
+          %i.fas.fa-angle-down
173
 
160
 
174
         %span.sv-show-expanded
161
         %span.sv-show-expanded
175
-          %i.fa.fa-angle-up
162
+          %i.fas.fa-angle-up
176
 
163
 
177
         = t 'activities.state.need_response'
164
         = t 'activities.state.need_response'
178
 
165
 
182
     %table.table.collapse#unknown-collapse
169
     %table.table.collapse#unknown-collapse
183
       %tbody
170
       %tbody
184
         - @participants.where(attending: nil).each do |p|
171
         - @participants.where(attending: nil).each do |p|
185
-          %tr.participant-row{data: {person_id: p.person.id, activity_id: @activity.id, subgroup_id: p.subgroup_id}}
186
-            %td
187
-              = p.person.full_name
188
-              - if p.is_organizer
189
-                %i.fa.fa-star-o
190
-
191
-            %td
192
-              - if p.person.id == current_person.id || all_buttons
193
-                = render partial: "activities/presence_buttons", locals: {activity: @activity, person: p.person, state: p.attending}
194
-
195
-          %tr.participant-row{data: {person_id: p.person_id, activity_id: @activity.id, subgroup_id: p.subgroup_id}}
196
-            %td{colspan: "2"}
197
-              = editable p, :notes, url: presence_group_activity_path(@activity.group, @activity, person_id: p.person_id), title: t('activities.participant.notes'), value: p.notes, emptytext: "--"
172
+          = render partial: "mobile_participant_row", locals: {participant: p, show_all_buttons: all_buttons}
198
 
173
 
199
   .panel.panel-default.panel-danger
174
   .panel.panel-default.panel-danger
200
     .panel-heading
175
     .panel-heading
201
       %a{role: 'button', href: '#absent-collapse', data: {toggle: 'collapse'}, 'aria-expanded': 'false'}
176
       %a{role: 'button', href: '#absent-collapse', data: {toggle: 'collapse'}, 'aria-expanded': 'false'}
202
 
177
 
203
         %span.sv-show-collapsed
178
         %span.sv-show-collapsed
204
-          %i.fa.fa-angle-down
179
+          %i.fas.fa-angle-down
205
 
180
 
206
         %span.sv-show-expanded
181
         %span.sv-show-expanded
207
-          %i.fa.fa-angle-up
182
+          %i.fas.fa-angle-up
208
 
183
 
209
         = t 'activities.state.absent'
184
         = t 'activities.state.absent'
210
 
185
 
214
     %table.table.collapse#absent-collapse
189
     %table.table.collapse#absent-collapse
215
       %tbody
190
       %tbody
216
         - @participants.where(attending: false).each do |p|
191
         - @participants.where(attending: false).each do |p|
217
-          %tr.participant-row{data: {person_id: p.person.id, activity_id: @activity.id, subgroup_id: p.subgroup_id}}
218
-            %td
219
-              = p.person.full_name
220
-              - if p.is_organizer
221
-                %i.fa.fa-star-o
222
-
223
-            %td
224
-              - if p.person.id == current_person.id || all_buttons
225
-                = render partial: "activities/presence_buttons", locals: {activity: @activity, person: p.person, state: p.attending}
226
-
227
-          %tr.participant-row{data: {person_id: p.person_id, activity_id: @activity.id, subgroup_id: p.subgroup_id}}
228
-            %td{colspan: "2"}
229
-              = editable p, :notes, url: presence_group_activity_path(@activity.group, @activity, person_id: p.person_id), title: t('activities.participant.notes'), value: p.notes, emptytext: "--"
192
+          = render partial: "mobile_participant_row", locals: {participant: p, show_all_buttons: all_buttons}

+ 1 - 1
app/views/authentication/logout_confirm.html.haml

4
       = t :areyousure
4
       = t :areyousure
5
     .panel-body
5
     .panel-body
6
       = link_to logout_path, method: :delete, class: 'btn btn-danger' do
6
       = link_to logout_path, method: :delete, class: 'btn btn-danger' do
7
-        %i.fa.fa-sign-out{'aria-hidden': true}
7
+        %i.fas.fa-sign-out-alt{'aria-hidden': true}
8
         = t :log_out
8
         = t :log_out
9
       = link_to root_path, class: 'btn btn-default' do
9
       = link_to root_path, class: 'btn btn-default' do
10
         = t :cancel
10
         = t :cancel

+ 2 - 2
app/views/dashboard/home.html.haml

45
               %a{role: 'button', href: '#needresponse-collapse', data: {toggle: 'collapse'}, 'aria-expanded': 'false'}
45
               %a{role: 'button', href: '#needresponse-collapse', data: {toggle: 'collapse'}, 'aria-expanded': 'false'}
46
 
46
 
47
                 %span.sv-show-collapsed
47
                 %span.sv-show-collapsed
48
-                  %i.fa.fa-angle-down
48
+                  %i.fas.fa-angle-down
49
 
49
 
50
                 %span.sv-show-expanded
50
                 %span.sv-show-expanded
51
-                  %i.fa.fa-angle-up
51
+                  %i.fas.fa-angle-up
52
 
52
 
53
                 = t 'activities.state.need_response'
53
                 = t 'activities.state.need_response'
54
                 %span.badge
54
                 %span.badge

+ 2 - 2
app/views/dashboard/settings.html.haml

14
         = text_field_tag(:calurl, person_calendar_url(@person.calendar_token), readonly: true, id: 'calurl', class: 'form-control')
14
         = text_field_tag(:calurl, person_calendar_url(@person.calendar_token), readonly: true, id: 'calurl', class: 'form-control')
15
         %span.input-group-btn
15
         %span.input-group-btn
16
           = button_tag(class: 'btn btn-default copy-url', data: {'clipboard-target': '#calurl'}) do
16
           = button_tag(class: 'btn btn-default copy-url', data: {'clipboard-target': '#calurl'}) do
17
-            %i.fa.fa-files-o
17
+            %i.far.fa-files
18
 
18
 
19
     .form-group
19
     .form-group
20
       .input-group
20
       .input-group
21
         = text_field_tag(:calurl_nocancel, person_calendar_url(@person.calendar_token, skipcancel: 1), readonly: true, id: 'calurl-skipcancel', class: 'form-control')
21
         = text_field_tag(:calurl_nocancel, person_calendar_url(@person.calendar_token, skipcancel: 1), readonly: true, id: 'calurl-skipcancel', class: 'form-control')
22
         %span.input-group-btn
22
         %span.input-group-btn
23
           = button_tag(class: 'btn btn-default copy-url', data: {'clipboard-target': '#calurl-skipcancel'}) do
23
           = button_tag(class: 'btn btn-default copy-url', data: {'clipboard-target': '#calurl-skipcancel'}) do
24
-            %i.fa.fa-files-o
24
+            %i.far.fa-files
25
 
25
 
26
 %h2
26
 %h2
27
   = t 'settings.email_settings'
27
   = t 'settings.email_settings'

+ 6 - 6
app/views/shared/_menu.html.haml

14
       %ul.nav.navbar-nav
14
       %ul.nav.navbar-nav
15
         %li
15
         %li
16
           = link_to root_path do
16
           = link_to root_path do
17
-            %i.fa.fa-home{'aria-hidden': true}
17
+            %i.fas.fa-home{'aria-hidden': true}
18
             Home
18
             Home
19
 
19
 
20
         %li
20
         %li
21
           = link_to user_groups_path do
21
           = link_to user_groups_path do
22
-            %i.fa.fa-users{'aria-hidden': true}
22
+            %i.fas.fa-users{'aria-hidden': true}
23
             = t 'groups.plural'
23
             = t 'groups.plural'
24
 
24
 
25
         - if current_person.is_admin?
25
         - if current_person.is_admin?
26
           %li
26
           %li
27
             = link_to people_path do
27
             = link_to people_path do
28
-              %i.fa.fa-user{'aria-hidden': true}
28
+              %i.fas.fa-user{'aria-hidden': true}
29
               = t 'person.plural'
29
               = t 'person.plural'
30
 
30
 
31
           %li
31
           %li
32
             = link_to groups_path do
32
             = link_to groups_path do
33
-              %i.fa.fa-users{'aria-hidden': true}
33
+              %i.fas.fa-users{'aria-hidden': true}
34
               = t 'groups.all'
34
               = t 'groups.all'
35
 
35
 
36
       %ul.nav.navbar-nav.navbar-right
36
       %ul.nav.navbar-nav.navbar-right
37
         %li
37
         %li
38
           = link_to settings_path do
38
           = link_to settings_path do
39
-            %i.fa.fa-cogs{'aria-hidden': true}
39
+            %i.fas.fa-cogs{'aria-hidden': true}
40
             = t 'settings.settings'
40
             = t 'settings.settings'
41
         %li
41
         %li
42
           = link_to logout_path, confirm: "Really log out?", method: :delete do
42
           = link_to logout_path, confirm: "Really log out?", method: :delete do
43
-            %i.fa.fa-sign-out{'aria-hidden': true}
43
+            %i.fas.fa-sign-out-alt{'aria-hidden': true}
44
             = t 'log_out'
44
             = t 'log_out'