refactors shared part of debate & proposal views

This commit is contained in:
kikito
2015-10-21 14:47:17 +02:00
parent 6c5d1faa90
commit d4bbf0d26e
5 changed files with 31 additions and 50 deletions

View File

@@ -0,0 +1,25 @@
<%= avatar_image(resource.author, seed: resource.author_id, size: 32, class: 'author-photo') %>
<% if resource.author.hidden? || resource.author.erased? %>
<i class="icon-deleted author-deleted"></i>
<span class="author">
<%= t("shared.author_info.author_deleted") %>
</span>
<% else %>
<span class="author">
<%= resource.author.name %>
</span>
<% if resource.author.official? %>
&nbsp;&bull;&nbsp;
<span class="label round level-<%= resource.author.official_level %>">
<%= resource.author.official_position %>
</span>
<% end %>
<% end %>
<% if resource.author.verified_organization? %>
&nbsp;&bull;&nbsp;
<span class="label round is-association">
<%= t("shared.collective") %>
</span>
<% end %>