Skip to content

Commit

Permalink
Merge pull request ppy#10731 from Swekka/misc-cleanup
Browse files Browse the repository at this point in the history
Blade cleanup
  • Loading branch information
nanaya authored Nov 13, 2023
2 parents 0bf7ed4 + 22a8d68 commit a7f0f23
Show file tree
Hide file tree
Showing 12 changed files with 58 additions and 57 deletions.
2 changes: 1 addition & 1 deletion resources/lang/hu/notifications.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
'beatmapset_discussion_post_new_empty' => 'Új poszt a ":title"-on :username:-tol',
'beatmapset_discussion_post_new_compact' => 'Új hozzászólás :username által: ":content"',
'beatmapset_discussion_post_new_compact_empty' => 'Új poszt :username által',
'beatmapset_discussion_review_new' => 'Új hozzászolás problémákat tartalmazó tartalomról :username által, ezen a beatmapen: ":title"
'beatmapset_discussion_review_new' => 'Új hozzászolás problémákat tartalmazó tartalomról :username által, ezen a beatmapen: ":title"
:problems, javaslat :suggestions, dícséret: :praises',
'beatmapset_discussion_review_new_compact' => 'Új hozzászolás problémákat tartalmazó tartalomról :username által: :problems, javaslat :suggestions, dícséret: :praises',
'beatmapset_discussion_unlock' => 'A beszélgetést feloldották ezen: ":title"',
Expand Down
13 changes: 6 additions & 7 deletions resources/views/accounts/_edit_country.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,16 @@
@if ($countryChangeTarget !== null)
<p>
{!! osu_trans('accounts.edit.profile.country_change._', [
'update_link' => tag(
'a',
'update_link' => link_to(
route('account.country', ['country_acronym' => $countryChangeTarget]),
osu_trans('accounts.edit.profile.country_change.update_link', [
'country' => app('countries')->byCode($countryChangeTarget)->name,
]),
[
'data-confirm' => osu_trans('common.confirmation'),
'data-method' => 'PUT',
'data-remote' => '1',
'href' => route('account.country', ['country_acronym' => $countryChangeTarget]),
],
osu_trans('accounts.edit.profile.country_change.update_link', [
'country' => Country::find($countryChangeTarget)->name,
]),
]
),
]) !!}
</p>
Expand Down
7 changes: 4 additions & 3 deletions resources/views/accounts/_edit_email.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ class="js-form-error js-form-clear js-account-edit account-edit"
<div class="account-edit__input-group">
<div class="account-edit-entry account-edit-entry--no-label">
<div>{!! osu_trans('accounts.edit.email.locked._', [
'accounts' => tag('a', [
'href' => 'mailto:'.config('osu.emails.account'),
], osu_trans('accounts.edit.email.locked.accounts'))
'accounts' => link_to(
'mailto:'.config('osu.emails.account'),
osu_trans('accounts.edit.email.locked.accounts')
)
]) !!}</div>
</div>
</div>
Expand Down
25 changes: 14 additions & 11 deletions resources/views/home/download.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,8 @@ class="btn-osu-big btn-osu-big--download btn-osu-big--download-lazer"
</div>
<div class="download-page__text download-page__text--description">
{!! osu_trans('home.download.steps.beatmaps.description._', [
'browse' => tag(
'a',
['href' => route('beatmapsets.index')],
'browse' => link_to(
route('beatmapsets.index'),
osu_trans('home.download.steps.beatmaps.description.browse')
)
]) !!}
Expand All @@ -125,14 +124,18 @@ class="btn-osu-big btn-osu-big--download btn-osu-big--download-lazer"
@if (config('services.enchant.id') !== null)
<div class="download-page__help">
{!! osu_trans('home.download.help._', [
'support_button' => tag('a', [
'class' => 'js-enchant--show',
'role' => 'button',
'href' => '#',
], osu_trans('home.download.help.support_button')),
'help_forum_link' => tag('a', [
'href' => route('forum.forums.show', ['forum' => config('osu.forum.help_forum_id')]),
], osu_trans('home.download.help.help_forum_link')),
'support_button' => link_to(
'#',
osu_trans('home.download.help.support_button'),
[
'class' => 'js-enchant--show',
'role' => 'button',
],
),
'help_forum_link' => link_to(
route('forum.forums.show', ['forum' => config('osu.forum.help_forum_id')]),
osu_trans('home.download.help.help_forum_link')
)
]) !!}
</div>

Expand Down
7 changes: 3 additions & 4 deletions resources/views/master.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,9 @@ class="
'type' => 'alert',
'title' => osu_trans('users.restricted_banner.title'),
'message' => osu_trans('users.restricted_banner.message', [
'link' => tag(
'a',
['href' => config('osu.urls.user.restriction')],
osu_trans('users.restricted_banner.message_link'),
'link' => link_to(
config('osu.urls.user.restriction'),
osu_trans('users.restricted_banner.message_link')
),
]),
])
Expand Down
9 changes: 3 additions & 6 deletions resources/views/objects/search/_forum_post.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,10 @@
'forum.post.posted_by_in',
[
'username' => link_to_user($user, null, null, ['search-forum-post__sub-link']),
'forum' => tag(
'a',
[
'href' => route('forum.forums.show', ['forum' => $topic->forum_id]),
'class' => 'search-forum-post__sub-link',
],
'forum' => link_to(
route('forum.forums.show', ['forum' => $topic->forum_id]),
$topic->forum->forum_name,
['class' => 'search-forum-post__sub-link']
),
],
) !!}
Expand Down
2 changes: 1 addition & 1 deletion resources/views/packs/raw.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class="beatmap-pack-download__link"
@if ($pack->no_diff_reduction)
<div class="beatmap-pack-description">
{!! osu_trans('beatmappacks.show.no_diff_reduction._', [
'link' => tag('a', ['href' => wiki_url('Game_modifier')], osu_trans('beatmappacks.show.no_diff_reduction.link')),
'link' => link_to(wiki_url('Game_modifier'), osu_trans('beatmappacks.show.no_diff_reduction.link')),
]) !!}
</div>
@endif
Expand Down
13 changes: 8 additions & 5 deletions resources/views/password_reset/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,14 @@ class="password-reset js-form-error"

