-
Notifications
You must be signed in to change notification settings - Fork 100
ETQ admin, ma démarche est indexable par les moteurs de recherche, mais je peux le désactiver #12145
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
Open
colinux
wants to merge
8
commits into
demarches-simplifiees:main
Choose a base branch
from
colinux:seo
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
ETQ admin, ma démarche est indexable par les moteurs de recherche, mais je peux le désactiver #12145
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
89dbfb0
chore(seo): allow robots access on /commencer pages
colinux 217cf15
chore(seo): commencer pages are indexable when publiee
colinux be87c8f
chore(schema): add robots_indexable on procedures
colinux 44fef30
refactor: publish form with rails-way naming conventions
colinux b88d47d
chore(procedure): admin can toggle robots preference
colinux 32ca337
test: merge similar procedures examples
colinux 56a291e
feat(procedure): apply noindex directive on non indexable procedure
colinux 37cd550
refactor(herb): convert publish form partial to herb
colinux File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
app/views/administrateurs/procedures/_publication_form.html.haml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 0 additions & 43 deletions
43
app/views/administrateurs/procedures/_publication_form_inputs.html.haml
This file was deleted.
Oops, something went wrong.
49 changes: 49 additions & 0 deletions
49
app/views/administrateurs/procedures/_publication_form_inputs.html.herb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<div class="fr-input-group"> | ||
<%= form.label :path, class: 'fr-label' do %> | ||
<%= t('activerecord.attributes.procedure.procedure_path') %> | ||
<span class="fr-hint-text"><%= t('activerecord.attributes.procedure.hints.procedure_path') %></span> | ||
<% end %> | ||
|
||
<div class="fr-input"> | ||
<div class="flex"> | ||
<span class="placeholder"><%= commencer_url(path: '') %></span> | ||
<%= form.text_field(:path, value: procedure.suggested_path, | ||
placeholder: t('activerecord.attributes.procedure.procedure_path_placeholder'), | ||
required: true, | ||
class: 'unstyled flex-1', | ||
pattern: '[a-z0-9.\-_]{3,200}', | ||
autocomplete: 'off', | ||
data: { controller: 'turbo-input', turbo_input_url_value: admin_procedure_check_path_path }) %> | ||
</div> | ||
</div> | ||
|
||
<div id="check_path"></div> | ||
</div> | ||
|
||
<div class="fr-input-group"> | ||
<%= form.label :lien_site_web, class: 'fr-label' do %> | ||
<%= t('activerecord.attributes.procedure.lien_site_web') %> | ||
<span class="fr-hint-text"><%= t('activerecord.attributes.procedure.hints.lien_site_web') %></span> | ||
<% end %> | ||
<%= form.text_field(:lien_site_web, | ||
required: true, | ||
class: 'fr-input', | ||
autocomplete: 'off') %> | ||
</div> | ||
|
||
<div class="fr-input-group"> | ||
<%= render Dsfr::ToggleComponent.new(form:, target: :robots_indexable, extra_class_names: "fr-mt-4w", | ||
title: "Cette démarche est référençable par les moteurs de recherche (Google, …) pour aider les usagers à la découvrir", | ||
) %> | ||
</div> | ||
|
||
<% if closed_procedures.present? %> | ||
<div class="fr-select-group"> | ||
<%= label_tag :old_procedure, class: 'fr-label' do %> | ||
<%= t('activerecord.attributes.procedure.old_procedure') %> | ||
<%= t('utils.no_mandatory') %> | ||
<span class="fr-hint-text"><%= t('activerecord.attributes.procedure.hints.old_procedure') %></span> | ||
<% end %> | ||
<%= select_tag :old_procedure, options_for_select(@closed_procedures), include_blank: true, class: 'fr-select' %> | ||
</div> | ||
<% end %> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
db/migrate/20250930160810_add_robots_indexable_on_procedures.rb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# frozen_string_literal: true | ||
|
||
class AddRobotsIndexableOnProcedures < ActiveRecord::Migration[7.2] | ||
def change | ||
add_column :procedures, :robots_indexable, :boolean, default: true, null: false | ||
end | ||
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Je comprends le raisonnement de mettre
true
pour le stock.Tu te dis que de toutes façon les procédures dites
privées/internes/confidentielles
n'ont pas leur lien dispo sur internet et ne sont donc pas découvertes.Et mm si qq liens étaient disponibles, notre configuration actuelle rend au moins le titre publique + lien vers la page indexé, donc on est déjà à moitié indexable par défaut (pas totalement remarque).
Je pense que cela peut surprendre les administrateurs des dites procédures de constater qu'elle sont passé par défaut en indexable.
A minima, il faudrait faire une comm pour que les admins puissent rapidement changer cette option.