Welcome to mirror list, hosted at ThFree Co, Russian Federation.

index.html.haml « notifications « views « app - github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 61a70fe1437752ed28117b686854bdfe4399ef06 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
.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
              = 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")