Skip to content
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

Permet d'installer un plugin de recherche #2387

Merged
merged 2 commits into from Mar 31, 2015

Conversation

Projects
None yet
8 participants
@Fulbert
Copy link
Contributor

commented Mar 1, 2015

Q R
Correction de bugs ? non
Nouvelle Fonctionnalité ? oui
Tickets (issues) concernés

Pour QA :

  • Ajouter le plugin de recherche sur plusieurs navigateurs
  • Vérifier que les recherches aboutissent bien (*Attention : * il faut que la variable ZDS_APP['site']['url'] corresponde à la réalité pour que les recherches aboutissent.)
@landscape-bot

This comment has been minimized.

Copy link

commented Mar 1, 2015

Code Health
Repository health decreased by 0.00% when pulling 0882d7f on Fulbert:opensearch into 5098d3f on zestedesavoir:dev.

@Eskimon

This comment has been minimized.

Copy link
Member

commented Mar 2, 2015

Va falloir etre un peu plus explicite car la ca sert a quoi concrètement ?


def opensearch(request):
"""Generate OpenSearch Description file"""

This comment has been minimized.

Copy link
@Eskimon

Eskimon Mar 2, 2015

Member

Erreur Travis Flake8 - Il y a un espace dans cette ligne blanche

'site_name': settings.ZDS_APP['site']['litteral_name'],
'site_image_16': '',
'search_url': settings.ZDS_APP['site']['url'] + reverse('haystack_search')
}, content_type='text/xml')

This comment has been minimized.

Copy link
@Eskimon

Eskimon Mar 2, 2015

Member

Erreur Travis Flake8 - Il manque un saut de ligne a la fin du fichier

@Fulbert

This comment has been minimized.

Copy link
Contributor Author

commented Mar 3, 2015

Oui j'ai vu les erreurs Travis.

Il y a souvent une petite barre de recherche à droite de la barre d'adresse dans les navigateurs. Et la liste des moteurs de recherches utilisable avec cette barre est personnalisable. Grâce à ce fichier opensearch.xml, et un petit lien dans les meta, les navigateurs permettent d'ajouter le moteur de recherche de Zeste de Savoir en deux clics. Sur Firefox par exemple, il y a un petit signe "plus" qui apparait sur la petite loupe lorsqu'un site propose cette fonctionnalité.

@landscape-bot

This comment has been minimized.

Copy link

commented Mar 3, 2015

Code Health
Repository health decreased by 0.00% when pulling 1942715 on Fulbert:opensearch into 5098d3f on zestedesavoir:dev.

@Eskimon

This comment has been minimized.

Copy link
Member

commented Mar 3, 2015

Ahhh bah merci c'est nettement plus clair comme ça :D (pas d'ironie hein, j'avais vraiment pas vu le but). C'est une bonne idée je trouve :)

@Fulbert Fulbert force-pushed the Fulbert:opensearch branch from 1942715 to 758f155 Mar 3, 2015

@landscape-bot

This comment has been minimized.

Copy link

commented Mar 3, 2015

Code Health
Repository health increased by 0.00% when pulling 758f155 on Fulbert:opensearch into 5098d3f on zestedesavoir:dev.

