diff --git a/app/controllers/notifications_controller.rb b/app/controllers/notifications_controller.rb index 99f401f7b..16a82de6a 100644 --- a/app/controllers/notifications_controller.rb +++ b/app/controllers/notifications_controller.rb @@ -11,7 +11,7 @@ class NotificationsController < ApplicationController def show @notification = current_user.notifications.find(params[:id]) - redirect_to url_for(@notification.linkable_resource) + redirect_to linkable_resource_path(@notification) end def mark_all_as_read @@ -25,4 +25,13 @@ class NotificationsController < ApplicationController @notification.mark_as_read end + def linkable_resource_path(notification) + case notification.linkable_resource.class.name + when "Budget::Investment" + budget_investment_path @notification.linkable_resource.budget, @notification.linkable_resource + else + url_for @notification.linkable_resource + end + end + end diff --git a/app/views/welcome/_recommended.html.erb b/app/views/welcome/_recommended.html.erb index 3c6e17294..974e6ae68 100644 --- a/app/views/welcome/_recommended.html.erb +++ b/app/views/welcome/_recommended.html.erb @@ -1,138 +1,29 @@ -
-

Recomendaciones que te pueden interesar

-
-
-

Debates recomendados

-
-
-
    -
  • -
    - -
    -
    Titulo debate 1
    -

    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua

    -
    -
    -
  • +
-
-
- - -
-
- -
- -
-

Propuestas recomendadas

-
-
-
    -
  • -
    - -
    -
    Titulo propuesta 1
    -

    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua

    -
    -
    -
  • - - - -
-
-
- - -
-
-
-
- -
- -
-

Presupuestos recomendados

-
-
-
    -
  • -
    - -
    -
    Titulo presupuesto 1
    -

    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua

    -
    -
    -
  • - - - -
-
-
- - -
-
-
-
-
diff --git a/app/views/welcome/_recommended_carousel.html.erb b/app/views/welcome/_recommended_carousel.html.erb index 2b1f891d3..bf7d102c1 100644 --- a/app/views/welcome/_recommended_carousel.html.erb +++ b/app/views/welcome/_recommended_carousel.html.erb @@ -1,4 +1,4 @@ -
+

<%= t("welcome.recommended.#{key.underscore}.title") %>

diff --git a/app/views/welcome/_recommended_no_image.html.erb b/app/views/welcome/_recommended_no_image.html.erb deleted file mode 100644 index d35c9993e..000000000 --- a/app/views/welcome/_recommended_no_image.html.erb +++ /dev/null @@ -1,25 +0,0 @@ - diff --git a/app/views/welcome/index.html.erb b/app/views/welcome/index.html.erb index 57b8d0424..f7a4e12e1 100644 --- a/app/views/welcome/index.html.erb +++ b/app/views/welcome/index.html.erb @@ -47,7 +47,7 @@ <% end %> <% if current_user.present? %> - <%= render "recommended_no_image", recommended_debates: current_user.recommended_debates, - recommended_proposals: current_user.recommended_proposals, - recommended_budget_investments: current_user.recommended_budget_investments %> + <%= render "recommended", recommended_debates: current_user.recommended_debates, + recommended_proposals: current_user.recommended_proposals, + recommended_budget_investments: current_user.recommended_budget_investments %> <% end %>