@@ -3,111 +3,111 @@ discard block |
||
3 | 3 | // Home |
4 | 4 | use Illuminate\Support\Facades\Auth; |
5 | 5 | |
6 | -Breadcrumbs::register('dashboard', function ($breadcrumbs) { |
|
6 | +Breadcrumbs::register('dashboard', function($breadcrumbs) { |
|
7 | 7 | $breadcrumbs->push(trans('core.dashboard'), route('dashboard')); |
8 | 8 | }); |
9 | 9 | |
10 | 10 | // Home > Federations |
11 | -Breadcrumbs::register('federations.index', function ($breadcrumbs) { |
|
11 | +Breadcrumbs::register('federations.index', function($breadcrumbs) { |
|
12 | 12 | $breadcrumbs->parent('dashboard'); |
13 | 13 | $breadcrumbs->push(trans_choice('structures.federation', 2), route('federations.index')); |
14 | 14 | }); |
15 | 15 | |
16 | -Breadcrumbs::register('federations.edit', function ($breadcrumbs, $federation) { |
|
16 | +Breadcrumbs::register('federations.edit', function($breadcrumbs, $federation) { |
|
17 | 17 | $breadcrumbs->parent('federations.index'); |
18 | 18 | if (Auth::user()->isFederationPresident($federation)) { |
19 | - $breadcrumbs->push(str_limit($federation->name,40), route('federations.edit', $federation->id)); |
|
19 | + $breadcrumbs->push(str_limit($federation->name, 40), route('federations.edit', $federation->id)); |
|
20 | 20 | } else { |
21 | - $breadcrumbs->push(str_limit($federation->name,40), route('federations.show', $federation->id)); |
|
21 | + $breadcrumbs->push(str_limit($federation->name, 40), route('federations.show', $federation->id)); |
|
22 | 22 | } |
23 | 23 | |
24 | 24 | }); |
25 | 25 | |
26 | 26 | // Home > Associations |
27 | -Breadcrumbs::register('associations.index', function ($breadcrumbs) { |
|
27 | +Breadcrumbs::register('associations.index', function($breadcrumbs) { |
|
28 | 28 | $breadcrumbs->parent('dashboard'); |
29 | 29 | $breadcrumbs->push(trans_choice('structures.association', 2), route('associations.index')); |
30 | 30 | }); |
31 | 31 | |
32 | -Breadcrumbs::register('associations.create', function ($breadcrumbs) { |
|
32 | +Breadcrumbs::register('associations.create', function($breadcrumbs) { |
|
33 | 33 | $breadcrumbs->parent('associations.index'); |
34 | 34 | $breadcrumbs->push(trans('core.addModel', ['currentModelName' => trans_choice('structures.association', 1)]), route('associations.create')); |
35 | 35 | |
36 | 36 | }); |
37 | 37 | |
38 | 38 | |
39 | -Breadcrumbs::register('associations.edit', function ($breadcrumbs, $association) { |
|
39 | +Breadcrumbs::register('associations.edit', function($breadcrumbs, $association) { |
|
40 | 40 | $breadcrumbs->parent('associations.index'); |
41 | 41 | if (Auth::user()->isFederationPresident($association->federation) || Auth::user()->isAssociationPresident($association)) { |
42 | - $breadcrumbs->push(str_limit($association->name,40), route('associations.edit', $association->id)); |
|
42 | + $breadcrumbs->push(str_limit($association->name, 40), route('associations.edit', $association->id)); |
|
43 | 43 | } else { |
44 | - $breadcrumbs->push(str_limit($association->name,40), route('associations.show', $association->id)); |
|
44 | + $breadcrumbs->push(str_limit($association->name, 40), route('associations.show', $association->id)); |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | }); |
48 | 48 | |
49 | 49 | // |
50 | 50 | // Home > Clubs |
51 | -Breadcrumbs::register('clubs.index', function ($breadcrumbs) { |
|
51 | +Breadcrumbs::register('clubs.index', function($breadcrumbs) { |
|
52 | 52 | $breadcrumbs->parent('dashboard'); |
53 | 53 | $breadcrumbs->push(trans_choice('structures.club', 2), route('clubs.index')); |
54 | 54 | }); |
55 | 55 | |
56 | -Breadcrumbs::register('clubs.edit', function ($breadcrumbs, $club) { |
|
56 | +Breadcrumbs::register('clubs.edit', function($breadcrumbs, $club) { |
|
57 | 57 | $breadcrumbs->parent('clubs.index'); |
58 | 58 | if (Auth::user()->isFederationPresident($club->federation) || Auth::user()->isAssociationPresident($club) || Auth::user()->isClubPresident($club)) { |
59 | - $breadcrumbs->push(str_limit($club->name,40), route('clubs.edit', $club->id)); |
|
59 | + $breadcrumbs->push(str_limit($club->name, 40), route('clubs.edit', $club->id)); |
|
60 | 60 | } else { |
61 | - $breadcrumbs->push(str_limit($club->name,40), route('clubs.show', $club->id)); |
|
61 | + $breadcrumbs->push(str_limit($club->name, 40), route('clubs.show', $club->id)); |
|
62 | 62 | } |
63 | 63 | |
64 | 64 | }); |
65 | 65 | |
66 | 66 | |
67 | 67 | // Home > Tournaments |
68 | -Breadcrumbs::register('tournaments.index', function ($breadcrumbs) { |
|
68 | +Breadcrumbs::register('tournaments.index', function($breadcrumbs) { |
|
69 | 69 | $breadcrumbs->parent('dashboard'); |
70 | 70 | $breadcrumbs->push(trans_choice('core.tournament', 2), route('tournaments.index')); |
71 | 71 | }); |
72 | 72 | |
73 | 73 | |
74 | -Breadcrumbs::register('tournaments.deleted', function ($breadcrumbs) { |
|
74 | +Breadcrumbs::register('tournaments.deleted', function($breadcrumbs) { |
|
75 | 75 | $breadcrumbs->parent('dashboard'); |
76 | 76 | $breadcrumbs->push(trans('core.tournaments_deleted')); |
77 | 77 | }); |
78 | 78 | |
79 | 79 | // Home > Create Tournament |
80 | -Breadcrumbs::register('tournaments.create', function ($breadcrumbs, $currentModelName) { |
|
80 | +Breadcrumbs::register('tournaments.create', function($breadcrumbs, $currentModelName) { |
|
81 | 81 | $breadcrumbs->parent('dashboard'); |
82 | 82 | $breadcrumbs->push(trans('core.createTournament'), route('tournaments.create')); |
83 | 83 | }); |
84 | 84 | |
85 | 85 | // Home > Tournaments > Edit Tournament |
86 | -Breadcrumbs::register('tournaments.edit', function ($breadcrumbs, $tournament) { |
|
86 | +Breadcrumbs::register('tournaments.edit', function($breadcrumbs, $tournament) { |
|
87 | 87 | $breadcrumbs->parent('tournaments.index'); |
88 | 88 | if (policy($tournament)->edit(Auth::user(), $tournament)) { |
89 | 89 | $breadcrumbs->push(str_limit($tournament->name, 30), route('tournaments.edit', $tournament->slug)); |
90 | 90 | } else { |
91 | - $breadcrumbs->push(str_limit($tournament->name,30), route('tournaments.show', $tournament->slug)); |
|
91 | + $breadcrumbs->push(str_limit($tournament->name, 30), route('tournaments.show', $tournament->slug)); |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | }); |
95 | -Breadcrumbs::register('tournaments.show', function ($breadcrumbs, $tournament) { |
|
95 | +Breadcrumbs::register('tournaments.show', function($breadcrumbs, $tournament) { |
|
96 | 96 | $breadcrumbs->parent('tournaments.index'); |
97 | - $breadcrumbs->push(str_limit($tournament->name,30), route('tournaments.show', $tournament->slug)); |
|
97 | + $breadcrumbs->push(str_limit($tournament->name, 30), route('tournaments.show', $tournament->slug)); |
|
98 | 98 | |
99 | 99 | }); |
100 | 100 | |
101 | 101 | |
102 | 102 | // Home > Invites |
103 | -Breadcrumbs::register('invites.index', function ($breadcrumbs) { |
|
103 | +Breadcrumbs::register('invites.index', function($breadcrumbs) { |
|
104 | 104 | |
105 | 105 | $breadcrumbs->parent('dashboard'); |
106 | 106 | $breadcrumbs->push(trans_choice('core.invitation', 2), route('invites.index')); |
107 | 107 | }); |
108 | 108 | |
109 | 109 | // Home > Tournaments > MyTournament > Invite Competitors |
110 | -Breadcrumbs::register('invites.show', function ($breadcrumbs, $tournament) { |
|
110 | +Breadcrumbs::register('invites.show', function($breadcrumbs, $tournament) { |
|
111 | 111 | if ($tournament != null) { |
112 | 112 | if (policy($tournament)->edit(Auth::user(), $tournament)) { |
113 | 113 | $breadcrumbs->parent('tournaments.edit', $tournament); |
@@ -121,13 +121,13 @@ discard block |
||
121 | 121 | }); |
122 | 122 | |
123 | 123 | // Home > Tournaments > MyTournament > List Competitors |
124 | -Breadcrumbs::register('tournaments.users.index', function ($breadcrumbs, $tournament) { |
|
124 | +Breadcrumbs::register('tournaments.users.index', function($breadcrumbs, $tournament) { |
|
125 | 125 | $breadcrumbs->parent('tournaments.edit', $tournament); |
126 | 126 | $breadcrumbs->push(trans_choice('core.competitor', 2), action('CompetitorController@index', [$tournament->slug])); |
127 | 127 | }); |
128 | 128 | |
129 | 129 | // Home > Tournaments > MyTournament > Add Competitors |
130 | -Breadcrumbs::register('tournaments.users.create', function ($breadcrumbs, $tournament) { |
|
130 | +Breadcrumbs::register('tournaments.users.create', function($breadcrumbs, $tournament) { |
|
131 | 131 | if (policy($tournament)->edit(Auth::user(), $tournament)) { |
132 | 132 | $breadcrumbs->parent('tournaments.edit', $tournament); |
133 | 133 | } else { |
@@ -137,13 +137,13 @@ discard block |
||
137 | 137 | }); |
138 | 138 | |
139 | 139 | // Home > Tournaments > MyTournament > show Competitor |
140 | -Breadcrumbs::register('tournaments.users.show', function ($breadcrumbs, $tournament, $user) { |
|
140 | +Breadcrumbs::register('tournaments.users.show', function($breadcrumbs, $tournament, $user) { |
|
141 | 141 | $breadcrumbs->parent('tournaments.users.index', $tournament); |
142 | 142 | $breadcrumbs->push($user->name, action('CompetitorController@index', [$tournament->slug, $user->slug])); |
143 | 143 | }); |
144 | 144 | |
145 | 145 | // Home > Edit Profile |
146 | -Breadcrumbs::register('users.edit', function ($breadcrumbs, $user) { |
|
146 | +Breadcrumbs::register('users.edit', function($breadcrumbs, $user) { |
|
147 | 147 | $breadcrumbs->parent('dashboard'); |
148 | 148 | if (policy($user)->edit(Auth::user(), $user)) { |
149 | 149 | if (Auth::user()->name == $user->name) { |
@@ -157,35 +157,35 @@ discard block |
||
157 | 157 | |
158 | 158 | }); |
159 | 159 | |
160 | -Breadcrumbs::register('users.index', function ($breadcrumbs) { |
|
160 | +Breadcrumbs::register('users.index', function($breadcrumbs) { |
|
161 | 161 | $breadcrumbs->parent('dashboard'); |
162 | 162 | $breadcrumbs->push(trans_choice('core.competitor', 2), route('users.index')); |
163 | 163 | }); |
164 | 164 | |
165 | -Breadcrumbs::register('users.create', function ($breadcrumbs) { |
|
165 | +Breadcrumbs::register('users.create', function($breadcrumbs) { |
|
166 | 166 | $breadcrumbs->parent('dashboard'); |
167 | 167 | $breadcrumbs->push(trans('core.add_competitor'), route('users.create')); |
168 | 168 | }); |
169 | 169 | |
170 | -Breadcrumbs::register('users.show', function ($breadcrumbs, $user) { |
|
170 | +Breadcrumbs::register('users.show', function($breadcrumbs, $user) { |
|
171 | 171 | $breadcrumbs->parent('dashboard'); |
172 | 172 | $breadcrumbs->push(trans_choice('core.user', 1), route('users.show', $user->slug)); |
173 | 173 | }); |
174 | 174 | |
175 | -Breadcrumbs::register('users.tournaments', function ($breadcrumbs, $user) { |
|
175 | +Breadcrumbs::register('users.tournaments', function($breadcrumbs, $user) { |
|
176 | 176 | $breadcrumbs->parent('dashboard'); |
177 | 177 | $breadcrumbs->push(trans('core.tournaments_registered'), route('users.tournaments', $user->slug)); |
178 | 178 | |
179 | 179 | |
180 | 180 | }); |
181 | 181 | |
182 | -Breadcrumbs::register('categories.create', function ($breadcrumbs) { |
|
182 | +Breadcrumbs::register('categories.create', function($breadcrumbs) { |
|
183 | 183 | $breadcrumbs->parent('dashboard'); |
184 | 184 | $breadcrumbs->push(trans('core.add_category'), route('categories.create')); |
185 | 185 | }); |
186 | 186 | |
187 | 187 | // Home > Tournaments > MyTournament > List Teams |
188 | -Breadcrumbs::register('teams.index', function ($breadcrumbs, $tournament) { |
|
188 | +Breadcrumbs::register('teams.index', function($breadcrumbs, $tournament) { |
|
189 | 189 | $breadcrumbs->parent('tournaments.edit', $tournament); |
190 | 190 | if (policy($tournament)->edit(Auth::user(), $tournament)) { |
191 | 191 | $breadcrumbs->push(trans_choice('core.team', 2), route('tournaments.edit', $tournament->slug)); |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | }); |
197 | 197 | |
198 | 198 | // Home > Tournaments > MyTournament > List Trees |
199 | -Breadcrumbs::register('trees.index', function ($breadcrumbs, $tournament) { |
|
199 | +Breadcrumbs::register('trees.index', function($breadcrumbs, $tournament) { |
|
200 | 200 | if (policy($tournament) != null && policy($tournament)->edit(Auth::user(), $tournament)) { |
201 | 201 | $breadcrumbs->parent('tournaments.edit', $tournament); |
202 | 202 | $breadcrumbs->push(trans_choice('core.tree', 2), route('tournaments.edit', $tournament->slug)); |
@@ -208,17 +208,17 @@ discard block |
||
208 | 208 | }); |
209 | 209 | |
210 | 210 | |
211 | -Breadcrumbs::register('teams.create', function ($breadcrumbs, $tournament) { |
|
211 | +Breadcrumbs::register('teams.create', function($breadcrumbs, $tournament) { |
|
212 | 212 | $breadcrumbs->parent('tournaments.edit', $tournament); |
213 | 213 | $breadcrumbs->push(trans_choice('core.team', 2), route('teams.index', $tournament->slug)); |
214 | 214 | }); |
215 | -Breadcrumbs::register('teams.edit', function ($breadcrumbs, $tournament) { |
|
215 | +Breadcrumbs::register('teams.edit', function($breadcrumbs, $tournament) { |
|
216 | 216 | $breadcrumbs->parent('teams.index', $tournament); |
217 | 217 | $breadcrumbs->push(trans_choice('core.team', 2), route('teams.index', $tournament->slug)); |
218 | 218 | }); |
219 | 219 | |
220 | 220 | // Home > Tournaments > MyTournament > List Fights |
221 | -Breadcrumbs::register('fights.index', function ($breadcrumbs, $tournament) { |
|
221 | +Breadcrumbs::register('fights.index', function($breadcrumbs, $tournament) { |
|
222 | 222 | if (policy($tournament)->edit(Auth::user(), $tournament)) { |
223 | 223 | $breadcrumbs->parent('tournaments.edit', $tournament); |
224 | 224 | $breadcrumbs->push(trans_choice('core.fight', 2), route('tournaments.edit', $tournament->slug)); |
@@ -230,7 +230,7 @@ discard block |
||
230 | 230 | }); |
231 | 231 | |
232 | 232 | // Home > Tournaments > MyTournament > List Fights |
233 | -Breadcrumbs::register('scoresheet.index', function ($breadcrumbs, $tournament) { |
|
233 | +Breadcrumbs::register('scoresheet.index', function($breadcrumbs, $tournament) { |
|
234 | 234 | if (policy($tournament)->edit(Auth::user(), $tournament)) { |
235 | 235 | $breadcrumbs->parent('tournaments.edit', $tournament); |
236 | 236 | $breadcrumbs->push(trans_choice('core.fight', 2), route('tournaments.edit', $tournament->slug)); |