diff --git a/app/views/admin/budget_investments/_written_by_author.html.erb b/app/views/admin/budget_investments/_written_by_author.html.erb index ec2582fdc..b2bc5b5b5 100644 --- a/app/views/admin/budget_investments/_written_by_author.html.erb +++ b/app/views/admin/budget_investments/_written_by_author.html.erb @@ -6,7 +6,6 @@
-

<%= @investment.title %>

@@ -59,35 +58,3 @@ <%= text_with_links @investment.external_url %> 

<% end %> - -<%= safe_html_with_links @investment.description %> - -

- <%= t("admin.budget_investments.show.image") %>: - - <% if @investment.image.present? %> - <%= link_to t("admin.budget_investments.show.see_image"), - namespaced_budget_investment_path(@investment, {anchor: "image"}), - target: "blank" %> - <% else %> - <%= t("admin.budget_investments.show.no_image") %> - <% end %> -

- -

- <%= t("admin.budget_investments.show.documents") %>: - - <% if @investment.documents.present? %> - <%= link_to t("admin.budget_investments.show.see_documents", - count: @investment.documents.count), - namespaced_budget_investment_path(@investment, {anchor: "documents"}), - target: "blank" %> - <% else %> - <%= t("admin.budget_investments.show.no_documents") %> - <% end %> -

- -

- <%= t("admin.budget_investments.show.user_tags") %>: - <%= @investment.tag_list.sort.join(", ") %> -

diff --git a/app/views/admin/budget_investments/show.html.erb b/app/views/admin/budget_investments/show.html.erb index d364118ca..b77b9216b 100644 --- a/app/views/admin/budget_investments/show.html.erb +++ b/app/views/admin/budget_investments/show.html.erb @@ -5,10 +5,19 @@ <%= render "written_by_author" %> -<%= link_to t("admin.budget_investments.show.edit"), - edit_admin_budget_budget_investment_path(@budget, @investment, - Budget::Investment.filter_params(params).to_h) unless @budget.finished? %> +

<%= t("admin.budget_investments.show.preview") %>

+
+ <%= link_to t("admin.budget_investments.show.edit"), + edit_admin_budget_budget_investment_path( + @budget, + @investment, + Budget::Investment.filter_params(params).to_h + ), + class: "button hollow" unless @budget.finished? %> +
+
+<%= render partial: "/budgets/investments/investment_detail", locals: {investment: @investment, preview: true} %>

<%= t("admin.budget_investments.show.classification") %>

diff --git a/app/views/budgets/investments/_investment_detail.erb b/app/views/budgets/investments/_investment_detail.erb new file mode 100644 index 000000000..6c49abe38 --- /dev/null +++ b/app/views/budgets/investments/_investment_detail.erb @@ -0,0 +1,77 @@ +

<%= investment.title %>

+
+ <%= render "/shared/author_info", resource: investment %> + +  •  + <%= l investment.created_at.to_date %> +  •  + <%= investment.heading.name %> +  •  + <% if local_assigns[:preview].nil? %> + + <%= render "budgets/investments/flag_actions", investment: investment %> + + <% end %> +
+ +
+ +<%= render_image(investment.image, :large, true) if investment.image.present? %> + +

+ <%= t("budgets.investments.show.code_html", code: investment.id) %> +

+ +<%= safe_html_with_links investment.description.html_safe %> + +<% if feature?(:map) && map_location_available?(@investment.map_location) %> +
+ <%= render_map(investment.map_location, "budget_investment", false, nil) %> +
+<% end %> + +<% if investment.location.present? %> +

+ <%= t("budgets.investments.show.location_html", location: investment.location) %> +

+<% end %> + +<% if investment.organization_name.present? %> +

+ <%= t("budgets.investments.show.organization_name_html", name: investment.organization_name) %> +

+<% end %> + +<% if feature?(:allow_attached_documents) %> + <%= render "documents/documents", + documents: investment.documents, + max_documents_allowed: Budget::Investment.max_documents_allowed %> +<% end %> + +<%= render "shared/tags", taggable: investment %> + +<% if investment.external_url.present? %> + +<% end %> + +<% if investment.should_show_unfeasibility_explanation? %> +

<%= t("budgets.investments.show.unfeasibility_explanation") %>

+

<%= investment.unfeasibility_explanation %>

+<% end %> + +<% if investment.should_show_price_explanation? %> +

+ <%= t("budgets.investments.show.price_explanation") %> +

+

<%= investment.price_explanation %>

