.container-fluid#notifications_container
  .row
    .col-md-3
      .sidebar
        .sidebar-header.clearfix
          %h3
            = t(".notifications")
        .list-group
          %a.list-group-item{href: "/notifications" + (params[:show] == "unread" ? "?show=unread" : ""),
              class: ("active" unless params[:type] && @grouped_unread_notification_counts.has_key?(params[:type])),
              data: {type: "all"}}
            %span.pull-right.badge{class: ("hidden" unless @unread_notification_count > 0)}
              = @unread_notification_count
            = t(".all_notifications")
          - @grouped_unread_notification_counts.each do |key, count|
            %a.list-group-item{class: ("active" if params[:type] == key),
                data: {type: key},
                href: "/notifications?type=" + key + (params[:show] == "unread" ? "&show=unread" : "")}
              %span.pull-right.badge{class: ("hidden" unless count > 0)}
                = count
              - case key
                - when "also_commented", "comment_on_post"
                  %i.entypo-comment
                - when "liked"
                  %i.entypo-heart
                - when "mentioned", "mentioned_in_comment"
                  %span.mentionIcon
                    @
                - when "reshared"
                  %i.entypo-reshare
                - when "started_sharing"
                  %i.entypo-add-user
                - when "contacts_birthday"
                  %i.entypo-calendar
              = t("." + key)

    .col-md-9.stream.notifications
      .framed-content
        .row
          .col-md-12
            .header.clearfix
              .btn-toolbar.pull-right
                .btn-group
                  %a.btn.btn-default{class: ("active" unless params[:show] == "unread"),
                      href: "/notifications" + (params[:type] ? "?type=" + params[:type] : "")}
                    = t(".show_all")
                  %a.btn.btn-default{class: ("active" if params[:show] == "unread"),
                      href: "/notifications?show=unread" + (params[:type] ? "&type=" + params[:type] : "")}
                    = t(".show_unread")
                %a.btn.btn-default.btn-group{href: read_all_notifications_path(type: params[:type]),
                    class: ("disabled" unless @unread_notification_count > 0)}
                  - if params[:type]
                    = t(".mark_all_shown_as_read")
                  - else
                    = t(".mark_all_as_read")
        - if @group_days.length > 0
          - year = nil
          - @group_days.each do |date, notes|
            - if display_year?(year, date)
              - year = the_year(date)
              .row.year_container
                .col-md-4.col-md-offset-4.year= year

            .day_group.row
              .date.col-md-2
                .day= the_day(date)
                .month= the_month(date)

              .notifications_for_day.col-md-10
                - notes.each do |note|
                  = render partial: "notifications/notification", locals: {note: note}

          .center-block.text-center
            = will_paginate @notifications, renderer: WillPaginate::ActionView::BootstrapLinkRenderer

        - else
          .no-notifications.well
            %h4
              = t(".no_notifications")
