Skip to content

Loading…

cancel search link, fix p.2 from #1850 #1922

Closed
wants to merge 5 commits into from

4 participants

@keram

@parndt ? :)

@parndt parndt commented on an outdated diff
core/config/locales/en.yml
@@ -50,8 +50,9 @@ en:
current: Current File
search:
button_text: Search
- results_for: "Search results for '%{query}'"
+ results_for: "Search results for &#8216;<em>%{query}</em>&#8217;"
@parndt Refinery member
parndt added a note

This key should be results_for_html now given it contains HTML.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@parndt
Refinery member

Can you please put a before/after screenshot here so that we have the history of what this did?

Thanks :)

@travisbot

This pull request passes (merged ea2d36e into 0b1de8b).

@keram

captain here are screenshots
before
after

@travisbot

This pull request passes (merged 1edcdc4 into 0b1de8b).

@travisbot

This pull request passes (merged fcbc5fa into 0b1de8b).

@ugisozols
Refinery member

Looks good.

@ugisozols
Refinery member

Unfortunately I can't comment inline so I'm putting some code here.

In the engine generator template (2nd line) there's code:

refinery.admin_<%= plural_name %>_path

The link won't work because engine routes are namespaced. You should use:

refinery.<%= namespacing.underscore %>_admin_<%= plural_name %>_path
@ugisozols
Refinery member

One more thing - changes to css makes the backed look a bit different than it is now:

original:
before

after changes:
after

Please fix that and also do a squash. Thanks :)

@keram

@ugisozols please check if is look good for you now.
I tested this only on ubuntu and on other platforms may been still some small issues

@keram keram referenced this pull request
Closed

User admin #1934

@ugisozols
Refinery member

@keram I squashed your commits and merged this in 1a35085 + updated other locales here - a75309d

@ugisozols ugisozols closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
View
19 core/app/assets/stylesheets/refinery/layout.css.scss
@@ -20,11 +20,6 @@
-webkit-border-bottom-left-radius: $radius;
-webkit-border-bottom-right-radius: $radius;
}
-* {
- color: #41403C;
- font-family: Arial;
- font-size: 13px;
-}
p {
font-size: 14px;
line-height: 18px;
@@ -36,9 +31,10 @@ body {
min-height: 100%;
margin: 0;
padding: 0;
- font-size: 10px;
- font-family: Verdana;
+ font-family: Arial, sans-serif;
+ font-size: 13px;
line-height: 1.5em;
+ color: #41403C;
background: #303030 image_url('refinery/page_bg.png') repeat;
}
acronym {
@@ -91,7 +87,7 @@ select.widest {
}
}
li {
- margin-top: 10px;
+ margin-bottom: 10px;
a {
background-color: #dbedff;
background-position: 12px;
@@ -431,7 +427,7 @@ header {
}
a {
display: block;
- padding: 9px 13px;
+ padding: 7px 13px;
font-size: 13px;
background: image_url('refinery/nav_inactive_background.png') transparent repeat;
margin-top:4px;
@@ -445,7 +441,7 @@ header {
color: #ff5500;
}
&.active {
- padding: 11px 13px;
+ padding: 9px 13px;
margin-top: 0px;
}
}
@@ -1018,6 +1014,9 @@ ul#menu.reordering_menu li a {
font-size: 16px;
width: 180px;
}
+.cancel-search {
+ float: right;
+}
.pt-BR #search {
width: 187px;
}
View
2 core/app/views/refinery/admin/_search.html.erb
@@ -1,5 +1,5 @@
<form method='GET' action='<%= url %>' class='search_form'>
- <input id='search' name='search' size='22' type='search' value='<%= params[:search] %>' />
+ <input id='search' name='search' size='22' type='search' value='<%= params[:search] %>' title="<%= t('search_input_notice', :scope => 'refinery.admin.search') %>" />
<% if params[:wymeditor].presence %><input name='wymeditor' value='true' type='hidden'><% end %>
<% if from_dialog? %><input id='dialog' name='dialog' type='hidden' value='true' /><% end %>
<% if @callback.presence %><input name='callback' value='<%= @callback %>' type='hidden'><% end %>
View
3 core/config/locales/en.yml
@@ -51,7 +51,10 @@ en:
search:
button_text: Search
results_for: "Search results for '%{query}'"
+ results_for_html: "Search results for &#8216;<em>%{query}</em>&#8217;"
no_results: 'Sorry, no results found'
+ cancel_search: 'Cancel search'
+ search_input_notice: 'Put here string which you looking for. Minimal length is 3 chars.'
delete:
message: "Are you sure you want to remove '%{title}'?"
error_messages:
View
3 ...efinery/engine/templates/app/views/refinery/namespace/admin/plural_name/_records.html.erb
@@ -1,5 +1,6 @@
<%% if searching? %>
- <h2><%%= t('results_for', :scope => 'refinery.admin.search', :query => params[:search]) %></h2>
+ <%%= link_to t('cancel_search', :scope => 'refinery.admin.search'), refinery.<%= namespacing.underscore %>_admin_<%= plural_name %>_path, :class => "cancel-search" %>
+ <h2><%%= t('results_for_html', :scope => 'refinery.admin.search', :query => h(params[:search])).html_safe %></h2>
<%% end %>
<div class='pagination_container'>
<%% if @<%= plural_name %>.any? %>
View
3 images/app/views/refinery/admin/images/_records.html.erb
@@ -1,5 +1,6 @@
<% if searching? %>
- <h2><%= t('results_for', :scope => 'refinery.admin.search', :query => params[:search]) %></h2>
+ <%= link_to t('cancel_search', :scope => 'refinery.admin.search'), refinery.admin_images_path, :class => "cancel-search" %>
+ <h2><%= t('results_for_html', :scope => 'refinery.admin.search', :query => h(params[:search])).html_safe %></h2>
<% end %>
<div class='pagination_container'>
<% if @images.any? %>
View
3 pages/app/views/refinery/admin/pages/_records.html.erb
@@ -1,5 +1,6 @@
<% if searching? %>
- <h2><%= t('results_for', :scope => 'refinery.admin.search', :query => params[:search]) %></h2>
+ <%= link_to t('cancel_search', :scope => 'refinery.admin.search'), refinery.admin_pages_path, :class => "cancel-search" %>
+ <h2><%= t('results_for_html', :scope => 'refinery.admin.search', :query => h(params[:search])).html_safe %></h2>
<% end %>
<% if @pages.any? %>
<%= render 'sortable_list' %>
View
3 resources/app/views/refinery/admin/resources/_records.html.erb
@@ -1,5 +1,6 @@
<% if searching? %>
- <h2><%= t('results_for', :scope => 'refinery.admin.search', :query => params[:search]) %></h2>
+ <%= link_to t('cancel_search', :scope => 'refinery.admin.search'), refinery.admin_resources_path, :class => "cancel-search" %>
+ <h2><%= t('results_for_html', :scope => 'refinery.admin.search', :query => h(params[:search])).html_safe %></h2>
<% end %>
<div class='pagination_container'>
<% if @resources.any? %>
Something went wrong with that request. Please try again.