+<% end %> + +<% if local_assigns[:preview].nil? %> + <%= render "relationable/related_content", relationable: investment %> + +
+ <%= render "budgets/investments/actions", investment: investment %> +
+<% end %> diff --git a/app/views/budgets/investments/_investment_show.html.erb b/app/views/budgets/investments/_investment_show.html.erb index ecc2645bc..529699001 100644 --- a/app/views/budgets/investments/_investment_show.html.erb +++ b/app/views/budgets/investments/_investment_show.html.erb @@ -18,79 +18,7 @@
<%= back_link_to budget_investments_path(investment.budget, heading_id: investment.heading) %> -

<%= investment.title %>

-
- <%= render "/shared/author_info", resource: investment %> - -  •  - <%= l investment.created_at.to_date %> -  •  - <%= investment.heading.name %> -  •  - - <%= render "budgets/investments/flag_actions", investment: @investment %> - -
- -
- - <%= render_image(investment.image, :large, true) if investment.image.present? %> - -

- <%= t("budgets.investments.show.code_html", code: investment.id) %> -

- - <%= safe_html_with_links investment.description.html_safe %> - - <% if feature?(:map) && map_location_available?(@investment.map_location) %> -
- <%= render_map(@investment.map_location, "budget_investment", false, nil) %> -
- <% end %> - - <% if investment.location.present? %> -

- <%= t("budgets.investments.show.location_html", location: investment.location) %> -

- <% end %> - - <% if investment.organization_name.present? %> -

- <%= t("budgets.investments.show.organization_name_html", name: investment.organization_name) %> -

- <% end %> - - <% if feature?(:allow_attached_documents) %> - <%= render "documents/documents", - documents: investment.documents, - max_documents_allowed: Budget::Investment.max_documents_allowed %> - <% end %> - - <%= render "shared/tags", taggable: investment %> - - <% if investment.external_url.present? %> - - <% end %> - - <% if investment.should_show_unfeasibility_explanation? %> -

<%= t("budgets.investments.show.unfeasibility_explanation") %>

-

<%= investment.unfeasibility_explanation %>

- <% end %> - - <% if investment.should_show_price_explanation? %> -

- <%= t("budgets.investments.show.price_explanation") %> -

-

<%= investment.price_explanation %>

- <% end %> - - <%= render "relationable/related_content", relationable: @investment %> - -
- <%= render "budgets/investments/actions", investment: @investment %> -
+ <%= render partial: "/budgets/investments/investment_detail", locals: {investment: investment} %>
+
+

<%= t("valuation.budget_investments.show.dossier") %>

<%= link_to t("valuation.budget_investments.show.edit_dossier"), edit_valuation_budget_budget_investment_path(@budget, @investment) %>

