diff --git a/app/assets/stylesheets/pages/cas_usages-show.css b/app/assets/stylesheets/pages/cas_usages-show.css new file mode 100644 index 0000000000..8b504ab873 --- /dev/null +++ b/app/assets/stylesheets/pages/cas_usages-show.css @@ -0,0 +1,55 @@ +.cas-usage-section { + padding: 3rem 0; +} + +.cas-usage-section.even:nth-of-type(even) { + background-color: var(--background-alt-grey); +} + +.cas-usage-section.odd:nth-of-type(odd) { + background-color: var(--background-alt-grey); +} + +.cas-usage-section:first-of-type { + padding: 0 0 3rem 0; +} + +.viewer-of-content { + border: 1px solid lightgray; + border-radius: 1rem; + padding: 2rem; + background-color: white; +} + +.title-with-modify-button { + display: flex; + flex-direction: row-reverse; + flex-wrap: wrap; + justify-content: right; +} + +.title-with-modify-button .title { + flex-grow: 1; +} + +.cas-usage-properties { + display: flex; + flex-wrap: wrap; + gap: 1rem; +} + +.cas-usage-property { + border: 1px lightgray solid; + padding: 0.5rem 1rem; + border-radius: 5px; +} + +.header-count-badges { + display: flex; + flex-direction: column; + justify-content: center; +} + +.bordered-link-box { + border: 1px solid #000091; +} \ No newline at end of file diff --git a/app/components/instructor_menu_component.html.erb b/app/components/instructor_menu_component.html.erb index e5aa3c95e0..b2fda88903 100644 --- a/app/components/instructor_menu_component.html.erb +++ b/app/components/instructor_menu_component.html.erb @@ -4,14 +4,6 @@ -<% if show_drafts %> -
+ <%= t('.multiple_steps.description') %> +
++ <%= simple_format t(".single_form.description") %> +
+
+ <%= t('instruction.cas_usages.show.identification') %> :
+ <%= @cas_usage.uid %>
+
+ <% if cas_usage.default %>
+
+ <% end %>
+ <%= cas_usage.uid %>
+
+
<%= t('.empty_cas_usages') %>
+ <% end %> +- <%= link_to t('.back'), - instruction_formulaire_path(provider_slug: @data_provider.slug, id: @formulaire.id), - class: 'fr-link fr-icon-arrow-left-line fr-link--icon-left' %> -
-
- <%= t('.sections.identification') %> :
- <%= @cas_usage.uid %>
- — <%= t('instruction.formulaires.show.title') %> :
- <%= link_to @formulaire.name_with_stage,
- instruction_formulaire_path(provider_slug: @data_provider.slug, id: @formulaire.id),
- class: 'fr-link' %>
-
<%= t('.empty_description') %>
- <% end %> -<%= t('.empty_introduction') %>
- <% end %> -| Propriété | -Valeur | -
|---|---|
| <%= t('.flags.public') %> | -<%= t(".#{@cas_usage.public}") %> | -
| <%= t('.flags.startable_by_applicant') %> | -<%= t(".#{@cas_usage.startable_by_applicant}") %> | -
| - <%= t('.flags.single_page_view') %> - - - - | -
- <% if @cas_usage.single_page_view.present? %>
- <%= @cas_usage.single_page_view %>
- <% else %>
- <%= t('.flags.single_page_view_default') %>
- <% end %>
- |
-
- <%= t(".flow.mode.#{mode_label}_intro") %>
- <% if mode_label == :single_page %>
-
- <%= @cas_usage.single_page_view.presence || @cas_usage.uid.underscore %>
+
<%= name %>
- <% end %>
- <% if out_of_catalog %>
-
- <% end %>
- <%= t('.flow.empty_catalog') %>
+| <%= t('.flow.tabs.data_column') %> | -<%= t('.flow.tabs.data_value') %> | -
|---|---|
- formulaire.blocks
-
-
-
- |
-
- <% catalog = @formulaire.blocks.map { |b| b[:name] || b['name'] } %>
- <% if catalog.any? %>
-
|
-
steps |
-
- <% step_names = @cas_usage.steps.map { |s| s[:name] || s['name'] } %>
- <% if step_names.any? %>
-
|
-
static_blocks |
-
- <% block_names = @cas_usage.static_blocks.map { |b| b[:name] || b['name'] } %>
- <% if block_names.any? %>
-
|
-
single_page_view |
-
- <% if @cas_usage.single_page_view.present? %>
- <%= @cas_usage.single_page_view %>
- <% else %>
- nil
- <% end %>
- |
-
<%= t(".#{@cas_usage.public}") %>
<%= t('.empty_scopes_config') %>
- <% else %> - <% disabled_set = (@cas_usage.scopes_config[:disabled] || []).to_set %> - <% hidden_set = (@cas_usage.scopes_config[:hide] || []).to_set %> - <% displayed_whitelist = @cas_usage.scopes_config[:displayed].presence %> - <% preset_set = (@cas_usage.initialize_with[:scopes] || []).to_set %> -<%= t(".#{@cas_usage.startable_by_applicant}") %>
+ <%= t('.scopes_config_intro') %>
- +<%= group_name %>
- <% end %> - -
+ <% if @cas_usage.single_page_view.present? %>
+ Oui (<%= @cas_usage.single_page_view %>)
+ <% else %>
+ <%= t('.flags.single_page_view_default') %>
<% end %>
- <%= code_data.to_yaml(line_width: -1).sub(/\A---\n/, '') %>
+ <%= t('.formulaire_scopes_intro') %>
- <% formulaire_scopes_dump = { - 'formulaire_scopes' => @formulaire.scopes.map { |s| - { - 'name' => s.name, - 'value' => s.value, - 'group' => s.group, - 'link' => s.link, - 'included' => s.included? || nil, - 'disabled' => s.disabled? || nil, - 'deprecated' => (s.deprecated_date if s.deprecated?), - }.compact - }, - } %> -<%= formulaire_scopes_dump.to_yaml(line_width: -1).sub(/\A---\n/, '') %>
- <%= t('.empty_initial_data') %>
- <% else %> -<%= t('.initial_data_tabs.form_intro') %>
- <% initial_data.each do |key, value| %> - <% label = t("activerecord.attributes.authorization_request.#{key}", default: key.to_s.humanize) %> - <% input_id = "initial-#{@cas_usage.uid}-#{key}".parameterize %> -<%= JSON.pretty_generate(value) %>
- <% end %>
- <% end %>
- <%= initial_data.deep_stringify_keys.to_yaml(line_width: -1).sub(/\A---\n/, '') %>
- - <%= @cas_usage.service_provider.name %> - <% if @cas_usage.service_provider.try(:editor?) %> - - <% end %> -
- <% else %> -<%= t('.no_service_provider') %>
- <% end %> -- <%= link_to t('instruction.data_providers.title'), - instruction_data_providers_path, - class: 'fr-link fr-icon-arrow-left-line fr-link--icon-left' %> -
diff --git a/app/views/instruction/data_providers/index.html.erb b/app/views/instruction/data_providers/index.html.erb index 5c305eae60..65df0f3fcd 100644 --- a/app/views/instruction/data_providers/index.html.erb +++ b/app/views/instruction/data_providers/index.html.erb @@ -1,51 +1,42 @@ <% set_title! t('page_titles.instruction.data_providers_index') %> -
<%= t('instruction.data_providers.title') %>
-<%= t('.subtitle') %>
+<%= t('.empty') %>
- <% else %> -
- <%= data_provider.slug %>
+<% if @data_providers.empty? %>
+
<%= t('.empty') %>
+<% else %> +
+ <%= data_provider.slug %>
+
<%= email.body_text %>+ <% end %> + +
+ <%= t('instruction.formulaires.show.identification') %> :
+ <%= @formulaire.id %>
+
<%= t('.empty') %>
<% else %>- <%= truncate(formulaire.description.to_s, length: 200) %> + <%#= truncate(formulaire.description.to_s, length: 200) %>
- <%= link_to t('.back'), - instruction_formulaires_path(provider_slug: @data_provider.slug), - class: 'fr-link fr-icon-arrow-left-line fr-link--icon-left' %> -
+
- <%= t('.sections.identification') %> :
- <%= @formulaire.id %>
-
<%= @formulaire.kind.presence || content_tag(:span, t('.empty_value'), class: 'fr-text-mention--grey') %>
+ <%= @formulaire.description %>
-<%= t(".#{@formulaire.startable_by_applicant}") %>
+ | <%= t('.fields.label') %> | -<%= t('.fields.value') %> | -
|---|---|
| <%= t('.fields.kind') %> | -<%= @formulaire.kind.presence || content_tag(:span, t('.empty_value'), class: 'fr-text-mention--grey') %> | -
| <%= t('.fields.link') %> | -- <% if @formulaire.link.present? %> - <%= link_to @formulaire.link, @formulaire.link, class: 'fr-link', target: '_blank', rel: 'noopener' %> - <% else %> - <%= t('.empty_value') %> - <% end %> - | -
| <%= t('.fields.access_link') %> | -
- <% if @formulaire.access_link.present? %>
- <%= @formulaire.access_link %>
- <% else %>
- <%= t('.empty_value') %>
- <% end %>
- |
-
| <%= t('.fields.cgu_link') %> | -- <% if @formulaire.cgu_link.present? %> - <%= link_to @formulaire.cgu_link, @formulaire.cgu_link, class: 'fr-link', target: '_blank', rel: 'noopener' %> - <% else %> - <%= t('.empty_value') %> - <% end %> - | -
| <%= t('.fields.support_email') %> | -- <% if @formulaire.support_email.present? %> - <%= mail_to @formulaire.support_email, @formulaire.support_email, class: 'fr-link' %> - <% else %> - <%= t('.empty_value') %> - <% end %> - | -
<%= t(".#{@formulaire.unique}") %>
+ | <%= t('.fields.label') %> | -<%= t('.fields.value') %> | -
|---|---|
| <%= t('.flags.public') %> | -<%= t(".#{@formulaire.public}") %> | -
| <%= t('.flags.startable_by_applicant') %> | -<%= t(".#{@formulaire.startable_by_applicant}") %> | -
| <%= t('.flags.unique') %> | -<%= t(".#{@formulaire.unique}") %> | -
<%= t(".#{value}", default: 'Non') %>
+ <%= name %> : <%= t(".#{value}", default: value.to_s) %>
-
- <%= cas_usage.uid %>
+ <% if @cas_usages_count > 1 %>
+
+ Facilitez votre instruction ainsi que les demandes en préremplissant votre formulaire <%=@formulaire.name %> avec des cas d'usages +
++ Consultez le contenu et les destinataires des emails automatiques envoyés durant tout le cycle de vie d'une demande +
+<%= t('.empty_cas_usages') %>
- <% end %> - -