diff --git a/app/helpers/cv_search_helper.rb b/app/helpers/cv_search_helper.rb index df0162afc..dc6139eb9 100644 --- a/app/helpers/cv_search_helper.rb +++ b/app/helpers/cv_search_helper.rb @@ -4,8 +4,4 @@ module CvSearchHelper def translate_found_in(result) I18n.t("cv_search.#{result[:found_in].split('#')[0].underscore}") end - - def person_path_with_query(result) - "#{person_path(result[:person][:id])}?q=#{params[:q]}" - end end diff --git a/app/views/cv_search/index.html.haml b/app/views/cv_search/index.html.haml index ee741b862..9ab93da35 100644 --- a/app/views/cv_search/index.html.haml +++ b/app/views/cv_search/index.html.haml @@ -12,5 +12,5 @@ = link_to result[:person][:name], person_path(result[:person][:id]), {class: "bg-skills-green w-50 text-decoration-none text-white ps-1 p-2 rounded-1", "data-turbo": "false"} %div.w-50.d-flex.justify-content-end.align-items-center %div.me-1 gefunden in: - = link_to translate_found_in(result), person_path_with_query(result), {class: "bg-skills-search-result-blue w-50 text-decoration-none text-white ps-1 p-2 rounded-1 text-center", "data-turbo": "false"} + = link_to translate_found_in(result), person_path(result[:person][:id]), {class: "bg-skills-search-result-blue w-50 text-decoration-none text-white ps-1 p-2 rounded-1 text-center", "data-turbo": "false"} %br \ No newline at end of file diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 581c4cc15..78b800c92 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -14,11 +14,12 @@ %body.d-flex.justify-content-center{"data-controller": "skills-empty-space"} %div.content{"data-skills-empty-space-target": "container"} %div.position-sticky.top-0.z-3 - %div.d-flex.justify-content-between.bg-white - %div.d-flex - %div.mb-1.mt-1 - %img{:src=> "/assets/logo.svg",:height=>"32"} - %text.d-flex.align-items-end.ms-2.small= "5.0.0" + %div.d-flex.justify-content-between.bg-white.flex-wrap + = link_to root_path, class: "text-decoration-none text-dark" do + %div.d-flex + %div.mb-1.mt-1 + %img{:src=> "/assets/logo.svg",:height=>"32"} + %text.d-flex.align-items-end.ms-2.small= "5.0.0" %ul.navbar.text-gray - if Rails.env.development? %li.d-flex.align-items-center.cursor-pointer.ps-2.pe-2.border-start.border-end.h-100 @@ -33,7 +34,7 @@ %div.scale-icon-06(name="user") %span#username - if find_person_by_auth_user.nil? - = link_to current_auth_user&.name, people_path(alert: "true") + = link_to current_auth_user&.name || current_auth_user&.email, people_path(alert: "true") - else = link_to find_person_by_auth_user.name, person_path(find_person_by_auth_user) - if admin? diff --git a/app/views/people/_search.html.haml b/app/views/people/_search.html.haml index f70b49f01..be4edee70 100644 --- a/app/views/people/_search.html.haml +++ b/app/views/people/_search.html.haml @@ -1,5 +1,5 @@ %div.d-flex.align-items-center.justify-content-between - %div.d-flex.col-12.gap-3 + %div.d-flex.col-9.gap-3 %span.col-6{"data-controller": "dropdown"} = collection_select :person_id, :person, Person.all.sort_by {|p| p.name.downcase }, :id, :name, select_when_availabale(person), {data:{"dropdown-target": "dropdown" , action: "change->dropdown#handleChange", value: "/people/"}} %div.d-flex.align-items-center.text-gray diff --git a/app/views/people/people_skills/edit.html.haml b/app/views/people/people_skills/edit.html.haml index 4b28fb98b..c03c1fa22 100644 --- a/app/views/people/people_skills/edit.html.haml +++ b/app/views/people/people_skills/edit.html.haml @@ -3,8 +3,8 @@ = form_with(model: @person, url: people_skills_person_path(@person)) do |form| %div.d-flex.flex-row.w-100 %div.w-25.bg-skills-gray.d-flex.flex-column.align-items-center.people-skills-actions.pt-3.pb-3.me-2.mt-2.border.border-light-subtle.border-2 - = link_to t("helpers.submit.cancel"), person_people_skills_path(@person), class: "d-flex align-items-center text-decoration-none mt-2 mb-2" = form.submit :Speichern, { class: "btn btn-primary bg-skills-blue w-75", id: "save-button" } + = link_to t("helpers.submit.cancel"), person_people_skills_path(@person), class: "d-flex align-items-center text-decoration-none mt-2 mb-2" %div.mw-75.border-bottom.people-skills.overflow-scroll %p.d-flex.align-items-center.profile-header Skills diff --git a/spec/features/cv_search_spec.rb b/spec/features/cv_search_spec.rb index f5df444e1..bdfdb732a 100644 --- a/spec/features/cv_search_spec.rb +++ b/spec/features/cv_search_spec.rb @@ -44,7 +44,7 @@ fill_in 'cv_search_field', with: education_location check_search_results(I18n.t("cv_search.educations")) click_link(I18n.t("cv_search.educations")) - expect(page).to have_current_path("#{person_path(person)}?q=#{education_location}") + expect(page).to have_current_path("#{person_path(person)}") end it 'should only display results when length of search-text is > 3' do @@ -61,4 +61,4 @@ def check_search_results(field_name) expect(page).to have_content(person.name) expect(page).to have_content(field_name) } -end \ No newline at end of file +end