Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[WebProfilerBundle] Update the search links in the profiler layout #54423

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

Merged
merged 1 commit into from
Apr 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@ public function searchBarAction(Request $request): Response
'end' => $request->query->get('end', $session?->get('_profiler_search_end')),
'limit' => $request->query->get('limit', $session?->get('_profiler_search_limit')),
'request' => $request,
'render_hidden_by_default' => false,
'profile_type' => $request->query->get('type', $session?->get('_profiler_search_type', 'request')),
]),
200,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,10 @@
<div id="sidebar-shortcuts">
{% block sidebar_shortcuts_links %}
<div class="shortcuts">
<a class="btn btn-link" href="{{ path('_profiler_search', { limit: 10, type: profile_type }) }}">Last 10</a>
<a class="btn btn-link" href="{{ path('_profiler_search', { limit: 10, type: profile_type }) }}">{{ source('@WebProfiler/Icon/search.svg') }} Search profiles</a>
<a class="btn btn-link" href="{{ path('_profiler', { token: 'latest', type: profile_type }|merge(request.query.all)) }}">Latest</a>

<a class="sf-toggle btn btn-link" data-toggle-selector="#sidebar-search" {% if tokens is defined or about is defined %}data-toggle-initial="display"{% endif %}>
{{ source('@WebProfiler/Icon/search.svg') }} <span class="hidden-small">Search</span>
</a>
</div>
{% endblock sidebar_shortcuts_links %}

{{ render(controller('web_profiler.controller.profiler::searchBarAction', query={type: profile_type }|merge(request.query.all))) }}
</div>

{% if templates is defined %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1416,7 +1416,7 @@ tr.status-warning td {
------------------------------------------------------------------------- #}
#sidebar #sidebar-shortcuts {
color: var(--gray-500);
padding: 10px 15px;
padding: 5px 8px;
}
#sidebar #sidebar-shortcuts .sf-tabs .tab-navigation {
margin: 5px 0 15px;
Expand All @@ -1431,15 +1431,21 @@ tr.status-warning td {
display: flex;
align-items: center;
font-size: 13px;
padding: 5px 7px;
}
#sidebar #sidebar-shortcuts:hover .btn-link {
color: var(--menu-color);
#sidebar #sidebar-shortcuts .btn-link:hover {
background: var(--menu-active-background);
color: var(--menu-active-color);
text-decoration: none;
}
#sidebar-shortcuts .shortcuts svg {
height: 16px;
width: 16px;
margin-right: 4px;
}
#sidebar #sidebar-shortcuts form {
padding: 5px 7px;
}

{# Sidebar Search (the colors of this element don't change based on the selected theme)
------------------------------------------------------------------------- #}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@
{% endblock %}

{% block sidebar_search_css_class %}{% endblock %}
{% block sidebar_shortcuts_links %}{% endblock %}
{% block sidebar_shortcuts_links %}
{{ render(controller('web_profiler.controller.profiler::searchBarAction', query={type: profile_type }|merge(request.query.all))) }}
{% endblock %}

{% block panel %}
<div class="sf-tabs" data-processed="true">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div id="sidebar-search" class="{{ (render_hidden_by_default ?? true) ? 'hidden' }}">
<div id="sidebar-search">
<form action="{{ path('_profiler_search') }}" method="get">
<div class="form-group">
<label for="ip">
Expand Down