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" %>