Adds notification menu and message for empty notifications

This commit is contained in:
Alberto Garcia Cabeza
2016-06-15 21:00:56 +02:00
parent 017ccfb378
commit dd7629b5af
5 changed files with 10 additions and 13 deletions

View File

@@ -2,13 +2,6 @@
<section class="comments">
<div class="row">
<div id="comments" class="small-12 column">
<% if @notifications.blank? %>
<h2>
<%= t("proposals.show.comments_title") %>
<span class="js-comments-count">(<%= @proposal.comments_count %>)</span>
</h2>
<% end %>
<%= render 'shared/wide_order_selector', i18n_namespace: "comments" %>
<% if user_signed_in? %>

View File

@@ -1,6 +1,12 @@
<div class="tabs-panel" id="tab-notifications">
<div class="row">
<div class="small-12 column">
<% if @notifications.blank? %>
<div class="callout primary text-center">
<%= t('proposals.show.no_notifications') %>
</div>
<% end %>
<% @notifications.each do |notification| %>
<h3><%= notification.title %></h3>
<p class="more-info"><%= notification.created_at.to_date %></p>

View File

@@ -124,10 +124,8 @@
<% end %>
<div class="tabs-content" data-tabs-content="example-tabs">
<% if @notifications.present? %>
<%= render "proposals/filter_subnav" %>
<%= render "proposals/notifications" %>
<% end %>
<%= render "proposals/filter_subnav" %>
<%= render "proposals/notifications" %>
<div class="tabs-panel is-active" id="tab-comments">
<%= render "proposals/comments" %>

View File

@@ -356,7 +356,6 @@ en:
other: "%{count} comments"
zero: No comments
comments_tab: Comments
comments_title: Comments
edit_proposal_link: Edit
flag: This proposal has been flagged as inappropriate by several users.
login_to_comment: You must %{signin} or %{signup} to leave a comment.
@@ -366,6 +365,7 @@ en:
retired: Proposal retired by the author
share: Share
send_notification: Send notification
no_notifications: "This proposal has any notifications."
update:
form:
submit_button: Save changes

View File

@@ -356,7 +356,6 @@ es:
other: "%{count} Comentarios"
zero: Sin comentarios
comments_tab: Comentarios
comments_title: Comentarios
edit_proposal_link: Editar propuesta
flag: Esta propuesta ha sido marcada como inapropiada por varios usuarios.
login_to_comment: Necesitas %{signin} o %{signup} para comentar.
@@ -366,6 +365,7 @@ es:
retired: Propuesta retirada por el autor
send_notification: Enviar notificación
share: Compartir
no_notifications: "Esta propuesta no tiene notificaciones."
update:
form:
submit_button: Guardar cambios