1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-17 06:52:27 +01:00

use slugs in projects URL opened from notifications

This commit is contained in:
Sylvain 2016-09-27 16:58:57 +02:00
parent e48bb88f1f
commit 60d60fdd65
7 changed files with 7 additions and 6 deletions

View File

@ -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

View File

@ -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)

View File

@ -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) +
"<a href='/#!/projects/#{notification.attached_object.project.id}'><strong><em> #{notification.attached_object.project.name}</em></strong></a>."
"<a href='/#!/projects/#{notification.attached_object.project.slug}'><strong><em> #{notification.attached_object.project.name}</em></strong></a>."
json.url notification_url(notification, format: :json)

View File

@ -1,4 +1,4 @@
json.title notification.notification_type
json.description t('.you_are_invited_to_collaborate_on_the_project') +
"<a href='/#!/projects/#{notification.attached_object.project.id}'><strong><em>#{notification.attached_object.project.name}</em></strong></a>."
"<a href='/#!/projects/#{notification.attached_object.project.slug}'><strong><em>#{notification.attached_object.project.name}</em></strong></a>."
json.url notification_url(notification, format: :json)

View File

@ -1,3 +1,3 @@
<%= render 'notifications_mailer/shared/hello', recipient: @recipient %>
<p><%= t('.body.new_project_published') %> "<%= link_to @attached_object.name, "#{root_url}#!/projects/#{@attached_object.id}" %>"</p>
<p><%= t('.body.new_project_published') %> "<%= link_to @attached_object.name, "#{root_url}#!/projects/#{@attached_object.slug}" %>"</p>

View File

@ -1,3 +1,3 @@
<%= render 'notifications_mailer/shared/hello', recipient: @recipient %>
<p><%= t('.body.the_member') %> <%= @attached_object.user.profile.full_name %> <%= t(".body.accepted_your_invitation_to_take_part_in_the_project" ) %> <strong><em><%= link_to @attached_object.project.name, "#{root_url}#!/projects/#{@attached_object.project.id}" %></em></strong>.</p>
<p><%= t('.body.the_member') %> <%= @attached_object.user.profile.full_name %> <%= t(".body.accepted_your_invitation_to_take_part_in_the_project" ) %> <strong><em><%= link_to @attached_object.project.name, "#{root_url}#!/projects/#{@attached_object.project.slug}" %></em></strong>.</p>

View File

@ -1,5 +1,5 @@
<%= render 'notifications_mailer/shared/hello', recipient: @recipient %>
<p><%= t(".body.your_are_invited_to_take_part_in_a_project") %> <strong><em><%= link_to @attached_object.project.name, "#{root_url}#!/projects/#{@attached_object.project.id}" %></em></strong>.</p>
<p><%= t(".body.your_are_invited_to_take_part_in_a_project") %> <strong><em><%= link_to @attached_object.project.name, "#{root_url}#!/projects/#{@attached_object.project.slug}" %></em></strong>.</p>
<p><%= 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}" %></p>