Fix lints in app/views/notifications
This commit is contained in:
parent
df2537a6cf
commit
979bbbd13e
|
@ -1,11 +1,11 @@
|
||||||
.card
|
.card
|
||||||
%ul#notifications.list-group
|
%ul.list-group#notifications
|
||||||
- if @notifications.count == 0
|
- if @notifications.count.zero?
|
||||||
%li.list-group-item.text-center
|
%li.list-group-item.text-center
|
||||||
.notifications--none
|
.notifications--none
|
||||||
%i.fa.fa-bell-o.notification__bell-icon
|
%i.fa.fa-bell-o.notification__bell-icon
|
||||||
%p
|
%p
|
||||||
- if params[:type] != "all"
|
- if params[:type] != 'all'
|
||||||
No new notifications.
|
No new notifications.
|
||||||
- else
|
- else
|
||||||
No notifications.
|
No notifications.
|
||||||
|
@ -19,5 +19,5 @@
|
||||||
= render 'shared/cursored_pagination_dummy', more_data_available: @more_data_available, last_id: @notifications_last_id, permitted_params: %i[type]
|
= render 'shared/cursored_pagination_dummy', more_data_available: @more_data_available, last_id: @notifications_last_id, permitted_params: %i[type]
|
||||||
|
|
||||||
- if @more_data_available
|
- if @more_data_available
|
||||||
%button#load-more-btn.btn.btn-default{type: :button, data: { last_id: @notifications_last_id }}
|
%button.btn.btn-default#load-more-btn{ type: :button, data: { last_id: @notifications_last_id } }
|
||||||
Load more
|
Load more
|
||||||
|
|
|
@ -3,10 +3,10 @@
|
||||||
%i.fa.fa-2x.fa-fw.fa-exclamation
|
%i.fa.fa-2x.fa-fw.fa-exclamation
|
||||||
.media-body
|
.media-body
|
||||||
.notification__heading
|
.notification__heading
|
||||||
%img.avatar-xs{src: notification.target.user.profile_picture.url(:small)}
|
%img.avatar-xs{ src: notification.target.user.profile_picture.url(:small) }
|
||||||
= user_screen_name notification.target.user
|
= user_screen_name notification.target.user
|
||||||
answered
|
answered
|
||||||
= link_to "your question", show_user_answer_path(username: notification.target.user.screen_name, id: notification.target.id)
|
= link_to 'your question', show_user_answer_path(username: notification.target.user.screen_name, id: notification.target.id)
|
||||||
= time_tooltip(notification.target)
|
= time_tooltip(notification.target)
|
||||||
ago
|
ago
|
||||||
.list-group
|
.list-group
|
||||||
|
@ -14,9 +14,9 @@
|
||||||
.media.question-media
|
.media.question-media
|
||||||
.media-body
|
.media-body
|
||||||
%h6.notification__list-heading question
|
%h6.notification__list-heading question
|
||||||
= markdown notification.target.question.content[0..60] + "#{notification.target.question.content.length > 60 ? '[...]' : ''}"
|
= markdown notification.target.question.content[0..60] + (notification.target.question.content.length > 60 ? '[...]' : '')
|
||||||
.list-group-item
|
.list-group-item
|
||||||
.media.question-media
|
.media.question-media
|
||||||
.media-body
|
.media-body
|
||||||
%h6.notification__list-heading answer
|
%h6.notification__list-heading answer
|
||||||
= markdown notification.target.content[0..60] + "#{notification.target.content.length > 60 ? '[...]' : ''}"
|
= markdown notification.target.content[0..60] + (notification.target.content.length > 60 ? '[...]' : '')
|
||||||
|
|
|
@ -3,15 +3,16 @@
|
||||||
%i.fa.fa-2x.fa-fw.fa-comments
|
%i.fa.fa-2x.fa-fw.fa-comments
|
||||||
.media-body
|
.media-body
|
||||||
.notification__heading
|
.notification__heading
|
||||||
%img.avatar-xs{src: notification.target.user.profile_picture.url(:small)}
|
%img.avatar-xs{ src: notification.target.user.profile_picture.url(:small) }
|
||||||
= user_screen_name notification.target.user
|
= user_screen_name notification.target.user
|
||||||
commented on
|
commented on
|
||||||
- if notification.target.answer.user == current_user
|
- if notification.target.answer.user == current_user
|
||||||
= link_to "your answer", show_user_answer_path(username: notification.target.user.screen_name, id: notification.target.answer.id)
|
= link_to 'your answer', show_user_answer_path(username: notification.target.user.screen_name, id: notification.target.answer.id)
|
||||||
- elsif notification.target.user == notification.target.answer.user
|
- elsif notification.target.user == notification.target.answer.user
|
||||||
= link_to "their answer", show_user_answer_path(username: notification.target.user.screen_name, id: notification.target.answer.id)
|
= link_to 'their answer', show_user_answer_path(username: notification.target.user.screen_name, id: notification.target.answer.id)
|
||||||
- else
|
- else
|
||||||
= link_to "#{notification.target.answer.user.screen_name}'s answer", show_user_answer_path(username: notification.target.user.screen_name, id: notification.target.answer.id)
|
= link_to "#{notification.target.answer.user.screen_name}'s answer",
|
||||||
|
show_user_answer_path(username: notification.target.user.screen_name, id: notification.target.answer.id)
|
||||||
= time_tooltip(notification.target)
|
= time_tooltip(notification.target)
|
||||||
ago
|
ago
|
||||||
.list-group
|
.list-group
|
||||||
|
@ -19,9 +20,9 @@
|
||||||
.media.question-media
|
.media.question-media
|
||||||
.media-body
|
.media-body
|
||||||
%h6.notification__list-heading answer
|
%h6.notification__list-heading answer
|
||||||
= markdown notification.target.answer.content[0..60] + "#{notification.target.answer.content.length > 60 ? '[...]' : ''}"
|
= markdown notification.target.answer.content[0..60] + (notification.target.answer.content.length > 60 ? '[...]' : '')
|
||||||
.list-group-item
|
.list-group-item
|
||||||
.media.question-media
|
.media.question-media
|
||||||
.media-body
|
.media-body
|
||||||
%h6.notification__list-heading comment
|
%h6.notification__list-heading comment
|
||||||
= markdown notification.target.content[0..60] + "#{notification.target.content.length > 60 ? '[...]' : ''}"
|
= markdown notification.target.content[0..60] + (notification.target.content.length > 60 ? '[...]' : '')
|
||||||
|
|
|
@ -3,10 +3,10 @@
|
||||||
%i.fa.fa-2x.fa-fw.fa-smile-o
|
%i.fa.fa-2x.fa-fw.fa-smile-o
|
||||||
.media-body
|
.media-body
|
||||||
.notification__heading
|
.notification__heading
|
||||||
%img.avatar-xs{src: notification.target.user.profile_picture.url(:small)}
|
%img.avatar-xs{ src: notification.target.user.profile_picture.url(:small) }
|
||||||
= user_screen_name notification.target.user
|
= user_screen_name notification.target.user
|
||||||
smiled
|
smiled
|
||||||
= link_to "your comment", show_user_answer_path(username: notification.target.user.screen_name, id: notification.target.comment.answer.id)
|
= link_to 'your comment', show_user_answer_path(username: notification.target.user.screen_name, id: notification.target.comment.answer.id)
|
||||||
= time_tooltip(notification.target)
|
= time_tooltip(notification.target)
|
||||||
ago
|
ago
|
||||||
.list-group
|
.list-group
|
||||||
|
@ -14,4 +14,4 @@
|
||||||
.media.question-media
|
.media.question-media
|
||||||
.media-body
|
.media-body
|
||||||
%h6.notification__list-heading comment
|
%h6.notification__list-heading comment
|
||||||
= markdown notification.target.comment.content[0..60] + "#{notification.target.comment.content.length > 60 ? '[...]' : ''}"
|
= markdown notification.target.comment.content[0..60] + (notification.target.comment.content.length > 60 ? '[...]' : '')
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
.media.notification
|
.media.notification
|
||||||
.notification__icon
|
.notification__icon
|
||||||
%img.avatar-sm{src: notification.target.source.profile_picture.url(:small)}
|
%img.avatar-sm{ src: notification.target.source.profile_picture.url(:small) }
|
||||||
.media-body
|
.media-body
|
||||||
%h6.media-heading.notification__user
|
%h6.media-heading.notification__user
|
||||||
= user_screen_name notification.target.source
|
= user_screen_name notification.target.source
|
||||||
.notification__text
|
.notification__text
|
||||||
= raw t('views.notifications.relationship.body', time: time_ago_in_words(notification.target.created_at))
|
= raw t('views.notifications.relationship.body', time: time_ago_in_words(notification.target.created_at))
|
||||||
|
|
|
@ -3,10 +3,10 @@
|
||||||
%i.fa.fa-2x.fa-fw.fa-smile-o
|
%i.fa.fa-2x.fa-fw.fa-smile-o
|
||||||
.media-body
|
.media-body
|
||||||
.notification__heading
|
.notification__heading
|
||||||
%img.avatar-xs{src: notification.target.user.profile_picture.url(:small)}
|
%img.avatar-xs{ src: notification.target.user.profile_picture.url(:small) }
|
||||||
= user_screen_name notification.target.user
|
= user_screen_name notification.target.user
|
||||||
smiled
|
smiled
|
||||||
= link_to "your answer", show_user_answer_path(username: notification.target.user.screen_name, id: notification.target.answer.id)
|
= link_to 'your answer', show_user_answer_path(username: notification.target.user.screen_name, id: notification.target.answer.id)
|
||||||
= time_tooltip(notification.target)
|
= time_tooltip(notification.target)
|
||||||
ago
|
ago
|
||||||
.list-group
|
.list-group
|
||||||
|
@ -14,4 +14,4 @@
|
||||||
.media.question-media
|
.media.question-media
|
||||||
.media-body
|
.media-body
|
||||||
%h6.notification__list-heading answer
|
%h6.notification__list-heading answer
|
||||||
= markdown notification.target.answer.content[0..60] + "#{notification.target.answer.content.length > 60 ? '[...]' : ''}"
|
= markdown notification.target.answer.content[0..60] + (notification.target.answer.content.length > 60 ? '[...]' : '')
|
||||||
|
|
Loading…
Reference in New Issue