@if (config('services.enchant.id') !== null)
<div>
{!! osu_trans('password_reset.starting.support._', ['button' => tag('a', [
'class' => 'js-enchant--show',
'role' => 'button',
'href' => '#',
], osu_trans('password_reset.starting.support.button'))]) !!}
{!! osu_trans('password_reset.starting.support._', ['button' => link_to(
'#',
osu_trans('password_reset.starting.support.button'),
[
'class' => 'js-enchant--show',
'role' => 'button',
]
)]) !!}
</div>

@include('objects._enchant')
Expand Down
2 changes: 1 addition & 1 deletion resources/views/store/checkout/show.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<div class="store-cart-footer">
<div class="store-cart-footer__total-box store-cart-footer__total-box--full">
<p class="store-cart-footer__text">total</p>
<p class="store-cart-footer__text store-cart-footer__text--amount">{{{ currency($order->getTotal()) }}}</p>
<p class="store-cart-footer__text store-cart-footer__text--amount">{{ currency($order->getTotal()) }}</p>
</div>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions resources/views/store/orders/_details.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@
@if($order->address !== null)
<div class="store-page__address">
<div>
<h4 class="store-text store-text--title store-text--title-small">Sent Via:</h4>
<h4 class="store-text store-text--title store-text--title-small">{{ osu_trans('store.invoice.sent_via') }}</h4>

<div class='address'>
osu!store
</div>
</div>

<div>
<h4 class="store-text store-text--title store-text--title-small">Shipping To:</h4>
<h4 class="store-text store-text--title store-text--title-small">{{ osu_trans('store.invoice.shipping_to') }}</h4>

@include('store.objects.address', ['data' => $order->address])
</div>
Expand Down
11 changes: 4 additions & 7 deletions resources/views/users/create.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,10 @@ class="btn-osu-big btn-osu-big--rounded-thin js-captcha--submit-button"
<div class="simple-form__row simple-form__row--no-label">
<p>
{!! osu_trans('users.create.form.tos_notice._', [
'link' => tag(
'a',
[
'href' => route('legal', ['locale' => app()->getLocale(), 'path' => 'Terms']),
'target' => '_blank',
],
osu_trans('users.create.form.tos_notice.link')
'link' => link_to(
route('legal', ['locale' => app()->getLocale(), 'path' => 'Terms']),
osu_trans('users.create.form.tos_notice.link'),
['target' => '_blank']
),
]) !!}
</p>
Expand Down
20 changes: 11 additions & 9 deletions resources/views/users/disabled.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@
<ul>
<li>
{!! osu_trans('users.disabled.reasons.tos._', [
'community_rules' => tag('a', [
'href' => osu_url('user.rules'),
], osu_trans('users.disabled.reasons.tos.community_rules')),
'tos' => tag('a', [
'href' => route('legal', ['locale' => app()->getLocale(), 'path' => 'terms']),
], osu_trans('users.disabled.reasons.tos.tos')),
'community_rules' => link_to(
osu_url('user.rules'),
osu_trans('users.disabled.reasons.tos.community_rules')
),
'tos' => link_to(
route('legal', ['locale' => app()->getLocale(), 'path' => 'terms']),
osu_trans('users.disabled.reasons.tos.tos')
),
]) !!}
</li>
<li>
Expand All @@ -36,9 +38,9 @@

<p>
{!! osu_trans('users.disabled.if_mistake._', [
'email' => tag('a', [
'href' => 'mailto:'.config('osu.emails.account')
], osu_trans('users.disabled.if_mistake.email')),
'email' => link_to(
'mailto:'.config('osu.emails.account'),
osu_trans('users.disabled.if_mistake.email'))
]) !!}
</p>

Expand Down

0 comments on commit a7f0f23

Please sign in to comment.