<%= render "dossier" %> +
+ <%= render "valuation/budget_investments/valuation_comments" %> diff --git a/config/locales/ar/admin.yml b/config/locales/ar/admin.yml index 8601e856e..10c1d77ab 100644 --- a/config/locales/ar/admin.yml +++ b/config/locales/ar/admin.yml @@ -255,7 +255,6 @@ ar: dossier: إضبارة edit_dossier: تحرير إضبارة tags: علامات - user_tags: علامات المستخدم undefined: غير معرف compatibility: title: التوافق @@ -269,12 +268,6 @@ ar: title: الفائز "true": "نعم" "false": "لا" - image: "صورة" - see_image: "رؤية الصورة" - no_image: "بدون صورة" - documents: "الوثائق" - see_documents: "رؤية الوثائق (%{count})" - no_documents: "بدون وثائق" valuator_groups: "مجموعات المقيمين" edit: classification: تصنيف diff --git a/config/locales/ast/admin.yml b/config/locales/ast/admin.yml index 23141b81d..84afe128a 100644 --- a/config/locales/ast/admin.yml +++ b/config/locales/ast/admin.yml @@ -165,8 +165,6 @@ ast: title: Ganadora "true": "Sí" "false": "Non" - image: "Imaxe" - documents: "Documentos" edit: selection: Selección assigned_valuators: Evaluaores diff --git a/config/locales/cs-CZ/admin.yml b/config/locales/cs-CZ/admin.yml index 0a3eabfe1..8d8e3f7d1 100644 --- a/config/locales/cs-CZ/admin.yml +++ b/config/locales/cs-CZ/admin.yml @@ -242,13 +242,6 @@ cs: title: Vítěz "true": "Ano" "false": "Ne" - image: "Image" - see_image: "Zobrazit obrázek" - no_image: "Bez obrázku" - documents: "Dokumenty" - see_documents: "Viz dokumenty (%{count})" - no_documents: "Bez dokumentů" - valuator_groups: "Skupiny hodnotitelů" edit: classification: Klasifikace compatibility: Kompatibilita diff --git a/config/locales/de-DE/admin.yml b/config/locales/de-DE/admin.yml index 4618c4aa7..3c1b77a3f 100644 --- a/config/locales/de-DE/admin.yml +++ b/config/locales/de-DE/admin.yml @@ -239,7 +239,6 @@ de: dossier: Bericht edit_dossier: Bericht bearbeiten tags: Tags - user_tags: Benutzer*innentags undefined: Undefiniert compatibility: title: Kompatibilität @@ -253,12 +252,6 @@ de: title: Bestbewerteter Vorschlag "true": "Ja" "false": "Nein" - image: "Bild" - see_image: "Bild anzeigen" - no_image: "Ohne Bild" - documents: "Dokumente" - see_documents: "Dokumente anzeigen (%{count})" - no_documents: "Ohne Dokumente" valuator_groups: "Begutachtungsgruppen" edit: classification: Klassifizierung diff --git a/config/locales/en/admin.yml b/config/locales/en/admin.yml index 83fcf3601..af6bb0f6f 100644 --- a/config/locales/en/admin.yml +++ b/config/locales/en/admin.yml @@ -246,7 +246,6 @@ en: dossier: Dossier edit_dossier: Edit dossier tags: Tags - user_tags: User tags undefined: Undefined compatibility: title: Compatibility @@ -260,13 +259,8 @@ en: title: Winner "true": "Yes" "false": "No" - image: "Image" - see_image: "See image" - no_image: "Without image" - documents: "Documents" - see_documents: "See documents (%{count})" - no_documents: "Without documents" valuator_groups: "Valuator Groups" + preview: Investment preview edit: classification: Classification compatibility: Compatibility diff --git a/config/locales/en/valuation.yml b/config/locales/en/valuation.yml index fbf8c9359..452c0b1e6 100644 --- a/config/locales/en/valuation.yml +++ b/config/locales/en/valuation.yml @@ -57,6 +57,7 @@ en: responsibles: Responsibles assigned_admin: Assigned admin assigned_valuators: Assigned valuators + preview: Investment preview edit: dossier: Dossier price_html: "Price (%{currency})" diff --git a/config/locales/es-PE/admin.yml b/config/locales/es-PE/admin.yml index 75b9a280c..f487090dd 100644 --- a/config/locales/es-PE/admin.yml +++ b/config/locales/es-PE/admin.yml @@ -168,7 +168,6 @@ es-PE: dossier: Informe edit_dossier: Editar informe tags: Etiquetas - user_tags: Etiquetas del usuario undefined: Sin definir compatibility: title: Compatibilidad @@ -179,8 +178,6 @@ es-PE: winner: title: Ganadora "true": "Si" - image: "Imagen" - documents: "Documentos" edit: classification: Clasificación compatibility: Compatibilidad diff --git a/config/locales/es/admin.yml b/config/locales/es/admin.yml index e09e55e4f..32922cd92 100644 --- a/config/locales/es/admin.yml +++ b/config/locales/es/admin.yml @@ -26,7 +26,7 @@ es: all: Todos with_active: Activos with_inactive: Inactivos - preview: Vista previa + preview: Vista previa de presupuesto banner: title: Título description: Descripción @@ -246,7 +246,6 @@ es: dossier: Informe edit_dossier: Editar informe tags: Etiquetas - user_tags: Etiquetas del usuario undefined: Sin definir compatibility: title: Compatibilidad @@ -260,13 +259,8 @@ es: title: Ganador "true": "Si" "false": "No" - image: "Imagen" - see_image: "Ver imagen" - no_image: "Sin imagen" - documents: "Documentos" - see_documents: "Ver documentos (%{count})" - no_documents: "Sin documentos" valuator_groups: "Grupos de evaluadores" + preview: Vista previa edit: classification: Clasificación compatibility: Compatibilidad diff --git a/config/locales/es/valuation.yml b/config/locales/es/valuation.yml index 5117c43c9..08b9ac9b0 100644 --- a/config/locales/es/valuation.yml +++ b/config/locales/es/valuation.yml @@ -57,6 +57,7 @@ es: responsibles: Responsables assigned_admin: Administrador asignado assigned_valuators: Evaluadores asignados + preview: Vista previa de presupuesto edit: dossier: Informe price_html: "Coste (%{currency}) (dato público)" diff --git a/config/locales/eu-ES/admin.yml b/config/locales/eu-ES/admin.yml index 7ea3b3a7c..3449160ce 100644 --- a/config/locales/eu-ES/admin.yml +++ b/config/locales/eu-ES/admin.yml @@ -7,10 +7,6 @@ eu: name: "Izena" budget_headings: name: "Izena" - budget_investments: - show: - image: "Irudia" - documents: "Dokumentuak" milestones: index: image: "Irudia" diff --git a/config/locales/fa-IR/admin.yml b/config/locales/fa-IR/admin.yml index 498d1f83a..c5bd4365c 100644 --- a/config/locales/fa-IR/admin.yml +++ b/config/locales/fa-IR/admin.yml @@ -193,7 +193,6 @@ fa: dossier: پرونده edit_dossier: ویرایش پرونده tags: برچسب ها - user_tags: برچسب های کاربر undefined: تعریف نشده compatibility: title: سازگاری @@ -207,12 +206,6 @@ fa: title: برندگان "true": "بله" "false": "نه" - image: "تصویر" - see_image: "دیدن تصویر" - no_image: "بدون تصویر" - documents: "اسناد" - see_documents: "دیدن اسناد (%{count})" - no_documents: "بدون اسناد" valuator_groups: "گروهای ارزيابي" edit: classification: طبقه بندی @@ -350,7 +343,7 @@ fa: all: همه new: back: برگشت - title: ایجاد یک پروسه جدید قانون مشارکتی + title: ایجاد یک پروسه جدید قانون مشارکتی submit_button: فرآیند را ایجاد کنید proposals: select_order: مرتب سازی بر اساس @@ -506,7 +499,7 @@ fa: homepage: صفحه اصلی pages: صفحه سفارشی images: صفحات سفارشی - content_blocks: محتوای بلوکهای سفارشی + content_blocks: محتوای بلوکهای سفارشی information_texts_menu: debates: "مباحثه" community: "جامعه" @@ -630,7 +623,7 @@ fa: title: خلاصه ارزشیابی برای پروژه های سرمایه گذاری valuator_name: ارزیابی finished_and_feasible_count: تمام شده و امکان پذیر است - finished_and_unfeasible_count: تمام شده و غیر قابل پیش بینی + finished_and_unfeasible_count: تمام شده و غیر قابل پیش بینی finished_count: به پایان رسید in_evaluation_count: در ارزیابی total_count: "جمع\n" @@ -697,7 +690,7 @@ fa: remove_shift: "حذف" search_officer_button: جستجو search_officer_placeholder: جستجو افسر - search_officer_text: جستجو برای افسر برای اختصاص شیفت جدید + search_officer_text: جستجو برای افسر برای اختصاص شیفت جدید select_date: "انتخاب روز" select_task: "وظیفه را انتخاب کنید" table_shift: "تغییر " @@ -887,7 +880,7 @@ fa: no_officials: هیچ مقام رسمی وجود ندارد name: نام official_position: موضع رسمی - official_level: سطح + official_level: سطح level_0: رسمی نیست level_1: سطح 1 level_2: سطح 2 @@ -980,7 +973,7 @@ fa: placeholder: جستجوی غرفه با نام poll_officers_search: button: جستجو - placeholder: جستجو افسران نظرسنجی + placeholder: جستجو افسران نظرسنجی poll_questions_search: button: جستجو placeholder: جستجو پرسش های نظرسنجی @@ -1056,7 +1049,7 @@ fa: title_proposals_with_supports: خلاصه ای برای پروژه های سرمایه گذاری با پشتیبانی geozone_name: دامنه finished_and_feasible_count: تمام شده و امکان پذیر است - finished_and_unfeasible_count: تمام شده و غیر قابل پیش بینی + finished_and_unfeasible_count: تمام شده و غیر قابل پیش بینی finished_count: به پایان رسید in_evaluation_count: در ارزیابی total_count: "جمع\n" @@ -1115,7 +1108,7 @@ fa: loading: " امضاتوسط سرشماری تایید شده است، لطفا این صفحه را رفرش کنید" stats: show: - stats_title: آمار + stats_title: آمار summary: comment_votes: نظر رای comments: توضیحات @@ -1148,7 +1141,7 @@ fa: total: "جمع\n" proposals_with_notifications: طرح با اعلان ها polls: - title: وضعیت نظرسنجی ها + title: وضعیت نظرسنجی ها all: نظر سنجی ها web_participants: وب سایت شرکت کنندگان total_participants: کل شرکت کنندگان @@ -1178,7 +1171,7 @@ fa: title: کاربر no_users: هیچ کاربری وجود ندارد. search: - placeholder: جستجوی کاربر توسط ایمیل و نام یا شماره سند + placeholder: جستجوی کاربر توسط ایمیل و نام یا شماره سند search: جستجو verifications: index: diff --git a/config/locales/fi-FI/admin.yml b/config/locales/fi-FI/admin.yml index 10b6f3da3..af7a036e6 100644 --- a/config/locales/fi-FI/admin.yml +++ b/config/locales/fi-FI/admin.yml @@ -151,12 +151,6 @@ fi: title: Voittaja "true": "Kyllä" "false": "Ei" - image: "Kuva" - see_image: "Näytä kuva" - no_image: "Ilman kuvaa" - documents: "Asiakirjat" - see_documents: "Näytä asiakirjat (%{count})" - no_documents: "Ilman asiakirjoja" edit: classification: Luokitus compatibility: Yhteensopivuus diff --git a/config/locales/fr/admin.yml b/config/locales/fr/admin.yml index 3c1c92d68..2426f0d4c 100644 --- a/config/locales/fr/admin.yml +++ b/config/locales/fr/admin.yml @@ -243,7 +243,6 @@ fr: dossier: Rapport edit_dossier: Éditer le rapport tags: Sujets - user_tags: Tags de l’utilisateur undefined: Indéfini compatibility: title: Compatibilité @@ -257,12 +256,6 @@ fr: title: Gagnants "true": "Oui" "false": "Non" - image: "Image" - see_image: "Voir l’image" - no_image: "Sans image" - documents: "Documents" - see_documents: "Voir les documents (%{count})" - no_documents: "Sans document" valuator_groups: "Groupes de l’évaluateur" edit: classification: Classement diff --git a/config/locales/gl/admin.yml b/config/locales/gl/admin.yml index 27f9738b7..ca064b21f 100644 --- a/config/locales/gl/admin.yml +++ b/config/locales/gl/admin.yml @@ -239,7 +239,6 @@ gl: dossier: Informe edit_dossier: Editar informe tags: Etiquetas - user_tags: Etiquetas do usuario undefined: Sen definir compatibility: title: Compatibilidade @@ -253,12 +252,6 @@ gl: title: Gañadora "true": "Si" "false": "Non" - image: "Imaxe" - see_image: "Ver imaxe" - no_image: "Sen imaxe" - documents: "Documentos" - see_documents: "Ver documentos (%{count})" - no_documents: "Sen documentos" valuator_groups: "Grupos de avaliadores" edit: classification: Clasificación diff --git a/config/locales/he/admin.yml b/config/locales/he/admin.yml index 5a4160885..959001529 100644 --- a/config/locales/he/admin.yml +++ b/config/locales/he/admin.yml @@ -266,13 +266,6 @@ he: title: זוכה "true": "כן" "false": "לא" - image: "תמונה" - see_image: "ראה תמונה" - no_image: "ללא תמונה" - documents: "מסמכים" - see_documents: "ראה את המסמכים (%{count})" - no_documents: "ללא מסמכים" - valuator_groups: "קבוצת המעריכים" edit: classification: סיווג compatibility: תאימות diff --git a/config/locales/id-ID/admin.yml b/config/locales/id-ID/admin.yml index 98a73e6e8..251f0cda5 100644 --- a/config/locales/id-ID/admin.yml +++ b/config/locales/id-ID/admin.yml @@ -229,7 +229,6 @@ id: dossier: Berkas edit_dossier: Sunting berkas tags: Tag - user_tags: Tag Pengguna undefined: Tidak terdefinisi compatibility: title: Kecocokan @@ -243,10 +242,6 @@ id: title: Pemenang "true": "Ya" "false": "Tidak" - image: "Gambar" - see_image: "Lihat gambar" - no_image: "Tanpa gambar" - documents: "Dokumen" edit: classification: Klasifikasi compatibility: Kecocokan diff --git a/config/locales/it/admin.yml b/config/locales/it/admin.yml index 4fe3ae6a2..db37ca49c 100644 --- a/config/locales/it/admin.yml +++ b/config/locales/it/admin.yml @@ -207,7 +207,6 @@ it: dossier: Dossier edit_dossier: Modificare il dossier tags: Etichette - user_tags: Etichette utente undefined: Non definito compatibility: title: Compatibilità @@ -221,12 +220,6 @@ it: title: Vincitore "true": "Sì" "false": "No" - image: "Immagine" - see_image: "Vedi immagine" - no_image: "Senza immagine" - documents: "Documenti" - see_documents: "Vedi documenti (%{count})" - no_documents: "Senza documenti" valuator_groups: "Gruppi di stimatori" edit: classification: Classificazione diff --git a/config/locales/nl/admin.yml b/config/locales/nl/admin.yml index 2f4f667b9..6742eedbe 100644 --- a/config/locales/nl/admin.yml +++ b/config/locales/nl/admin.yml @@ -245,7 +245,6 @@ nl: dossier: Dossier edit_dossier: Edit dossier tags: Tags - user_tags: Deelnemerslabels undefined: Undefined compatibility: title: Compatibiliteit @@ -259,12 +258,6 @@ nl: title: Winnaar "true": "Ja" "false": "Nee" - image: "Afbeelding" - see_image: "Zie afbeelding" - no_image: "Zonder afbeelding" - documents: "Documenten" - see_documents: "zie documenten (%{count})" - no_documents: "Zonder documenten" valuator_groups: "Beoordelingsgroepen" edit: classification: Clasificatie diff --git a/config/locales/pl-PL/admin.yml b/config/locales/pl-PL/admin.yml index 52cca88dc..b776bb972 100644 --- a/config/locales/pl-PL/admin.yml +++ b/config/locales/pl-PL/admin.yml @@ -245,7 +245,6 @@ pl: dossier: Dokumentacja edit_dossier: Edytuj dokumentację tags: Tagi - user_tags: Tagi użytkownika undefined: Niezdefiniowany compatibility: title: Zgodność @@ -259,12 +258,6 @@ pl: title: Zwycięzca "true": "Tak" "false": "Nie" - image: "Obraz" - see_image: "Zobacz obraz" - no_image: "Bez obrazu" - documents: "Dokumenty" - see_documents: "Zobacz dokumenty (%{count})" - no_documents: "Bez dokumentów" valuator_groups: "Grupy Wyceniające" edit: classification: Klasyfikacja diff --git a/config/locales/pt-BR/admin.yml b/config/locales/pt-BR/admin.yml index 5a0c12006..38f117d45 100644 --- a/config/locales/pt-BR/admin.yml +++ b/config/locales/pt-BR/admin.yml @@ -202,7 +202,6 @@ pt-BR: dossier: Dossiê edit_dossier: Editar dossiê tags: Marcação - user_tags: Marcações do usuário undefined: Não definido compatibility: title: Compatibilidade @@ -216,12 +215,6 @@ pt-BR: title: Vencedor "true": "Sim" "false": "Não" - image: "Imagem" - see_image: "Exibir imagem" - no_image: "Sem imagem" - documents: "Documentos" - see_documents: "Exibir documentos (%{count})" - no_documents: "Sem documentos" valuator_groups: "Grupos de avaliação" edit: classification: Classificação diff --git a/config/locales/ru/admin.yml b/config/locales/ru/admin.yml index 2e5d6c302..b13892510 100644 --- a/config/locales/ru/admin.yml +++ b/config/locales/ru/admin.yml @@ -247,7 +247,6 @@ ru: dossier: Пакет документов edit_dossier: Редактировать пакет документов tags: Метки - user_tags: Метки пользователя undefined: Неопределено compatibility: title: Совместимость @@ -261,12 +260,6 @@ ru: title: Победитель "true": "Да" "false": "Нет" - image: "Изображение" - see_image: "Смотреть изображение" - no_image: "Без изображения" - documents: "Документы" - see_documents: "Смотреть документы (%{count})" - no_documents: "Без документов" valuator_groups: "Группы оценки" edit: classification: Классификация diff --git a/config/locales/sl-SI/admin.yml b/config/locales/sl-SI/admin.yml index 93938dd55..031b32760 100644 --- a/config/locales/sl-SI/admin.yml +++ b/config/locales/sl-SI/admin.yml @@ -154,7 +154,6 @@ sl: dossier: Dosje edit_dossier: Uredi dosje tags: Oznake - user_tags: Uporabniške oznake undefined: Nedefinirano compatibility: title: Kompatibilnost @@ -168,12 +167,6 @@ sl: title: Zmagovalec "true": "Da" "false": "Ne" - image: "Slika" - see_image: "Poglej sliko" - no_image: "Brez slike" - documents: "Dokumenti" - see_documents: "Poglej dokumente (%{count})" - no_documents: "Brez dokumentov" edit: classification: Klasifikacija compatibility: Kompatibilnost diff --git a/config/locales/so-SO/admin.yml b/config/locales/so-SO/admin.yml index 4250acbac..54a2afc26 100644 --- a/config/locales/so-SO/admin.yml +++ b/config/locales/so-SO/admin.yml @@ -202,7 +202,6 @@ so: dossier: Koob edit_dossier: Tafatiraha Warqadaha tags: Tagyada - user_tags: Isamalaha taaga undefined: Aan la garanayn compatibility: title: U Hogaansanan @@ -216,12 +215,6 @@ so: title: Guleyste "true": "Haa" "false": "Maya" - image: "Sawiir" - see_image: "Muuji sawir" - no_image: "Sawir la an" - documents: "Dukumentiyo" - see_documents: "Arag dukumeentiyada%{count}" - no_documents: "Dukumenti La an" valuator_groups: "Kooxdaha Qimeeynta" edit: classification: Qeybinta diff --git a/config/locales/sq-AL/admin.yml b/config/locales/sq-AL/admin.yml index 12f96b9dc..3a2867073 100644 --- a/config/locales/sq-AL/admin.yml +++ b/config/locales/sq-AL/admin.yml @@ -202,7 +202,6 @@ sq: dossier: Dosje edit_dossier: Ndrysho dosjen tags: Etiketë - user_tags: Përdorues të etiketuar undefined: E padefinuar compatibility: title: Pajtueshmëri @@ -216,12 +215,6 @@ sq: title: Fitues "true": "Po" "false": "Jo" - image: "Imazh" - see_image: "Shiko imazhin" - no_image: "Pa imazh" - documents: "Dokumentet" - see_documents: "Shiko dokumentet (%{count})" - no_documents: "Pa dokumentet" valuator_groups: "Grup vlerësuesish" edit: classification: Klasifikim diff --git a/config/locales/sv-SE/admin.yml b/config/locales/sv-SE/admin.yml index b6c8afbf5..614ac7ecf 100644 --- a/config/locales/sv-SE/admin.yml +++ b/config/locales/sv-SE/admin.yml @@ -208,7 +208,6 @@ sv: dossier: Rapport edit_dossier: Redigera rapport tags: Taggar - user_tags: Användartaggar undefined: Odefinierad compatibility: title: Kompatibilitet @@ -222,12 +221,6 @@ sv: title: Vinnare "true": "Ja" "false": "Nej" - image: "Bild" - see_image: "Visa bild" - no_image: "Utan bild" - documents: "Dokument" - see_documents: "Visa dokument (%{count})" - no_documents: "Utan dokument" valuator_groups: "Bedömningsgrupper" edit: classification: Klassificering diff --git a/config/locales/tr-TR/admin.yml b/config/locales/tr-TR/admin.yml index e22beafcd..e3153099a 100644 --- a/config/locales/tr-TR/admin.yml +++ b/config/locales/tr-TR/admin.yml @@ -253,13 +253,6 @@ tr: title: Kazanan "true": "Evet" "false": "Hayır" - image: "Fotoğraf" - see_image: "Görüntüyü göster" - no_image: "Görüntü olmadan" - documents: "Belgeler" - see_documents: "Belgeleri göster (%{count})" - no_documents: "Belgeler olmadan" - valuator_groups: "Bilirkişi Grupları" edit: classification: Sınıflandırma compatibility: Uygunluk diff --git a/config/locales/val/admin.yml b/config/locales/val/admin.yml index 8cd1596cb..1067c80c6 100644 --- a/config/locales/val/admin.yml +++ b/config/locales/val/admin.yml @@ -239,7 +239,6 @@ val: dossier: Informe edit_dossier: Editar informe tags: Temes - user_tags: Etiquetes de l'usuari undefined: Sense definir compatibility: title: Compatibilitat @@ -253,12 +252,6 @@ val: title: Guanyadores "true": "Si" "false": "No" - image: "Imatge" - see_image: "Veure imatge" - no_image: "Sense imatge" - documents: "Documents" - see_documents: "Veure documents (%{count})" - no_documents: "Sense documents" valuator_groups: "Grups d'Avaluadors" edit: classification: Classificació diff --git a/config/locales/zh-CN/admin.yml b/config/locales/zh-CN/admin.yml index b4152a1a9..95876f09c 100644 --- a/config/locales/zh-CN/admin.yml +++ b/config/locales/zh-CN/admin.yml @@ -202,7 +202,6 @@ zh-CN: dossier: 档案 edit_dossier: 编辑档案 tags: 标签 - user_tags: 用户标签 undefined: 未定义 compatibility: title: 兼容性 @@ -216,12 +215,6 @@ zh-CN: title: 胜出者 "true": "是" "false": "不是" - image: "图像" - see_image: "参阅图像" - no_image: "没有图像" - documents: "文档" - see_documents: "参阅文档 (%{count})" - no_documents: "没有文档" valuator_groups: "评估员组" edit: classification: 分类 diff --git a/config/locales/zh-TW/admin.yml b/config/locales/zh-TW/admin.yml index 0a4696675..55474f555 100644 --- a/config/locales/zh-TW/admin.yml +++ b/config/locales/zh-TW/admin.yml @@ -201,7 +201,6 @@ zh-TW: dossier: 檔案 edit_dossier: 編輯檔案 tags: 標籤 - user_tags: 用戶標籤 undefined: 未定義 compatibility: title: 相容性 @@ -215,12 +214,6 @@ zh-TW: title: 勝出者 "true": "是" "false": "否" - image: "圖像" - see_image: "請參閱圖像" - no_image: "沒有圖像" - documents: "文檔" - see_documents: "請參閱文檔 (%{count})" - no_documents: "沒有文檔" valuator_groups: "評估組" edit: classification: 分類 diff --git a/spec/features/admin/budget_investments_spec.rb b/spec/features/admin/budget_investments_spec.rb index 8e870fa5a..a87a30597 100644 --- a/spec/features/admin/budget_investments_spec.rb +++ b/spec/features/admin/budget_investments_spec.rb @@ -998,12 +998,11 @@ describe "Admin budget investments" do click_link budget_investment.title + expect(page).to have_content("Investment preview") expect(page).to have_content(budget_investment.title) expect(page).to have_content(budget_investment.description) expect(page).to have_content(budget_investment.author.name) expect(page).to have_content(budget_investment.heading.name) - expect(page).to have_content("Without image") - expect(page).to have_content("Without documents") expect(page).to have_content("1234") expect(page).to have_content("1000") expect(page).to have_content("Unfeasible") @@ -1035,8 +1034,11 @@ describe "Admin budget investments" do expect(page).to have_content(budget_investment.description) expect(page).to have_content(budget_investment.author.name) expect(page).to have_content(budget_investment.heading.name) - expect(page).to have_content("See image") - expect(page).to have_content("See documents (1)") + expect(page).to have_content("Investment preview") + expect(page).to have_content(budget_investment.image.title) + expect(page).to have_content("Documents (1)") + expect(page).to have_content(document.title) + expect(page).to have_content("Download file") expect(page).to have_content("1234") expect(page).to have_content("1000") expect(page).to have_content("Unfeasible") @@ -1044,6 +1046,22 @@ describe "Admin budget investments" do expect(page).to have_content("Ana (ana@admins.org)") end + scenario "Not show related content or hide links on preview" do + budget_investment = create(:budget_investment, + price: 1234, + price_first_year: 1000, + feasibility: "unfeasible", + unfeasibility_explanation: "It is impossible", + administrator: administrator) + + visit admin_budget_budget_investments_path(budget_investment.budget) + + click_link budget_investment.title + + expect(page).not_to have_content("Add related content") + expect(page).not_to have_content("Hide") + end + scenario "If budget is finished, investment cannot be edited or valuation comments created" do # Only milestones can be managed @@ -1236,7 +1254,7 @@ describe "Admin budget investments" do visit admin_budget_budget_investment_path(budget_investment.budget, budget_investment) - within("#user-tags") do + within("#tags_budget_investment_#{budget_investment.id}") do expect(page).not_to have_content "Education" expect(page).to have_content "Park" end @@ -1249,10 +1267,11 @@ describe "Admin budget investments" do visit admin_budget_budget_investment_path(budget_investment.budget, budget_investment) - within("#user-tags") do + within("#tags_budget_investment_#{budget_investment.id}") do expect(page).not_to have_content "Education" expect(page).not_to have_content "Environment" - expect(page).to have_content "Park, Trees" + expect(page).to have_content "Park" + expect(page).to have_content "Trees" end within("#tags") do diff --git a/spec/features/valuation/budget_investments_spec.rb b/spec/features/valuation/budget_investments_spec.rb index 372389f64..acd16e517 100644 --- a/spec/features/valuation/budget_investments_spec.rb +++ b/spec/features/valuation/budget_investments_spec.rb @@ -254,9 +254,9 @@ describe "Valuation budget investments" do investment.update(visible_to_valuators: true) visit valuation_budget_budget_investments_path(budget) - click_link investment.title + expect(page).to have_content("Investment preview") expect(page).to have_content(investment.title) expect(page).to have_content(investment.description) expect(page).to have_content(investment.author.name) @@ -278,6 +278,7 @@ describe "Valuation budget investments" do visit valuation_budget_budget_investment_path(budget, investment) + expect(page).to have_content("Investment preview") expect(page).to have_content(investment.title) expect(page).to have_content(investment.description) expect(page).to have_content(investment.author.name) @@ -302,6 +303,22 @@ describe "Valuation budget investments" do }.to raise_error "Not Found" end + scenario "preview is visible" do + logout + login_as create(:administrator).user + + visit valuation_budget_budget_investment_path(budget, investment) + + expect(page).to have_content("Investment preview") + expect(page).to have_content(investment.title) + expect(page).to have_content(investment.description) + expect(page).to have_content(investment.author.name) + expect(page).to have_content(investment.heading.name) + expect(page).to have_content("1234") + expect(page).to have_content("Unfeasible") + expect(page).to have_content("It is impossible") + expect(page).to have_content("Ana (ana@admins.org)") + end end describe "Valuate" do