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

github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAugier <contact@c-henry.fr>2015-04-16 20:19:41 +0300
committerJonne Haß <me@jhass.eu>2015-06-04 19:05:43 +0300
commit207b6c61537fc96528f7cd29e80a27401f49be18 (patch)
tree621f6b8b70559c69e3443ec66a13149b837d6923 /app/views/notifications
parente39d024ba1dc6fa742e5b8f5024fef09006a9e29 (diff)
Port to Bootstrap 3
correcting images display on stream sidebar Corrections on profile page
Diffstat (limited to 'app/views/notifications')
-rw-r--r--app/views/notifications/index.html.haml74
-rw-r--r--app/views/notifications/index.mobile.haml47
2 files changed, 61 insertions, 60 deletions
diff --git a/app/views/notifications/index.html.haml b/app/views/notifications/index.html.haml
index 4d3d4cde0..71ad48c71 100644
--- a/app/views/notifications/index.html.haml
+++ b/app/views/notifications/index.html.haml
@@ -1,43 +1,41 @@
.container-fluid#notifications_container
- .row-fluid
- .span3
+ .row
+ .col-md-3
%h3
= t('.notifications')
- %ul.nav.nav-tabs.nav-stacked
- %li{ :class => ('active' unless params[:type] && @grouped_unread_notification_counts.has_key?(params[:type])) }
- %a{ :href => '/notifications' + (params[:show] == 'unread' ? '?show=unread' : '') }
- %span.pull-right.badge{:class => (@unread_notification_count > 0 ? 'badge-important' : 'badge-default')}
- = @unread_notification_count
- = t('.all_notifications')
+ %ul.list-group
+ %a.list-group-item{class: ('active' unless params[:type] && @grouped_unread_notification_counts.has_key?(params[:type])), href: '/notifications' + (params[:show] == 'unread' ? '?show=unread' : '') }
+ %span.pull-right.badge{class: (@unread_notification_count > 0 ? 'badge-important' : 'badge-default')}
+ = @unread_notification_count
+ = t('.all_notifications')
- @grouped_unread_notification_counts.each do |key, count|
- %li{ :class => ('active' if params[:type] == key), :data => { :type => key } }
- %a{ :href => '/notifications?type=' + key + (params[:show] == 'unread' ? '&show=unread' : '') }
- %span.pull-right.badge{ :class => (count > 0 ? 'badge-important' :'badge-default') }
- = count
- - case key
- - when 'also_commented', 'comment_on_post'
- %i.entypo.comment
- - when 'liked'
- %i.entypo.heart
- - when 'mentioned'
- %span.mentionIcon
- @
- - when 'reshared'
- %i.entypo.retweet
- - when 'started_sharing'
- %i.entypo.add-user
- = t('.'+key)
+ %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: (count > 0 ? 'badge-important' :'badge-default') }
+ = count
+ - case key
+ - when 'also_commented', 'comment_on_post'
+ %i.entypo.comment
+ - when 'liked'
+ %i.entypo.heart
+ - when 'mentioned'
+ %span.mentionIcon
+ @
+ - when 'reshared'
+ %i.entypo.retweet
+ - when 'started_sharing'
+ %i.entypo.add-user
+ = t('.'+key)
- .span9.stream.notifications
- .row-fluid.header
- .span12
+ .col-md-9.stream.notifications
+ .row.header
+ .col-md-12
.btn-toolbar.pull-right
.btn-group
- %a.btn.btn-default{ :class => ('active' unless params[:show] == 'unread'), :href => '/notifications' + (params[:type] ? '?type=' + params[:type] : '') }
+ %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] : '') }
+ %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{:href => read_all_notifications_path(:type => params[:type] ), :class => ('disabled' unless @unread_notification_count > 0)}
+ %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
@@ -47,19 +45,19 @@
- @group_days.each do |date, notes|
- if display_year?(year, date)
- year = the_year(date)
- .row-fluid.year_container
- .span4.offset4.year= year
+ .row.year_container
+ .col-md-4.col-md-offset-4.year= year
- .day_group.row-fluid
- .date.span2
+ .day_group.row
+ .date.col-md-2
.day= the_day(date)
.month= the_month(date)
- .notifications_for_day.span10
+ .notifications_for_day.col-md-10
- notes.each do |note|
- = render :partial => 'notifications/notification', :locals => { :note => note }
+ = render partial: 'notifications/notification', locals: { note: note }
- = will_paginate @notifications, :renderer => WillPaginate::ActionView::BootstrapLinkRenderer
+ = will_paginate @notifications, renderer: WillPaginate::ActionView::BootstrapLinkRenderer
- else
.no_notifications.well
diff --git a/app/views/notifications/index.mobile.haml b/app/views/notifications/index.mobile.haml
index 7258fc418..038e11f8f 100644
--- a/app/views/notifications/index.mobile.haml
+++ b/app/views/notifications/index.mobile.haml
@@ -1,24 +1,27 @@
-%h3
- = t('.notifications')
+.col-md-12
+ %h3
+ = t('.notifications')
-.right
- -if params[:type]
- = link_to t('.mark_all_shown_as_read'), read_all_notifications_path(:type => params[:type] ), :class => 'btn'
- -else
- = link_to t('.mark_all_as_read'), read_all_notifications_path, :class => 'btn'
-%ul.notifications
- - @group_days.each do |date, notes|
- %li
- .notification_day_header
- %span.label
- = locale_date(date)
- %ul.notifications_for_day
- - notes.each do |note|
- .stream_element{:data=>{:guid => note.id}, :class => "#{note.unread ? 'unread' : 'read'}"}
- .content.from
- =person_image_link(note.actors.last)
- = notification_message_for(note)
- .time_notif
- = timeago(note.created_at)
+ .right
+ -if params[:type]
+ = link_to t('.mark_all_shown_as_read'), read_all_notifications_path(type: params[:type] ), class: 'btn btn-default'
+ -else
+ = link_to t('.mark_all_as_read'), read_all_notifications_path, class: 'btn btn-default'
+ %ul.notifications
+ - @group_days.each do |date, notes|
+ %li
+ .notification_day_header
+ %span.label.label-default
+ = locale_date(date)
+ %ul.notifications_for_day
+ - notes.each do |note|
+ .stream_element{:data=>{guid: note.id}, class: "#{note.unread ? 'unread' : 'read'}"}
+ .content.from
+ .col-xs-1
+ = person_image_link(note.actors.last, size: :thumb_small)
+ .col-xs-11
+ = notification_message_for(note)
+ .time_notif
+ = timeago(note.created_at)
- = will_paginate @notifications, :renderer => WillPaginate::ActionView::BootstrapLinkRenderer
+ = will_paginate @notifications, renderer: WillPaginate::ActionView::BootstrapLinkRenderer