Skip to content
Extraits de code Groupes Projets
Valider 9c8dfb38 rédigé par Jonne Haß's avatar Jonne Haß
Parcourir les fichiers

Merge pull request #4392 from movilla/search_mobile

Fix mobile search tags
parents a5d73401 152c0896
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
* Descending text is no longer cut off in orange welcome banner [#4377](https://github.com/diaspora/diaspora/issues/4377) * Descending text is no longer cut off in orange welcome banner [#4377](https://github.com/diaspora/diaspora/issues/4377)
* Adjust Facebook character limit to reality [#4380](https://github.com/diaspora/diaspora/issues/4380) * Adjust Facebook character limit to reality [#4380](https://github.com/diaspora/diaspora/issues/4380)
* Restore truncated URLs when posting to Twitter [#4211](https://github.com/diaspora/diaspora/issues/4211) * Restore truncated URLs when posting to Twitter [#4211](https://github.com/diaspora/diaspora/issues/4211)
* Fix mobile search tags [#4392](https://github.com/diaspora/diaspora/issues/4392)
## Features ## Features
* Admin: add option to find users under 13 (COPPA) [#4252](https://github.com/diaspora/diaspora/pull/4252) * Admin: add option to find users under 13 (COPPA) [#4252](https://github.com/diaspora/diaspora/pull/4252)
......
...@@ -6,7 +6,7 @@ class SearchController < ApplicationController ...@@ -6,7 +6,7 @@ class SearchController < ApplicationController
if search_query.length > 1 if search_query.length > 1
respond_to do |format| respond_to do |format|
format.json {redirect_to tags_path(:q => search_query.delete("#."))} format.json {redirect_to tags_path(:q => search_query.delete("#."))}
format.html {redirect_to tag_path(:name => search_query.delete("#."))} format.any {redirect_to tag_path(:name => search_query.delete("#."))}
end end
else else
flash[:error] = I18n.t('tags.show.none', :name => search_query) flash[:error] = I18n.t('tags.show.none', :name => search_query)
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
= t('search') = t('search')
.search-mobile .search-mobile
= form_tag(people_path, :method => 'get') do = form_tag(search_path, :method => 'get') do
%div{:data => {:role => 'fieldcontain', :inline => 'true'}} %div{:data => {:role => 'fieldcontain', :inline => 'true'}}
= search_field_tag :q, nil, :placeholder => t('find_people'), :class => 'search' = search_field_tag :q, nil, :placeholder => t('find_people'), :class => 'search'
= submit_tag t('search'), 'data-inline' => 'true', :class => 'btn' = submit_tag t('search'), 'data-inline' => 'true', :class => 'btn'
......
...@@ -21,3 +21,7 @@ end ...@@ -21,3 +21,7 @@ end
When /^I visit the mobile getting started page$/ do When /^I visit the mobile getting started page$/ do
visit('/getting_started.mobile') visit('/getting_started.mobile')
end end
When /^I visit the mobile search page$/ do
visit('/people.mobile')
end
@javascript
Feature: Interacting with tags
Background:
Given a user with username "alice"
And "alice@alice.alice" has a public post with text "Hello! i am #newhere"
When I sign in as "alice@alice.alice"
And I toggle the mobile view
Scenario: Searching for a tag
When I visit the mobile search page
And I fill in the following:
| q | #newhere |
And I press "Search"
Then I should see "#newhere" within ".ltr"
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter