diff --git a/app/views/debates/show.html.erb b/app/views/debates/show.html.erb
index 371260550..a4613fd3b 100644
--- a/app/views/debates/show.html.erb
+++ b/app/views/debates/show.html.erb
@@ -21,31 +21,7 @@
<% end %>
- <%= avatar_image(@debate.author, seed: @debate.author_id, size: 32, class: 'author-photo') %>
-
- <% if @debate.author.hidden? || @debate.author.erased? %>
-
-
- <%= t("debates.show.author_deleted") %>
-
- <% else %>
-
- <%= @debate.author.name %>
-
- <% if @debate.author.official? %>
- •
-
- <%= @debate.author.official_position %>
-
- <% end %>
- <% end %>
-
- <% if @debate.author.verified_organization? %>
- •
-
- <%= t("shared.collective") %>
-
- <% end %>
+ <%= render '/shared/author_info', resource: @debate %>
•
<%= l @debate.created_at.to_date %>
diff --git a/app/views/proposals/show.html.erb b/app/views/proposals/show.html.erb
index 95adf93aa..4cc5f5e17 100644
--- a/app/views/proposals/show.html.erb
+++ b/app/views/proposals/show.html.erb
@@ -27,31 +27,7 @@
<% end %>
- <%= avatar_image(@proposal.author, seed: @proposal.author_id, size: 32, class: 'author-photo') %>
-
- <% if @proposal.author.hidden? || @proposal.author.erased? %>
-
-
- <%= t("proposals.show.author_deleted") %>
-
- <% else %>
-
- <%= @proposal.author.name %>
-
- <% if @proposal.author.official? %>
- •
-
- <%= @proposal.author.official_position %>
-
- <% end %>
- <% end %>
-
- <% if @proposal.author.verified_organization? %>
- •
-
- <%= t("shared.collective") %>
-
- <% end %>
+ <%= render '/shared/author_info', resource: @proposal %>
•
<%= l @proposal.created_at.to_date %>
diff --git a/app/views/shared/_author_info.html.erb b/app/views/shared/_author_info.html.erb
new file mode 100644
index 000000000..ee5c1f749
--- /dev/null
+++ b/app/views/shared/_author_info.html.erb
@@ -0,0 +1,25 @@
+<%= avatar_image(resource.author, seed: resource.author_id, size: 32, class: 'author-photo') %>
+
+<% if resource.author.hidden? || resource.author.erased? %>
+
+
+ <%= t("shared.author_info.author_deleted") %>
+
+<% else %>
+
+ <%= resource.author.name %>
+
+ <% if resource.author.official? %>
+ •
+
+ <%= resource.author.official_position %>
+
+ <% end %>
+<% end %>
+
+<% if resource.author.verified_organization? %>
+ •
+
+ <%= t("shared.collective") %>
+
+<% end %>
diff --git a/config/locales/en.yml b/config/locales/en.yml
index e2d604c72..bd0a6ce3a 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -310,6 +310,8 @@ en:
debate: "secret code did not match with the image"
proposal: "secret code did not match with the image"
shared:
+ author_info:
+ author_deleted: Deleted user
tags_cloud:
tags: Trend
print:
diff --git a/config/locales/es.yml b/config/locales/es.yml
index c20524f47..a31572432 100644
--- a/config/locales/es.yml
+++ b/config/locales/es.yml
@@ -310,6 +310,8 @@ es:
debate: "el código secreto no coincide con la imagen"
proposal: "el código secreto no coincide con la imagen"
shared:
+ author_info:
+ author_deleted: Usuario eliminado
tags_cloud:
tags: Tendencias
print: