-
Notifications
You must be signed in to change notification settings - Fork 878
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] add span to backpack button text #5343
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
@if ($crud->hasAccess('create')) | ||
<a href="{{ url($crud->route.'/create') }}" class="btn btn-primary" data-style="zoom-in"> | ||
<span><i class="la la-plus"></i> {{ trans('backpack::crud.add') }} {{ $crud->entity_name }}</span> | ||
<span><i class="la la-plus"></i> <span class="create-button-text-span">{{ trans('backpack::crud.add') }} {{ $crud->entity_name }}</span></span> | ||
</a> | ||
@endif |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,6 +1,6 @@ | ||||||
@if ($crud->hasAccess('delete')) | ||||||
<a href="javascript:void(0)" onclick="deleteEntry(this)" data-route="{{ url($crud->route.'/'.$entry->getKey()) }}" class="btn btn-sm btn-link" data-button-type="delete"> | ||||||
<span><i class="la la-trash"></i> {{ trans('backpack::crud.delete') }}</span> | ||||||
<span><i class="la la-trash"></i> <span class="delete-button-text-span">{{ trans('backpack::crud.delete') }}</span></span> | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we really need two spans? One for the entire button content, one for the text? Cause if we only need one for the text, it should be as easy as moving the span start after the icon. No class needed:
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||||||
</a> | ||||||
@endif | ||||||
|
||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
@if ($crud->get('reorder.enabled') && $crud->hasAccess('reorder')) | ||
<a href="{{ url($crud->route.'/reorder') }}" class="btn btn-outline-primary" data-style="zoom-in"> | ||
<span><i class="la la-arrows"></i> {{ trans('backpack::crud.reorder') }} {{ $crud->entity_name_plural }}</span> | ||
<span><i class="la la-arrows"></i> <span class="reorder-button-text-span">{{ trans('backpack::crud.reorder') }} {{ $crud->entity_name_plural }}</span></span> | ||
</a> | ||
@endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about we add
bp-button="create"
to the anchor? That way you can style the button itself too, if needed.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And it'd be similar to our other CSS hooks,
bp-section
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://backpackforlaravel.com/docs/6.x/crud-how-to#how-to-customize-crud-panel-design-css-hooks