return render(request, 'search/opensearch.xml', {
'site_name': settings.ZDS_APP['site']['litteral_name'],
'site_image_16': '',
'search_url': settings.ZDS_APP['site']['url'] + reverse('haystack_search')

This comment has been minimized.

Copy link
@Fulbert

Fulbert Mar 3, 2015

Author Contributor

Je suis pas sûr concernant la méthode pour récupérer l'URL. Vous en pensez quoi ?

This comment has been minimized.

Copy link
@DevHugo

DevHugo Mar 7, 2015

Contributor

Ça m'a l'air ok (à tester).

@@ -104,6 +104,9 @@

{# RSS links #}
<link rel="alternate" type="application/rss+xml" title="Forum" href="{% url "post-feed-rss" %}">

{# OpenSearch plugin autodiscovery #}
<link rel="search" type="application/opensearchdescription+xml" title="{{ app.site.litteral_name }}" href="{% url "zds.search.views.opensearch" %}">

This comment has been minimized.

Copy link
@DevHugo

DevHugo Mar 7, 2015

Contributor

L'attribut title me semble pas pertinent

This comment has been minimized.

Copy link
@Fulbert

Fulbert Mar 21, 2015

Author Contributor

Sur Firefox, lorsque l'on clique pour ajouter le plugin de recherche, il y a la phrase : Ajouter "Zeste de Savoir". Ce qui me semble correct ? Si je mets "Rechercher sur Zeste de Savoir", ça rend Ajouter "Rechercher sur Zeste de Savoir".

This comment has been minimized.

Copy link
@DevHugo

DevHugo Mar 27, 2015

Contributor

C'est bon au début, y'avait rien.

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>

This comment has been minimized.

Copy link
@DevHugo

DevHugo Mar 7, 2015

Contributor

Ça serait cool, d'ajouter les attributs suivants:

   <AdultContent>false</AdultContent>
    <Language>fr-fr</Language>
    <Contact>http://zestedesavoir.com/pages/contact/</Contact>
``

Et au moins une balise pour l'image favicon 
<Image height="57" width="57" type="image/png">http://zestedesavoir.com/static/images/favicon.cbe63cc70f5c.png</Image>

``

form_class=CustomSearchForm
), name='haystack_search'))

urlpatterns += patterns('',

This comment has been minimized.

Copy link
@DevHugo

DevHugo Mar 7, 2015

Contributor

Tu peux directement écrire quelque chose comme :

urlpatterns = patterns(
                        url(r'^$', search_view_factory(
                            view_class=CustomSearchView,
                            template='search/search.html',
                            form_class=CustomSearchForm
                        ), name='haystack_search'),

                        url(r'^opensearch.xml', 'zds.search.views.opensearch')
)

This comment has been minimized.

Copy link
@Fulbert

Fulbert Mar 21, 2015

Author Contributor

Ça ne fonctionne pas comme ça (tu as enlevé le premier paramètre haystack.views).


return render(request, 'search/opensearch.xml', {
'site_name': settings.ZDS_APP['site']['litteral_name'],
'site_image_16': '',

This comment has been minimized.

Copy link
@DevHugo

DevHugo Mar 7, 2015

Contributor

Tu utilise cet attribut ? sinon, il sert a quoi ?

@DevHugo

This comment has been minimized.

Copy link
Contributor

commented Mar 7, 2015

Sympa comme idée, j'ai fait quelques petites remarques !

Un petit exemple assez complet: http://davidwalsh.name/open-search

@Fulbert

This comment has been minimized.

Copy link
Contributor Author

commented Mar 7, 2015

Merci pour les remarques, je vais faire les modifs nécessaires plus tard...

@artragis

This comment has been minimized.

Copy link
Member

commented Mar 11, 2015

Il serait aussi sympa de mettre un peu de doc. Si tu veux, je peux même l'écrire et te faire une PR !

Ce modèle-là semble sympa.
http://zds-site.readthedocs.org/fr/latest/utils/pdf-generator.html

@Eskimon

This comment has been minimized.

Copy link
Member

commented Mar 19, 2015

@Fulbert tu es toujours là ? :)

@landscape-bot

This comment has been minimized.

Copy link

commented Mar 19, 2015

Code Health
Repository health decreased by 0.14% when pulling 758f155 on Fulbert:opensearch into c827d7e on zestedesavoir:dev.

@Fulbert

This comment has been minimized.

Copy link
Contributor Author

commented Mar 20, 2015

Voui, j'ai pas eu le temps de m'y pencher. J'espère pouvoir le faire samedi.

2015-03-19 12:02 GMT-07:00 landscape-bot notifications@github.com:

[image: Code Health] https://landscape.io/diff/114841
Repository health decreased by 0.14% when pulling 758f155
Fulbert@758f155
on Fulbert:opensearch
into c827d7e
c827d7e
on zestedesavoir:dev
.


Reply to this email directly or view it on GitHub
#2387 (comment)
.

@Fulbert

This comment has been minimized.

Copy link
Contributor Author

commented Mar 21, 2015

Je pense que c'est mergeable si QA ok. :)

@landscape-bot

This comment has been minimized.

Copy link

commented Mar 21, 2015

Code Health
Repository health decreased by 0.14% when pulling 6657d5e on Fulbert:opensearch into c827d7e on zestedesavoir:dev.

@coveralls

This comment has been minimized.

Copy link

commented Mar 21, 2015

Coverage Status

Coverage increased (+0.81%) to 79.26% when pulling 6657d5e on Fulbert:opensearch into c827d7e on zestedesavoir:dev.

@pierre-24

This comment has been minimized.

Copy link
Member

commented Mar 31, 2015

Rapport de QA: ok sous Firefox (ou c'est évident) et sous chrome (ou ça l'est un petit peu moins).

À merger ;)

(ping @Eskimon ?)

SpaceFox added a commit that referenced this pull request Mar 31, 2015

Merge pull request #2387 from Fulbert/opensearch
Permet d'installer un plugin de recherche

@SpaceFox SpaceFox merged commit 8f217e5 into zestedesavoir:dev Mar 31, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@SpaceFox

This comment has been minimized.

Copy link
Member

commented Mar 31, 2015

Trop tard, j'ai mergé d'abord !

@SpaceFox SpaceFox added the Evolution label Mar 31, 2015

@SpaceFox SpaceFox added the C-Front label Mar 31, 2015

@SpaceFox SpaceFox added this to the Version 1.8 milestone Mar 31, 2015

@Eskimon

This comment has been minimized.

Copy link
Member

commented Mar 31, 2015

:(

@SpaceFox SpaceFox modified the milestones: Version 1.8, Version 1.7 Apr 2, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.