Fix lints in app/views/notifications
This commit is contained in:
parent
df2537a6cf
commit
979bbbd13e
|
@ -1,11 +1,11 @@
|
|||
.card
|
||||
%ul#notifications.list-group
|
||||
- if @notifications.count == 0
|
||||
%ul.list-group#notifications
|
||||
- if @notifications.count.zero?
|
||||
%li.list-group-item.text-center
|
||||
.notifications--none
|
||||
%i.fa.fa-bell-o.notification__bell-icon
|
||||
%p
|
||||
- if params[:type] != "all"
|
||||
- if params[:type] != 'all'
|
||||
No new notifications.
|
||||
- else
|
||||
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]
|
||||
|
||||
- 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
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
%i.fa.fa-2x.fa-fw.fa-exclamation
|
||||
.media-body
|
||||
.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
|
||||
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)
|
||||
ago
|
||||
.list-group
|
||||
|
@ -14,9 +14,9 @@
|
|||
.media.question-media
|
||||
.media-body
|
||||
%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
|
||||
.media.question-media
|
||||
.media-body
|
||||
%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
|
||||
.media-body
|
||||
.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
|
||||
commented on
|
||||
- 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
|
||||
= 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
|
||||
= 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)
|
||||
ago
|
||||
.list-group
|
||||
|
@ -19,9 +20,9 @@
|
|||
.media.question-media
|
||||
.media-body
|
||||
%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
|
||||
.media.question-media
|
||||
.media-body
|
||||
%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
|
||||
.media-body
|
||||
.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
|
||||
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)
|
||||
ago
|
||||
.list-group
|
||||
|
@ -14,4 +14,4 @@
|
|||
.media.question-media
|
||||
.media-body
|
||||
%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
|
||||
.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
|
||||
%h6.media-heading.notification__user
|
||||
= user_screen_name notification.target.source
|
||||
.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
|
||||
.media-body
|
||||
.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
|
||||
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)
|
||||
ago
|
||||
.list-group
|
||||
|
@ -14,4 +14,4 @@
|
|||
.media.question-media
|
||||
.media-body
|
||||
%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