diff --git a/CHANGELOG.md b/CHANGELOG.md index 814b4bfb1..c60a1ce26 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Changelog Fab Manager ## next release +- Use slugs in projects URL opened from notifications - Ask for confirmation on machine deletion from the public view - Ability to delete a training from the public view for an admin - Project images will show in full-size on a click diff --git a/app/views/api/notifications/_notify_admin_when_project_published.json.jbuilder b/app/views/api/notifications/_notify_admin_when_project_published.json.jbuilder index e90c6daf0..63bee71e1 100644 --- a/app/views/api/notifications/_notify_admin_when_project_published.json.jbuilder +++ b/app/views/api/notifications/_notify_admin_when_project_published.json.jbuilder @@ -1,5 +1,5 @@ json.title notification.notification_type json.description t('.project_NAME_has_been_published_html', - ID: notification.attached_object.id, + ID: notification.attached_object.slug, NAME: notification.attached_object.name) json.url notification_url(notification, format: :json) diff --git a/app/views/api/notifications/_notify_project_author_when_collaborator_valid.json.jbuilder b/app/views/api/notifications/_notify_project_author_when_collaborator_valid.json.jbuilder index 58209d776..d5dc45864 100644 --- a/app/views/api/notifications/_notify_project_author_when_collaborator_valid.json.jbuilder +++ b/app/views/api/notifications/_notify_project_author_when_collaborator_valid.json.jbuilder @@ -1,5 +1,5 @@ json.title notification.notification_type json.description t('.USER_became_collaborator_of_your_project', USER: notification.attached_object.user.profile.full_name) + - " #{notification.attached_object.project.name}." + " #{notification.attached_object.project.name}." json.url notification_url(notification, format: :json) diff --git a/app/views/api/notifications/_notify_project_collaborator_to_valid.json.jbuilder b/app/views/api/notifications/_notify_project_collaborator_to_valid.json.jbuilder index f656f668d..2615f16c6 100644 --- a/app/views/api/notifications/_notify_project_collaborator_to_valid.json.jbuilder +++ b/app/views/api/notifications/_notify_project_collaborator_to_valid.json.jbuilder @@ -1,4 +1,4 @@ json.title notification.notification_type json.description t('.you_are_invited_to_collaborate_on_the_project') + - "#{notification.attached_object.project.name}." + "#{notification.attached_object.project.name}." json.url notification_url(notification, format: :json) diff --git a/app/views/notifications_mailer/notify_admin_when_project_published.html.erb b/app/views/notifications_mailer/notify_admin_when_project_published.html.erb index 0c3486e53..add5528e8 100644 --- a/app/views/notifications_mailer/notify_admin_when_project_published.html.erb +++ b/app/views/notifications_mailer/notify_admin_when_project_published.html.erb @@ -1,3 +1,3 @@ <%= render 'notifications_mailer/shared/hello', recipient: @recipient %> -
<%= t('.body.new_project_published') %> "<%= link_to @attached_object.name, "#{root_url}#!/projects/#{@attached_object.id}" %>"
+<%= t('.body.new_project_published') %> "<%= link_to @attached_object.name, "#{root_url}#!/projects/#{@attached_object.slug}" %>"
diff --git a/app/views/notifications_mailer/notify_project_author_when_collaborator_valid.html.erb b/app/views/notifications_mailer/notify_project_author_when_collaborator_valid.html.erb index c5141f2fc..1ea34bed0 100644 --- a/app/views/notifications_mailer/notify_project_author_when_collaborator_valid.html.erb +++ b/app/views/notifications_mailer/notify_project_author_when_collaborator_valid.html.erb @@ -1,3 +1,3 @@ <%= render 'notifications_mailer/shared/hello', recipient: @recipient %> -<%= t('.body.the_member') %> <%= @attached_object.user.profile.full_name %> <%= t(".body.accepted_your_invitation_to_take_part_in_the_project" ) %> <%= link_to @attached_object.project.name, "#{root_url}#!/projects/#{@attached_object.project.id}" %>.
+<%= t('.body.the_member') %> <%= @attached_object.user.profile.full_name %> <%= t(".body.accepted_your_invitation_to_take_part_in_the_project" ) %> <%= link_to @attached_object.project.name, "#{root_url}#!/projects/#{@attached_object.project.slug}" %>.
diff --git a/app/views/notifications_mailer/notify_project_collaborator_to_valid.html.erb b/app/views/notifications_mailer/notify_project_collaborator_to_valid.html.erb index 1bb99907c..26e5a72ce 100644 --- a/app/views/notifications_mailer/notify_project_collaborator_to_valid.html.erb +++ b/app/views/notifications_mailer/notify_project_collaborator_to_valid.html.erb @@ -1,5 +1,5 @@ <%= render 'notifications_mailer/shared/hello', recipient: @recipient %> -<%= t(".body.your_are_invited_to_take_part_in_a_project") %> <%= link_to @attached_object.project.name, "#{root_url}#!/projects/#{@attached_object.project.id}" %>.
+<%= t(".body.your_are_invited_to_take_part_in_a_project") %> <%= link_to @attached_object.project.name, "#{root_url}#!/projects/#{@attached_object.project.slug}" %>.
<%= t(".body.to_accept_the_invitation_click_on_following_link") %> <%= link_to "#{root_url}project_collaborator/#{@attached_object.valid_token}", "#{root_url}project_collaborator/#{@attached_object.valid_token}" %>