1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
|
%= form_for "/social-action" => (method => 'POST') => begin
%= csrf_field
%= hidden_field redirect_to => '/account'
% my $count = scalar @{$entries};
% if ($type eq 'follow-requests-received') {
<div class="row">
<div class="col s12">
<h2>Erhaltene Folge-Anfragen</h2>
</div>
</div>
% if ($notifications) {
<div class="row center-align">
<div class="col s12">
<button class="btn waves-effect waves-light" type="submit" name="action" value="clear_notifications">
<i class="material-icons left" aria-hidden="true">notifications_off</i> Als gelesen markieren
</button>
</div>
</div>
% }
<div class="row center-align">
<div class="col s4">
<i class="material-icons">block</i><br/> Blockieren
</div>
<div class="col s4">
<i class="material-icons">cancel</i><br/> Ablehnen
</div>
<div class="col s4">
<i class="material-icons">check</i><br/> Annehmen
</div>
</div>
<div class="row center-align">
<div class="col s12">
<button class="btn red waves-effect waves-light" type="submit" name="reject_follow_request" value="<%= join(q{,}, map { $_->{id} } @{$entries}) %>">
<i class="material-icons left" aria-hidden="true">cancel</i> Alle ablehnen
</button>
</div>
</div>
<div class="row center-align">
<div class="col s12">
<button class="btn waves-effect waves-light" type="submit" name="accept_follow_request" value="<%= join(q{,}, map { $_->{id} } @{$entries}) %>">
<i class="material-icons left" aria-hidden="true">check</i> Alle annehmen
</button>
</div>
</div>
<!--
<div class="row center-align">
<div class="col s6">
<button class="btn red waves-effect waves-light" type="submit" name="block" value="<%= join(q{,}, map { $_->{id} } @{$entries}) %>">
<i class="material-icons left" aria-hidden="true">block</i> Alle blockieren
</button>
</div>
</div>
-->
% }
% elsif ($type eq 'follow-requests-sent') {
<div class="row">
<div class="col s12">
<h2>Gestellte Folge-Anfragen</h2>
</div>
</div>
<div class="row center-align">
<div class="col s12">
<i class="material-icons">cancel</i><br/> Zurücknehmen
</div>
</div>
% }
% elsif ($type eq 'followers') {
<div class="row">
<div class="col s12">
% if ($count == 1) {
<h2>Dir folgt ein Account</h2>
% }
% else {
<h2>Dir folgen <%= $count %> Accounts</h2>
% }
</div>
</div>
<div class="row center-align">
<div class="col s4">
<i class="material-icons">block</i><br/> Blockieren
</div>
<div class="col s4">
<i class="material-icons">remove</i><br/> Entfernen
</div>
<div class="col s4">
<i class="material-icons">person_add</i><br/> Zurückfolgen
</div>
</div>
<div class="row center-align">
<div class="col s4">
</div>
<div class="col s4">
<i class="material-icons">access_time</i><br/> Folgen angefragt
</div>
<div class="col s4">
<i class="material-icons">group</i><br/> Du folgst diesem Account
</div>
</div>
<!--
<div class="row center-align">
<div class="col s6">
<button class="btn grey waves-effect waves-light" type="submit" name="remove_follower" value="<%= join(q{,}, map { $_->{id} } @{$entries}) %>">
<i class="material-icons left" aria-hidden="true">remove</i> Alle entfernen
</button>
</div>
<div class="col s6">
<button class="btn waves-effect waves-light" type="submit" name="follow_or_request" value="<%= join(q{,}, map { $_->{id} } @{$entries}) %>">
<i class="material-icons left" aria-hidden="true">group_add</i> Allen zurückfolgen
</button>
</div>
</div>
<div class="row center-align">
<div class="col s6">
<button class="btn red waves-effect waves-light" type="submit" name="block" value="<%= join(q{,}, map { $_->{id} } @{$entries}) %>">
<i class="material-icons left" aria-hidden="true">block</i> Alle blockieren
</button>
</div>
</div>
-->
% }
% elsif ($type eq 'follows') {
<div class="row">
<div class="col s12">
% if ($count == 1) {
<h2>Du folgst einem Account</h2>
% }
% else {
<h2>Du folgst <%= $count %> Accounts</h2>
% }
</div>
</div>
<div class="row center-align">
<div class="col s12">
<i class="material-icons">remove</i><br/> Nicht mehr folgen
</div>
</div>
<!--
<div class="row center-align">
<div class="col s12">
<button class="btn grey waves-effect waves-light" type="submit" name="unfollow" value="<%= join(q{,}, map { $_->{id} } @{$entries}) %>">
<i class="material-icons left" aria-hidden="true">remove</i> Alle entfernen
</button>
</div>
</div>
-->
% }
% elsif ($type eq 'blocks') {
<div class="row">
<div class="col s12">
<h2>Blockierte Accounts</h2>
<p>
Blockierte Accounts können dir nicht folgen und keine Folge-Anfragen stellen.
Sie haben weiterhin Zugriff auf deine als öffentlich oder travelynx-intern markierten Checkins.
</p>
</div>
</div>
<div class="row center-align">
<div class="col s12">
<i class="material-icons">remove</i><br/>Entblockieren
</div>
</div>
<!--
<div class="row center-align">
<div class="col s12">
<button class="btn grey waves-effect waves-light" type="submit" name="unblock" value="<%= join(q{,}, map { $_->{id} } @{$entries}) %>">
<i class="material-icons left" aria-hidden="true">remove</i> Alle entblockieren
</button>
</div>
</div>
-->
% }
%= end
<div class="row">
<div class="col s12">
%= form_for "/social-action" => (method => 'POST') => begin
%= csrf_field
%= hidden_field redirect_to => "/account/social/$type"
<table class="striped">
% for my $entry (@{$entries}) {
<tr>
<td><a href="/p/<%= $entry->{name} %>"><%= $entry->{name} %></a></td>
% if ($type eq 'follow-requests-received') {
<td class="right-align">
<button class="btn-flat waves-effect waves-light" type="submit" name="block" value="<%= $entry->{id} %>">
<i class="material-icons" aria-label="blockieren">block</i>
</button>
</td>
<td class="right-align">
<button class="btn-flat waves-effect waves-light" type="submit" name="reject_follow_request" value="<%= $entry->{id} %>">
<i class="material-icons" aria-label="ablehnen">cancel</i>
</button>
</td>
<td class="right-align">
<button class="btn-flat waves-effect waves-light" type="submit" name="accept_follow_request" value="<%= $entry->{id} %>">
<i class="material-icons" aria-label="annehmen">check</i>
</button>
</td>
% }
% elsif ($type eq 'follow-requests-sent') {
<td class="right-align">
<button class="btn-flat waves-effect waves-light" type="submit" name="cancel_follow_request" value="<%= $entry->{id} %>">
<i class="material-icons" aria-label="zurücknehmen">cancel</i>
</button>
</td>
% }
% elsif ($type eq 'followers') {
<td class="right-align">
<button class="btn-flat waves-effect waves-light" type="submit" name="block" value="<%= $entry->{id} %>">
<i class="material-icons" aria-label="blockieren">block</i>
</button>
</td>
<td class="right-align">
<button class="btn-flat waves-effect waves-light" type="submit" name="remove_follower" value="<%= $entry->{id} %>">
<i class="material-icons" aria-label="entfernen">remove</i>
</button>
</td>
<td class="right-align">
% if ($entry->{following_back}) {
<i class="material-icons" aria-label="ihr folgt euch gegenseitig">group</i>
% }
% elsif ($entry->{followback_requested}) {
<i class="material-icons" aria-label="Zurückfolgen angefragt">access_time</i>
% }
% elsif ($entry->{can_follow_back} or $entry->{can_request_follow_back}) {
<button class="btn-flat waves-effect waves-light" type="submit" name="follow_or_request" value="<%= $entry->{id} %>">
<i class="material-icons" aria-label="zurückfolgen">person_add</i>
</button>
% }
</td>
% }
% elsif ($type eq 'follows') {
<td class="right-align">
<button class="btn-flat waves-effect waves-light" type="submit" name="unfollow" value="<%= $entry->{id} %>">
<i class="material-icons" aria-label="entfolgen">remove</i>
</button>
</td>
% }
% elsif ($type eq 'blocks') {
<td class="right-align">
<button class="btn-flat waves-effect waves-light" type="submit" name="unblock" value="<%= $entry->{id} %>">
<i class="material-icons" aria-label="von Blockliste entefrnen">remove</i>
</button>
</td>
% }
</tr>
% }
</table>
%= end
</div>
</div>
|